From c288a88104108bc4c2691e35649f5dba14860692 Mon Sep 17 00:00:00 2001 From: "@zuopngfei" Date: Wed, 30 Jul 2025 14:35:48 +0800 Subject: [PATCH] sds --- pages/mmp-7/index.js | 40 +++++++++++++++++++++++++++++++++++++--- 1 file changed, 37 insertions(+), 3 deletions(-) diff --git a/pages/mmp-7/index.js b/pages/mmp-7/index.js index 50e604a..c04a845 100644 --- a/pages/mmp-7/index.js +++ b/pages/mmp-7/index.js @@ -123,6 +123,9 @@ Page({ }); return; } + wx.showLoading({ + title: '正在提交...', + }) const body = { username: this.data.form.username, mmp_7: this.data.form.mmp_7, @@ -132,10 +135,41 @@ Page({ portal_vein_branch_image: this.data.form.portal_vein_branch_image, portal_vein_cross_image: this.data.form.portal_vein_cross_image } - const res = await request('patient/diagnostic', 'post', body) + try{ + const res = await request('patient/diagnostic', 'post', body) + wx.hideLoading() + wx.showLoading({ + title: '正在查询结果...', + }) + setTimeout(() => { + this.searchDiagnostic(res) + }, 1000) + } catch(e) { + wx.hideLoading() + } + + + }, + async searchDiagnostic(data) { + const resd = await request('patient/diagnostic/search', 'post', { + mobile: this.data.form.mobile, + user_id: data.user_id, + username: this.data.form.username + }) + if(resd.success == true){ + wx.hideLoading() + this.setData({ + msg: resd.message, + visible: true + }) + } else { + this.searchDiagnostic(data) + } + + }, + onClose(){ this.setData({ - msg: res.message, - visible: true + imageVisible: false }) }, confirm() {