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
4ad1a0a2
Commit
4ad1a0a2
authored
Jun 07, 2021
by
yinjiacheng
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update 获取金山云objectKey接口请求参数增加业务场景字段;身份证OCR、营业执照OCR、人脸检测接口请求参数增加bucket
parent
22771e3c
Changes
11
Show whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
81 additions
and
40 deletions
+81
-40
LifeAccountPersonalAuthData.kt
...nghuoquan/newscontent/bean/LifeAccountPersonalAuthData.kt
+1
-0
ApiService.kt
...va/com/yidian/shenghuoquan/newscontent/http/ApiService.kt
+15
-16
CommonService.kt
...com/yidian/shenghuoquan/newscontent/http/CommonService.kt
+1
-1
GetIDCardOCRBean.kt
...henghuoquan/newscontent/http/httpbean/GetIDCardOCRBean.kt
+2
-1
LifeAccountEnterpriseCertificationActivity.kt
...scontent/ui/LifeAccountEnterpriseCertificationActivity.kt
+1
-0
AliveTestActivity.kt
...an/shenghuoquan/newscontent/ui/alive/AliveTestActivity.kt
+2
-1
LifeAccountAuthActivity.kt
...enghuoquan/newscontent/ui/auth/LifeAccountAuthActivity.kt
+1
-3
LifeAccountBusinessLicenseAuthFragment.kt
...content/ui/auth/LifeAccountBusinessLicenseAuthFragment.kt
+3
-1
LifeAccountIDCardAuthFragment.kt
...quan/newscontent/ui/auth/LifeAccountIDCardAuthFragment.kt
+15
-5
IDCardTestActivity.kt
.../shenghuoquan/newscontent/ui/idcard/IDCardTestActivity.kt
+4
-3
KS3Core.kt
...java/com/yidian/shenghuoquan/newscontent/utils/KS3Core.kt
+36
-9
No files found.
Components/newscontent/src/main/java/com/yidian/shenghuoquan/newscontent/bean/LifeAccountPersonalAuthData.kt
View file @
4ad1a0a2
...
...
@@ -20,6 +20,7 @@ class LifeAccountPersonalAuthData {
var
idCardNationalEmblemFaceCompleteness
:
Int
=
-
1
var
liveDetectBizToken
:
String
=
""
var
liveDetectObjectKey
:
String
=
""
var
liveDetectBucket
:
String
=
""
var
isFaceAuthPass
:
Boolean
=
false
// 身份证相关信息
...
...
Components/newscontent/src/main/java/com/yidian/shenghuoquan/newscontent/http/ApiService.kt
View file @
4ad1a0a2
...
...
@@ -16,7 +16,7 @@ import okhttp3.MultipartBody
class
ApiService
{
companion
object
{
//获取短信验证码
//
获取短信验证码
fun
sendMsgCode
(
apiCallback
:
IMobileLoginCallback
,
requestParams
:
HashMap
<
String
,
String
?
>)
{
val
timeStamp
=
System
.
currentTimeMillis
()
val
publicParamsMap
=
HttpParamsUtils
.
getPublicParamsMap
(
timeStamp
)
...
...
@@ -35,7 +35,7 @@ class ApiService {
})
}
//手机号登录登录接口
//
手机号登录登录接口
fun
mobileLogin
(
apiCallback
:
IMobileLoginCallback
,
requestParams
:
HashMap
<
String
,
String
?
>)
{
val
timeStamp
=
System
.
currentTimeMillis
()
val
publicParamsMap
=
HttpParamsUtils
.
getPublicParamsMap
(
timeStamp
)
...
...
@@ -54,7 +54,7 @@ class ApiService {
})
}
//获取生活号列表
//
获取生活号列表
fun
getAccountList
(
apiCallback
:
IMobileLoginCallback
)
{
val
timeStamp
=
System
.
currentTimeMillis
()
val
publicParamsMap
=
HttpParamsUtils
.
getPublicParamsMap
(
timeStamp
)
...
...
@@ -72,7 +72,7 @@ class ApiService {
})
}
//
获取活体
检测接口
//
人脸
检测接口
fun
identifyIdOcrVerify
(
apiCallback
:
IdentifyIdOcrVerifyCallback
,
requestParams
:
HashMap
<
String
,
String
?
>)
{
val
timeStamp
=
System
.
currentTimeMillis
()
val
publicParamsMap
=
HttpParamsUtils
.
getPublicParamsMap
(
timeStamp
)
...
...
@@ -91,7 +91,7 @@ class ApiService {
})
}
//
获取活体检测
接口
//
获取人脸检测token
接口
fun
authPersonalGetToken
(
apiCallback
:
AuthPersonalGetTokenCallback
,
requestParams
:
HashMap
<
String
,
String
?
>)
{
val
timeStamp
=
System
.
currentTimeMillis
()
val
publicParamsMap
=
HttpParamsUtils
.
getPublicParamsMap
(
timeStamp
)
...
...
@@ -109,7 +109,7 @@ class ApiService {
})
}
//获取金山云token接口
//
获取金山云token接口
fun
getKSYunToken
(
requestParams
:
HashMap
<
String
,
String
?
>):
HttpResult
<
GetKSYunTokenBean
.
Response
>?
{
val
timeStamp
=
System
.
currentTimeMillis
()
val
publicParamsMap
=
HttpParamsUtils
.
getPublicParamsMap
(
timeStamp
)
...
...
@@ -129,7 +129,7 @@ class ApiService {
return
null
}
//获取身份证OCR接口
//
获取身份证OCR接口
fun
getIDCardOCR
(
apiCallback
:
IGetIDCardOCRCallback
,
requestParams
:
HashMap
<
String
,
String
?
>)
{
val
timeStamp
=
System
.
currentTimeMillis
()
val
publicParamsMap
=
HttpParamsUtils
.
getPublicParamsMap
(
timeStamp
)
...
...
@@ -148,12 +148,13 @@ class ApiService {
})
}
//获取金山云ObjectId
fun
getKSYunObjectId
(
apiCallback
:
IGetKSYunObjectIdCallback
)
{
//
获取金山云ObjectId
fun
getKSYunObjectId
(
apiCallback
:
IGetKSYunObjectIdCallback
,
requestParams
:
HashMap
<
String
,
String
?
>
)
{
val
timeStamp
=
System
.
currentTimeMillis
()
val
publicParamsMap
=
HttpParamsUtils
.
getPublicParamsMap
(
timeStamp
)
val
privateParamsMap
=
HttpParamsUtils
.
getPrivateParamsMap
(
requestParams
,
timeStamp
)
ServiceFactory
.
getInstance
().
createService
(
CommonService
::
class
.
java
)
.
getKSYunObjectId
(
publicParamsMap
)
.
getKSYunObjectId
(
publicParamsMap
,
privateParamsMap
)
.
compose
(
TransformUtil
.
defaultSchedulers
())
.
subscribe
(
object
:
HttpResultSubscriber
<
GetKSYunObjectIdBean
.
Response
>()
{
override
fun
onSuccess
(
result
:
HttpResult
<
GetKSYunObjectIdBean
.
Response
>?)
{
...
...
@@ -166,7 +167,7 @@ class ApiService {
})
}
//获取金山云Bucket
//
获取金山云Bucket
fun
getKSYunBucket
(
apiCallback
:
IGetKSYunBucketCallback
)
{
val
timeStamp
=
System
.
currentTimeMillis
()
val
publicParamsMap
=
HttpParamsUtils
.
getPublicParamsMap
(
timeStamp
)
...
...
@@ -184,7 +185,7 @@ class ApiService {
})
}
//获取金山云Bucket
//
获取金山云Bucket
fun
businessLicenseOCR
(
apiCallback
:
IBusinessLicenseOCRCallback
,
requestParams
:
HashMap
<
String
,
String
?
>)
{
val
timeStamp
=
System
.
currentTimeMillis
()
val
publicParamsMap
=
HttpParamsUtils
.
getPublicParamsMap
(
timeStamp
)
...
...
@@ -203,9 +204,7 @@ class ApiService {
})
}
//文件上传
// 文件上传
fun
uploadFile
(
apiCallback
:
IUploadFileCallback
,
requestParams
:
MultipartBody
.
Part
)
{
val
timeStamp
=
System
.
currentTimeMillis
()
val
publicParamsMap
=
HttpParamsUtils
.
getPublicParamsMap
(
timeStamp
)
...
...
@@ -224,7 +223,7 @@ class ApiService {
})
}
//pushToken绑定接口
//
pushToken绑定接口
fun
pushTokenAndroid
(
requestParams
:
HashMap
<
String
,
String
?
>)
{
val
timeStamp
=
System
.
currentTimeMillis
()
val
publicParamsMap
=
HttpParamsUtils
.
getPublicParamsMap
(
timeStamp
)
...
...
Components/newscontent/src/main/java/com/yidian/shenghuoquan/newscontent/http/CommonService.kt
View file @
4ad1a0a2
...
...
@@ -38,7 +38,7 @@ interface CommonService {
fun
identifyIdOcrVerify
(
@QueryMap
commonParams
:
Map
<
String
,
String
>,
@Body
requestParams
:
Map
<
String
,
String
?
>):
Observable
<
HttpResult
<
Any
?
>>
@GET
(
URLs
.
getKSYunObjectId
)
fun
getKSYunObjectId
(
@QueryMap
commonParams
:
Map
<
String
,
String
>)
:
Observable
<
HttpResult
<
Any
?
>>
fun
getKSYunObjectId
(
@QueryMap
commonParams
:
Map
<
String
,
String
>
,
@QueryMap
requestParams
:
Map
<
String
,
String
?
>
)
:
Observable
<
HttpResult
<
Any
?
>>
@GET
(
URLs
.
getKSYunBucket
)
fun
getKSYunBucket
(
@QueryMap
commonParams
:
Map
<
String
,
String
>)
:
Observable
<
HttpResult
<
Any
?
>>
...
...
Components/newscontent/src/main/java/com/yidian/shenghuoquan/newscontent/http/httpbean/GetIDCardOCRBean.kt
View file @
4ad1a0a2
...
...
@@ -9,7 +9,8 @@ class GetIDCardOCRBean(val request: Request, val response: Response) {
data class
Request
(
val
posit_image_objectid
:
String
,
val
back_image_objectid
:
String
,
val
bucket
:
String
val
posit_bucket
:
String
,
val
back_bucket
:
String
)
data class
Response
(
...
...
Components/newscontent/src/main/java/com/yidian/shenghuoquan/newscontent/ui/LifeAccountEnterpriseCertificationActivity.kt
View file @
4ad1a0a2
...
...
@@ -97,6 +97,7 @@ class LifeAccountEnterpriseCertificationActivity :
KS3Core
.
INSTANCE
.
uploadObject
(
generateUploadFile
(
filePath
),
KS3Core
.
ObjectType
.
IMAGE
,
KS3Core
.
ScenarioType
.
BUSINESS_LICENSE
,
object
:
KS3Core
.
OnKS3TaskListener
{
override
fun
onTaskStart
()
{
...
...
Components/newscontent/src/main/java/com/yidian/shenghuoquan/newscontent/ui/alive/AliveTestActivity.kt
View file @
4ad1a0a2
...
...
@@ -188,7 +188,7 @@ class AliveTestActivity : BaseActivity<ActivityAliveLayoutBinding>(), PreCallbac
fos
.
flush
()
fos
.
close
()
KS3Core
.
INSTANCE
.
uploadObject
(
file
,
object
:
KS3Core
.
OnKS3TaskListener
{
KS3Core
.
INSTANCE
.
uploadObject
(
file
,
KS3Core
.
ScenarioType
.
ALIVE_DETECT
,
object
:
KS3Core
.
OnKS3TaskListener
{
override
fun
onTaskStart
()
{
}
...
...
@@ -205,6 +205,7 @@ class AliveTestActivity : BaseActivity<ActivityAliveLayoutBinding>(), PreCallbac
val
requestParams
=
HashMap
<
String
,
String
?>()
requestParams
[
"biz_token"
]
=
bizToken
requestParams
[
"meglive_objectid"
]
=
objectKey
requestParams
[
"meglive_bucket"
]
=
bucket
ApiService
.
identifyIdOcrVerify
(
identifyIdOcrVerifyCallback
,
requestParams
)
}
...
...
Components/newscontent/src/main/java/com/yidian/shenghuoquan/newscontent/ui/auth/LifeAccountAuthActivity.kt
View file @
4ad1a0a2
...
...
@@ -74,9 +74,7 @@ class LifeAccountAuthActivity : BaseActivity<ActivityLifeAccountAuthBinding>(),
}
R
.
id
.
view_enterprise_auth
->
{
// 请求企业认证信息 用于回显已填入的信息
val
params
=
HashMap
<
String
,
String
?>(
1
)
params
[
"life_account_id"
]
=
null
ApiService
.
authMerchantCheck
(
this
,
params
)
ApiService
.
authMerchantCheck
(
this
,
hashMapOf
())
}
}
}
...
...
Components/newscontent/src/main/java/com/yidian/shenghuoquan/newscontent/ui/auth/LifeAccountBusinessLicenseAuthFragment.kt
View file @
4ad1a0a2
...
...
@@ -182,7 +182,9 @@ class LifeAccountBusinessLicenseAuthFragment :
)
KS3Core
.
INSTANCE
.
uploadObject
(
File
(
commonPath
+
Constant
.
FILE_PATH_BUSINESS_LICENSE
),
KS3Core
.
ObjectType
.
IMAGE
,
this
KS3Core
.
ObjectType
.
IMAGE
,
KS3Core
.
ScenarioType
.
BUSINESS_LICENSE
,
this
)
}
...
...
Components/newscontent/src/main/java/com/yidian/shenghuoquan/newscontent/ui/auth/LifeAccountIDCardAuthFragment.kt
View file @
4ad1a0a2
...
...
@@ -349,7 +349,9 @@ class LifeAccountIDCardAuthFragment : BaseFragment<FragmentLifeAccountIdCardAuth
private
fun
startUpload
()
{
KS3Core
.
INSTANCE
.
uploadObject
(
File
(
cachePath
+
Constant
.
FILE_PATH_ID_CARD_PORTRAIT_FACE
),
KS3Core
.
ObjectType
.
IMAGE
,
object
:
KS3Core
.
OnKS3TaskListener
{
KS3Core
.
ObjectType
.
IMAGE
,
KS3Core
.
ScenarioType
.
ID_CARD
,
object
:
KS3Core
.
OnKS3TaskListener
{
override
fun
onTaskStart
()
{
}
...
...
@@ -377,7 +379,9 @@ class LifeAccountIDCardAuthFragment : BaseFragment<FragmentLifeAccountIdCardAuth
}
KS3Core
.
INSTANCE
.
uploadObject
(
File
(
cachePath
+
Constant
.
FILE_PATH_ID_CARD_NATIONAL_EMBLEM_FACE
),
KS3Core
.
ObjectType
.
IMAGE
,
object
:
KS3Core
.
OnKS3TaskListener
{
KS3Core
.
ObjectType
.
IMAGE
,
KS3Core
.
ScenarioType
.
ID_CARD
,
object
:
KS3Core
.
OnKS3TaskListener
{
override
fun
onTaskStart
()
{
}
...
...
@@ -438,8 +442,10 @@ class LifeAccountIDCardAuthFragment : BaseFragment<FragmentLifeAccountIdCardAuth
LifeAccountAuthDataManager
.
personalAuthData
.
idCardPortraitFaceObjectKey
requestParams
[
"back_image_objectid"
]
=
LifeAccountAuthDataManager
.
personalAuthData
.
idCardNationalEmblemFaceObjectKey
requestParams
[
"bucket"
]
=
requestParams
[
"
posit_
bucket"
]
=
LifeAccountAuthDataManager
.
personalAuthData
.
idCardPortraitFaceBucket
requestParams
[
"back_bucket"
]
=
LifeAccountAuthDataManager
.
personalAuthData
.
idCardNationalEmblemFaceBucket
ApiService
.
getIDCardOCR
(
this
,
requestParams
)
}
...
...
@@ -542,6 +548,7 @@ class LifeAccountIDCardAuthFragment : BaseFragment<FragmentLifeAccountIdCardAuth
)
KS3Core
.
INSTANCE
.
uploadObject
(
cachePath
+
Constant
.
FILE_PATH_ALIVE_DETECT_VERIFY_DATA
,
KS3Core
.
ScenarioType
.
ALIVE_DETECT
,
this
)
}
else
{
...
...
@@ -573,10 +580,13 @@ class LifeAccountIDCardAuthFragment : BaseFragment<FragmentLifeAccountIdCardAuth
objectKey
?.
let
{
LifeAccountAuthDataManager
.
personalAuthData
.
liveDetectObjectKey
=
it
}
bucket
?.
let
{
LifeAccountAuthDataManager
.
personalAuthData
.
liveDetectBucket
=
it
}
val
requestParams
=
HashMap
<
String
,
String
?>()
requestParams
[
"biz_token"
]
=
LifeAccountAuthDataManager
.
personalAuthData
.
liveDetectBizToken
requestParams
[
"meglive_objectid"
]
=
LifeAccountAuthDataManager
.
personalAuthData
.
liveDetectObjectKey
requestParams
[
"meglive_objectid"
]
=
objectKey
requestParams
[
"meglive_bucket"
]
=
bucket
ApiService
.
identifyIdOcrVerify
(
this
,
requestParams
)
}
...
...
Components/newscontent/src/main/java/com/yidian/shenghuoquan/newscontent/ui/idcard/IDCardTestActivity.kt
View file @
4ad1a0a2
...
...
@@ -79,7 +79,7 @@ class IDCardTestActivity : BaseActivity<ActivityIdcardBinding>() {
}
idCardFront
?.
compress
(
Bitmap
.
CompressFormat
.
JPEG
,
100
,
FileOutputStream
(
frontFile
))
idCardBack
?.
compress
(
Bitmap
.
CompressFormat
.
JPEG
,
100
,
FileOutputStream
(
backFile
))
KS3Core
.
INSTANCE
.
uploadObject
(
frontFile
,
object
:
KS3Core
.
OnKS3TaskListener
{
KS3Core
.
INSTANCE
.
uploadObject
(
frontFile
,
KS3Core
.
ScenarioType
.
ID_CARD
,
object
:
KS3Core
.
OnKS3TaskListener
{
override
fun
onTaskStart
()
{
}
...
...
@@ -103,7 +103,7 @@ class IDCardTestActivity : BaseActivity<ActivityIdcardBinding>() {
if
(
bucket
!=
null
)
{
idCardFrontBucket
=
bucket
}
KS3Core
.
INSTANCE
.
uploadObject
(
backFile
,
object
:
KS3Core
.
OnKS3TaskListener
{
KS3Core
.
INSTANCE
.
uploadObject
(
backFile
,
KS3Core
.
ScenarioType
.
ID_CARD
,
object
:
KS3Core
.
OnKS3TaskListener
{
override
fun
onTaskStart
()
{
}
...
...
@@ -130,7 +130,8 @@ class IDCardTestActivity : BaseActivity<ActivityIdcardBinding>() {
val
requestParams
=
HashMap
<
String
,
String
?>()
requestParams
[
"posit_image_objectid"
]
=
idCardFrontObjectKey
requestParams
[
"back_image_objectid"
]
=
idCardBackObjectKey
requestParams
[
"bucket"
]
=
idCardFrontBucket
requestParams
[
"posit_bucket"
]
=
idCardFrontBucket
requestParams
[
"back_bucket"
]
=
idCardBackBucket
ApiService
.
getIDCardOCR
(
object
:
IGetIDCardOCRCallback
{
override
fun
getIDCardOCRSuccess
(
result
:
GetIDCardOCRBean
.
Response
?)
{
Log
.
d
(
KS3Core
.
TAG
,
"name: ${result?.posit?.name}, id num: ${result?.posit?.idcard_number}"
)
...
...
Components/newscontent/src/main/java/com/yidian/shenghuoquan/newscontent/utils/KS3Core.kt
View file @
4ad1a0a2
...
...
@@ -14,7 +14,6 @@ import com.ksyun.ks3.services.request.PutObjectRequest
import
com.yidian.common.YdBaseApplication
import
com.yidian.shenghuoquan.newscontent.http.ApiService
import
com.yidian.shenghuoquan.newscontent.http.httpbean.GetKSYunObjectIdBean
import
com.yidian.shenghuoquan.newscontent.http.httpbean.GetKSYunTokenBean
import
com.yidian.shenghuoquan.newscontent.http.httpbean.IGetKSYunObjectIdCallback
import
com.yidian.utils.MD5Util
import
com.yidian.yac.ftdevicefinger.core.FtDeviceFingerManager
...
...
@@ -112,8 +111,14 @@ class KS3Core private constructor(val context: Context) : AuthListener {
* 文件上传
* @param path 本地文件全路径
* @param type 文件类型
* @param scenario 业务场景
*/
fun
uploadObject
(
path
:
String
,
type
:
ObjectType
,
listener
:
OnKS3TaskListener
)
{
fun
uploadObject
(
path
:
String
,
type
:
ObjectType
,
scenario
:
ScenarioType
,
listener
:
OnKS3TaskListener
)
{
ApiService
.
getKSYunObjectId
(
object
:
IGetKSYunObjectIdCallback
{
override
fun
getKSYunObjectIdSuccess
(
result
:
GetKSYunObjectIdBean
.
Response
?)
{
Log
.
d
(
...
...
@@ -140,14 +145,15 @@ class KS3Core private constructor(val context: Context) : AuthListener {
override
fun
getKSYunObjectIdFailure
(
message
:
String
?)
{
Log
.
e
(
TAG
,
"request get KSYun objectId fail, message: $message"
)
}
})
}
,
hashMapOf
(
Pair
(
"scenario"
,
scenario
.
scenario
))
)
}
/**
* 文件上传
* @param path 本地文件全路径
* @param scenario 业务场景
*/
fun
uploadObject
(
path
:
String
,
listener
:
OnKS3TaskListener
)
{
fun
uploadObject
(
path
:
String
,
scenario
:
ScenarioType
,
listener
:
OnKS3TaskListener
)
{
ApiService
.
getKSYunObjectId
(
object
:
IGetKSYunObjectIdCallback
{
override
fun
getKSYunObjectIdSuccess
(
result
:
GetKSYunObjectIdBean
.
Response
?)
{
Log
.
d
(
...
...
@@ -166,14 +172,15 @@ class KS3Core private constructor(val context: Context) : AuthListener {
override
fun
getKSYunObjectIdFailure
(
message
:
String
?)
{
Log
.
e
(
TAG
,
"request get KSYun objectId fail, message: $message"
)
}
})
}
,
hashMapOf
(
Pair
(
"scenario"
,
scenario
.
scenario
))
)
}
/**
* 文件上传
* @param file 文件实体
* @param scenario 业务场景
*/
fun
uploadObject
(
file
:
File
,
listener
:
OnKS3TaskListener
)
{
fun
uploadObject
(
file
:
File
,
scenario
:
ScenarioType
,
listener
:
OnKS3TaskListener
)
{
ApiService
.
getKSYunObjectId
(
object
:
IGetKSYunObjectIdCallback
{
override
fun
getKSYunObjectIdSuccess
(
result
:
GetKSYunObjectIdBean
.
Response
?)
{
Log
.
d
(
...
...
@@ -192,15 +199,21 @@ class KS3Core private constructor(val context: Context) : AuthListener {
override
fun
getKSYunObjectIdFailure
(
message
:
String
?)
{
Log
.
e
(
TAG
,
"request get KSYun objectId fail, message: $message"
)
}
})
}
,
hashMapOf
(
Pair
(
"scenario"
,
scenario
.
scenario
))
)
}
/**
* 文件上传
* @param file 文件实体
* @param type 文件类型
* @param scenario 业务场景
*/
fun
uploadObject
(
file
:
File
,
type
:
ObjectType
,
listener
:
OnKS3TaskListener
)
{
fun
uploadObject
(
file
:
File
,
type
:
ObjectType
,
scenario
:
ScenarioType
,
listener
:
OnKS3TaskListener
)
{
ApiService
.
getKSYunObjectId
(
object
:
IGetKSYunObjectIdCallback
{
override
fun
getKSYunObjectIdSuccess
(
result
:
GetKSYunObjectIdBean
.
Response
?)
{
Log
.
d
(
...
...
@@ -227,7 +240,7 @@ class KS3Core private constructor(val context: Context) : AuthListener {
override
fun
getKSYunObjectIdFailure
(
message
:
String
?)
{
Log
.
e
(
TAG
,
"request get KSYun objectId fail, message: $message"
)
}
})
}
,
hashMapOf
(
Pair
(
"scenario"
,
scenario
.
scenario
))
)
}
/**
...
...
@@ -295,6 +308,20 @@ class KS3Core private constructor(val context: Context) : AuthListener {
VIDEO
,
IMAGE
}
/**
* 业务场景的类型
*/
enum
class
ScenarioType
(
val
scenario
:
String
)
{
// 身份证
ID_CARD
(
"id_card"
),
// 活体数据
ALIVE_DETECT
(
"living_data"
),
// 营业执照
BUSINESS_LICENSE
(
"business_license"
)
}
/**
* 金山云object上传handler
*/
...
...
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