From 4491ed5548812a8bf5ac60b40e28266a805a1b69 Mon Sep 17 00:00:00 2001 From: "@zuopngfei" Date: Mon, 11 Aug 2025 16:56:27 +0800 Subject: [PATCH] =?UTF-8?q?=E8=AF=8A=E6=96=AD=E4=BF=A1=E6=81=AF=E5=BD=95?= =?UTF-8?q?=E5=85=A5=E5=A2=9E=E5=8A=A0open=E2=80=94=E2=80=94id?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/AddTherapeuticRegimen/index.js | 2 +- pages/followUp/index.js | 10 ++++++++-- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/pages/AddTherapeuticRegimen/index.js b/pages/AddTherapeuticRegimen/index.js index c67f9b9..064e16c 100644 --- a/pages/AddTherapeuticRegimen/index.js +++ b/pages/AddTherapeuticRegimen/index.js @@ -323,7 +323,7 @@ Page({ handleUpload(e) { uploadFileToOSS().then((imageUrls) => { - wx.showToast({ title: '上传成功,正在识别内容!', icon: 'none' }); + wx.showLoading({ title: '正在识别内容!', icon: 'none' }); this.setData({ imageFile: imageUrls }) diff --git a/pages/followUp/index.js b/pages/followUp/index.js index 059f495..fbf94e5 100644 --- a/pages/followUp/index.js +++ b/pages/followUp/index.js @@ -266,18 +266,24 @@ Page({ if (mode == 'mdt_image') { wx.showToast({ title: '上传成功!', icon: 'none' }); } else if (mode == 'b_mode_image') { - wx.showToast({ title: '上传成功,正在识别内容!', icon: 'none' }); + wx.showLoading({ title: '正在识别内容!', icon: 'none' }); getBOcr(imageUrl).then(ocrRes => { console.log(ocrRes) + wx.hideLoading() wx.showToast({ title: '识别完成!', icon: 'none' }) this.setFormData(ocrRes, mode) + }).catch(err => { + wx.hideLoading() }) } else { - wx.showToast({ title: '上传成功,正在识别内容!', icon: 'none' }); + wx.showLoading({ title: '正在识别内容!', icon: 'none' }); getOcr(imageUrl).then(ocrRes => { console.log(ocrRes) + wx.hideLoading() wx.showToast({ title: '识别完成!', icon: 'none' }) this.setFormData(ocrRes, mode) + }).catch(err => { + wx.hideLoading() }) } })