fix: V5.32.8实名认证问题 https://jira.shanqu.cc/browse/GHZS-4567
Signed-off-by: chenjuntao <chenjuntao@ghzhushou.com>
This commit is contained in:
@ -101,16 +101,11 @@ class RealNameInfoViewModel(application: Application) : AndroidViewModel(applica
|
||||
val cachedUserInfo =
|
||||
UserRepository.getInstance().cacheUserInfoEntity
|
||||
|
||||
// 登录状态下更新实名认证信息
|
||||
if (cachedUserInfo != null) {
|
||||
cachedUserInfo.idCard = content.toObject()
|
||||
UserRepository.getInstance()
|
||||
.cacheAndNotifyUserInfo(cachedUserInfo, true)
|
||||
}
|
||||
var isUnQualified = false
|
||||
|
||||
tryWithDefaultCatch {
|
||||
val `object` = JSONObject(data?.string() ?: "")
|
||||
val isUnQualified = `object`.getBoolean("minor")
|
||||
isUnQualified = `object`.getBoolean("minor")
|
||||
var qualifyInt = 1
|
||||
if (!isUnQualified) {
|
||||
qualifyInt = 2
|
||||
@ -125,6 +120,17 @@ class RealNameInfoViewModel(application: Application) : AndroidViewModel(applica
|
||||
)
|
||||
}
|
||||
|
||||
// 登录状态下更新实名认证信息
|
||||
if (cachedUserInfo != null && data?.string() != null) {
|
||||
val newIdCard: IdCardEntity? = content.toObject()
|
||||
if (isUnQualified) {
|
||||
newIdCard?.minor = true
|
||||
}
|
||||
cachedUserInfo.idCard = newIdCard
|
||||
UserRepository.getInstance()
|
||||
.cacheAndNotifyUserInfo(cachedUserInfo, true)
|
||||
}
|
||||
|
||||
DataUtils.getDeviceCertification(HaloApp.getInstance().gid)
|
||||
|
||||
certificateResultLiveData.postValue(RESULT_SUCCESS)
|
||||
|
||||
Reference in New Issue
Block a user