Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
S
ShenghuoquanBusiness
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
bp
ShenghuoquanBusiness
Commits
3af73e63
Commit
3af73e63
authored
Jun 15, 2021
by
yinjiacheng
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update 生活号标签认证类型判断条件
parent
db449be7
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
30 deletions
+8
-30
LifeAccountLabelView.kt
...n/shenghuoquan/newscontent/widget/LifeAccountLabelView.kt
+8
-30
No files found.
Components/newscontent/src/main/java/com/yidian/shenghuoquan/newscontent/widget/LifeAccountLabelView.kt
View file @
3af73e63
...
...
@@ -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_AUT
H
->
{
Constant
.
STATUS_AUTH_FINIS
H
->
{
// 已认证
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_ACCOUN
T_REJECT
->
{
Constant
.
STATUS_AUDI
T_REJECT
->
{
// 审核驳回
setBackgroundResource
(
R
.
drawable
.
shape_life_account_status_reject
)
setTextColor
(
ContextCompat
.
getColor
(
context
,
R
.
color
.
color_FFFF3A3A
))
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment