Commit 3af73e63 authored by yinjiacheng's avatar yinjiacheng

update 生活号标签认证类型判断条件

parent db449be7
......@@ -7,6 +7,7 @@ import androidx.constraintlayout.widget.ConstraintLayout
import androidx.core.content.ContextCompat
import com.yidian.common.XRouterPathConstants
import com.yidian.shenghuoquan.newscontent.R
import com.yidian.shenghuoquan.newscontent.constant.Constant
import com.yidian.shenghuoquan.newscontent.databinding.ViewLifeAccountLabelBinding
import com.yidian.shenghuoquan.newscontent.http.httpbean.LifeAccountItemBean
import com.yidian.shenghuoquan.newscontent.ui.center.MerchantInfoActivity
......@@ -23,29 +24,6 @@ class LifeAccountLabelView @JvmOverloads constructor(
defStyle: Int = 0
) : ConstraintLayout(context, attrs, defStyle), View.OnClickListener {
companion object {
// 未认证
const val STATUS_LIFE_ACCOUNT_NOT_AUTH = 1
// 已认证
const val STATUS_LIFE_ACCOUNT_AUTH = 2
// 审核中
const val STATUS_LIFE_ACCOUNT_AUDIT = 10
// 认证驳回
const val STATUS_LIFE_ACCOUNT_REJECT = 30
// 个人
const val TYPE_LIFE_ACCOUNT_PERSONAL = 1
// 个体工商户
const val TYPE_LIFE_ACCOUNT_INDIVIDUAL_BUSINESS = 2
// 普通企业
const val TYPE_LIFE_ACCOUNT_COMMON_ENTERPRISE = 3
}
private val viewBinding = ViewLifeAccountLabelBinding.bind(
View.inflate(
getContext(),
......@@ -73,32 +51,32 @@ class LifeAccountLabelView @JvmOverloads constructor(
viewBinding.tvLifeAccountName.text = data.life_account_name
viewBinding.tvLifeAccountStatus.apply {
when (data.life_account_auth_status) {
STATUS_LIFE_ACCOUNT_NOT_AUTH -> {
Constant.STATUS_AUTH_NOT -> {
// 未认证
setBackgroundResource(R.drawable.shape_life_account_status_unauth)
setTextColor(ContextCompat.getColor(context, R.color.color_333333))
text = resources.getString(R.string.not_auth)
}
STATUS_LIFE_ACCOUNT_AUTH -> {
Constant.STATUS_AUTH_FINISH -> {
// 已认证
setBackgroundResource(R.drawable.shape_life_account_status_auth)
setTextColor(ContextCompat.getColor(context, R.color.color_FF1852F1))
text = when (data.life_account_type) {
TYPE_LIFE_ACCOUNT_INDIVIDUAL_BUSINESS -> resources.getString(R.string.individual_business)
TYPE_LIFE_ACCOUNT_COMMON_ENTERPRISE -> resources.getString(R.string.common_enterprise)
TYPE_LIFE_ACCOUNT_PERSONAL -> resources.getString(R.string.personal_auth)
Constant.TYPE_AUTH_INDIVIDUAL_BUSINESS -> resources.getString(R.string.individual_business)
Constant.TYPE_AUTH_COMMON_ENTERPRISE -> resources.getString(R.string.common_enterprise)
Constant.TYPE_AUTH_PERSONAL -> resources.getString(R.string.personal_auth)
else -> ""
}
}
}
when (data.enterprise_audit_status) {
STATUS_LIFE_ACCOUNT_AUDIT -> {
Constant.STATUS_AUDIT_UNDER -> {
// 审核中
setBackgroundResource(R.drawable.shape_life_account_status_audit)
setTextColor(ContextCompat.getColor(context, R.color.color_FFF26E3D))
text = resources.getString(R.string.under_audit)
}
STATUS_LIFE_ACCOUNT_REJECT -> {
Constant.STATUS_AUDIT_REJECT -> {
// 审核驳回
setBackgroundResource(R.drawable.shape_life_account_status_reject)
setTextColor(ContextCompat.getColor(context, R.color.color_FFFF3A3A))
......
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