文档
测试

身份证单张上传

POST
http://localhost:8090/dev-api/interface/elt/upload

请求参数

参数名
类型
描述
必填
base64Data
string
图片base64
必填
side
string
枚举 (身份证正面:front 身份证反面: back 其它正常图片: none)示例:front
必填

响应参数

参数名
类型
描述
必填
msg
string
示例:操作成功
必填
code
int
示例:200
必填
data
object
数据字典
必填
risk_type_desc
string
示例:正常身份证
必填
side
string
示例:front
必填
risk_type
string
示例:normal
必填
file
string
路径 示例:/profile/idcard/07c1deb64b7c45ad8670d59340100080.jpg
必填
image_status_desc
string
示例:识别正常
必填
idcard_number_type
int
示例:1
必填
image_status
string
示例:normal
必填
idcard_number_type_desc
string
示例:身份证证号和性别、出生信息一致
必填
info
object
数据字典
必填
address
string
示例:南京市鼓楼区渊声巷11号416室
必填
nation
string
示例:汉
必填
idcard
string
示例:320106198705131217
必填
sex
string
示例:男
必填
name
string
示例:高飞
必填
birth
string
示例:19870513
必填

说明 / 示例

>d 请把file路径值传给申报接口 ###### 身份证正面判断 >i if(data.image_status !== 'normal'){ //识别失败 this.msgError(data.image_status_desc); }else if(data.risk_type !== 'normal' && data.risk_type !== 'copy'){ //识别失败 this.msgError(data.risk_type_desc); }else if(data.idcard_number_type !== 1){ //识别失败 this.msgError(data.idcard_number_type_desc); }else{ //识别成功 } ###### 身份证反面判断 >i if(data.image_status !== 'normal'){ //识别失败 this.msgError(data.image_status_desc); }else if(data.risk_type !== 'normal' && data.risk_type !== 'copy'){ //识别失败 this.msgError(data.risk_type_desc); }else{ //识别成功 }