From 17ca6694267c75e2bb30ef1346ff686833de6a30 Mon Sep 17 00:00:00 2001 From: kola-web Date: Mon, 23 Dec 2024 18:15:46 +0800 Subject: [PATCH] =?UTF-8?q?1.7=20=E5=9F=8B=E7=82=B9=E5=89=8D=E7=AB=AF?= =?UTF-8?q?=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- project.config.json | 110 ++++++++++----------- src/app.ts | 12 +++ src/components/customAudioText/index.ts | 14 +++ src/components/doctorAvatar/index.ts | 14 ++- src/components/popupDoctorDetail/index.ts | 1 + src/echart/components/homeLevel1/index.ts | 12 +++ src/echart/components/homeLevel1/index.wxml | 2 + src/echart/components/homeLevel2/index.ts | 19 +++- src/echart/components/homeLevel2/index.wxml | 7 +- src/echart/components/homeLevel3/index.ts | 17 +++- src/echart/components/homeLevel3/index.wxml | 5 +- src/echart/components/homeLevel4/index.ts | 17 ++++ src/echart/components/homeLevel4/index.wxml | 8 +- src/module1/pages/applicationRecords/index.ts | 1 + src/module1/pages/auditDoctorDetail/index.ts | 2 + src/module1/pages/auditDoctorList/index.ts | 1 + src/module1/pages/casesDetail/index.ts | 17 +++- src/module1/pages/casesDetail/index.wxml | 8 +- src/module1/pages/casesFeedback/index.ts | 12 +++ src/module1/pages/casesFeedback/index.wxml | 15 ++- src/module1/pages/chatRoom/index.ts | 10 ++ src/module1/pages/chatRoom/index.wxml | 2 +- src/module1/pages/entryCases/index.ts | 11 +++ src/module1/pages/entryCases/index.wxml | 104 +++++-------------- src/module1/pages/login/index.ts | 12 ++- src/module1/pages/loginOut/index.ts | 8 +- src/module1/pages/loginProtool/index.ts | 8 +- src/module1/pages/setApplicationDoctor/index.ts | 3 + .../pages/setApplicationDoctorResult/index.ts | 1 + src/module1/pages/setInfo/index.ts | 4 + src/module1/pages/setInfoResult/index.ts | 3 +- src/module1/pages/userInfo/index.ts | 6 ++ src/pages/cases/index.ts | 15 +++ src/pages/cases/index.wxml | 1 + src/pages/chatRoomList/index.ts | 12 +++ src/pages/home/index.ts | 9 ++ src/pages/my/index.ts | 7 ++ typings/index.d.ts | 1 + 38 files changed, 354 insertions(+), 157 deletions(-) diff --git a/project.config.json b/project.config.json index c057c94..95dd3fc 100644 --- a/project.config.json +++ b/project.config.json @@ -1,56 +1,56 @@ -{ - "description": "项目配置文件", - "miniprogramRoot": "src/", - "compileType": "miniprogram", - "setting": { - "useCompilerPlugins": [ - "typescript", - "sass" - ], - "babelSetting": { - "ignore": [], - "disablePlugins": [], - "outputPath": "" - }, - "coverView": false, - "postcss": false, - "minified": false, - "enhance": true, - "showShadowRootInWxmlPanel": false, - "packNpmManually": true, - "packNpmRelationList": [ - { - "packageJsonPath": "package.json", - "miniprogramNpmDistDir": "./src" - } - ], - "ignoreUploadUnusedFiles": true, - "compileHotReLoad": false, - "skylineRenderEnable": true, - "es6": true - }, - "simulatorType": "wechat", - "simulatorPluginLibVersion": {}, - "condition": {}, - "srcMiniprogramRoot": "src/", - "editorSetting": { - "tabIndent": "insertSpaces", - "tabSize": 2 - }, - "libVersion": "2.32.3", - "packOptions": { - "ignore": [ - { - "value": "src/images/*", - "type": "glob" - } - ], - "include": [ - { - "value": "/echart/components/ec-canvas/echarts.js", - "type": "file" - } - ] - }, - "appid": "wxaae50c206446a964" +{ + "description": "项目配置文件", + "miniprogramRoot": "src/", + "compileType": "miniprogram", + "setting": { + "useCompilerPlugins": [ + "typescript", + "sass" + ], + "babelSetting": { + "ignore": [], + "disablePlugins": [], + "outputPath": "" + }, + "coverView": false, + "postcss": false, + "minified": false, + "enhance": true, + "showShadowRootInWxmlPanel": false, + "packNpmManually": true, + "packNpmRelationList": [ + { + "packageJsonPath": "package.json", + "miniprogramNpmDistDir": "./src" + } + ], + "ignoreUploadUnusedFiles": true, + "compileHotReLoad": false, + "skylineRenderEnable": true, + "es6": true + }, + "simulatorType": "wechat", + "simulatorPluginLibVersion": {}, + "condition": {}, + "srcMiniprogramRoot": "src/", + "editorSetting": { + "tabIndent": "insertSpaces", + "tabSize": 2 + }, + "libVersion": "2.32.3", + "packOptions": { + "ignore": [ + { + "value": "src/images/*", + "type": "glob" + } + ], + "include": [ + { + "value": "/echart/components/ec-canvas/echarts.js", + "type": "file" + } + ] + }, + "appid": "wxaae50c206446a964" } \ No newline at end of file diff --git a/src/app.ts b/src/app.ts index 3adddd3..ba3133d 100644 --- a/src/app.ts +++ b/src/app.ts @@ -134,4 +134,16 @@ App({ menuButtonInfo, }); }, + mpBehavior(data: object) { + console.log(data); + // wx.ajax({ + // method: "POST", + // url: "?r=raredcare/mp-behavior/add", + // data, + // loading: false, + // showMsg: false, + // }).then((_res) => { + // // console.log('res: ', _res) + // }); + }, }); diff --git a/src/components/customAudioText/index.ts b/src/components/customAudioText/index.ts index a72c028..e8d20f0 100644 --- a/src/components/customAudioText/index.ts +++ b/src/components/customAudioText/index.ts @@ -9,6 +9,14 @@ Component({ type: String, value: "", }, + map1: { + type: String, + value: "", + }, + map2: { + type: String, + value: "", + }, }, // 组件数据 data: { @@ -22,6 +30,9 @@ Component({ methods: { init() {}, handleAudioText() { + if (this.data.map1) { + app.mpBehavior({ PageName: this.data.map1 }); + } wx.ajax({ method: "GET", url: "?r=takeda/common/audio-url-to-text", @@ -42,6 +53,9 @@ Component({ }); }, onCopy() { + if (this.data.map2) { + app.mpBehavior({ PageName: this.data.map2 }); + } this.setData({ show: false, }); diff --git a/src/components/doctorAvatar/index.ts b/src/components/doctorAvatar/index.ts index 7361e29..23bf960 100644 --- a/src/components/doctorAvatar/index.ts +++ b/src/components/doctorAvatar/index.ts @@ -1,4 +1,4 @@ -const _app = getApp(); +const app = getApp(); // pages/story/a.ts Component({ @@ -22,6 +22,11 @@ Component({ optionalTypes: [String, Number], value: "", }, + type: { + type: String, + optionalTypes: [String], + value: "", + }, }, /** @@ -47,7 +52,10 @@ Component({ }); }, async handleDetail() { - const { did, popupDoctorDetail, showDetail } = this.data; + const { did, popupDoctorDetail, showDetail, type } = this.data; + if (type) { + app.mpBehavior({ PageName: type }); + } if (!did || showDetail) return; this.setData({ showDetail: true, @@ -86,3 +94,5 @@ Component({ }, }, }); + +export {}; diff --git a/src/components/popupDoctorDetail/index.ts b/src/components/popupDoctorDetail/index.ts index ba87caf..db92c0b 100644 --- a/src/components/popupDoctorDetail/index.ts +++ b/src/components/popupDoctorDetail/index.ts @@ -26,6 +26,7 @@ Component({ */ methods: { onClose() { + app.mpBehavior({ PageName: "BTN_DOCTORINFOWINDOWCLOSE" }); this.triggerEvent("close"); }, handleTap() { diff --git a/src/echart/components/homeLevel1/index.ts b/src/echart/components/homeLevel1/index.ts index e27dff2..2acd9c0 100644 --- a/src/echart/components/homeLevel1/index.ts +++ b/src/echart/components/homeLevel1/index.ts @@ -60,11 +60,13 @@ Component({ }); }, toggleFold1() { + app.mpBehavior({ PageName: "BTN_MYDOCTORSTOGGLE" }); this.setData({ fold1: !this.data.fold1, }); }, handleEntryCase() { + app.mpBehavior({ PageName: "BTN_SUBMITEMPTYCASE" }); wx.navigateTo({ url: "/module1/pages/entryCases/index", }); @@ -104,12 +106,14 @@ Component({ }); }, handleCaseUpdate() { + app.mpBehavior({ PageName: "BTN_CASEUPDATE" }); app.globalData.newFeedback = "1"; wx.switchTab({ url: "/pages/cases/index", }); }, handleChat() { + app.mpBehavior({ PageName: "BTN_LEARNINGMESSAGE" }); wx.switchTab({ url: "/pages/chatRoomList/index", }); @@ -126,6 +130,13 @@ Component({ 3: "讨论中", 4: "已归档", }[type]; + const PageName = { + 0: "BTN_MANAGEDCASESALL", + 2: "BTN_MANAGEDCASESNEW", + 3: "BTN_MANAGEDCASESDISCUSSING", + 4: "BTN_MANAGEDCASESCLOSED", + }[type]; + app.mpBehavior({ PageName }); app.globalData.caseStatus = type === "0" ? "" : type; app.globalData.caseStatusName = name; wx.switchTab({ @@ -142,6 +153,7 @@ Component({ }); }, handleApplicationDoctor() { + app.mpBehavior({ PageName: "BTN_MYDOCTORSBIND" }); wx.navigateTo({ url: "/module1/pages/setApplicationDoctor/index", }); diff --git a/src/echart/components/homeLevel1/index.wxml b/src/echart/components/homeLevel1/index.wxml index dc3a209..29e2be3 100644 --- a/src/echart/components/homeLevel1/index.wxml +++ b/src/echart/components/homeLevel1/index.wxml @@ -3,6 +3,7 @@ @@ -137,6 +138,7 @@ id="cooperate{{index}}" did="{{item.DoctorId}}" class="avatar" + type="BTN_MYDOCTORSDETAIL" src="{{item.DoctorImg}}" level="{{item.DoctorLevel}}" > diff --git a/src/echart/components/homeLevel2/index.ts b/src/echart/components/homeLevel2/index.ts index a74dab8..5f995c0 100644 --- a/src/echart/components/homeLevel2/index.ts +++ b/src/echart/components/homeLevel2/index.ts @@ -67,11 +67,13 @@ Component({ }); }, toggleFold1() { + app.mpBehavior({ PageName: "BTN_MYDOCTORSTOGGLE" }); this.setData({ fold1: !this.data.fold1, }); }, toggleFold2() { + app.mpBehavior({ PageName: "BTN_INVITEDDOCTORSTOGGLE" }); this.setData({ fold2: !this.data.fold2, }); @@ -123,22 +125,27 @@ Component({ }); }, handleInvite() { + app.mpBehavior({ PageName: "BTN_QRCODEPOSTER" }); wx.navigateTo({ url: "/module1/pages/invite/index", }); }, handleEntryCase() { + app.mpBehavior({ PageName: "BTN_SUBMITEMPTYCASE" }); wx.navigateTo({ url: "/module1/pages/entryCases/index", }); }, handlePendCase() { + app.mpBehavior({ PageName: "BTN_PENDINGCASES" }); app.globalData.needDeal = "1"; wx.switchTab({ url: "/pages/cases/index", }); }, - handleCaseUpdate() { + handleCaseUpdate(e) { + const { type } = e.currentTarget.dataset; + app.mpBehavior({ PageName: type }); app.globalData.newFeedback = "1"; wx.switchTab({ url: "/pages/cases/index", @@ -152,6 +159,13 @@ Component({ 3: "讨论中", 4: "已归档", }[type]; + const PageName = { + 0: "BTN_MANAGEDCASESALL", + 2: "BTN_MANAGEDCASESNEW", + 3: "BTN_MANAGEDCASESDISCUSSING", + 4: "BTN_MANAGEDCASESCLOSED", + }[type]; + app.mpBehavior({ PageName }); app.globalData.caseStatus = type === "0" ? "" : type; app.globalData.caseStatusName = name; wx.switchTab({ @@ -159,11 +173,13 @@ Component({ }); }, handleChat() { + app.mpBehavior({ PageName: "BTN_LEARNINGMESSAGE" }); wx.switchTab({ url: "/pages/chatRoomList/index", }); }, handleAudit() { + app.mpBehavior({ PageName: "BTN_DOCTORAPPLICATION" }); wx.navigateTo({ url: "/module1/pages/auditDoctorList/index", }); @@ -198,6 +214,7 @@ Component({ }); }, handleApplicationDoctor() { + app.mpBehavior({ PageName: "BTN_MYDOCTORSBIND" }); wx.navigateTo({ url: "/module1/pages/setApplicationDoctor/index", }); diff --git a/src/echart/components/homeLevel2/index.wxml b/src/echart/components/homeLevel2/index.wxml index 4e5b30e..2193799 100644 --- a/src/echart/components/homeLevel2/index.wxml +++ b/src/echart/components/homeLevel2/index.wxml @@ -3,6 +3,7 @@ @@ -53,7 +54,7 @@ - + 病历更新 @@ -90,7 +91,7 @@ style="background: url({{imageUrl}}home-stat-bg.png?r={{Timestamp}}) no-repeat top center/100% 100%;" > 我管理的病历 - + 查看全部 @@ -183,6 +184,7 @@ id="cooperate{{index}}" did="{{item.DoctorId}}" class="avatar" + type="BTN_MYDOCTORSDETAIL" src="{{item.DoctorImg}}" level="{{item.DoctorLevel}}" > @@ -261,6 +263,7 @@ id="invite{{index}}" did="{{item.DoctorId}}" class="avatar" + type="BTN_INVITEDDOCTORSDETAIL" src="{{item.DoctorImg}}" level="{{item.DoctorLevel}}" > diff --git a/src/echart/components/homeLevel3/index.ts b/src/echart/components/homeLevel3/index.ts index 4995641..da2aa4b 100644 --- a/src/echart/components/homeLevel3/index.ts +++ b/src/echart/components/homeLevel3/index.ts @@ -76,39 +76,47 @@ Component({ }); }, handleInvite() { + app.mpBehavior({ PageName: "BTN_QRCODEPOSTER" }); wx.navigateTo({ url: "/module1/pages/invite/index", }); }, handleOrg() { + app.mpBehavior({ PageName: "BTN_ALLMANAGEDDOCTORS" }); wx.navigateTo({ url: "/module1/pages/org3/index", }); }, handleEntryCase() { + app.mpBehavior({ PageName: "BTN_SUBMITEMPTYCASE" }); wx.navigateTo({ url: "/module1/pages/entryCases/index", }); }, handlePendCase() { + app.mpBehavior({ PageName: "BTN_PENDINGCASES" }); app.globalData.needDeal = "1"; wx.switchTab({ url: "/pages/cases/index", }); }, - handleCaseUpdate() { + handleCaseUpdate(e) { + const { type } = e.currentTarget.dataset; + app.mpBehavior({ PageName: type }); app.globalData.newFeedback = "1"; wx.switchTab({ url: "/pages/cases/index", }); }, handleChat() { + app.mpBehavior({ PageName: "BTN_LEARNINGMESSAGE" }); wx.switchTab({ url: "/pages/chatRoomList/index", }); }, handleAudit() { + app.mpBehavior({ PageName: "BTN_DOCTORAPPLICATION" }); wx.navigateTo({ url: "/module1/pages/auditDoctorList/index", }); @@ -125,6 +133,13 @@ Component({ 3: "讨论中", 4: "已归档", }[type]; + const PageName = { + 0: "BTN_MANAGEDCASESALL", + 2: "BTN_MANAGEDCASESNEW", + 3: "BTN_MANAGEDCASESDISCUSSING", + 4: "BTN_MANAGEDCASESCLOSED", + }[type]; + app.mpBehavior({ PageName }); app.globalData.caseStatus = type === "0" ? "" : type; app.globalData.caseStatusName = name; wx.switchTab({ diff --git a/src/echart/components/homeLevel3/index.wxml b/src/echart/components/homeLevel3/index.wxml index 1a7b470..dd5443d 100644 --- a/src/echart/components/homeLevel3/index.wxml +++ b/src/echart/components/homeLevel3/index.wxml @@ -3,6 +3,7 @@ @@ -50,7 +51,7 @@ - + 病历更新 @@ -86,7 +87,7 @@ style="background: url({{imageUrl}}home-stat-bg.png?r={{Timestamp}}) no-repeat top center/100% 100%;" > 我管理的病历 - diff --git a/src/echart/components/homeLevel4/index.ts b/src/echart/components/homeLevel4/index.ts index 3ed60ed..33878b3 100644 --- a/src/echart/components/homeLevel4/index.ts +++ b/src/echart/components/homeLevel4/index.ts @@ -91,6 +91,7 @@ Component({ }, 30); }, handleYear1(e) { + app.mpBehavior({ PageName: "BTN_DEPTSTATUSYEARFILTER" }); this.setData({ year1: e.detail.value, }); @@ -273,6 +274,7 @@ Component({ }); }, handleYear2(e) { + app.mpBehavior({ PageName: "BTN_CASESTATSYEARFILTER" }); this.setData({ year2: e.detail.value, }); @@ -435,6 +437,7 @@ Component({ }); }, handleYear3(e) { + app.mpBehavior({ PageName: "BTN_DEPTNEWCASEYEARFILTER" }); this.setData({ year3: e.detail.value, }); @@ -658,11 +661,13 @@ Component({ }); }, handleRankDetail() { + app.mpBehavior({ PageName: "BTN_HOSPITALRANKAL" }); wx.navigateTo({ url: "/module1/pages/doctorRankList/index", }); }, handleInvite() { + app.mpBehavior({ PageName: "BTN_QRCODEPOSTER" }); wx.navigateTo({ url: "/module1/pages/invite/index", }); @@ -674,29 +679,34 @@ Component({ }); }, handleAllDoctor() { + app.mpBehavior({ PageName: "BTN_DEPTDOCTORSALL" }); wx.navigateTo({ url: "/module1/pages/org4/index", }); }, handlePendCase() { + app.mpBehavior({ PageName: "BTN_PENDINGCASES" }); app.globalData.needDeal = "1"; wx.switchTab({ url: "/pages/cases/index", }); }, handleCaseUpdate() { + app.mpBehavior({ PageName: "BTN_CASEUPDATE" }); app.globalData.newFeedback = "1"; wx.switchTab({ url: "/pages/cases/index", }); }, handleChat() { + app.mpBehavior({ PageName: "BTN_LEARNINGMESSAGE" }); wx.switchTab({ url: "/pages/chatRoomList/index", }); }, handleAudit() { + app.mpBehavior({ PageName: "BTN_DOCTORAPPLICATION" }); wx.navigateTo({ url: "/module1/pages/auditDoctorList/index", }); @@ -723,6 +733,13 @@ Component({ 3: "讨论中", 4: "已归档", }[type]; + const PageName = { + 0: "BTN_MANAGEDCASESALL", + 2: "BTN_MANAGEDCASESNEW", + 3: "BTN_MANAGEDCASESDISCUSSING", + 4: "BTN_MANAGEDCASESCLOSED", + }[type]; + app.mpBehavior({ PageName }); app.globalData.caseNav = "3"; app.globalData.caseStatus = type === "0" ? "" : type; app.globalData.caseStatusName = name; diff --git a/src/echart/components/homeLevel4/index.wxml b/src/echart/components/homeLevel4/index.wxml index f8513ed..51d48bc 100644 --- a/src/echart/components/homeLevel4/index.wxml +++ b/src/echart/components/homeLevel4/index.wxml @@ -1,6 +1,12 @@ - + diff --git a/src/module1/pages/applicationRecords/index.ts b/src/module1/pages/applicationRecords/index.ts index 31a4c25..86e46f8 100644 --- a/src/module1/pages/applicationRecords/index.ts +++ b/src/module1/pages/applicationRecords/index.ts @@ -39,6 +39,7 @@ Page({ }, onLoad() { app.waitLogin().then(() => { + app.mpBehavior({ PageName: "PG_DOCTORBINDRECORD" }); this.getList(); }); }, diff --git a/src/module1/pages/auditDoctorDetail/index.ts b/src/module1/pages/auditDoctorDetail/index.ts index 8e9c8a5..a3510b6 100644 --- a/src/module1/pages/auditDoctorDetail/index.ts +++ b/src/module1/pages/auditDoctorDetail/index.ts @@ -52,6 +52,7 @@ Page({ }); }, handleReject() { + app.mpBehavior({ PageName: "BTN_DOCTORREJECT" }); this.setData({ showReject: true, }); @@ -76,6 +77,7 @@ Page({ }); }, handleResolve() { + app.mpBehavior({ PageName: "BTN_DOCTORAPPROVE" }); this.setData({ show: true, }); diff --git a/src/module1/pages/auditDoctorList/index.ts b/src/module1/pages/auditDoctorList/index.ts index 8943bbf..bc4170e 100644 --- a/src/module1/pages/auditDoctorList/index.ts +++ b/src/module1/pages/auditDoctorList/index.ts @@ -12,6 +12,7 @@ Page({ }, onShow() { app.waitLogin().then(() => { + app.mpBehavior({ PageName: "PG_DOCTORREVIEW" }); this.getDoctorDict() this.getList(); }); diff --git a/src/module1/pages/casesDetail/index.ts b/src/module1/pages/casesDetail/index.ts index d6e0914..ff35e93 100644 --- a/src/module1/pages/casesDetail/index.ts +++ b/src/module1/pages/casesDetail/index.ts @@ -53,6 +53,7 @@ Page({ rid: options.rid, beforeClose1: (e: any) => { if (e === "confirm") { + app.mpBehavior({ PageName: "BTN_REJECTCASECONFIRM" }); if (!this.data.remark) { wx.showToast({ title: "请输入驳回原因", @@ -61,6 +62,8 @@ Page({ return false; } this.handleRejectSubmit(); + } else { + app.mpBehavior({ PageName: "BTN_REJECTCASEBACK" }); } return true; }, @@ -219,6 +222,7 @@ Page({ }, handleShowLable() { + app.mpBehavior({ PageName: "BTN_CASEDETAILTAGEDIT" }); const { deptId, deptList } = this.data; if (deptId) { const params = deptList.find((item) => item.value === deptId); @@ -260,6 +264,7 @@ Page({ }); }, handleLableSubmit() { + app.mpBehavior({ PageName: "BTN_CASEDETAILTAGSUBMIT" }); const { id, deptId, labelIds } = this.data; if (!deptId) { wx.showToast({ @@ -290,8 +295,8 @@ Page({ this.handleResoure(); }); }, - handlePreviewFile(e) { + app.mpBehavior({ PageName: "BTN_CASEDETAILFILEPREVIEW" }); const { item } = e.currentTarget.dataset; wx.downloadFile({ url: item.url, @@ -364,6 +369,7 @@ Page({ }); }, handleFeedBack() { + app.mpBehavior({ PageName: "BTN_CASEDETAILSUBMITFEEDBACK" }); wx.navigateTo({ url: `/module1/pages/casesFeedback/index?id=${this.data.id}&rid=${this.data.rid}`, }); @@ -376,6 +382,7 @@ Page({ }, handleArchive() { + app.mpBehavior({ PageName: "BTN_CASEDETAILARCHIVE" }); this.setData({ show3: true, }); @@ -394,6 +401,7 @@ Page({ }, handleUnArchive() { + app.mpBehavior({ PageName: "BTN_CASEDETAILUNARCHIVE" }); this.setData({ show5: true, }); @@ -415,10 +423,12 @@ Page({ const { detail } = this.data; const isOpen = detail.isOpen === "1"; if (isOpen) { + app.mpBehavior({ PageName: "BTN_CASEDETAILUNPUBLIC" }); this.setData({ show9: true, }); } else { + app.mpBehavior({ PageName: "BTN_CASEDETAILPUBLIC" }); this.setData({ show8: true, }); @@ -453,10 +463,12 @@ Page({ const { detail } = this.data; const isHighQuality = detail.isHighQuality === "1"; if (isHighQuality) { + app.mpBehavior({ PageName: "BTN_CASEDETAILUNMARKQUALITY" }); this.setData({ show4: true, }); } else { + app.mpBehavior({ PageName: "BTN_CASEDETAILMARKQUALITY" }); this.setData({ show2: true, }); @@ -530,6 +542,7 @@ Page({ }, handleReject() { + app.mpBehavior({ PageName: "BTN_CASEDETAILREJECT" }); this.setData({ show1: true, }); @@ -585,11 +598,13 @@ Page({ }, handleCreateRoomShow() { + app.mpBehavior({ PageName: "BTN_CASEDETAILGENERATECHAT" }); this.setData({ show6: true, }); }, handleRoom() { + app.mpBehavior({ PageName: "BTN_CASEDETAILCHATROOM" }); wx.navigateTo({ url: `/module1/pages/chatRoom/index?id=${this.data.detail.roomId}`, }); diff --git a/src/module1/pages/casesDetail/index.wxml b/src/module1/pages/casesDetail/index.wxml index 11b1995..5f67a69 100644 --- a/src/module1/pages/casesDetail/index.wxml +++ b/src/module1/pages/casesDetail/index.wxml @@ -75,7 +75,9 @@ - 转文字 + + 转文字 + @@ -169,7 +171,9 @@ - 转文字 + + 转文字 + diff --git a/src/module1/pages/casesFeedback/index.ts b/src/module1/pages/casesFeedback/index.ts index b5552a1..5e8f57b 100644 --- a/src/module1/pages/casesFeedback/index.ts +++ b/src/module1/pages/casesFeedback/index.ts @@ -24,6 +24,7 @@ Page({ rid: options.rid, }); app.waitLogin().then(() => { + app.mpBehavior({ PageName: "PG_SUBMITFEEDBACK" }); this.getCache(); app.getUserInfo(this, (res) => { this.setData({ @@ -44,6 +45,9 @@ Page({ }); }); }, + handleMapPhoto() { + app.mpBehavior({ PageName: "BTN_FEEDBACKSELECTIMAGE" }); + }, handlePhoto(e) { const detail = e.detail; const images = this.data.images; @@ -107,6 +111,9 @@ Page({ }); }); }, + handleMapAudio() { + app.mpBehavior({ PageName: "BTN_FEEDBACKRECORDLONGPRESS" }); + }, handleAudio(e) { this.setData({ audios: [ @@ -137,6 +144,9 @@ Page({ }, }); }, + handleMapFile() { + app.mpBehavior({ PageName: "BTN_FEEDBACKSELECTFILE" }); + }, handleFile(e) { this.setData({ files: [ @@ -263,10 +273,12 @@ Page({ } }, handleBack() { + app.mpBehavior({ PageName: "BTN_FEEDBACKBACK" }); wx.navigateBack(); }, handleSubmit() { const { caseId, isOpen, rid } = this.data; + app.mpBehavior({ PageName: "BTN_FEEDBACKSAVE" }); const params = this.formatParams(); wx.ajax({ method: "POST", diff --git a/src/module1/pages/casesFeedback/index.wxml b/src/module1/pages/casesFeedback/index.wxml index 57cad11..4c312e6 100644 --- a/src/module1/pages/casesFeedback/index.wxml +++ b/src/module1/pages/casesFeedback/index.wxml @@ -23,11 +23,18 @@ data-index="{{index}}" > - 转文字 + + 转文字 + - + 您也可以长按录入语音 @@ -48,7 +55,7 @@ 重复图片 - + @@ -58,7 +65,7 @@ 病历相关文件 - + 从聊天记录选择文件 diff --git a/src/module1/pages/chatRoom/index.ts b/src/module1/pages/chatRoom/index.ts index 3320997..5fd030e 100644 --- a/src/module1/pages/chatRoom/index.ts +++ b/src/module1/pages/chatRoom/index.ts @@ -148,11 +148,13 @@ Page({ }); }, handleRoomDetail() { + app.mpBehavior({ PageName: "BTN_CHATROOMAVATAR" }); wx.navigateTo({ url: `/module1/pages/chatRoomInfo/index?id=${this.data.id}&cid=${this.data.case.caseId}`, }); }, handleCaseDetail() { + app.mpBehavior({ PageName: "BTN_CHATROOMCASEDETAIL" }); wx.navigateTo({ url: `/module1/pages/casesDetail/index?id=${this.data.case.caseId}&rid=${this.data.id}`, }); @@ -233,6 +235,9 @@ Page({ }); this.WebIMSendMessage(message); }, + handleSendMapAudio() { + app.mpBehavior({ PageName: "BTN_CHATROOMRECORDLONGPRESS" }); + }, handleSendAudio(e) { const { userInfo } = this.data; const contentStr = JSON.stringify({ @@ -254,6 +259,7 @@ Page({ this.WebIMSendMessage(message); }, handleSendPhoto(e) { + app.mpBehavior({ PageName: "BTN_CHATROOMSELECTIMAGE" }); const { userInfo } = this.data; const contentStr = JSON.stringify({ url: e.detail.fileUrl, @@ -273,6 +279,7 @@ Page({ this.WebIMSendMessage(message); }, handleSendVideo(e) { + app.mpBehavior({ PageName: "BTN_CHATROOMSELECTVIDEO" }); const { userInfo } = this.data; const contentStr = JSON.stringify({ url: e.detail.fileUrl, @@ -307,6 +314,7 @@ Page({ }); }, handleRecall(e) { + app.mpBehavior({ PageName: "BTN_CHATROOMREVOKE" }); const { index } = e.currentTarget.dataset; const { messageList } = this.data; const message = messageList[index]; @@ -468,6 +476,7 @@ Page({ }); }, handleFooter() { + app.mpBehavior({ PageName: "BTN_CHATROOMMOREOPTIONS" }); this.setData({ fold: !this.data.fold, }); @@ -476,6 +485,7 @@ Page({ } }, handleAudio(e) { + app.mpBehavior({ PageName: "BTN_CHATROOMVOICE" }); const { index } = e.currentTarget.dataset; const { messageList } = this.data; const messageItem = messageList[index]; diff --git a/src/module1/pages/chatRoom/index.wxml b/src/module1/pages/chatRoom/index.wxml index b52c632..f22d9ac 100644 --- a/src/module1/pages/chatRoom/index.wxml +++ b/src/module1/pages/chatRoom/index.wxml @@ -165,7 +165,7 @@ /> {{sendMessage}} - + 按住说话 - - + + @@ -18,23 +9,9 @@ ({{images.length}}/9) - - - + + + @@ -42,12 +19,7 @@ 重复图片 - + @@ -68,16 +40,8 @@ {{description.length}}/3000 - - + + - 转文字 + + 转文字 + - + 您也可以长按录入语音 病历相关文件 - + 从聊天记录选择文件 @@ -160,33 +127,13 @@ - 存为草稿 - - 保存并提交 - - 保存并提交 - + 存为草稿 + 保存并提交 + 保存并提交 - + 确认提交您的反馈信息 直接提交我的反馈信息 @@ -197,12 +144,7 @@ - + 您的病历没有进行涂抹 diff --git a/src/module1/pages/login/index.ts b/src/module1/pages/login/index.ts index c9250f3..32c8e4d 100644 --- a/src/module1/pages/login/index.ts +++ b/src/module1/pages/login/index.ts @@ -9,9 +9,14 @@ Page({ protool: false, codeText: "发送验证码", }, - onLoad() {}, + onLoad() { + app.waitLogin(true).then(() => { + app.mpBehavior({ PageName: "PG_LOGIN" }); + }); + }, getCode() { if (timer) return; + app.mpBehavior({ PageName: "BTN_SENDVERIFICATION" }); const mobile = this.data.mobile; if (!mobile) { wx.showToast({ @@ -57,6 +62,7 @@ Page({ }, handleSubmit() { const { mobile, code, protool } = this.data; + app.mpBehavior({ PageName: "BTN_LOGIN" }); if (!protool) { this.handleNavProtool(); return; @@ -87,6 +93,7 @@ Page({ }); }, handleWxSubmit(e: any) { + app.mpBehavior({ PageName: "BTN_PHONEQUICKACCESS" }); const { protool } = this.data; const { iv, encryptedData } = e.detail; if (!protool) { @@ -128,6 +135,9 @@ Page({ }, handleNavProtool(e) { const phone = e?.currentTarget?.dataset?.phone; + if (phone === "1") { + app.mpBehavior({ PageName: "BTN_PHONEQUICKACCESS" }); + } wx.navigateTo({ url: `/module1/pages/loginProtool/index?phone=${phone}` }); }, }); diff --git a/src/module1/pages/loginOut/index.ts b/src/module1/pages/loginOut/index.ts index 83a9e43..028317d 100644 --- a/src/module1/pages/loginOut/index.ts +++ b/src/module1/pages/loginOut/index.ts @@ -2,11 +2,17 @@ const app = getApp(); Page({ data: {}, - onLoad() {}, + onLoad() { + app.waitLogin().then(() => { + app.mpBehavior({ PageName: "PG_CANCELACCOUNT" }); + }); + }, handleCancel() { + app.mpBehavior({ PageName: "BTN_CANCELACCOUNTCANCEL" }); wx.navigateBack(); }, handleLoginOut() { + app.mpBehavior({ PageName: "BTN_CANCELACCOUNTCONFIRM" }); wx.showModal({ confirmColor: "#00B4C5", cancelColor: "#141515", diff --git a/src/module1/pages/loginProtool/index.ts b/src/module1/pages/loginProtool/index.ts index ee5d903..bfb48f9 100644 --- a/src/module1/pages/loginProtool/index.ts +++ b/src/module1/pages/loginProtool/index.ts @@ -10,7 +10,10 @@ Page({ onLoad(options) { this.setData({ ismy: options.ismy === "1", - phone : options.phone === "1", + phone: options.phone === "1", + }); + app.waitLogin(true).then(() => { + app.mpBehavior({ PageName: "PG_PRIVACY" }); }); }, handleScrollToLower(e) { @@ -21,6 +24,7 @@ Page({ } }, handleCancel() { + app.mpBehavior({ PageName: "BTN_UNAGREEPRIVACY" }); const pages = getCurrentPages(); //获取当前页面js里面的pages里的所有信息。 const prevPage = pages[pages.length - 2]; prevPage.setData({ @@ -29,6 +33,7 @@ Page({ wx.navigateBack(); }, handleOk() { + app.mpBehavior({ PageName: "BTN_AGREEPRIVACY" }); const pages = getCurrentPages(); //获取当前页面js里面的pages里的所有信息。 const prevPage = pages[pages.length - 2]; prevPage.setData({ @@ -37,6 +42,7 @@ Page({ wx.navigateBack(); }, handleWxSubmit(e: any) { + app.mpBehavior({ PageName: "BTN_AGREEPRIVACY" }); const { iv, encryptedData } = e.detail; if (iv && encryptedData) { wx.ajax({ diff --git a/src/module1/pages/setApplicationDoctor/index.ts b/src/module1/pages/setApplicationDoctor/index.ts index fb829f4..73420e1 100644 --- a/src/module1/pages/setApplicationDoctor/index.ts +++ b/src/module1/pages/setApplicationDoctor/index.ts @@ -51,6 +51,7 @@ Page({ }); } app.waitLogin().then(() => { + app.mpBehavior({ PageName: "PG_SELECTBINDDOCTOR" }); this.getList(); this.getDoctorDict(); this.getHostipalDict(); @@ -235,6 +236,7 @@ Page({ }, handleSubmit({ exempt = false }) { const { DoctorId, doctorRejectCount } = this.data; + app.mpBehavior({ PageName: "BTN_SELECTBINDDOCTORSEND" }); if (!DoctorId) { wx.showToast({ title: "请选择医生", @@ -271,6 +273,7 @@ Page({ }); }, handleBack() { + app.mpBehavior({ PageName: "BTN_SELECTBINDDOCTORBACK" }); wx.navigateBack(); }, }); diff --git a/src/module1/pages/setApplicationDoctorResult/index.ts b/src/module1/pages/setApplicationDoctorResult/index.ts index eeeb709..2b59a76 100644 --- a/src/module1/pages/setApplicationDoctorResult/index.ts +++ b/src/module1/pages/setApplicationDoctorResult/index.ts @@ -8,6 +8,7 @@ Page({ }, onLoad(options) { app.waitLogin(true).then(() => { + app.mpBehavior({ PageName: "PG_BINDSUCCESS" }); this.getCodeUrl(); this.setData({ isf: Number(options.isf), diff --git a/src/module1/pages/setInfo/index.ts b/src/module1/pages/setInfo/index.ts index 02b1a2c..6f94364 100644 --- a/src/module1/pages/setInfo/index.ts +++ b/src/module1/pages/setInfo/index.ts @@ -23,6 +23,7 @@ Page({ }, onLoad() { app.waitLogin(true).then(() => { + app.mpBehavior({ PageName: "PG_DOCTORREGISTRATION" }); this.getApplyDoctor(); this.getLoastApplyHostipal(); this.getDoctorDict(); @@ -128,6 +129,7 @@ Page({ }); }, handleSubmitConform() { + app.mpBehavior({ PageName: "BTN_DOCTORREGISTRATIONSUBMIT" }); wx.showModal({ content: "您没有邀约医生,可能会影响您的审核", confirmColor: "#00B4C5", @@ -142,6 +144,7 @@ Page({ }); }, handleSubmit() { + app.mpBehavior({ PageName: "BTN_DOCTORREGISTRATIONSUBMIT" }); const { AuditId, Name, @@ -296,6 +299,7 @@ Page({ }); }, handleLoginOut() { + app.mpBehavior({ PageName: "BTN_DOCTORREGISTRATIONLOGOUT" }); wx.showModal({ confirmColor: "#00B4C5", cancelColor: "#141515", diff --git a/src/module1/pages/setInfoResult/index.ts b/src/module1/pages/setInfoResult/index.ts index 314ccec..62fdbd1 100644 --- a/src/module1/pages/setInfoResult/index.ts +++ b/src/module1/pages/setInfoResult/index.ts @@ -8,6 +8,7 @@ Page({ }, onLoad(options) { app.waitLogin(true).then(() => { + app.mpBehavior({ PageName: "PG_DOCTORSUBMITSUCCESS" }); this.setData({ isFollow: Number(options.isf), InviteDoctorName: options.iname === "null" ? "" : options.iname, @@ -45,7 +46,7 @@ Page({ title: "确认退出登录?", success(res) { if (res.confirm) { - app.globalData.isLogin = 0 + app.globalData.isLogin = 0; wx.ajax({ method: "POST", url: "?r=takeda/account/reg-logout", diff --git a/src/module1/pages/userInfo/index.ts b/src/module1/pages/userInfo/index.ts index 7568d25..5657b5e 100644 --- a/src/module1/pages/userInfo/index.ts +++ b/src/module1/pages/userInfo/index.ts @@ -19,6 +19,7 @@ Page({ }, onShow() { app.waitLogin().then(async () => { + app.mpBehavior({ PageName: "PG_PERSONALINFO" }); await this.getDoctorDict(); this.getUserInfo(); }); @@ -69,6 +70,7 @@ Page({ this.handleSubmit(); }, handleShowDept() { + app.mpBehavior({ PageName: "BTN_PERSONALINFODEPARTMENT" }); this.setData({ show1: true, }); @@ -114,6 +116,7 @@ Page({ }); }, handleIntroduce() { + app.mpBehavior({ PageName: "BTN_PERSONALINFOINTRODUCTION" }); this.setData({ show2: true, }); @@ -150,6 +153,7 @@ Page({ this.onClose(); }, changePhone() { + app.mpBehavior({ PageName: "BTN_PERSONALINFOCHANGEMOBILE" }); wx.navigateTo({ url: "/module1/pages/changePhone/index", }); @@ -160,6 +164,7 @@ Page({ }); }, handleLoginOut() { + app.mpBehavior({ PageName: "BTN_PERSONALINFOLOGOUT" }); wx.showModal({ confirmColor: "#00B4C5", cancelColor: "#141515", @@ -180,6 +185,7 @@ Page({ }); }, handleLogout() { + app.mpBehavior({ PageName: "BTN_PERSONALINFOCANCELACCOUNT" }); wx.navigateTo({ url: "/module1/pages/loginOut/index", }); diff --git a/src/pages/cases/index.ts b/src/pages/cases/index.ts index cf3aa6b..91093ec 100644 --- a/src/pages/cases/index.ts +++ b/src/pages/cases/index.ts @@ -105,6 +105,7 @@ Page({ }); app.globalData.needDeal = ""; app.waitLogin().then(() => { + app.mpBehavior({ PageName: "PG_CASELIST" }); this.getBaseInfo(); this.getList(); this.getHospitalsList(); @@ -208,6 +209,9 @@ Page({ this.getList(page + 1); } }, + handleSearchFocus() { + app.mpBehavior({ PageName: "BTN_CASELISTSEARCH" }); + }, handleSearch() { this.getList(); }, @@ -301,6 +305,7 @@ Page({ }, handleDetail(e) { const { params } = e.currentTarget.dataset; + app.mpBehavior({ PageName: "BTN_CASECARD" }); this.setData({ entryDetail: true, }); @@ -458,6 +463,15 @@ Page({ handleRadio(e) { const { key } = e.currentTarget.dataset; + const PageName = { + isReject: "BTN_CASELISTREJECTFILTER", + isHighQuality: "BTN_CASELISTQUALITYFILTER", + isOpen: "BTN_CASELISTPUBLIC", + newFeedback: "BTN_CASELISTUPDATE", + }[key]; + if (PageName) { + app.mpBehavior({ PageName }); + } this.setData({ [key]: this.data[key] === "1" ? "" : "1", }); @@ -471,6 +485,7 @@ Page({ this.handleSearch(); }, handleFold() { + app.mpBehavior({ PageName: "BTN_CASELISTFILTERTOGGLE" }); this.setData({ fold: !this.data.fold, }); diff --git a/src/pages/cases/index.wxml b/src/pages/cases/index.wxml index a846401..3b4f6c0 100644 --- a/src/pages/cases/index.wxml +++ b/src/pages/cases/index.wxml @@ -27,6 +27,7 @@ class="input" model:value="{{search}}" confirm-type="search" + bind:focus="handleSearchFocus" bindconfirm="handleSearch" placeholder-class="place-input" type="text" diff --git a/src/pages/chatRoomList/index.ts b/src/pages/chatRoomList/index.ts index e61b8fe..ea923f1 100644 --- a/src/pages/chatRoomList/index.ts +++ b/src/pages/chatRoomList/index.ts @@ -74,6 +74,7 @@ Page({ notice: false, }); app.waitLogin().then(() => { + app.mpBehavior({ PageName: "PG_CHATROOMLIST" }); this.getBaseInfo(); this.getList(); this.getHospitalsList(); @@ -180,6 +181,7 @@ Page({ } }, handleSearch() { + app.mpBehavior({ PageName: "BTN_CHATROOMSEARCH" }); this.getList(); }, handleCaseShow() { @@ -419,6 +421,13 @@ Page({ }, handleRead(e) { const { value } = e.currentTarget.dataset; + const PageName = { + 1: "BTN_CHATROOMREAD", + 2: "BTN_CHATROOMUNREAD", + }[value]; + if (PageName) { + app.mpBehavior({ PageName }); + } this.setData({ readStatus: value, }); @@ -450,6 +459,7 @@ Page({ }, handleFold() { + app.mpBehavior({ PageName: "BTN_CHATROOMFILTERTOGGLE" }); this.setData({ fold: !this.data.fold, }); @@ -460,12 +470,14 @@ Page({ }, handleRoom(e) { + app.mpBehavior({ PageName: "BTN_CHATROOMCARD" }); const { params } = e.currentTarget.dataset; wx.navigateTo({ url: `/module1/pages/chatRoom/index?id=${params.roomId}`, }); }, handleReadAll() { + app.mpBehavior({ PageName: "BTN_CHATROOMMARKALLREAD" }); wx.showModal({ title: "确认全部标为已读", confirmColor: "#00B4C5", diff --git a/src/pages/home/index.ts b/src/pages/home/index.ts index 01a8ec0..15c377e 100644 --- a/src/pages/home/index.ts +++ b/src/pages/home/index.ts @@ -26,6 +26,7 @@ Page({ notice: false, }); app.waitLogin().then(() => { + app.mpBehavior({ PageName: "PG_HOME" }); this.handleBindDoctor(); this.getDoctorDict(); this.getHostipalDict(); @@ -120,6 +121,14 @@ Page({ 9: "S2:核心医生", 10: "S3:质控医生", }[index]; + const PageName = { + 1: "BTN_MANAGEDCASESNEWINFO", + 2: "BTN_MANAGEDCASESDISCUSSINFO", + 3: "BTN_MANAGEDCASESCLOSEDINFO", + }[index]; + if (PageName) { + app.mpBehavior({ PageName }); + } wx.showModal({ content: tip, confirmColor: "#00B4C5", diff --git a/src/pages/my/index.ts b/src/pages/my/index.ts index 6f2d8cb..75b763c 100644 --- a/src/pages/my/index.ts +++ b/src/pages/my/index.ts @@ -13,6 +13,7 @@ Page({ notice: false, }); app.waitLogin().then(() => { + app.mpBehavior({ PageName: "PG_MY" }); this.getDoctorDict(); app.getUserInfo(this, (userInfo) => { this.getTabBar().setData({ @@ -45,11 +46,13 @@ Page({ }); }, handleUserInfo() { + app.mpBehavior({ PageName: "BTN_MYPERSONALINFO" }); wx.navigateTo({ url: "/module1/pages/userInfo/index", }); }, handleProtocol() { + app.mpBehavior({ PageName: "BTN_MYPRIVACYPOLICY" }); wx.navigateTo({ url: "/module1/pages/loginProtool/index?ismy=1", }); @@ -59,6 +62,10 @@ Page({ url: "/module1/pages/invite/index", }); }, + + handleBZSC() { + app.mpBehavior({ PageName: "BTN_MYHELPMANUAL" }); + }, }); export {}; diff --git a/typings/index.d.ts b/typings/index.d.ts index fe869d9..63f052b 100644 --- a/typings/index.d.ts +++ b/typings/index.d.ts @@ -21,6 +21,7 @@ interface IAppOption { getMenuInfo: (arg0: WechatMiniprogram.Page.Instance) => void; getUserInfo: (arg0: WechatMiniprogram.Page.Instance, arg1?: (arg0: any) => void) => void; getApplyDoctor: () => Promise; + mpBehavior: (data: { PageName: string }) => void; } interface IAgaxParams extends WechatMiniprogram.RequestOption {