|
@@ -227,7 +227,6 @@
|
|
image: idcardFace,
|
|
image: idcardFace,
|
|
image_type: 'BASE64'
|
|
image_type: 'BASE64'
|
|
}]
|
|
}]
|
|
- console.log("人脸对比:", data)
|
|
|
|
uni.request({
|
|
uni.request({
|
|
url: '/baiduApi/rest/2.0/face/v3/match?access_token=' + this.token,
|
|
url: '/baiduApi/rest/2.0/face/v3/match?access_token=' + this.token,
|
|
data: data,
|
|
data: data,
|
|
@@ -236,7 +235,6 @@
|
|
'Content-Type': 'application/json'
|
|
'Content-Type': 'application/json'
|
|
},
|
|
},
|
|
success: (res) => {
|
|
success: (res) => {
|
|
- console.log('对比', res);
|
|
|
|
if (res.data.error_msg == 'SUCCESS') {
|
|
if (res.data.error_msg == 'SUCCESS') {
|
|
this.score = res.data.result.score;
|
|
this.score = res.data.result.score;
|
|
|
|
|
|
@@ -274,7 +272,6 @@
|
|
|
|
|
|
},
|
|
},
|
|
error: (err) => {
|
|
error: (err) => {
|
|
- console.log("对比失败,", err);
|
|
|
|
uni.hideLoading()
|
|
uni.hideLoading()
|
|
}
|
|
}
|
|
})
|
|
})
|
|
@@ -310,7 +307,6 @@
|
|
user_id: this.idcardMD5,
|
|
user_id: this.idcardMD5,
|
|
action_type: 'REPLACE', // 操作方式 APPEND: 当user_id在库中已经存在时,对此user_id重复注册时,新注册的图片默认会追加到该user_id下 REPLACE : 当对此user_id重复注册时,则会用新图替换库中该user_id下所有图片 默认使用APPEND
|
|
action_type: 'REPLACE', // 操作方式 APPEND: 当user_id在库中已经存在时,对此user_id重复注册时,新注册的图片默认会追加到该user_id下 REPLACE : 当对此user_id重复注册时,则会用新图替换库中该user_id下所有图片 默认使用APPEND
|
|
}
|
|
}
|
|
- console.log("人脸注册:", data)
|
|
|
|
uni.request({
|
|
uni.request({
|
|
url: '/baiduApi/rest/2.0/face/v3/faceset/user/add?access_token=' + this.token,
|
|
url: '/baiduApi/rest/2.0/face/v3/faceset/user/add?access_token=' + this.token,
|
|
data: data,
|
|
data: data,
|
|
@@ -319,7 +315,6 @@
|
|
'Content-Type': 'application/json'
|
|
'Content-Type': 'application/json'
|
|
},
|
|
},
|
|
success: (res) => {
|
|
success: (res) => {
|
|
- console.log("人脸注册:", res);
|
|
|
|
uni.hideLoading()
|
|
uni.hideLoading()
|
|
if (res.data.error_msg != 'SUCCESS') {
|
|
if (res.data.error_msg != 'SUCCESS') {
|
|
showConfirm(res.data.error_msg)
|
|
showConfirm(res.data.error_msg)
|
|
@@ -340,7 +335,6 @@
|
|
match_threshold: config.score,
|
|
match_threshold: config.score,
|
|
max_user_num: 50
|
|
max_user_num: 50
|
|
}
|
|
}
|
|
- console.log("人脸搜索:", data)
|
|
|
|
uni.request({
|
|
uni.request({
|
|
url: '/baiduApi/rest/2.0/face/v3/search?access_token=' + this.token,
|
|
url: '/baiduApi/rest/2.0/face/v3/search?access_token=' + this.token,
|
|
data: data,
|
|
data: data,
|
|
@@ -349,11 +343,9 @@
|
|
'Content-Type': 'application/json'
|
|
'Content-Type': 'application/json'
|
|
},
|
|
},
|
|
success: (res) => {
|
|
success: (res) => {
|
|
- console.log("人脸搜索:", res)
|
|
|
|
if (res.data.error_msg == 'SUCCESS') {
|
|
if (res.data.error_msg == 'SUCCESS') {
|
|
// this.isSearch = true
|
|
// this.isSearch = true
|
|
if (res.data.result.user_list.length < 1) {
|
|
if (res.data.result.user_list.length < 1) {
|
|
- console.log("人脸不存在");
|
|
|
|
this.createGroup()
|
|
this.createGroup()
|
|
} else {
|
|
} else {
|
|
if (res.data.result.user_list[0].score >= config.score) {
|
|
if (res.data.result.user_list[0].score >= config.score) {
|
|
@@ -409,17 +401,14 @@
|
|
})
|
|
})
|
|
this.$refs['baseForm'].validate().then(res => {
|
|
this.$refs['baseForm'].validate().then(res => {
|
|
UploadOne(this.baseFormData.prelrZjz, {}).then(re => {
|
|
UploadOne(this.baseFormData.prelrZjz, {}).then(re => {
|
|
- console.log("re", re)
|
|
|
|
this.baseFormData.lrZjz = re.data.url
|
|
this.baseFormData.lrZjz = re.data.url
|
|
UploadOne(this.src, {}).then(re => {
|
|
UploadOne(this.src, {}).then(re => {
|
|
- console.log("re", re)
|
|
|
|
this.baseFormData.lrTx = re.data.url
|
|
this.baseFormData.lrTx = re.data.url
|
|
if (this.userInfo.userType == '07') this.baseFormData.id = this
|
|
if (this.userInfo.userType == '07') this.baseFormData.id = this
|
|
.userInfo.userId
|
|
.userInfo.userId
|
|
|
|
|
|
if (this.updateFlag) {
|
|
if (this.updateFlag) {
|
|
updateKhjbxx(this.baseFormData).then(r => {
|
|
updateKhjbxx(this.baseFormData).then(r => {
|
|
- console.log("r:", r)
|
|
|
|
uni.hideLoading()
|
|
uni.hideLoading()
|
|
if (r.code == 200) {
|
|
if (r.code == 200) {
|
|
toast('保存成功')
|
|
toast('保存成功')
|
|
@@ -432,7 +421,6 @@
|
|
})
|
|
})
|
|
} else {
|
|
} else {
|
|
SaveKhjbxx(this.baseFormData).then(r => {
|
|
SaveKhjbxx(this.baseFormData).then(r => {
|
|
- console.log("r:", r)
|
|
|
|
uni.hideLoading()
|
|
uni.hideLoading()
|
|
if (r.code == 200) {
|
|
if (r.code == 200) {
|
|
toast('保存成功')
|
|
toast('保存成功')
|
|
@@ -452,7 +440,6 @@
|
|
})
|
|
})
|
|
}).catch(err => {
|
|
}).catch(err => {
|
|
uni.hideLoading()
|
|
uni.hideLoading()
|
|
- console.log(err);
|
|
|
|
})
|
|
})
|
|
} else {
|
|
} else {
|
|
showConfirm('请重新采集人像')
|
|
showConfirm('请重新采集人像')
|
|
@@ -489,7 +476,6 @@
|
|
uni.getFileInfo({
|
|
uni.getFileInfo({
|
|
filePath: blobUrl,
|
|
filePath: blobUrl,
|
|
success: (res) => {
|
|
success: (res) => {
|
|
- console.log(res);
|
|
|
|
let size = res.size
|
|
let size = res.size
|
|
let scale = 1
|
|
let scale = 1
|
|
if (size / 1024 / 1024 > 0.9) {
|
|
if (size / 1024 / 1024 > 0.9) {
|
|
@@ -502,7 +488,7 @@
|
|
}
|
|
}
|
|
},
|
|
},
|
|
fail: (err) => {
|
|
fail: (err) => {
|
|
- console.log("err:", err);
|
|
|
|
|
|
+ console.log(err);
|
|
}
|
|
}
|
|
})
|
|
})
|
|
},
|
|
},
|
|
@@ -561,7 +547,6 @@
|
|
GetLrByZjhm({
|
|
GetLrByZjhm({
|
|
lrJmzjhm: this.idcardMD5
|
|
lrJmzjhm: this.idcardMD5
|
|
}).then(res => {
|
|
}).then(res => {
|
|
- console.log(res);
|
|
|
|
if (res.data) this.baseFormData = decryptData_ECB(res.data, ["lrZjhm", "lrXm", "lrHjbcxx",
|
|
if (res.data) this.baseFormData = decryptData_ECB(res.data, ["lrZjhm", "lrXm", "lrHjbcxx",
|
|
"lrXjdzBcxx",
|
|
"lrXjdzBcxx",
|
|
"lrCydh", "lrPoxm", "lrPoZjmh", "jhrXm", "jhrSjhm", "zlrXm", "zlrDh", "cjzh",
|
|
"lrCydh", "lrPoxm", "lrPoZjmh", "jhrXm", "jhrSjhm", "zlrXm", "zlrDh", "cjzh",
|