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
4fe0cae2
Commit
4fe0cae2
authored
Jun 23, 2021
by
yinjiacheng
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix SHQBD-179 个人认证完成页、个人认证信息页中"个人小店"修改为显示生活号名称,证件号码和手机号脱敏处理
parent
f7515ae7
Changes
10
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
159 additions
and
190 deletions
+159
-190
AuthEnterpriseLegalIdentityCommitBean.kt
...nt/http/httpbean/AuthEnterpriseLegalIdentityCommitBean.kt
+19
-19
AuthIndividualBusinessCompleteBean.kt
...ntent/http/httpbean/AuthIndividualBusinessCompleteBean.kt
+3
-3
AuthPersonalCompleteBean.kt
...uan/newscontent/http/httpbean/AuthPersonalCompleteBean.kt
+12
-3
LifeAccountEnterpriseAuthActivity.kt
.../newscontent/ui/auth/LifeAccountEnterpriseAuthActivity.kt
+10
-40
LifeAccountEnterpriseAuthCompleteActivity.kt
...tent/ui/auth/LifeAccountEnterpriseAuthCompleteActivity.kt
+2
-3
LifeAccountPersonalAuthActivity.kt
...an/newscontent/ui/auth/LifeAccountPersonalAuthActivity.kt
+19
-24
LifeAccountPersonalAuthCompleteActivity.kt
...ontent/ui/auth/LifeAccountPersonalAuthCompleteActivity.kt
+2
-0
MerchantAuthInfoActivity.kt
...huoquan/newscontent/ui/center/MerchantAuthInfoActivity.kt
+61
-60
SensitiveInfoUtil.kt
...idian/shenghuoquan/newscontent/utils/SensitiveInfoUtil.kt
+2
-12
LifeAccountPersonalAuthInfoView.kt
...uan/newscontent/widget/LifeAccountPersonalAuthInfoView.kt
+29
-26
No files found.
Components/newscontent/src/main/java/com/yidian/shenghuoquan/newscontent/http/httpbean/AuthEnterpriseLegalIdentityCommitBean.kt
View file @
4fe0cae2
...
@@ -7,24 +7,24 @@ package com.yidian.shenghuoquan.newscontent.http.httpbean
...
@@ -7,24 +7,24 @@ package com.yidian.shenghuoquan.newscontent.http.httpbean
*/
*/
class
AuthEnterpriseLegalIdentityCommitBean
{
class
AuthEnterpriseLegalIdentityCommitBean
{
data class
Request
(
data class
Request
(
val
record_id
:
Long
,
val
record_id
:
Long
,
val
front_img
:
String
,
val
front_img
:
String
,
val
bak_img
:
String
,
val
bak_img
:
String
,
val
front_completeness
:
Int
,
val
front_completeness
:
Int
,
val
bak_completeness
:
Int
,
val
bak_completeness
:
Int
,
val
idcard_number
:
String
,
val
idcard_number
:
String
,
val
gender
:
String
?,
val
gender
:
String
?,
val
name
:
String
,
val
name
:
String
,
val
address
:
String
?,
val
address
:
String
?,
val
nationality
:
String
?,
val
nationality
:
String
?,
val
valid_date_start
:
String
?,
val
valid_date_start
:
String
?,
val
valid_date_end
:
String
?,
val
valid_date_end
:
String
?,
val
issued_by
:
String
?,
val
issued_by
:
String
?,
val
life_account_id
:
Long
?,
val
life_account_id
:
Long
?,
val
mobile
:
String
,
val
mobile
:
String
,
)
)
data class
Response
(
val
life_account_i
d
:
String
)
data class
Response
(
val
life_account_id
:
String
,
val
name
:
String
,
val
code
:
String
,
val
legal_person
:
String
,
val
legal_id_car
d
:
String
)
}
}
\ No newline at end of file
Components/newscontent/src/main/java/com/yidian/shenghuoquan/newscontent/http/httpbean/AuthIndividualBusinessCompleteBean.kt
View file @
4fe0cae2
...
@@ -7,8 +7,8 @@ package com.yidian.shenghuoquan.newscontent.http.httpbean
...
@@ -7,8 +7,8 @@ package com.yidian.shenghuoquan.newscontent.http.httpbean
*/
*/
class
AuthIndividualBusinessCompleteBean
{
class
AuthIndividualBusinessCompleteBean
{
data class
Request
(
val
record_id
:
Long
)
data class
Request
(
val
record_id
:
Long
)
data class
Response
(
val
life_account_i
d
:
String
)
data class
Response
(
val
life_account_id
:
String
,
val
name
:
String
,
val
code
:
String
,
val
legal_person
:
String
,
val
legal_id_car
d
:
String
)
}
}
\ No newline at end of file
Components/newscontent/src/main/java/com/yidian/shenghuoquan/newscontent/http/httpbean/AuthPersonalCompleteBean.kt
View file @
4fe0cae2
...
@@ -6,6 +6,15 @@ package com.yidian.shenghuoquan.newscontent.http.httpbean
...
@@ -6,6 +6,15 @@ package com.yidian.shenghuoquan.newscontent.http.httpbean
* description: API /merchant/auth/complete
* description: API /merchant/auth/complete
*/
*/
class
AuthPersonalCompleteBean
(
val
request
:
Request
)
{
class
AuthPersonalCompleteBean
(
val
request
:
Request
)
{
data class
Request
(
val
mobile
:
String
,
val
life_account_id
:
Long
?)
data class
Response
(
val
life_account_id
:
String
)
data class
Request
(
val
mobile
:
String
,
val
life_account_id
:
Long
?)
}
\ No newline at end of file
data class
Response
(
val
life_account_id
:
String
,
val
occupation
:
String
,
val
full_name
:
String
,
val
id_card
:
String
,
val
life_account_name
:
String
)
}
Components/newscontent/src/main/java/com/yidian/shenghuoquan/newscontent/ui/auth/LifeAccountEnterpriseAuthActivity.kt
View file @
4fe0cae2
...
@@ -305,26 +305,11 @@ class LifeAccountEnterpriseAuthActivity : BaseActivity<ActivityLifeAccountEnterp
...
@@ -305,26 +305,11 @@ class LifeAccountEnterpriseAuthActivity : BaseActivity<ActivityLifeAccountEnterp
XPageManager
.
push
(
XPageManager
.
push
(
XRouterPathConstants
.
LIFE_ACCOUNT_ENTERPRISE_AUTH_COMPLETE
,
XRouterPathConstants
.
LIFE_ACCOUNT_ENTERPRISE_AUTH_COMPLETE
,
hashMapOf
(
hashMapOf
(
Pair
(
Pair
(
LifeAccountEnterpriseAuthCompleteActivity
.
REGISTRATION_NAME
,
result
?.
name
),
LifeAccountEnterpriseAuthCompleteActivity
.
REGISTRATION_NAME
,
Pair
(
LifeAccountEnterpriseAuthCompleteActivity
.
REGISTRATION_CODE
,
result
?.
code
),
LifeAccountAuthDataManager
.
merchantAuthData
.
registrationName
Pair
(
LifeAccountEnterpriseAuthCompleteActivity
.
ID_CARD_NAME
,
result
?.
legal_person
),
),
Pair
(
LifeAccountEnterpriseAuthCompleteActivity
.
ID_CARD_NUM
,
result
?.
legal_id_card
),
Pair
(
Pair
(
LifeAccountEnterpriseAuthCompleteActivity
.
EXTRA_LIFE_ACCOUNT_ID
,
result
?.
life_account_id
),
LifeAccountEnterpriseAuthCompleteActivity
.
REGISTRATION_CODE
,
LifeAccountAuthDataManager
.
merchantAuthData
.
registrationCode
),
Pair
(
LifeAccountEnterpriseAuthCompleteActivity
.
ID_CARD_NAME
,
LifeAccountAuthDataManager
.
personalAuthData
.
realName
),
Pair
(
LifeAccountEnterpriseAuthCompleteActivity
.
ID_CARD_NUM
,
LifeAccountAuthDataManager
.
personalAuthData
.
idCardNum
),
Pair
(
LifeAccountEnterpriseAuthCompleteActivity
.
EXTRA_LIFE_ACCOUNT_ID
,
result
?.
life_account_id
),
Pair
(
LifeAccountEnterpriseAuthCompleteActivity
.
EXTRA_IS_AUTH_MODIFY
,
isAuthModify
)
Pair
(
LifeAccountEnterpriseAuthCompleteActivity
.
EXTRA_IS_AUTH_MODIFY
,
isAuthModify
)
)
)
)
)
...
@@ -342,26 +327,11 @@ class LifeAccountEnterpriseAuthActivity : BaseActivity<ActivityLifeAccountEnterp
...
@@ -342,26 +327,11 @@ class LifeAccountEnterpriseAuthActivity : BaseActivity<ActivityLifeAccountEnterp
XPageManager
.
push
(
XPageManager
.
push
(
XRouterPathConstants
.
LIFE_ACCOUNT_ENTERPRISE_AUTH_COMPLETE
,
XRouterPathConstants
.
LIFE_ACCOUNT_ENTERPRISE_AUTH_COMPLETE
,
hashMapOf
(
hashMapOf
(
Pair
(
Pair
(
LifeAccountEnterpriseAuthCompleteActivity
.
REGISTRATION_NAME
,
result
?.
name
),
LifeAccountEnterpriseAuthCompleteActivity
.
REGISTRATION_NAME
,
Pair
(
LifeAccountEnterpriseAuthCompleteActivity
.
REGISTRATION_CODE
,
result
?.
code
),
LifeAccountAuthDataManager
.
merchantAuthData
.
registrationName
Pair
(
LifeAccountEnterpriseAuthCompleteActivity
.
ID_CARD_NAME
,
result
?.
legal_person
),
),
Pair
(
LifeAccountEnterpriseAuthCompleteActivity
.
ID_CARD_NUM
,
result
?.
legal_id_card
),
Pair
(
Pair
(
LifeAccountEnterpriseAuthCompleteActivity
.
EXTRA_LIFE_ACCOUNT_ID
,
result
?.
life_account_id
),
LifeAccountEnterpriseAuthCompleteActivity
.
REGISTRATION_CODE
,
LifeAccountAuthDataManager
.
merchantAuthData
.
registrationCode
),
Pair
(
LifeAccountEnterpriseAuthCompleteActivity
.
ID_CARD_NAME
,
LifeAccountAuthDataManager
.
personalAuthData
.
realName
),
Pair
(
LifeAccountEnterpriseAuthCompleteActivity
.
ID_CARD_NUM
,
LifeAccountAuthDataManager
.
personalAuthData
.
idCardNum
),
Pair
(
LifeAccountEnterpriseAuthCompleteActivity
.
EXTRA_LIFE_ACCOUNT_ID
,
result
?.
life_account_id
),
Pair
(
LifeAccountEnterpriseAuthCompleteActivity
.
EXTRA_IS_AUTH_MODIFY
,
isAuthModify
)
Pair
(
LifeAccountEnterpriseAuthCompleteActivity
.
EXTRA_IS_AUTH_MODIFY
,
isAuthModify
)
)
)
)
)
...
...
Components/newscontent/src/main/java/com/yidian/shenghuoquan/newscontent/ui/auth/LifeAccountEnterpriseAuthCompleteActivity.kt
View file @
4fe0cae2
...
@@ -66,10 +66,9 @@ class LifeAccountEnterpriseAuthCompleteActivity :
...
@@ -66,10 +66,9 @@ class LifeAccountEnterpriseAuthCompleteActivity :
-
1
,
-
1
,
-
1
,
-
1
,
params
?.
get
(
REGISTRATION_NAME
)
?.
let
{
it
as
String
},
params
?.
get
(
REGISTRATION_NAME
)
?.
let
{
it
as
String
},
params
?.
get
(
REGISTRATION_CODE
)
params
?.
get
(
REGISTRATION_CODE
)
?.
let
{
it
as
String
},
?.
let
{
it
as
String
},
params
?.
get
(
ID_CARD_NAME
)
?.
let
{
it
as
String
},
params
?.
get
(
ID_CARD_NAME
)
?.
let
{
it
as
String
},
SensitiveInfoUtil
.
idCardNumEncrypt
(
params
?.
get
(
ID_CARD_NUM
)
?.
let
{
it
as
String
}
?:
""
)
params
?.
get
(
ID_CARD_NUM
)
?.
let
{
it
as
String
}
)
)
}
}
...
...
Components/newscontent/src/main/java/com/yidian/shenghuoquan/newscontent/ui/auth/LifeAccountPersonalAuthActivity.kt
View file @
4fe0cae2
package
com.yidian.shenghuoquan.newscontent.ui.auth
package
com.yidian.shenghuoquan.newscontent.ui.auth
import
android.os.Bundle
import
android.os.Bundle
import
android.util.Log
import
android.view.View
import
android.view.View
import
android.widget.CompoundButton
import
android.widget.CompoundButton
import
com.orhanobut.hawk.Hawk
import
com.orhanobut.hawk.Hawk
...
@@ -11,7 +10,6 @@ import com.yidian.common.XEventConfig
...
@@ -11,7 +10,6 @@ import com.yidian.common.XEventConfig
import
com.yidian.common.XRouterPathConstants
import
com.yidian.common.XRouterPathConstants
import
com.yidian.common.base.BaseActivity
import
com.yidian.common.base.BaseActivity
import
com.yidian.shenghuoquan.newscontent.R
import
com.yidian.shenghuoquan.newscontent.R
import
com.yidian.shenghuoquan.newscontent.constant.Constant
import
com.yidian.shenghuoquan.newscontent.databinding.ActivityLifeAccountPersonalAuthBinding
import
com.yidian.shenghuoquan.newscontent.databinding.ActivityLifeAccountPersonalAuthBinding
import
com.yidian.shenghuoquan.newscontent.http.ApiService
import
com.yidian.shenghuoquan.newscontent.http.ApiService
import
com.yidian.shenghuoquan.newscontent.http.callback.IAuthPersonalCompleteCallback
import
com.yidian.shenghuoquan.newscontent.http.callback.IAuthPersonalCompleteCallback
...
@@ -37,6 +35,7 @@ class LifeAccountPersonalAuthActivity :
...
@@ -37,6 +35,7 @@ class LifeAccountPersonalAuthActivity :
companion
object
{
companion
object
{
// 认证数据
// 认证数据
const
val
EXTRA_AUTH_DATA
=
"authData"
const
val
EXTRA_AUTH_DATA
=
"authData"
const
val
EXTRA_LIFE_ACCOUNT_ID
=
"life_account_id"
}
}
/**
/**
...
@@ -55,6 +54,17 @@ class LifeAccountPersonalAuthActivity :
...
@@ -55,6 +54,17 @@ class LifeAccountPersonalAuthActivity :
}
}
}
}
/**
* 个人未认证的生活号升级传入
*/
private
val
lifeAccountId
by
lazy
{
intent
.
getSerializableExtra
(
XRouterPathConstants
.
ParamsKey
)
?.
let
{
params
->
(
params
as
HashMap
<*,
*>)[
EXTRA_LIFE_ACCOUNT_ID
]
?.
let
{
it
as
String
}
}
}
override
fun
createViewBinding
():
ActivityLifeAccountPersonalAuthBinding
{
override
fun
createViewBinding
():
ActivityLifeAccountPersonalAuthBinding
{
return
ActivityLifeAccountPersonalAuthBinding
.
inflate
(
layoutInflater
)
return
ActivityLifeAccountPersonalAuthBinding
.
inflate
(
layoutInflater
)
}
}
...
@@ -123,9 +133,8 @@ class LifeAccountPersonalAuthActivity :
...
@@ -123,9 +133,8 @@ class LifeAccountPersonalAuthActivity :
XPageManager
.
push
(
XRouterPathConstants
.
CHOOSE_CAREER
,
null
)
XPageManager
.
push
(
XRouterPathConstants
.
CHOOSE_CAREER
,
null
)
}
}
R
.
id
.
btn_next
->
{
R
.
id
.
btn_next
->
{
// TODO: 6/21/21 未认证生活号进行个人认证 传参life_account_id
// 个人认证 完成认证
// 个人认证 完成认证
ApiService
.
authComplete
(
this
,
hashMapOf
())
ApiService
.
authComplete
(
this
,
lifeAccountId
?.
let
{
hashMapOf
(
Pair
(
EXTRA_LIFE_ACCOUNT_ID
,
it
))
}
?:
hashMapOf
())
}
}
R
.
id
.
tv_privacy_certification
->
{
R
.
id
.
tv_privacy_certification
->
{
...
@@ -155,26 +164,12 @@ class LifeAccountPersonalAuthActivity :
...
@@ -155,26 +164,12 @@ class LifeAccountPersonalAuthActivity :
XPageManager
.
push
(
XPageManager
.
push
(
XRouterPathConstants
.
LIFE_ACCOUNT_PERSONAL_AUTH_COMPLETE
,
XRouterPathConstants
.
LIFE_ACCOUNT_PERSONAL_AUTH_COMPLETE
,
hashMapOf
(
hashMapOf
(
Pair
(
Pair
(
LifeAccountPersonalAuthCompleteActivity
.
OCCUPATION
,
result
?.
occupation
),
LifeAccountPersonalAuthCompleteActivity
.
OCCUPATION
,
Pair
(
LifeAccountPersonalAuthCompleteActivity
.
PHONE_NUM
,
Hawk
.
get
(
HawkConfig
.
Mobile
,
""
)),
LifeAccountAuthDataManager
.
personalAuthData
.
occupation
Pair
(
LifeAccountPersonalAuthCompleteActivity
.
REAL_NAME
,
result
?.
full_name
),
),
Pair
(
LifeAccountPersonalAuthCompleteActivity
.
ID_CARD_NUM
,
result
?.
id_card
),
Pair
(
Pair
(
LifeAccountPersonalAuthCompleteActivity
.
EXTRA_LIFE_ACCOUNT_ID
,
result
?.
life_account_id
),
LifeAccountPersonalAuthCompleteActivity
.
PHONE_NUM
,
Pair
(
LifeAccountPersonalAuthCompleteActivity
.
LIFE_ACCOUNT_NAME
,
result
?.
life_account_name
)
Hawk
.
get
(
HawkConfig
.
Mobile
,
""
)
),
Pair
(
LifeAccountPersonalAuthCompleteActivity
.
REAL_NAME
,
LifeAccountAuthDataManager
.
personalAuthData
.
realName
),
Pair
(
LifeAccountPersonalAuthCompleteActivity
.
ID_CARD_NUM
,
LifeAccountAuthDataManager
.
personalAuthData
.
idCardNum
),
Pair
(
LifeAccountPersonalAuthCompleteActivity
.
EXTRA_LIFE_ACCOUNT_ID
,
result
?.
life_account_id
)
)
)
)
)
XPageManager
.
pop
(
null
)
XPageManager
.
pop
(
null
)
...
...
Components/newscontent/src/main/java/com/yidian/shenghuoquan/newscontent/ui/auth/LifeAccountPersonalAuthCompleteActivity.kt
View file @
4fe0cae2
...
@@ -21,6 +21,7 @@ class LifeAccountPersonalAuthCompleteActivity :
...
@@ -21,6 +21,7 @@ class LifeAccountPersonalAuthCompleteActivity :
BaseActivity
<
ActivityLifeAccountPersonalAuthCompleteBinding
>(),
IGetLifeAccountListCallback
,
View
.
OnClickListener
{
BaseActivity
<
ActivityLifeAccountPersonalAuthCompleteBinding
>(),
IGetLifeAccountListCallback
,
View
.
OnClickListener
{
companion
object
{
companion
object
{
const
val
LIFE_ACCOUNT_NAME
=
"lifeAccountName"
const
val
OCCUPATION
=
"occupation"
const
val
OCCUPATION
=
"occupation"
const
val
REAL_NAME
=
"realName"
const
val
REAL_NAME
=
"realName"
const
val
ID_CARD_NUM
=
"idCardNum"
const
val
ID_CARD_NUM
=
"idCardNum"
...
@@ -58,6 +59,7 @@ class LifeAccountPersonalAuthCompleteActivity :
...
@@ -58,6 +59,7 @@ class LifeAccountPersonalAuthCompleteActivity :
private
fun
initData
()
{
private
fun
initData
()
{
viewBind
.
ivPersonAuthInfo
.
fillAuthInfo
(
viewBind
.
ivPersonAuthInfo
.
fillAuthInfo
(
params
?.
get
(
LIFE_ACCOUNT_NAME
)
?.
let
{
it
as
String
},
params
?.
get
(
OCCUPATION
)
?.
let
{
it
as
String
},
params
?.
get
(
OCCUPATION
)
?.
let
{
it
as
String
},
params
?.
get
(
REAL_NAME
)
?.
let
{
it
as
String
},
params
?.
get
(
REAL_NAME
)
?.
let
{
it
as
String
},
params
?.
get
(
ID_CARD_NUM
)
?.
let
{
it
as
String
},
params
?.
get
(
ID_CARD_NUM
)
?.
let
{
it
as
String
},
...
...
Components/newscontent/src/main/java/com/yidian/shenghuoquan/newscontent/ui/center/MerchantAuthInfoActivity.kt
View file @
4fe0cae2
...
@@ -17,70 +17,71 @@ import com.yidian.shenghuoquan.newscontent.http.httpbean.GetLifeAccountInfoByIdB
...
@@ -17,70 +17,71 @@ import com.yidian.shenghuoquan.newscontent.http.httpbean.GetLifeAccountInfoByIdB
*/
*/
class
MerchantAuthInfoActivity
:
BaseActivity
<
ActivityMerchantAuthInfoBinding
>()
{
class
MerchantAuthInfoActivity
:
BaseActivity
<
ActivityMerchantAuthInfoBinding
>()
{
companion
object
{
companion
object
{
const
val
EXTRA_LIFE_ACCOUNT_INFO
=
"life_account_info"
const
val
EXTRA_LIFE_ACCOUNT_INFO
=
"life_account_info"
}
}
/**
/**
* 生活号详情
* 生活号详情
*/
*/
private
val
lifeAccountInfo
by
lazy
{
private
val
lifeAccountInfo
by
lazy
{
intent
.
getSerializableExtra
(
XRouterPathConstants
.
ParamsKey
)
?.
let
{
params
->
intent
.
getSerializableExtra
(
XRouterPathConstants
.
ParamsKey
)
?.
let
{
params
->
(
params
as
HashMap
<*,
*>)[
EXTRA_LIFE_ACCOUNT_INFO
]
?.
let
{
(
params
as
HashMap
<*,
*>)[
EXTRA_LIFE_ACCOUNT_INFO
]
?.
let
{
it
as
GetLifeAccountInfoByIdBean
.
Response
it
as
GetLifeAccountInfoByIdBean
.
Response
}
}
}
}
}
}
override
fun
createViewBinding
():
ActivityMerchantAuthInfoBinding
{
override
fun
createViewBinding
():
ActivityMerchantAuthInfoBinding
{
return
ActivityMerchantAuthInfoBinding
.
inflate
(
layoutInflater
)
return
ActivityMerchantAuthInfoBinding
.
inflate
(
layoutInflater
)
}
}
override
fun
getXPageName
():
String
{
override
fun
getXPageName
():
String
{
return
XRouterPathConstants
.
MERCHANT_AUTH_INFO
return
XRouterPathConstants
.
MERCHANT_AUTH_INFO
}
}
override
fun
init
(
savedInstanceState
:
Bundle
?)
{
override
fun
init
(
savedInstanceState
:
Bundle
?)
{
super
.
init
(
savedInstanceState
)
super
.
init
(
savedInstanceState
)
initData
()
initData
()
}
}
private
fun
initData
()
{
private
fun
initData
()
{
when
(
lifeAccountInfo
?.
id_type
)
{
when
(
lifeAccountInfo
?.
id_type
)
{
Constant
.
TYPE_AUTH_PERSONAL
->
{
Constant
.
TYPE_AUTH_PERSONAL
->
{
// 个人认证
// 个人认证
viewBind
.
ivPersonAuthInfo
.
isVisible
=
true
viewBind
.
ivPersonAuthInfo
.
isVisible
=
true
viewBind
.
ivPersonAuthInfo
.
fillAuthInfo
(
viewBind
.
ivPersonAuthInfo
.
fillAuthInfo
(
lifeAccountInfo
?.
occupation
,
lifeAccountInfo
?.
life_account_name
,
lifeAccountInfo
?.
legal_pers
on
,
lifeAccountInfo
?.
occupati
on
,
lifeAccountInfo
?.
id_card
,
lifeAccountInfo
?.
legal_person
,
Hawk
.
get
(
HawkConfig
.
Mobile
)
lifeAccountInfo
?.
id_card
,
)
Hawk
.
get
(
HawkConfig
.
Mobile
)
}
)
Constant
.
TYPE_AUTH_INDIVIDUAL_BUSINESS
->
{
}
// 个人工商户认证
Constant
.
TYPE_AUTH_INDIVIDUAL_BUSINESS
->
{
viewBind
.
ivEnterpriseAuthInfo
.
isVisible
=
true
// 个人工商户认证
viewBind
.
ivEnterpriseAuthInfo
.
fillAuthInfo
(
viewBind
.
ivEnterpriseAuthInfo
.
isVisible
=
true
lifeAccountInfo
?.
id_type
,
viewBind
.
ivEnterpriseAuthInfo
.
fillAuthInfo
(
lifeAccountInfo
?.
audit_status
,
lifeAccountInfo
?.
id_type
,
lifeAccountInfo
?.
name
,
lifeAccountInfo
?.
audit_status
,
lifeAccountInfo
?.
cod
e
,
lifeAccountInfo
?.
nam
e
,
lifeAccountInfo
?.
legal_person
,
lifeAccountInfo
?.
code
,
lifeAccountInfo
?.
id_card
lifeAccountInfo
?.
legal_person
,
)
lifeAccountInfo
?.
id_card
}
)
Constant
.
TYPE_AUTH_COMMON_ENTERPRISE
->
{
}
// 普通企业认证
Constant
.
TYPE_AUTH_COMMON_ENTERPRISE
->
{
viewBind
.
ivEnterpriseAuthInfo
.
isVisible
=
true
// 普通企业认证
viewBind
.
ivEnterpriseAuthInfo
.
fillAuthInfo
(
viewBind
.
ivEnterpriseAuthInfo
.
isVisible
=
true
lifeAccountInfo
?.
id_type
,
viewBind
.
ivEnterpriseAuthInfo
.
fillAuthInfo
(
lifeAccountInfo
?.
audit_status
,
lifeAccountInfo
?.
id_type
,
lifeAccountInfo
?.
name
,
lifeAccountInfo
?.
audit_status
,
lifeAccountInfo
?.
cod
e
,
lifeAccountInfo
?.
nam
e
,
lifeAccountInfo
?.
legal_person
,
lifeAccountInfo
?.
code
,
lifeAccountInfo
?.
id_card
lifeAccountInfo
?.
legal_person
,
)
lifeAccountInfo
?.
id_card
}
)
}
}
}
}
}
}
\ No newline at end of file
}
Components/newscontent/src/main/java/com/yidian/shenghuoquan/newscontent/utils/SensitiveInfoUtil.kt
View file @
4fe0cae2
...
@@ -12,18 +12,8 @@ object SensitiveInfoUtil {
...
@@ -12,18 +12,8 @@ object SensitiveInfoUtil {
* 身份证号码出生日期脱敏
* 身份证号码出生日期脱敏
*/
*/
fun
idCardNumEncrypt
(
content
:
String
):
String
{
fun
idCardNumEncrypt
(
content
:
String
):
String
{
val
rule
=
"(\\d{6})\\d{8}(\\d{4})"
if
(
content
.
isBlank
())
return
content
return
content
.
replace
(
rule
.
toRegex
(),
"$1********$2"
)
return
content
.
replace
((
"(\\d{6})\\d{8}(\\d{4})"
).
toRegex
(),
"$1********$2"
)
}
/**
* 身份证号前三后四脱敏
*/
fun
idCardPartEncrypt
(
content
:
String
):
String
{
if
(
content
.
isBlank
()
||
content
.
length
<
18
)
{
return
content
}
return
content
.
replace
((
"(?<=\\w{3})\\w(?=\\w{4})"
).
toRegex
(),
"*"
);
}
}
/**
/**
...
...
Components/newscontent/src/main/java/com/yidian/shenghuoquan/newscontent/widget/LifeAccountPersonalAuthInfoView.kt
View file @
4fe0cae2
...
@@ -6,6 +6,7 @@ import android.view.View
...
@@ -6,6 +6,7 @@ import android.view.View
import
androidx.constraintlayout.widget.ConstraintLayout
import
androidx.constraintlayout.widget.ConstraintLayout
import
com.yidian.shenghuoquan.newscontent.R
import
com.yidian.shenghuoquan.newscontent.R
import
com.yidian.shenghuoquan.newscontent.databinding.ViewLifeAccountPersonalAuthInfoBinding
import
com.yidian.shenghuoquan.newscontent.databinding.ViewLifeAccountPersonalAuthInfoBinding
import
com.yidian.shenghuoquan.newscontent.utils.SensitiveInfoUtil
/**
/**
* author: yinjiacheng
* author: yinjiacheng
...
@@ -13,32 +14,34 @@ import com.yidian.shenghuoquan.newscontent.databinding.ViewLifeAccountPersonalAu
...
@@ -13,32 +14,34 @@ import com.yidian.shenghuoquan.newscontent.databinding.ViewLifeAccountPersonalAu
* description: 商户管理中心-基本信息-生活号个人认证信息
* description: 商户管理中心-基本信息-生活号个人认证信息
*/
*/
class
LifeAccountPersonalAuthInfoView
@JvmOverloads
constructor
(
class
LifeAccountPersonalAuthInfoView
@JvmOverloads
constructor
(
context
:
Context
,
context
:
Context
,
attrs
:
AttributeSet
?
=
null
,
attrs
:
AttributeSet
?
=
null
,
defStyle
:
Int
=
0
defStyle
:
Int
=
0
)
:
ConstraintLayout
(
context
,
attrs
,
defStyle
)
{
)
:
ConstraintLayout
(
context
,
attrs
,
defStyle
)
{
private
val
viewBinding
by
lazy
{
private
val
viewBinding
by
lazy
{
ViewLifeAccountPersonalAuthInfoBinding
.
bind
(
ViewLifeAccountPersonalAuthInfoBinding
.
bind
(
View
.
inflate
(
View
.
inflate
(
getContext
(),
getContext
(),
R
.
layout
.
view_life_account_personal_auth_info
,
R
.
layout
.
view_life_account_personal_auth_info
,
this
this
)
)
)
)
}
}
/**
/**
* 填充认证信息
* 填充认证信息
* @param occupation 职业
* @param lifeAccountName 生活号名称
* @param realName 真实姓名
* @param occupation 职业
* @param idCardNo 身份证号
* @param realName 真实姓名
* @param phoneNo 手机号
* @param idCardNo 身份证号
*/
* @param phoneNo 手机号
fun
fillAuthInfo
(
occupation
:
String
?,
realName
:
String
?,
idCardNo
:
String
?,
phoneNo
:
String
?)
{
*/
viewBinding
.
tvContentOccupationLabel
.
text
=
occupation
fun
fillAuthInfo
(
lifeAccountName
:
String
?,
occupation
:
String
?,
realName
:
String
?,
idCardNo
:
String
?,
phoneNo
:
String
?)
{
viewBinding
.
tvContentRealName
.
text
=
realName
viewBinding
.
tvLifeAccountName
.
text
=
lifeAccountName
viewBinding
.
tvContentIdCardNo
.
text
=
idCardNo
viewBinding
.
tvContentOccupationLabel
.
text
=
occupation
viewBinding
.
tvContentPhoneNo
.
text
=
phoneNo
viewBinding
.
tvContentRealName
.
text
=
realName
}
viewBinding
.
tvContentIdCardNo
.
text
=
idCardNo
?.
let
{
SensitiveInfoUtil
.
idCardNumEncrypt
(
it
)
}
}
viewBinding
.
tvContentPhoneNo
.
text
=
phoneNo
?.
let
{
SensitiveInfoUtil
.
mobileEncrypt
(
it
)
}
\ No newline at end of file
}
}
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