Commit 8255f21b authored by 李晓兵's avatar 李晓兵

'测试附件'

parent b559421d
Pipeline #2905 canceled with stages
...@@ -423,11 +423,14 @@ export default { ...@@ -423,11 +423,14 @@ export default {
hlsPopup.showLongCenter('请拍照') hlsPopup.showLongCenter('请拍照')
} }
hlsUtil.openCamera(cameraoptions, success, error) hlsUtil.openCamera(cameraoptions, success, error)
// this.confirmContractSign('', status)
}, },
// 执行同意的逻辑(查询对应的身份证正面图片->人脸识别->确认签约) // 执行同意的逻辑(查询对应的身份证正面图片->人脸识别->确认签约)
async confirmContractSign (faceImg, status) { async confirmContractSign (faceImg, status) {
let idCardImgUrl = await this.idCardImgUrlGet() let idCardImgUrl = await this.idCardImgUrlGet()
this.faceIdentify(faceImg, idCardImgUrl, status) if(idCardImgUrl){
this.faceIdentify(faceImg, idCardImgUrl, status)
}
}, },
// 获取身份证照片 // 获取身份证照片
async idCardImgUrlGet () { async idCardImgUrlGet () {
...@@ -439,10 +442,10 @@ export default { ...@@ -439,10 +442,10 @@ export default {
hlsPopup.showLoading('请稍候') hlsPopup.showLoading('请稍候')
let res = await vm.$post(url, param) let res = await vm.$post(url, param)
hlsPopup.hideLoading() hlsPopup.hideLoading()
if (res.result === 'S') { if (res.result === 'S' && res.info) {
let cardUrl = process.env.filePath + 'attachment_id=' + res.info.attachment_id + '&access_token=' + window.localStorage.access_token let cardUrl = process.env.filePath + 'attachment_id=' + res.info.attachment_id + '&access_token=' + window.localStorage.access_token
return cardUrl return cardUrl
} else if(res.result === 'S' && !res.info.attachment_id){ } else if(res.result === 'S' && !res.info){
hlsPopup.showLongCenter('未找到身份证照片') hlsPopup.showLongCenter('未找到身份证照片')
return null return null
} else { } else {
......
...@@ -316,7 +316,9 @@ export default { ...@@ -316,7 +316,9 @@ export default {
// 执行同意的逻辑(查询对应的身份证正面图片->人脸识别->确认签约) // 执行同意的逻辑(查询对应的身份证正面图片->人脸识别->确认签约)
async confirmContractSign (faceImg, status) { async confirmContractSign (faceImg, status) {
let idCardImgUrl = await this.idCardImgUrlGet() let idCardImgUrl = await this.idCardImgUrlGet()
this.faceIdentify(faceImg, idCardImgUrl, status) if(idCardImgUrl){
this.faceIdentify(faceImg, idCardImgUrl, status)
}
}, },
// 获取身份证照片 // 获取身份证照片
async idCardImgUrlGet () { async idCardImgUrlGet () {
...@@ -328,10 +330,10 @@ export default { ...@@ -328,10 +330,10 @@ export default {
hlsPopup.showLoading('请稍候') hlsPopup.showLoading('请稍候')
let res = await vm.$post(url, param) let res = await vm.$post(url, param)
hlsPopup.hideLoading() hlsPopup.hideLoading()
if (res.result === 'S') { if (res.result === 'S' && res.info) {
let cardUrl = process.env.filePath + 'attachment_id=' + res.info.attachment_id + '&access_token=' + window.localStorage.access_token let cardUrl = process.env.filePath + 'attachment_id=' + res.info.attachment_id + '&access_token=' + window.localStorage.access_token
return cardUrl return cardUrl
} else if (res.result === 'S' && !res.info.attachment_id) { } else if(res.result === 'S' && !res.info){
hlsPopup.showLongCenter('未找到身份证照片') hlsPopup.showLongCenter('未找到身份证照片')
return null return null
} else { } else {
......
...@@ -880,7 +880,6 @@ export default { ...@@ -880,7 +880,6 @@ export default {
}, },
// 图片保存 // 图片保存
save_picture (list) { save_picture (list) {
alert(JSON.stringify(list))
let vm = this let vm = this
if (list.length) { if (list.length) {
// hlsPopup.showLoading('图片上传请稍候') // hlsPopup.showLoading('图片上传请稍候')
......
...@@ -395,7 +395,6 @@ export default { ...@@ -395,7 +395,6 @@ export default {
} }
options.mimeType = 'multipart/form-date' options.mimeType = 'multipart/form-date'
let ft = new FileTransfer() // eslint-disable-line let ft = new FileTransfer() // eslint-disable-line
alert('options.fileName '+options.fileName)
function uploadSuccess (result) { function uploadSuccess (result) {
success(JSON.parse(result.response)) success(JSON.parse(result.response))
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment