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
9f9c4b02
Commit
9f9c4b02
authored
Jun 08, 2021
by
yinjiacheng
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update 身份证OCR流程
parent
1e0d35ec
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
44 additions
and
15 deletions
+44
-15
LifeAccountIDCardAuthFragment.kt
...quan/newscontent/ui/auth/LifeAccountIDCardAuthFragment.kt
+44
-15
No files found.
Components/newscontent/src/main/java/com/yidian/shenghuoquan/newscontent/ui/auth/LifeAccountIDCardAuthFragment.kt
View file @
9f9c4b02
...
...
@@ -387,7 +387,7 @@ class LifeAccountIDCardAuthFragment : BaseFragment<FragmentLifeAccountIdCardAuth
it
}
}
startIDCardOCR
()
startIDCardOCR
(
face
)
}
override
fun
onTaskFailure
(
statesCode
:
Int
,
message
:
String
?)
{
...
...
@@ -403,17 +403,34 @@ class LifeAccountIDCardAuthFragment : BaseFragment<FragmentLifeAccountIdCardAuth
/**
* 执行身份证OCR
*/
private
fun
startIDCardOCR
()
{
val
requestParams
=
HashMap
<
String
,
String
?>()
requestParams
[
"posit_image_objectid"
]
=
private
fun
startIDCardOCR
(
face
:
Int
)
{
if
(
face
==
Constant
.
ID_CARD_PORTRAIT_FACE
)
{
ApiService
.
getIDCardOCR
(
this
,
hashMapOf
(
Pair
(
"posit_image_objectid"
,
LifeAccountAuthDataManager
.
personalAuthData
.
idCardPortraitFaceObjectKey
requestParams
[
"back_image_objectid"
]
=
LifeAccountAuthDataManager
.
personalAuthData
.
idCardNationalEmblemFaceObjectKey
requestParams
[
"posit_bucket"
]
=
),
Pair
(
"posit_bucket"
,
LifeAccountAuthDataManager
.
personalAuthData
.
idCardPortraitFaceBucket
requestParams
[
"back_bucket"
]
=
),
)
)
}
else
{
ApiService
.
getIDCardOCR
(
this
,
hashMapOf
(
Pair
(
"back_image_objectid"
,
LifeAccountAuthDataManager
.
personalAuthData
.
idCardNationalEmblemFaceObjectKey
),
Pair
(
"back_bucket"
,
LifeAccountAuthDataManager
.
personalAuthData
.
idCardNationalEmblemFaceBucket
ApiService
.
getIDCardOCR
(
this
,
requestParams
)
),
)
)
}
}
override
fun
getIDCardOCRSuccess
(
result
:
GetIDCardOCRBean
.
Response
?)
{
...
...
@@ -638,8 +655,12 @@ class LifeAccountIDCardAuthFragment : BaseFragment<FragmentLifeAccountIdCardAuth
LifeAccountAuthDataManager
.
personalAuthData
.
isIDCardNationalEmblemFaceUpload
=
false
}
// 检查下一步条件
if
(
authType
==
Constant
.
TYPE_AUTH_PERSONAL
)
{
(
activity
as
LifeAccountPersonalAuthActivity
).
checkNextCondition
()
}
else
{
(
activity
as
LifeAccountEnterpriseAuthActivity
).
checkNextCondition
()
}
}
override
fun
onTextClear
(
from
:
LifeAccountAuthIdentityInfoEditView
)
{
when
(
from
)
{
...
...
@@ -654,8 +675,12 @@ class LifeAccountIDCardAuthFragment : BaseFragment<FragmentLifeAccountIdCardAuth
}
}
// 检查下一步条件
if
(
authType
==
Constant
.
TYPE_AUTH_PERSONAL
)
{
(
activity
as
LifeAccountPersonalAuthActivity
).
checkNextCondition
()
}
else
{
(
activity
as
LifeAccountEnterpriseAuthActivity
).
checkNextCondition
()
}
}
override
fun
onTextChange
(
from
:
LifeAccountAuthIdentityInfoEditView
,
text
:
String
)
{
when
(
from
)
{
...
...
@@ -670,8 +695,12 @@ class LifeAccountIDCardAuthFragment : BaseFragment<FragmentLifeAccountIdCardAuth
}
}
// 检查下一步条件
if
(
authType
==
Constant
.
TYPE_AUTH_PERSONAL
)
{
(
activity
as
LifeAccountPersonalAuthActivity
).
checkNextCondition
()
}
else
{
(
activity
as
LifeAccountEnterpriseAuthActivity
).
checkNextCondition
()
}
}
override
fun
onStartFaceAuth
()
{
// 判断是否满足条件进行活体检测
...
...
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