PDF 优化
This commit is contained in:
parent
7934c43ecd
commit
d3a2ea6340
|
|
@ -153,30 +153,32 @@ export default {
|
|||
// 拍照录入
|
||||
openPhotograph() {
|
||||
this.isHide = true
|
||||
uni.chooseImage({
|
||||
count: 1,
|
||||
sizeType: ['compressed'],
|
||||
sourceType: ['camera'],
|
||||
success: res => {
|
||||
let url = ''
|
||||
console.log('🚀 ~ res-拍照:', res)
|
||||
this.imgToBase64(res.tempFilePaths[0]).then(base64 => {
|
||||
url = base64
|
||||
console.log('🚀 ~ this.imgToBase64 ~ base64:', url)
|
||||
this.getFaceRecognition({ userId: uni.getStorageSync('userId'), img: url })
|
||||
})
|
||||
},
|
||||
fail(err) {
|
||||
console.log('🚀 ~ openFaceScan ~ 人脸识别失败', err)
|
||||
uni.showToast({
|
||||
title: '人脸识别失败',
|
||||
icon: ''
|
||||
})
|
||||
setTimeout(() => {
|
||||
this.updStudyDuration()
|
||||
}, 1000)
|
||||
}
|
||||
})
|
||||
setTimeout(() => {
|
||||
uni.chooseImage({
|
||||
count: 1,
|
||||
sizeType: ['compressed'],
|
||||
sourceType: ['camera'],
|
||||
success: res => {
|
||||
let url = ''
|
||||
console.log('🚀 ~ res-拍照:', res)
|
||||
this.imgToBase64(res.tempFilePaths[0]).then(base64 => {
|
||||
url = base64
|
||||
console.log('🚀 ~ this.imgToBase64 ~ base64:', url)
|
||||
this.getFaceRecognition({ userId: uni.getStorageSync('userId'), img: url })
|
||||
})
|
||||
},
|
||||
fail(err) {
|
||||
console.log('🚀 ~ openFaceScan ~ 人脸识别失败', err)
|
||||
uni.showToast({
|
||||
title: '人脸识别失败',
|
||||
icon: ''
|
||||
})
|
||||
setTimeout(() => {
|
||||
this.updStudyDuration()
|
||||
}, 1000)
|
||||
}
|
||||
})
|
||||
}, 500)
|
||||
},
|
||||
imgToBase64(data) {
|
||||
return new Promise((resolve, reject) => {
|
||||
|
|
|
|||
Loading…
Reference in New Issue