Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
L
lib_base
Overview
Overview
Details
Activity
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
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
sikang
lib_base
Commits
5d133791
Commit
5d133791
authored
Feb 27, 2019
by
sikang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
添加advance 活体接口
parent
69e26f9c
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
2 deletions
+13
-2
src/main/java/tech/starwin/mvp/api/UploadApi.java
+1
-0
src/main/java/tech/starwin/mvp/presenter/UploadPresenter.java
+12
-2
No files found.
src/main/java/tech/starwin/mvp/api/UploadApi.java
View file @
5d133791
...
...
@@ -67,6 +67,7 @@ public interface UploadApi {
@Query
(
"imei"
)
String
imei
,
@Query
(
"productId"
)
long
productId
,
@Query
(
"thirdpartyDataFlag"
)
Boolean
thirdpartyDataFlag
,
@Query
(
"method"
)
String
method
,
@Header
(
"X-AUTH-TOKEN"
)
String
token
);
...
...
src/main/java/tech/starwin/mvp/presenter/UploadPresenter.java
View file @
5d133791
...
...
@@ -17,6 +17,7 @@ import tech.starwin.mvp.api.UploadApi;
import
com.common.bean.BasicAck
;
import
com.common.bean.OcrResultBean
;
import
com.google.gson.JsonObject
;
import
tech.starwin.utils.GeneralUtils
;
import
tech.starwin.utils.LoginManager
;
...
...
@@ -77,10 +78,18 @@ public class UploadPresenter extends BasePresenter<UploadApi> {
* 上传依图 截取得帧图片
*/
public
void
faceVerify
(
final
String
action
,
Context
context
,
double
amount
,
int
day
,
long
productId
)
{
faceVerify
(
action
,
AppInfoUtils
.
getAndroidID
(
context
),
PreferencesManager
.
get
().
getVerificationData
(),
amount
,
day
,
productId
);
faceVerify
(
action
,
AppInfoUtils
.
getAndroidID
(
context
),
PreferencesManager
.
get
().
getVerificationData
(),
amount
,
day
,
productId
,
"yitu"
);
}
public
void
faceVerify
(
final
String
action
,
String
androidId
,
String
faceData
,
double
amount
,
int
day
,
long
productId
)
{
/**
* 上传advance 活体图片
*/
public
void
advanceFaceVerify
(
final
String
action
,
String
androidId
,
String
faceData
,
double
amount
,
int
day
,
long
productId
)
{
String
livenessId
=
new
Gson
().
fromJson
(
faceData
,
JsonObject
.
class
).
get
(
"livenessId"
).
toString
().
replace
(
"\""
,
""
);
faceVerify
(
action
,
androidId
,
livenessId
,
amount
,
day
,
productId
,
"advance"
);
}
public
void
faceVerify
(
final
String
action
,
String
androidId
,
String
faceData
,
double
amount
,
int
day
,
long
productId
,
String
method
)
{
TrackEventHelper
.
logEvent
(
TrackEvent
.
FACE_DETECTION
);
handleRequest
(
apiService
.
faceVerify
(
...
...
@@ -94,6 +103,7 @@ public class UploadPresenter extends BasePresenter<UploadApi> {
androidId
,
productId
,
!
TextUtils
.
isEmpty
(
LibConfig
.
TONGDUN_PARENT_KEY
),
method
,
LoginManager
.
get
().
getToken
()
),
new
HttpObserver
<
BasicAck
>()
{
...
...
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