Commit 7545acd3 authored by yinjiacheng's avatar yinjiacheng

update 商户管理中心功能入口校验权限

parent bfad23a5
...@@ -93,10 +93,6 @@ class MerchantCenterActivity : BaseActivity<ActivityMerchantCenterBinding>(), ...@@ -93,10 +93,6 @@ class MerchantCenterActivity : BaseActivity<ActivityMerchantCenterBinding>(),
// 本期需求无资产功能 仅做UI展示 // 本期需求无资产功能 仅做UI展示
viewBind.avMerchantAsset.setMerchantAssetData("8856.88", "675.00") viewBind.avMerchantAsset.setMerchantAssetData("8856.88", "675.00")
// todo 测试代码
viewBind.avMerchantAsset.setOnClickListener {
XPageManager.push(XRouterPathConstants.PERSONAL_MY_STAFF, null)
}
} }
private fun initListener() { private fun initListener() {
...@@ -324,78 +320,79 @@ class MerchantCenterActivity : BaseActivity<ActivityMerchantCenterBinding>(), ...@@ -324,78 +320,79 @@ class MerchantCenterActivity : BaseActivity<ActivityMerchantCenterBinding>(),
functionPageMap[data.function_id]?.let { XPageManager.push(it, null) } functionPageMap[data.function_id]?.let { XPageManager.push(it, null) }
} else { } else {
// 若当前功能无权限 根据生活号类型做弹窗提示 // 若当前功能无权限 根据生活号类型做弹窗提示
when (curLifeAccount.tag.tag_key) { if (curLifeAccount.enterprise_audit_status == Constant.STATUS_AUDIT_UNDER) {
Constant.LIFE_ACCOUNT_TAG_PERSONAL_AUTH -> { // 审核中 提示加急审核
// 个人认证 提示认证升级 HintDialog(
HintDialog( this,
this, resources.getString(R.string.audit_urgent),
resources.getString(R.string.upgrade_to_use_more_tool), arrayListOf(HintOptionBean(resources.getString(R.string.close))), null
arrayListOf(HintOptionBean(resources.getString(R.string.close)), HintOptionBean(resources.getString(R.string.goto_upgrade))), ).setRightBtnColor(ContextCompat.getColor(this, R.color.color_FF1852F1)).show()
object : HintDialog.OnHintOptionCallback { return
override fun onLeftOption() { }
if (curLifeAccount.enterprise_audit_status == Constant.STATUS_AUDIT_REJECT) {
} // 审核驳回 提示修改认证
HintDialog(
override fun onRightOption() { this,
// 认证升级 请求商户认证检查 resources.getString(R.string.auth_apply_reject),
ApiService.authMerchantCheck( arrayListOf(HintOptionBean(resources.getString(R.string.close)), HintOptionBean(resources.getString(R.string.modify_auth))),
this@MerchantCenterActivity, object : HintDialog.OnHintOptionCallback {
hashMapOf(Pair(LifeAccountEnterpriseAuthActivity.EXTRA_LIFE_ACCOUNT_ID, curLifeAccount.life_account_id)) override fun onLeftOption() {
)
} }
}).setRightBtnColor(ContextCompat.getColor(this, R.color.color_FF1852F1)).show() override fun onRightOption() {
} // 认证修改 请求商户认证检查
Constant.LIFE_ACCOUNT_TAG_NOT_AUTH -> { ApiService.authMerchantCheck(
// 未认证 提示认证 this@MerchantCenterActivity,
HintDialog( hashMapOf(Pair(LifeAccountEnterpriseAuthActivity.EXTRA_LIFE_ACCOUNT_ID, curLifeAccount.life_account_id))
this, )
resources.getString(R.string.auth_to_use_more_tool), }
arrayListOf(HintOptionBean(resources.getString(R.string.close)), HintOptionBean(resources.getString(R.string.goto_auth))),
object : HintDialog.OnHintOptionCallback { }).setRightBtnColor(ContextCompat.getColor(this, R.color.color_FFFF3A3A)).show()
override fun onLeftOption() { return
}
} if (curLifeAccount.life_account_type == Constant.TYPE_LIFE_ACCOUNT_PERSONAL && curLifeAccount.life_account_auth_status == Constant.STATUS_AUTH_NOT) {
// 未认证 提示认证 此处企业审核中也满足此条件但前面审核状态判断已拦截
override fun onRightOption() { HintDialog(
// 进行认证 this,
XPageManager.push( resources.getString(R.string.auth_to_use_more_tool),
XRouterPathConstants.LIFE_ACCOUNT_AUTH, arrayListOf(HintOptionBean(resources.getString(R.string.close)), HintOptionBean(resources.getString(R.string.goto_auth))),
hashMapOf(Pair(LifeAccountAuthActivity.EXTRA_PAGE_FROM, LifeAccountAuthActivity.FROM_AUTH)) object : HintDialog.OnHintOptionCallback {
) override fun onLeftOption() {
}
}
}).setRightBtnColor(ContextCompat.getColor(this, R.color.color_FF1852F1)).show()
} override fun onRightOption() {
Constant.LIFE_ACCOUNT_TAG_AUDIT_UNDER -> { // 进行认证
// 审核中 提示加急审核 XPageManager.push(
HintDialog( XRouterPathConstants.LIFE_ACCOUNT_AUTH,
this, hashMapOf(Pair(LifeAccountAuthActivity.EXTRA_PAGE_FROM, LifeAccountAuthActivity.FROM_AUTH))
resources.getString(R.string.audit_urgent), )
arrayListOf(HintOptionBean(resources.getString(R.string.close))), null }
).setRightBtnColor(ContextCompat.getColor(this, R.color.color_FF1852F1)).show()
} }).setRightBtnColor(ContextCompat.getColor(this, R.color.color_FF1852F1)).show()
Constant.LIFE_ACCOUNT_TAG_AUTH_REJECT -> { return
// 审核驳回 提示修改认证 }
HintDialog( if (curLifeAccount.life_account_type == Constant.TYPE_LIFE_ACCOUNT_PERSONAL) {
this, // 个人认证 提示认证升级
resources.getString(R.string.auth_apply_reject), HintDialog(
arrayListOf(HintOptionBean(resources.getString(R.string.close)), HintOptionBean(resources.getString(R.string.modify_auth))), this,
object : HintDialog.OnHintOptionCallback { resources.getString(R.string.upgrade_to_use_more_tool),
override fun onLeftOption() { arrayListOf(HintOptionBean(resources.getString(R.string.close)), HintOptionBean(resources.getString(R.string.goto_upgrade))),
object : HintDialog.OnHintOptionCallback {
} override fun onLeftOption() {
override fun onRightOption() { }
// 认证修改 请求商户认证检查
ApiService.authMerchantCheck( override fun onRightOption() {
this@MerchantCenterActivity, // 认证升级 请求商户认证检查
hashMapOf(Pair(LifeAccountEnterpriseAuthActivity.EXTRA_LIFE_ACCOUNT_ID, curLifeAccount.life_account_id)) ApiService.authMerchantCheck(
) this@MerchantCenterActivity,
} hashMapOf(Pair(LifeAccountEnterpriseAuthActivity.EXTRA_LIFE_ACCOUNT_ID, curLifeAccount.life_account_id))
)
}).setRightBtnColor(ContextCompat.getColor(this, R.color.color_FFFF3A3A)).show() }
}
}).setRightBtnColor(ContextCompat.getColor(this, R.color.color_FF1852F1)).show()
} }
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment