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,30 +320,39 @@ class MerchantCenterActivity : BaseActivity<ActivityMerchantCenterBinding>(), ...@@ -324,30 +320,39 @@ 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.upgrade_to_use_more_tool), resources.getString(R.string.audit_urgent),
arrayListOf(HintOptionBean(resources.getString(R.string.close)), HintOptionBean(resources.getString(R.string.goto_upgrade))), arrayListOf(HintOptionBean(resources.getString(R.string.close))), null
).setRightBtnColor(ContextCompat.getColor(this, R.color.color_FF1852F1)).show()
return
}
if (curLifeAccount.enterprise_audit_status == Constant.STATUS_AUDIT_REJECT) {
// 审核驳回 提示修改认证
HintDialog(
this,
resources.getString(R.string.auth_apply_reject),
arrayListOf(HintOptionBean(resources.getString(R.string.close)), HintOptionBean(resources.getString(R.string.modify_auth))),
object : HintDialog.OnHintOptionCallback { object : HintDialog.OnHintOptionCallback {
override fun onLeftOption() { override fun onLeftOption() {
} }
override fun onRightOption() { override fun onRightOption() {
// 认证升级 请求商户认证检查 // 认证修改 请求商户认证检查
ApiService.authMerchantCheck( ApiService.authMerchantCheck(
this@MerchantCenterActivity, this@MerchantCenterActivity,
hashMapOf(Pair(LifeAccountEnterpriseAuthActivity.EXTRA_LIFE_ACCOUNT_ID, curLifeAccount.life_account_id)) hashMapOf(Pair(LifeAccountEnterpriseAuthActivity.EXTRA_LIFE_ACCOUNT_ID, curLifeAccount.life_account_id))
) )
} }
}).setRightBtnColor(ContextCompat.getColor(this, R.color.color_FF1852F1)).show() }).setRightBtnColor(ContextCompat.getColor(this, R.color.color_FFFF3A3A)).show()
return
} }
Constant.LIFE_ACCOUNT_TAG_NOT_AUTH -> { if (curLifeAccount.life_account_type == Constant.TYPE_LIFE_ACCOUNT_PERSONAL && curLifeAccount.life_account_auth_status == Constant.STATUS_AUTH_NOT) {
// 未认证 提示认证 // 未认证 提示认证 此处企业审核中也满足此条件但前面审核状态判断已拦截
HintDialog( HintDialog(
this, this,
resources.getString(R.string.auth_to_use_more_tool), resources.getString(R.string.auth_to_use_more_tool),
...@@ -366,36 +371,28 @@ class MerchantCenterActivity : BaseActivity<ActivityMerchantCenterBinding>(), ...@@ -366,36 +371,28 @@ class MerchantCenterActivity : BaseActivity<ActivityMerchantCenterBinding>(),
} }
}).setRightBtnColor(ContextCompat.getColor(this, R.color.color_FF1852F1)).show() }).setRightBtnColor(ContextCompat.getColor(this, R.color.color_FF1852F1)).show()
return
} }
Constant.LIFE_ACCOUNT_TAG_AUDIT_UNDER -> { if (curLifeAccount.life_account_type == Constant.TYPE_LIFE_ACCOUNT_PERSONAL) {
// 审核中 提示加急审核 // 个人认证 提示认证升级
HintDialog(
this,
resources.getString(R.string.audit_urgent),
arrayListOf(HintOptionBean(resources.getString(R.string.close))), null
).setRightBtnColor(ContextCompat.getColor(this, R.color.color_FF1852F1)).show()
}
Constant.LIFE_ACCOUNT_TAG_AUTH_REJECT -> {
// 审核驳回 提示修改认证
HintDialog( HintDialog(
this, this,
resources.getString(R.string.auth_apply_reject), resources.getString(R.string.upgrade_to_use_more_tool),
arrayListOf(HintOptionBean(resources.getString(R.string.close)), HintOptionBean(resources.getString(R.string.modify_auth))), arrayListOf(HintOptionBean(resources.getString(R.string.close)), HintOptionBean(resources.getString(R.string.goto_upgrade))),
object : HintDialog.OnHintOptionCallback { object : HintDialog.OnHintOptionCallback {
override fun onLeftOption() { override fun onLeftOption() {
} }
override fun onRightOption() { override fun onRightOption() {
// 认证修改 请求商户认证检查 // 认证升级 请求商户认证检查
ApiService.authMerchantCheck( ApiService.authMerchantCheck(
this@MerchantCenterActivity, this@MerchantCenterActivity,
hashMapOf(Pair(LifeAccountEnterpriseAuthActivity.EXTRA_LIFE_ACCOUNT_ID, curLifeAccount.life_account_id)) 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