From d31fca29423f1c15540c1fe2dc8e43210815ed63 Mon Sep 17 00:00:00 2001 From: kola-web Date: Thu, 2 Apr 2026 12:24:59 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E6=B7=BB=E5=8A=A0=E9=A1=B5=E9=9D=A2?= =?UTF-8?q?=E5=92=8C=E6=8C=89=E9=92=AE=E7=9A=84=E8=A1=8C=E4=B8=BA=E8=BF=BD?= =?UTF-8?q?=E8=B8=AA=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/patient/pages/doctor/index.ts | 6 ++++++ src/patient/pages/hormones/index.ts | 6 ++++++ src/patient/pages/hormonesResult/index.ts | 3 +++ src/patient/pages/hormonesStart/index.ts | 3 +++ src/patient/pages/hospital/index.ts | 7 +++++++ src/patient/pages/qol/index.ts | 5 ++++- src/patient/pages/qolAdd/index.ts | 2 ++ src/patient/pages/qolReport/index.ts | 10 +++++++++- src/patient/pages/qolResult/index.ts | 2 ++ 9 files changed, 42 insertions(+), 2 deletions(-) diff --git a/src/patient/pages/doctor/index.ts b/src/patient/pages/doctor/index.ts index d19a214..09d5f5d 100644 --- a/src/patient/pages/doctor/index.ts +++ b/src/patient/pages/doctor/index.ts @@ -54,6 +54,9 @@ Page({ this.getConfig(options) }) }, + onShow() { + app.mpBehavior({ PageName: 'PG_HospitalMap' }) + }, getConfig(options) { wx.ajax({ method: 'GET', @@ -303,12 +306,14 @@ Page({ }).then((_res) => {}) }, handleDetail(e: WechatMiniprogram.CustomEvent) { + app.mpBehavior({ PageName: 'BTN_HospitalMapListItem' }) const { url } = e.currentTarget.dataset wx.navigateTo({ url, }) }, handleOpenMap(e: WechatMiniprogram.CustomEvent) { + app.mpBehavior({ PageName: 'BTN_HospitalMapNavigate' }) const { lat, lng, name, address } = e.currentTarget.dataset wx.openLocation({ latitude: lat * 1, @@ -331,6 +336,7 @@ Page({ }) }, handleDtpPhone(e: any) { + app.mpBehavior({ PageName: 'BTN_HospitalMapPhone' }) const { tel } = e.currentTarget.dataset if (!tel) { wx.showToast({ diff --git a/src/patient/pages/hormones/index.ts b/src/patient/pages/hormones/index.ts index c252f29..0d8e0d9 100644 --- a/src/patient/pages/hormones/index.ts +++ b/src/patient/pages/hormones/index.ts @@ -95,6 +95,7 @@ Page({ }, onLoad(options) { app.waitLogin({ type: [1] }).then(() => { + app.mpBehavior({ PageName: 'PG_HormonesAdd' }) this.getBaseInfo() if (Number(options.id) > 0) { wx.showToast({ @@ -167,6 +168,10 @@ Page({ const { key, value, custom } = e.currentTarget.dataset const { nav } = this.data + if (key === 'medicationMethod') { + app.mpBehavior({ PageName: 'BTN_HormonesAddMethod' }) + } + if (key === 'medicationMethod' && value !== this.data.form.medicationMethod) { this.setData({ 'form.dosage': '', @@ -247,6 +252,7 @@ Page({ this.handlePopupCancel() }, handleSubmit() { + app.mpBehavior({ PageName: 'BTN_HormonesAddSubmit' }) const { id, form, question } = this.data wx.ajax({ method: 'POST', diff --git a/src/patient/pages/hormonesResult/index.ts b/src/patient/pages/hormonesResult/index.ts index 4ffadf1..06fc40b 100644 --- a/src/patient/pages/hormonesResult/index.ts +++ b/src/patient/pages/hormonesResult/index.ts @@ -17,6 +17,7 @@ Page({ report: options.report == '1', }) app.waitLogin({ type: [1] }).then(() => { + app.mpBehavior({ PageName: 'PG_HormonesResult' }) this.getPicText(options.medicationMethod) }) }, @@ -32,11 +33,13 @@ Page({ }) }, handleReport() { + app.mpBehavior({ PageName: 'BTN_HormonesResultReport' }) wx.redirectTo({ url: '/patient/pages/qolReport/index?scrollId=proit-hormone', }) }, handlePic() { + app.mpBehavior({ PageName: 'BTN_HormonesResultPicText' }) wx.navigateTo({ url: `/patient/pages/repositoryDetail/index?id=${this.data.picText.picTextId}`, }) diff --git a/src/patient/pages/hormonesStart/index.ts b/src/patient/pages/hormonesStart/index.ts index f957505..ca01476 100644 --- a/src/patient/pages/hormonesStart/index.ts +++ b/src/patient/pages/hormonesStart/index.ts @@ -6,6 +6,7 @@ Page({ }, onLoad(options) { app.waitLogin({ type: [1] }).then(() => { + app.mpBehavior({ PageName: 'PG_HormonesStart' }) if (options.id) { this.setData({ id: options.id, @@ -14,11 +15,13 @@ Page({ }) }, handleAdd() { + app.mpBehavior({ PageName: 'BTN_HormonesStartAdd' }) wx.redirectTo({ url: `/patient/pages/hormones/index?id=${this.data.id}`, }) }, handleReport() { + app.mpBehavior({ PageName: 'BTN_HormonesStartReport' }) wx.navigateTo({ url: `/patient/pages/qolReport/index?scrollId=proit-hormone`, }) diff --git a/src/patient/pages/hospital/index.ts b/src/patient/pages/hospital/index.ts index d77ae88..b23ad1e 100644 --- a/src/patient/pages/hospital/index.ts +++ b/src/patient/pages/hospital/index.ts @@ -27,6 +27,9 @@ Page({ this.handleToggleSite() }) }, + onShow() { + app.mpBehavior({ PageName: 'PG_HospitalDetail' }) + }, handleToggleSite() { if (!this.data.LNG) { wx.getSetting({ @@ -148,12 +151,14 @@ Page({ }) }, handlePhone() { + app.mpBehavior({ PageName: 'BTN_HospitalDetailPhone' }) const { detail } = this.data wx.makePhoneCall({ phoneNumber: detail.Telephone, }) }, handleOpenMap() { + app.mpBehavior({ PageName: 'BTN_HospitalDetailNavigate' }) const { detail } = this.data wx.openLocation({ latitude: detail.LAT, @@ -187,12 +192,14 @@ Page({ }) }, routerTo(e) { + app.mpBehavior({ PageName: 'BTN_HospitalDetailDoctorCard' }) const { url } = e.currentTarget.dataset wx.navigateTo({ url, }) }, handleMedical() { + app.mpBehavior({ PageName: 'BTN_HospitalDetailMedical' }) wx.navigateTo({ url: `/patient/pages/medicalDetail/index?id=${this.data.detail.hospitalPolicyId}`, }) diff --git a/src/patient/pages/qol/index.ts b/src/patient/pages/qol/index.ts index a0a10fd..fa77f86 100644 --- a/src/patient/pages/qol/index.ts +++ b/src/patient/pages/qol/index.ts @@ -13,9 +13,12 @@ Page({ showMsg: false, }) } - app.waitLogin({ type: [1] }).then(() => {}) + app.waitLogin({ type: [1] }).then(() => { + app.mpBehavior({ PageName: 'PG_QolHome' }) + }) }, handleAdd() { + app.mpBehavior({ PageName: 'BTN_QolHomeAdd' }) wx.navigateTo({ url: '/patient/pages/qolAdd/index', }) diff --git a/src/patient/pages/qolAdd/index.ts b/src/patient/pages/qolAdd/index.ts index b254c26..bd83f62 100644 --- a/src/patient/pages/qolAdd/index.ts +++ b/src/patient/pages/qolAdd/index.ts @@ -165,6 +165,7 @@ Page({ edit: options.edit == '1', }) app.waitLogin({ type: [1] }).then(() => { + app.mpBehavior({ PageName: 'PG_QolAdd' }) if (options.id) { this.getDetail() } @@ -230,6 +231,7 @@ Page({ }) }, handleSubmit() { + app.mpBehavior({ PageName: 'BTN_QolAddSubmit' }) const { qolList0, qolList1, edit, id } = this.data const arr = [...qolList0, ...qolList1] const form = {} diff --git a/src/patient/pages/qolReport/index.ts b/src/patient/pages/qolReport/index.ts index 8cbbe47..169c295 100644 --- a/src/patient/pages/qolReport/index.ts +++ b/src/patient/pages/qolReport/index.ts @@ -46,6 +46,7 @@ Page({ this.chartComponent6 = this.selectComponent('#chart6') app.waitLogin({ type: [1] }).then(() => { + app.mpBehavior({ PageName: 'PG_QolReport' }) this.handleChangeType() this.getList() this.getQol() @@ -102,9 +103,12 @@ Page({ .exec() }, handleChangeType(e?: WechatMiniprogram.CustomEvent) { + if (e) { + app.mpBehavior({ PageName: 'BTN_QolReportTab' }) + } let type = '' if (e) { - // Tab 已移除“日”,现仅有“月度/年度” + // Tab 已移除"日",现仅有"月度/年度" type = e.detail.index === 0 ? '2' : '3' } else { @@ -533,6 +537,7 @@ Page({ } }, handleDelete(e) { + app.mpBehavior({ PageName: 'BTN_QolReportDelete' }) const { id, index } = e.currentTarget.dataset const { list } = this.data wx.showModal({ @@ -556,12 +561,14 @@ Page({ }) }, handleDetail(e) { + app.mpBehavior({ PageName: 'BTN_QolReportListItem' }) const { id, edit } = e.currentTarget.dataset wx.navigateTo({ url: `/patient/pages/qolAdd/index?id=${id}&edit=${edit ? 1 : 0}`, }) }, handleQol() { + app.mpBehavior({ PageName: 'BTN_QolReportAdd' }) this.handleHideFooterBtn() const { qolDetail } = this.data const url @@ -599,6 +606,7 @@ Page({ }) }, handleHormones() { + app.mpBehavior({ PageName: 'BTN_QolReportHormone' }) const hormoneDetail = this.data.hormoneDetail this.handleHideFooterBtn() const url = hormoneDetail.recordId diff --git a/src/patient/pages/qolResult/index.ts b/src/patient/pages/qolResult/index.ts index 2b23fe6..329d89f 100644 --- a/src/patient/pages/qolResult/index.ts +++ b/src/patient/pages/qolResult/index.ts @@ -16,6 +16,7 @@ Page({ id: options.id, }) app.waitLogin({ type: [1] }).then(() => { + app.mpBehavior({ PageName: 'PG_QolResult' }) this.getDetail() this.getToast() }) @@ -54,6 +55,7 @@ Page({ }) }, handleReport() { + app.mpBehavior({ PageName: 'BTN_QolResultReport' }) wx.navigateTo({ url: '/patient/pages/qolReport/index', })