Commit 9f9c4b02 authored by yinjiacheng's avatar yinjiacheng

update 身份证OCR流程

parent 1e0d35ec
...@@ -387,7 +387,7 @@ class LifeAccountIDCardAuthFragment : BaseFragment<FragmentLifeAccountIdCardAuth ...@@ -387,7 +387,7 @@ class LifeAccountIDCardAuthFragment : BaseFragment<FragmentLifeAccountIdCardAuth
it it
} }
} }
startIDCardOCR() startIDCardOCR(face)
} }
override fun onTaskFailure(statesCode: Int, message: String?) { override fun onTaskFailure(statesCode: Int, message: String?) {
...@@ -403,17 +403,34 @@ class LifeAccountIDCardAuthFragment : BaseFragment<FragmentLifeAccountIdCardAuth ...@@ -403,17 +403,34 @@ class LifeAccountIDCardAuthFragment : BaseFragment<FragmentLifeAccountIdCardAuth
/** /**
* 执行身份证OCR * 执行身份证OCR
*/ */
private fun startIDCardOCR() { private fun startIDCardOCR(face: Int) {
val requestParams = HashMap<String, String?>() if (face == Constant.ID_CARD_PORTRAIT_FACE) {
requestParams["posit_image_objectid"] = ApiService.getIDCardOCR(
this, hashMapOf(
Pair(
"posit_image_objectid",
LifeAccountAuthDataManager.personalAuthData.idCardPortraitFaceObjectKey LifeAccountAuthDataManager.personalAuthData.idCardPortraitFaceObjectKey
requestParams["back_image_objectid"] = ),
LifeAccountAuthDataManager.personalAuthData.idCardNationalEmblemFaceObjectKey Pair(
requestParams["posit_bucket"] = "posit_bucket",
LifeAccountAuthDataManager.personalAuthData.idCardPortraitFaceBucket LifeAccountAuthDataManager.personalAuthData.idCardPortraitFaceBucket
requestParams["back_bucket"] = ),
)
)
} else {
ApiService.getIDCardOCR(
this, hashMapOf(
Pair(
"back_image_objectid",
LifeAccountAuthDataManager.personalAuthData.idCardNationalEmblemFaceObjectKey
),
Pair(
"back_bucket",
LifeAccountAuthDataManager.personalAuthData.idCardNationalEmblemFaceBucket LifeAccountAuthDataManager.personalAuthData.idCardNationalEmblemFaceBucket
ApiService.getIDCardOCR(this, requestParams) ),
)
)
}
} }
override fun getIDCardOCRSuccess(result: GetIDCardOCRBean.Response?) { override fun getIDCardOCRSuccess(result: GetIDCardOCRBean.Response?) {
...@@ -638,8 +655,12 @@ class LifeAccountIDCardAuthFragment : BaseFragment<FragmentLifeAccountIdCardAuth ...@@ -638,8 +655,12 @@ class LifeAccountIDCardAuthFragment : BaseFragment<FragmentLifeAccountIdCardAuth
LifeAccountAuthDataManager.personalAuthData.isIDCardNationalEmblemFaceUpload = false LifeAccountAuthDataManager.personalAuthData.isIDCardNationalEmblemFaceUpload = false
} }
// 检查下一步条件 // 检查下一步条件
if (authType == Constant.TYPE_AUTH_PERSONAL) {
(activity as LifeAccountPersonalAuthActivity).checkNextCondition()
} else {
(activity as LifeAccountEnterpriseAuthActivity).checkNextCondition() (activity as LifeAccountEnterpriseAuthActivity).checkNextCondition()
} }
}
override fun onTextClear(from: LifeAccountAuthIdentityInfoEditView) { override fun onTextClear(from: LifeAccountAuthIdentityInfoEditView) {
when (from) { when (from) {
...@@ -654,8 +675,12 @@ class LifeAccountIDCardAuthFragment : BaseFragment<FragmentLifeAccountIdCardAuth ...@@ -654,8 +675,12 @@ class LifeAccountIDCardAuthFragment : BaseFragment<FragmentLifeAccountIdCardAuth
} }
} }
// 检查下一步条件 // 检查下一步条件
if (authType == Constant.TYPE_AUTH_PERSONAL) {
(activity as LifeAccountPersonalAuthActivity).checkNextCondition()
} else {
(activity as LifeAccountEnterpriseAuthActivity).checkNextCondition() (activity as LifeAccountEnterpriseAuthActivity).checkNextCondition()
} }
}
override fun onTextChange(from: LifeAccountAuthIdentityInfoEditView, text: String) { override fun onTextChange(from: LifeAccountAuthIdentityInfoEditView, text: String) {
when (from) { when (from) {
...@@ -670,8 +695,12 @@ class LifeAccountIDCardAuthFragment : BaseFragment<FragmentLifeAccountIdCardAuth ...@@ -670,8 +695,12 @@ class LifeAccountIDCardAuthFragment : BaseFragment<FragmentLifeAccountIdCardAuth
} }
} }
// 检查下一步条件 // 检查下一步条件
if (authType == Constant.TYPE_AUTH_PERSONAL) {
(activity as LifeAccountPersonalAuthActivity).checkNextCondition()
} else {
(activity as LifeAccountEnterpriseAuthActivity).checkNextCondition() (activity as LifeAccountEnterpriseAuthActivity).checkNextCondition()
} }
}
override fun onStartFaceAuth() { override fun onStartFaceAuth() {
// 判断是否满足条件进行活体检测 // 判断是否满足条件进行活体检测
......
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