From d3a2ea6340c94a1f930d806a9eed239e416701c8 Mon Sep 17 00:00:00 2001 From: binbin_pan Date: Wed, 18 Sep 2024 09:18:21 +0800 Subject: [PATCH] =?UTF-8?q?PDF=20=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/YNEduApp/learnProj/pdfStudy.vue | 50 ++++++++++++++------------- 1 file changed, 26 insertions(+), 24 deletions(-) diff --git a/pages/YNEduApp/learnProj/pdfStudy.vue b/pages/YNEduApp/learnProj/pdfStudy.vue index ebe736f..169b490 100644 --- a/pages/YNEduApp/learnProj/pdfStudy.vue +++ b/pages/YNEduApp/learnProj/pdfStudy.vue @@ -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) => {