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
6fa06455
Commit
6fa06455
authored
Jun 24, 2021
by
yinjiacheng
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix SHQBD-145 个人认证流程增加校验身份信息是否已认证逻辑
parent
db4b861a
Changes
7
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
57 additions
and
19 deletions
+57
-19
Constant.kt
.../com/yidian/shenghuoquan/newscontent/constant/Constant.kt
+3
-0
ApiService.kt
...va/com/yidian/shenghuoquan/newscontent/http/ApiService.kt
+1
-1
IAuthPersonalCheckCallback.kt
...n/newscontent/http/callback/IAuthPersonalCheckCallback.kt
+3
-3
LifeAccountEnterpriseAuthActivity.kt
.../newscontent/ui/auth/LifeAccountEnterpriseAuthActivity.kt
+5
-5
LifeAccountIDCardAuthFragment.kt
...quan/newscontent/ui/auth/LifeAccountIDCardAuthFragment.kt
+18
-2
LifeAccountPersonalAuthActivity.kt
...an/newscontent/ui/auth/LifeAccountPersonalAuthActivity.kt
+25
-8
strings.xml
Components/newscontent/src/main/res/values/strings.xml
+2
-0
No files found.
Components/newscontent/src/main/java/com/yidian/shenghuoquan/newscontent/constant/Constant.kt
View file @
6fa06455
...
@@ -94,4 +94,7 @@ object Constant {
...
@@ -94,4 +94,7 @@ object Constant {
// 各输入场景最大长度显示
// 各输入场景最大长度显示
const
val
MAX_LENGTH_LIFE_ACCOUNT_NAME
=
24
// 生活号名称
const
val
MAX_LENGTH_LIFE_ACCOUNT_NAME
=
24
// 生活号名称
// 服务端返回的业务错误码
const
val
ERROR_CODE_PERSONAL_AUTH_INFO_DUPLICATE
=
103010
// 身份证号已认证并且认证手机号不是当前手机号
}
}
Components/newscontent/src/main/java/com/yidian/shenghuoquan/newscontent/http/ApiService.kt
View file @
6fa06455
...
@@ -124,7 +124,7 @@ class ApiService {
...
@@ -124,7 +124,7 @@ class ApiService {
}
}
override
fun
onFailer
(
result
:
HttpResult
<
Any
>?)
{
override
fun
onFailer
(
result
:
HttpResult
<
Any
>?)
{
apiCallback
.
authPersonCheckFailure
(
result
?.
reason
)
apiCallback
.
authPersonCheckFailure
(
result
?.
code
,
result
?.
reason
)
}
}
})
})
}
}
...
...
Components/newscontent/src/main/java/com/yidian/shenghuoquan/newscontent/http/callback/IAuthPersonalCheckCallback.kt
View file @
6fa06455
...
@@ -7,5 +7,5 @@ package com.yidian.shenghuoquan.newscontent.http.callback
...
@@ -7,5 +7,5 @@ package com.yidian.shenghuoquan.newscontent.http.callback
*/
*/
interface
IAuthPersonalCheckCallback
{
interface
IAuthPersonalCheckCallback
{
fun
authPersonCheckSuccess
()
fun
authPersonCheckSuccess
()
fun
authPersonCheckFailure
(
message
:
String
?)
fun
authPersonCheckFailure
(
code
:
Int
?,
message
:
String
?)
}
}
Components/newscontent/src/main/java/com/yidian/shenghuoquan/newscontent/ui/auth/LifeAccountEnterpriseAuthActivity.kt
View file @
6fa06455
...
@@ -218,7 +218,7 @@ class LifeAccountEnterpriseAuthActivity : BaseActivity<ActivityLifeAccountEnterp
...
@@ -218,7 +218,7 @@ class LifeAccountEnterpriseAuthActivity : BaseActivity<ActivityLifeAccountEnterp
* 清理认证数据
* 清理认证数据
* 避免在修改认证时出现数据异常
* 避免在修改认证时出现数据异常
*/
*/
private
fun
clea
n
LifeAccountAuthData
()
{
private
fun
clea
r
LifeAccountAuthData
()
{
LifeAccountAuthDataManager
.
merchantAuthData
.
merchantType
=
0
LifeAccountAuthDataManager
.
merchantAuthData
.
merchantType
=
0
LifeAccountAuthDataManager
.
merchantAuthData
.
authRecordId
=
null
LifeAccountAuthDataManager
.
merchantAuthData
.
authRecordId
=
null
LifeAccountAuthDataManager
.
merchantAuthData
.
isBusinessLicenseUpload
=
false
LifeAccountAuthDataManager
.
merchantAuthData
.
isBusinessLicenseUpload
=
false
...
@@ -328,8 +328,8 @@ class LifeAccountEnterpriseAuthActivity : BaseActivity<ActivityLifeAccountEnterp
...
@@ -328,8 +328,8 @@ class LifeAccountEnterpriseAuthActivity : BaseActivity<ActivityLifeAccountEnterp
override
fun
authEnterpriseLegalIdentityCommitSuccess
(
result
:
AuthEnterpriseLegalIdentityCommitBean
.
Response
?)
{
override
fun
authEnterpriseLegalIdentityCommitSuccess
(
result
:
AuthEnterpriseLegalIdentityCommitBean
.
Response
?)
{
// 本地保存生活号id
// 本地保存生活号id
StorageUtil
.
putLifeAccountId
(
result
?.
life_account_id
)
StorageUtil
.
putLifeAccountId
(
result
?.
life_account_id
)
// 清
理
认证数据
// 清
空
认证数据
clea
n
LifeAccountAuthData
()
clea
r
LifeAccountAuthData
()
// 普通企业法人身份信息提交成功
// 普通企业法人身份信息提交成功
XPageManager
.
push
(
XPageManager
.
push
(
XRouterPathConstants
.
LIFE_ACCOUNT_ENTERPRISE_AUTH_COMPLETE
,
XRouterPathConstants
.
LIFE_ACCOUNT_ENTERPRISE_AUTH_COMPLETE
,
...
@@ -352,8 +352,8 @@ class LifeAccountEnterpriseAuthActivity : BaseActivity<ActivityLifeAccountEnterp
...
@@ -352,8 +352,8 @@ class LifeAccountEnterpriseAuthActivity : BaseActivity<ActivityLifeAccountEnterp
override
fun
authIndividualBusinessCompleteSuccess
(
result
:
AuthIndividualBusinessCompleteBean
.
Response
?)
{
override
fun
authIndividualBusinessCompleteSuccess
(
result
:
AuthIndividualBusinessCompleteBean
.
Response
?)
{
// 本地保存生活号id
// 本地保存生活号id
StorageUtil
.
putLifeAccountId
(
result
?.
life_account_id
)
StorageUtil
.
putLifeAccountId
(
result
?.
life_account_id
)
// 清
理
认证数据
// 清
空
认证数据
clea
n
LifeAccountAuthData
()
clea
r
LifeAccountAuthData
()
// 个体工商户认证完成
// 个体工商户认证完成
XPageManager
.
push
(
XPageManager
.
push
(
XRouterPathConstants
.
LIFE_ACCOUNT_ENTERPRISE_AUTH_COMPLETE
,
XRouterPathConstants
.
LIFE_ACCOUNT_ENTERPRISE_AUTH_COMPLETE
,
...
...
Components/newscontent/src/main/java/com/yidian/shenghuoquan/newscontent/ui/auth/LifeAccountIDCardAuthFragment.kt
View file @
6fa06455
...
@@ -11,6 +11,7 @@ import android.util.Log
...
@@ -11,6 +11,7 @@ import android.util.Log
import
android.view.LayoutInflater
import
android.view.LayoutInflater
import
android.view.View
import
android.view.View
import
android.view.ViewGroup
import
android.view.ViewGroup
import
androidx.core.content.ContextCompat
import
androidx.core.view.isVisible
import
androidx.core.view.isVisible
import
com.megvii.demo.activity.IDCardDetectActivity
import
com.megvii.demo.activity.IDCardDetectActivity
import
com.megvii.demo.utils.Configuration
import
com.megvii.demo.utils.Configuration
...
@@ -25,6 +26,7 @@ import com.yidian.common.http.HttpResult
...
@@ -25,6 +26,7 @@ import com.yidian.common.http.HttpResult
import
com.yidian.shenghuoquan.newscontent.R
import
com.yidian.shenghuoquan.newscontent.R
import
com.yidian.shenghuoquan.newscontent.adapter.BottomSelectAdapter
import
com.yidian.shenghuoquan.newscontent.adapter.BottomSelectAdapter
import
com.yidian.shenghuoquan.newscontent.bean.BottomSelectBean
import
com.yidian.shenghuoquan.newscontent.bean.BottomSelectBean
import
com.yidian.shenghuoquan.newscontent.bean.HintOptionBean
import
com.yidian.shenghuoquan.newscontent.constant.Constant
import
com.yidian.shenghuoquan.newscontent.constant.Constant
import
com.yidian.shenghuoquan.newscontent.databinding.FragmentLifeAccountIdCardAuthBinding
import
com.yidian.shenghuoquan.newscontent.databinding.FragmentLifeAccountIdCardAuthBinding
import
com.yidian.shenghuoquan.newscontent.http.ApiService
import
com.yidian.shenghuoquan.newscontent.http.ApiService
...
@@ -34,6 +36,7 @@ import com.yidian.shenghuoquan.newscontent.http.callback.IAuthLiveIdentityCallba
...
@@ -34,6 +36,7 @@ import com.yidian.shenghuoquan.newscontent.http.callback.IAuthLiveIdentityCallba
import
com.yidian.shenghuoquan.newscontent.http.callback.IAuthPersonalCheckCallback
import
com.yidian.shenghuoquan.newscontent.http.callback.IAuthPersonalCheckCallback
import
com.yidian.shenghuoquan.newscontent.http.httpbean.*
import
com.yidian.shenghuoquan.newscontent.http.httpbean.*
import
com.yidian.shenghuoquan.newscontent.ui.dialog.BottomSelectDialog
import
com.yidian.shenghuoquan.newscontent.ui.dialog.BottomSelectDialog
import
com.yidian.shenghuoquan.newscontent.ui.dialog.HintDialog
import
com.yidian.shenghuoquan.newscontent.utils.BitmapUtil
import
com.yidian.shenghuoquan.newscontent.utils.BitmapUtil
import
com.yidian.shenghuoquan.newscontent.utils.FileUtil
import
com.yidian.shenghuoquan.newscontent.utils.FileUtil
import
com.yidian.shenghuoquan.newscontent.utils.InputFilterUtil
import
com.yidian.shenghuoquan.newscontent.utils.InputFilterUtil
...
@@ -684,8 +687,21 @@ class LifeAccountIDCardAuthFragment : BaseFragment<FragmentLifeAccountIdCardAuth
...
@@ -684,8 +687,21 @@ class LifeAccountIDCardAuthFragment : BaseFragment<FragmentLifeAccountIdCardAuth
)
)
}
}
override
fun
authPersonCheckFailure
(
message
:
String
?)
{
override
fun
authPersonCheckFailure
(
code
:
Int
?,
message
:
String
?)
{
// 展示错误提示
if
(
code
==
Constant
.
ERROR_CODE_PERSONAL_AUTH_INFO_DUPLICATE
)
{
// 身份证号已认证并且认证手机号不是当前手机号 弹窗提示
activity
?.
let
{
HintDialog
(
it
,
message
.
toString
(),
arrayListOf
(
HintOptionBean
(
resources
.
getString
(
R
.
string
.
change
)),
HintOptionBean
(
resources
.
getString
(
R
.
string
.
login_again
))
),
it
as
LifeAccountPersonalAuthActivity
).
setRightBtnColor
(
ContextCompat
.
getColor
(
it
,
R
.
color
.
color_FF1852F1
)).
show
()
}
return
}
// 展示输入框下错误提示
when
(
message
)
{
when
(
message
)
{
Constant
.
ERROR_MESSAGE_REAL_NAME
->
{
Constant
.
ERROR_MESSAGE_REAL_NAME
->
{
viewBinding
.
evRealName
.
showErrorTips
(
viewBinding
.
evRealName
.
showErrorTips
(
...
...
Components/newscontent/src/main/java/com/yidian/shenghuoquan/newscontent/ui/auth/LifeAccountPersonalAuthActivity.kt
View file @
6fa06455
...
@@ -4,7 +4,6 @@ import android.os.Bundle
...
@@ -4,7 +4,6 @@ import android.os.Bundle
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
import
com.yidian.common.AppConfig
import
com.yidian.common.HawkConfig
import
com.yidian.common.HawkConfig
import
com.yidian.common.XEventConfig
import
com.yidian.common.XEventConfig
import
com.yidian.common.XRouterPathConstants
import
com.yidian.common.XRouterPathConstants
...
@@ -15,7 +14,7 @@ import com.yidian.shenghuoquan.newscontent.http.ApiService
...
@@ -15,7 +14,7 @@ import com.yidian.shenghuoquan.newscontent.http.ApiService
import
com.yidian.shenghuoquan.newscontent.http.callback.IAuthPersonalCompleteCallback
import
com.yidian.shenghuoquan.newscontent.http.callback.IAuthPersonalCompleteCallback
import
com.yidian.shenghuoquan.newscontent.http.httpbean.AuthAuthenticationBean
import
com.yidian.shenghuoquan.newscontent.http.httpbean.AuthAuthenticationBean
import
com.yidian.shenghuoquan.newscontent.http.httpbean.AuthPersonalCompleteBean
import
com.yidian.shenghuoquan.newscontent.http.httpbean.AuthPersonalCompleteBean
import
com.yidian.shenghuoquan.newscontent.ui.
ProtocolActivity
import
com.yidian.shenghuoquan.newscontent.ui.
dialog.HintDialog
import
com.yidian.shenghuoquan.newscontent.utils.StorageUtil
import
com.yidian.shenghuoquan.newscontent.utils.StorageUtil
import
com.yidian.xarc.xevent.XBaseEvent
import
com.yidian.xarc.xevent.XBaseEvent
import
com.yidian.xarc.xevent.XEventManager
import
com.yidian.xarc.xevent.XEventManager
...
@@ -29,8 +28,8 @@ import org.greenrobot.eventbus.ThreadMode
...
@@ -29,8 +28,8 @@ import org.greenrobot.eventbus.ThreadMode
* description: 生活号个人认证
* description: 生活号个人认证
*/
*/
class
LifeAccountPersonalAuthActivity
:
class
LifeAccountPersonalAuthActivity
:
BaseActivity
<
ActivityLifeAccountPersonalAuthBinding
>(),
BaseActivity
<
ActivityLifeAccountPersonalAuthBinding
>(),
View
.
OnClickListener
,
CompoundButton
.
OnCheckedChangeListener
,
View
.
OnClickListener
,
CompoundButton
.
OnCheckedChangeListener
,
IAuthPersonalComplete
Callback
{
IAuthPersonalCompleteCallback
,
HintDialog
.
OnHintOption
Callback
{
companion
object
{
companion
object
{
// 认证数据
// 认证数据
...
@@ -125,13 +124,18 @@ class LifeAccountPersonalAuthActivity :
...
@@ -125,13 +124,18 @@ class LifeAccountPersonalAuthActivity :
}
}
/**
/**
* 清
理
认证数据
* 清
空
认证数据
* 避免在升级企业认证时出现数据异常
* 避免在升级企业认证时出现数据异常
*/
*/
private
fun
clea
n
LifeAccountAuthData
()
{
private
fun
clea
r
LifeAccountAuthData
()
{
LifeAccountAuthDataManager
.
personalAuthData
.
isAgreePrivacyAgreement
=
false
LifeAccountAuthDataManager
.
personalAuthData
.
isAgreePrivacyAgreement
=
false
LifeAccountAuthDataManager
.
personalAuthData
.
occupation
=
null
LifeAccountAuthDataManager
.
personalAuthData
.
occupation
=
null
LifeAccountAuthDataManager
.
personalAuthData
.
isFaceAuthPass
=
false
LifeAccountAuthDataManager
.
personalAuthData
.
isFaceAuthPass
=
false
LifeAccountAuthDataManager
.
personalAuthData
.
realName
=
null
LifeAccountAuthDataManager
.
personalAuthData
.
idCardNum
=
null
LifeAccountAuthDataManager
.
personalAuthData
.
occupation
=
null
LifeAccountAuthDataManager
.
personalAuthData
.
isIDCardPortraitFaceUpload
=
false
LifeAccountAuthDataManager
.
personalAuthData
.
isIDCardNationalEmblemFaceUpload
=
false
}
}
override
fun
onClick
(
v
:
View
?)
{
override
fun
onClick
(
v
:
View
?)
{
...
@@ -154,8 +158,8 @@ class LifeAccountPersonalAuthActivity :
...
@@ -154,8 +158,8 @@ class LifeAccountPersonalAuthActivity :
override
fun
authPersonalCompleteSuccess
(
result
:
AuthPersonalCompleteBean
.
Response
?)
{
override
fun
authPersonalCompleteSuccess
(
result
:
AuthPersonalCompleteBean
.
Response
?)
{
// 本地保存生活号id
// 本地保存生活号id
StorageUtil
.
putLifeAccountId
(
result
?.
life_account_id
)
StorageUtil
.
putLifeAccountId
(
result
?.
life_account_id
)
// 清
理
认证数据
// 清
空
认证数据
clea
n
LifeAccountAuthData
()
clea
r
LifeAccountAuthData
()
// 跳转个人认证成功页
// 跳转个人认证成功页
XPageManager
.
push
(
XPageManager
.
push
(
XRouterPathConstants
.
LIFE_ACCOUNT_PERSONAL_AUTH_COMPLETE
,
XRouterPathConstants
.
LIFE_ACCOUNT_PERSONAL_AUTH_COMPLETE
,
...
@@ -193,4 +197,17 @@ class LifeAccountPersonalAuthActivity :
...
@@ -193,4 +197,17 @@ class LifeAccountPersonalAuthActivity :
}
}
}
}
override
fun
onLeftOption
()
{
// 更换认证信息
// 清空认证数据
clearLifeAccountAuthData
()
supportFragmentManager
.
beginTransaction
().
remove
(
fragment
).
add
(
R
.
id
.
fragment_container
,
LifeAccountIDCardAuthFragment
()).
commit
()
}
override
fun
onRightOption
()
{
// 重新登录
XPageManager
.
push
(
XRouterPathConstants
.
LOGIN_LIFE_CIRCLE
,
null
)
}
}
}
Components/newscontent/src/main/res/values/strings.xml
View file @
6fa06455
...
@@ -171,5 +171,7 @@
...
@@ -171,5 +171,7 @@
<string
name=
"goto_upgrade"
>
去升级
</string>
<string
name=
"goto_upgrade"
>
去升级
</string>
<string
name=
"goto_modify"
>
去修改
</string>
<string
name=
"goto_modify"
>
去修改
</string>
<string
name=
"input_legal_person_phone_number"
>
请输入法人手机号
</string>
<string
name=
"input_legal_person_phone_number"
>
请输入法人手机号
</string>
<string
name=
"change"
>
更换
</string>
<string
name=
"login_again"
>
重新登录
</string>
</resources>
</resources>
\ 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