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() }) } })