Commit 7545acd3 authored by yinjiacheng's avatar yinjiacheng

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

parent bfad23a5
......@@ -93,10 +93,6 @@ class MerchantCenterActivity : BaseActivity<ActivityMerchantCenterBinding>(),
// 本期需求无资产功能 仅做UI展示
viewBind.avMerchantAsset.setMerchantAssetData("8856.88", "675.00")
// todo 测试代码
viewBind.avMerchantAsset.setOnClickListener {
XPageManager.push(XRouterPathConstants.PERSONAL_MY_STAFF, null)
}
}
private fun initListener() {
......@@ -324,78 +320,79 @@ class MerchantCenterActivity : BaseActivity<ActivityMerchantCenterBinding>(),
functionPageMap[data.function_id]?.let { XPageManager.push(it, null) }
} else {
// 若当前功能无权限 根据生活号类型做弹窗提示
when (curLifeAccount.tag.tag_key) {
Constant.LIFE_ACCOUNT_TAG_PERSONAL_AUTH -> {
// 个人认证 提示认证升级
HintDialog(
this,
resources.getString(R.string.upgrade_to_use_more_tool),
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(
this@MerchantCenterActivity,
hashMapOf(Pair(LifeAccountEnterpriseAuthActivity.EXTRA_LIFE_ACCOUNT_ID, curLifeAccount.life_account_id))
)
}
}).setRightBtnColor(ContextCompat.getColor(this, R.color.color_FF1852F1)).show()
}
Constant.LIFE_ACCOUNT_TAG_NOT_AUTH -> {
// 未认证 提示认证
HintDialog(
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 {
override fun onLeftOption() {
}
override fun onRightOption() {
// 进行认证
XPageManager.push(
XRouterPathConstants.LIFE_ACCOUNT_AUTH,
hashMapOf(Pair(LifeAccountAuthActivity.EXTRA_PAGE_FROM, LifeAccountAuthActivity.FROM_AUTH))
)
}
}).setRightBtnColor(ContextCompat.getColor(this, R.color.color_FF1852F1)).show()
}
Constant.LIFE_ACCOUNT_TAG_AUDIT_UNDER -> {
// 审核中 提示加急审核
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(
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 {
override fun onLeftOption() {
}
override fun onRightOption() {
// 认证修改 请求商户认证检查
ApiService.authMerchantCheck(
this@MerchantCenterActivity,
hashMapOf(Pair(LifeAccountEnterpriseAuthActivity.EXTRA_LIFE_ACCOUNT_ID, curLifeAccount.life_account_id))
)
}
}).setRightBtnColor(ContextCompat.getColor(this, R.color.color_FFFF3A3A)).show()
}
if (curLifeAccount.enterprise_audit_status == Constant.STATUS_AUDIT_UNDER) {
// 审核中 提示加急审核
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()
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 {
override fun onLeftOption() {
}
override fun onRightOption() {
// 认证修改 请求商户认证检查
ApiService.authMerchantCheck(
this@MerchantCenterActivity,
hashMapOf(Pair(LifeAccountEnterpriseAuthActivity.EXTRA_LIFE_ACCOUNT_ID, curLifeAccount.life_account_id))
)
}
}).setRightBtnColor(ContextCompat.getColor(this, R.color.color_FFFF3A3A)).show()
return
}
if (curLifeAccount.life_account_type == Constant.TYPE_LIFE_ACCOUNT_PERSONAL && curLifeAccount.life_account_auth_status == Constant.STATUS_AUTH_NOT) {
// 未认证 提示认证 此处企业审核中也满足此条件但前面审核状态判断已拦截
HintDialog(
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 {
override fun onLeftOption() {
}
override fun onRightOption() {
// 进行认证
XPageManager.push(
XRouterPathConstants.LIFE_ACCOUNT_AUTH,
hashMapOf(Pair(LifeAccountAuthActivity.EXTRA_PAGE_FROM, LifeAccountAuthActivity.FROM_AUTH))
)
}
}).setRightBtnColor(ContextCompat.getColor(this, R.color.color_FF1852F1)).show()
return
}
if (curLifeAccount.life_account_type == Constant.TYPE_LIFE_ACCOUNT_PERSONAL) {
// 个人认证 提示认证升级
HintDialog(
this,
resources.getString(R.string.upgrade_to_use_more_tool),
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(
this@MerchantCenterActivity,
hashMapOf(Pair(LifeAccountEnterpriseAuthActivity.EXTRA_LIFE_ACCOUNT_ID, curLifeAccount.life_account_id))
)
}
}).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