From 9555a1607aa12af306599c43a1f164a3527f40b7 Mon Sep 17 00:00:00 2001 From: kola-web Date: Fri, 25 Jul 2025 18:36:54 +0800 Subject: [PATCH] =?UTF-8?q?bug=E5=A4=84=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/doctor/pages/course/index.ts | 5 ++--- src/doctor/pages/lastDiagnosisReport/index.ts | 18 +++++++++--------- 2 files changed, 11 insertions(+), 12 deletions(-) diff --git a/src/doctor/pages/course/index.ts b/src/doctor/pages/course/index.ts index c826d45..c8bd6f5 100644 --- a/src/doctor/pages/course/index.ts +++ b/src/doctor/pages/course/index.ts @@ -72,15 +72,14 @@ Page({ }, handleSelectHostipal(e) { const { period } = e.currentTarget.dataset - const { periodInfo1 } = this.data - if (!periodInfo1.hospitalId) { + const id = this.data[`periodInfo${period}`].hospitalId + if (!id) { wx.showToast({ title: '患者还未填写此信息哦~', icon: 'none', }) return } - const id = period==1 ? this.data[`periodInfo${period}`].hospitalId wx.navigateTo({ url: `/doctor/pages/courseHostipal/index?id=${id}&period=${period}`, }) diff --git a/src/doctor/pages/lastDiagnosisReport/index.ts b/src/doctor/pages/lastDiagnosisReport/index.ts index 93b164c..470f804 100644 --- a/src/doctor/pages/lastDiagnosisReport/index.ts +++ b/src/doctor/pages/lastDiagnosisReport/index.ts @@ -103,17 +103,17 @@ Page({ }) }, handleSelectHospital() { + const id = this.data.hospitalId + console.log('DEBUGPRINT[134]: index.ts:106: id=', id) + if (!id) { + wx.showToast({ + title: '患者还未填写此信息哦~', + icon: 'none', + }) + return + } wx.navigateTo({ url: `/doctor/pages/courseHostipal/index?id=${this.data.hospitalId}`, - events: { - acceptDataFromOpenedPage: (data) => { - this.setData({ - hospitalId: data.hospitalId, - hospitalName: data.hospitalName, - }) - this.updateSave() - }, - }, }) }, handleToggleFold(e: any) {