From 2498c2756c1a1e9e063e882be0be7f1a4e2c8b5e Mon Sep 17 00:00:00 2001 From: kola-web Date: Fri, 29 Aug 2025 11:12:57 +0800 Subject: [PATCH] =?UTF-8?q?=E5=88=A0=E9=99=A4=E6=89=80=E6=9C=89=E5=86=8D?= =?UTF-8?q?=E9=BC=8E=E7=9A=84=E5=9F=8B=E7=82=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/app.ts | 5 +- src/components/popup/index.ts | 7 - src/gift/pages/myHealthRecord/index.ts | 451 ++++++++++++------------- src/pages/d_interactive/index.ts | 10 +- src/pages/d_interactiveDoctor/index.ts | 8 +- src/pages/d_invite/index.ts | 2 +- src/pages/d_patient/index.ts | 8 +- src/pages/d_patientDetail/index.ts | 12 +- src/pages/d_userInfo/index.ts | 6 +- src/pages/home/index.ts | 12 +- src/pages/information/index.ts | 4 +- src/pages/informationDetail/index.ts | 6 +- src/pages/message/index.ts | 2 +- src/patient/pages/adl/index.ts | 8 +- src/patient/pages/adlResult/index.ts | 10 +- src/patient/pages/adlShare/index.ts | 4 +- src/patient/pages/adlTest/index.ts | 4 +- src/patient/pages/doctor/index.ts | 18 +- src/patient/pages/doctor/siteShare/index.ts | 2 +- src/patient/pages/enterInfo/index.ts | 4 +- src/patient/pages/family/index.ts | 4 +- src/patient/pages/familyList/index.ts | 2 +- src/patient/pages/index/index.ts | 32 +- src/patient/pages/interactivePatient/index.ts | 4 +- src/patient/pages/live/index.ts | 10 +- src/patient/pages/liveDetail/index.ts | 10 +- src/patient/pages/login/index.ts | 8 +- src/patient/pages/my/index.ts | 16 +- src/patient/pages/myLive/index.ts | 12 +- src/patient/pages/mySave/index.ts | 6 +- src/patient/pages/nrdl/index.ts | 2 +- src/patient/pages/nrdlDetail/index.ts | 6 +- src/patient/pages/nrdlTable/index.ts | 2 +- src/patient/pages/personalInformation/index.ts | 8 +- src/patient/pages/privacyAgreement/index.ts | 6 +- src/patient/pages/publishStoryDetail/index.ts | 6 +- src/patient/pages/repository/index.ts | 4 +- src/patient/pages/repositoryDetail/index.ts | 8 +- src/patient/pages/story/index.ts | 8 +- src/patient/pages/storyEnter/index.ts | 4 +- src/patient/pages/storyGuide/index.ts | 4 +- src/patient/pages/storyList/index.ts | 6 +- src/patient/pages/taskAgreement/index.ts | 6 +- src/patient/pages/uploadCert/index.ts | 4 +- src/patient/pages/webview/index.ts | 2 +- typings/index.d.ts | 3 +- 46 files changed, 372 insertions(+), 394 deletions(-) diff --git a/src/app.ts b/src/app.ts index 64b167e..ff9903d 100644 --- a/src/app.ts +++ b/src/app.ts @@ -233,7 +233,10 @@ App({ data: {}, }) as Promise }, - mpBehavior(data) { + mpBehavior(data: { PageName: string }) { + console.log(data) + }, + oldMpBehavior(data) { wx.ajax({ method: 'POST', url: '?r=xd/doctor/index/operate-action-submit', diff --git a/src/components/popup/index.ts b/src/components/popup/index.ts index 4945a48..d4d1fed 100644 --- a/src/components/popup/index.ts +++ b/src/components/popup/index.ts @@ -1,5 +1,3 @@ -import { wxPromiseWrapper } from 'XrFrame/core/utils' - const app = getApp() Component({ @@ -44,11 +42,6 @@ Component({ url, }) }, - handlePopup1Check1() { - if (this.data.popup1Check1) { - app.mpBehavior({ PageName: 'BTN_PATIENTPRIVACY' }) - } - }, handleSelectStatus(e) { const { status } = e.currentTarget.dataset this.triggerEvent('ok', { type: 'selectStatusComplete', status }) diff --git a/src/gift/pages/myHealthRecord/index.ts b/src/gift/pages/myHealthRecord/index.ts index ccbc6d6..ea86951 100644 --- a/src/gift/pages/myHealthRecord/index.ts +++ b/src/gift/pages/myHealthRecord/index.ts @@ -1,8 +1,8 @@ -import dayjs from 'dayjs'; -const app = getApp(); -const licia = require('miniprogram-licia'); +import dayjs from 'dayjs' +const app = getApp() +const licia = require('miniprogram-licia') -let echarts: any = null; +let echarts: any = null Page({ data: { @@ -109,39 +109,38 @@ Page({ app.zdGetTheme().then((res) => { this.setData({ theme: res, - }); - }); + }) + }) }, async onShow() { - echarts = await require.async('../../compontnts/echart/echarts.js'); - this.ecDataTrendComponent = this.selectComponent('#mychart-dom-bar'); - this.ecDataHormoneComponent = this.selectComponent('#mychart-hormone'); + echarts = await require.async('../../compontnts/echart/echarts.js') + this.ecDataTrendComponent = this.selectComponent('#mychart-dom-bar') + this.ecDataHormoneComponent = this.selectComponent('#mychart-hormone') this.setData({ calendarDate: dayjs().format('YYYY-MM'), - }); - this.handleChangeType(); + }) + this.handleChangeType() app.waitLogin().then(() => { // 强制疾病患者以上身份 app.zdPermissionVerification(3, 0, `/gift/pages/myHealthRecord/index`).then(() => { - app.zdMpBehavior({ PageName: 'PG_PATIENTHEALTHRECORD' }); app.getZdUserInfo(this, true, (res) => { if (res.UserType != 4) { this.setData({ tab: 2, - }); + }) } - this.getCale(); - this.handleTabCallBack(); - this.getMedicationAlertAdl(); - }); - }); - }); + this.getCale() + this.handleTabCallBack() + this.getMedicationAlertAdl() + }) + }) + }) }, handleChangeInput() { if (Number(this.data.Num) > 100) { this.setData({ Num: 100, - }); + }) } }, getCale() { @@ -152,44 +151,44 @@ Page({ Month: this.data.calendarDate, }, }).then((res) => { - this.setCalendarTodos(res); - }); + this.setCalendarTodos(res) + }) }, setCalendarTodos({ adl = [], medication = [] }: { adl: any[]; medication: string[] }) { - const theme = this.data.theme; - const calendar = this.selectComponent('#calendar').calendar; - const adlDate = adl.map((item) => item.Date); - const dates: any[] = []; - const intersectDate = licia.intersect(adlDate, medication); - const filterAdlDate = adl.filter((item) => !intersectDate.includes(item.Date)); - const filterMedication = medication.filter((item) => !intersectDate.includes(item)); - const intersectAdlDate = adl.filter((item) => intersectDate.includes(item.Date)); - const doc = theme === 'DRUG' ? 'doc' : ' '; + const theme = this.data.theme + const calendar = this.selectComponent('#calendar').calendar + const adlDate = adl.map((item) => item.Date) + const dates: any[] = [] + const intersectDate = licia.intersect(adlDate, medication) + const filterAdlDate = adl.filter((item) => !intersectDate.includes(item.Date)) + const filterMedication = medication.filter((item) => !intersectDate.includes(item)) + const intersectAdlDate = adl.filter((item) => intersectDate.includes(item.Date)) + const doc = theme === 'DRUG' ? 'doc' : ' ' filterMedication.forEach((Date: string) => { dates.push({ year: Date.split('-')[0], month: Date.split('-')[1], date: Date.split('-')[2], class: doc, - }); - }); + }) + }) intersectAdlDate.forEach(({ Date, TotalScore, LastTotalScore }) => { dates.push({ year: Date.split('-')[0], month: Date.split('-')[1], date: Date.split('-')[2], class: TotalScore > 5 || TotalScore - LastTotalScore >= 2 ? `error ${doc}` : `primary ${doc}`, - }); - }); + }) + }) filterAdlDate.forEach(({ Date, TotalScore, LastTotalScore }) => { dates.push({ year: Date.split('-')[0], month: Date.split('-')[1], date: Date.split('-')[2], class: TotalScore > 5 || TotalScore - LastTotalScore >= 2 ? 'error' : 'primary', - }); - }); - calendar.setDateStyle(dates); + }) + }) + calendar.setDateStyle(dates) }, getMedicationAlertAdl() { wx.ajax({ @@ -199,47 +198,37 @@ Page({ }).then((res) => { this.setData({ alertAdl: res, - }); - }); + }) + }) }, handleWhenChangeMonth(e: { detail: { next: any } }) { - const current = e.detail.next; + const current = e.detail.next this.setData({ calendarDate: dayjs(`${current.year}-${current.month}`).format('YYYY-MM'), - }); - this.getCale(); + }) + this.getCale() }, handleChangeType(e?: WechatMiniprogram.CustomEvent) { - let type = ''; - let callback = true; + let type = '' + let callback = true if (e) { - type = e.currentTarget.dataset.type; + type = e.currentTarget.dataset.type } else { - type = this.data.Type; - callback = false; + type = this.data.Type + callback = false } - let EndMonth = ''; - let BeginMonth = ''; + let EndMonth = '' + let BeginMonth = '' if (type == '1') { - if (e) { - app.zdMpBehavior({ PageName: 'BTN_PATIENTHEALTHRECORDDAILYCURVE' }); - } - EndMonth = dayjs().format('YYYY-MM-DD'); - BeginMonth = dayjs().subtract(6, 'd').format('YYYY-MM-DD'); + EndMonth = dayjs().format('YYYY-MM-DD') + BeginMonth = dayjs().subtract(6, 'd').format('YYYY-MM-DD') } else if (type == '2') { - if (e) { - app.zdMpBehavior({ PageName: 'BTN_PATIENTHEALTHRECORDMONTHLYCURVE' }); - } - EndMonth = dayjs().format('YYYY-MM'); - BeginMonth = dayjs().subtract(1, 'M').format('YYYY-MM'); + EndMonth = dayjs().format('YYYY-MM') + BeginMonth = dayjs().subtract(1, 'M').format('YYYY-MM') } else if (type == '3') { - if (e) { - app.zdMpBehavior({ PageName: 'BTN_PATIENTHEALTHRECORDYEARLYCURVE' }); - } - EndMonth = dayjs().format('YYYY'); - BeginMonth = dayjs().subtract(1, 'y').format('YYYY'); + EndMonth = dayjs().format('YYYY') + BeginMonth = dayjs().subtract(1, 'y').format('YYYY') } else if (type == '4' && e) { - app.zdMpBehavior({ PageName: 'BTN_PATIENTHEALTHRECORDTIMECURVE' }); } this.setData({ page: 0, @@ -247,52 +236,49 @@ Page({ Num: '5', EndMonth, BeginMonth, - }); + }) if (callback) { - this.handleTabCallBack(); + this.handleTabCallBack() } }, handleChange() { - this.handleTabCallBack(); + this.handleTabCallBack() }, handleTab(e) { - const { index } = e.currentTarget.dataset; + const { index } = e.currentTarget.dataset this.setData({ tab: index, - }); + }) if (index == 1) { - app.zdMpBehavior({ PageName: 'BTN_PATIENTHEALTHRECORDCOMPREHENSIVEREPORT' }); } if (index == 2) { - app.zdMpBehavior({ PageName: 'BTN_PATIENTHEALTHRECORDDUALCOMPLIANCENOTES' }); } if (index == 3) { - app.zdMpBehavior({ PageName: 'BTN_PATIENTHEALTHRECORDMEDICATIONRECORD' }); } - this.handleTabCallBack(); + this.handleTabCallBack() }, handleTabCallBack() { - const tab = this.data.tab; + const tab = this.data.tab this.setData({ pagination: { page: 1, pages: 1, count: 1, }, - }); + }) if (tab == 1) { - this.getAllList(); + this.getAllList() } if (tab == 2) { - this.getList(); + this.getList() } if (tab == 3) { - this.getMedicationList(); + this.getMedicationList() } - this.getChart(); + this.getChart() }, getAllList(newPage = 1) { - const { BeginMonth, EndMonth, Type, Num } = this.data; + const { BeginMonth, EndMonth, Type, Num } = this.data wx.ajax({ method: 'GET', url: '?r=zd/adl/composite-list', @@ -305,22 +291,22 @@ Page({ page: newPage, }, }).then((res) => { - const list = res.list; + const list = res.list list.map((item) => { - let grade = 1; + let grade = 1 if (item.TotalScore < 5) { - grade = 1; + grade = 1 } else if (item.TotalScore >= 5 && item.TotalScore < 15) { - grade = 2; + grade = 2 } else { - grade = 3; + grade = 3 } - item.grade = grade; - item.fold = true; - return item; - }); + item.grade = grade + item.fold = true + return item + }) - const newList = res.page === 1 ? res.list : [...this.data.list, ...res.list]; + const newList = res.page === 1 ? res.list : [...this.data.list, ...res.list] this.setData({ list: newList, pagination: { @@ -328,26 +314,26 @@ Page({ pages: res.pages, count: res.count, }, - }); - }); + }) + }) }, onReachBottom() { - const { page, pages } = this.data.pagination; - const tab = this.data.tab; + const { page, pages } = this.data.pagination + const tab = this.data.tab if (pages > page) { if (tab == 1) { - this.getAllList(page + 1); + this.getAllList(page + 1) } if (tab == 2) { - this.getList(page + 1); + this.getList(page + 1) } if (tab == 3) { - this.getMedicationList(page + 1); + this.getMedicationList(page + 1) } } }, getList(newPage = 1) { - const { BeginMonth, EndMonth, Type, Num } = this.data; + const { BeginMonth, EndMonth, Type, Num } = this.data wx.ajax({ method: 'GET', url: '?r=zd/adl/list', @@ -360,22 +346,22 @@ Page({ page: newPage, }, }).then((res) => { - const list = res.list; + const list = res.list list.map((item) => { - let grade = 1; + let grade = 1 if (item.TotalScore < 5) { - grade = 1; + grade = 1 } else if (item.TotalScore >= 5 && item.TotalScore < 15) { - grade = 2; + grade = 2 } else { - grade = 3; + grade = 3 } - item.grade = grade; - item.fold = true; - item.Type = 1; - return item; - }); - const newList = res.page === 1 ? res.list : [...this.data.list, ...res.list]; + item.grade = grade + item.fold = true + item.Type = 1 + return item + }) + const newList = res.page === 1 ? res.list : [...this.data.list, ...res.list] this.setData({ list: newList, pagination: { @@ -383,11 +369,11 @@ Page({ pages: res.pages, count: res.count, }, - }); - }); + }) + }) }, getMedicationList(newPage = 1) { - const { BeginMonth, EndMonth, Type, Num } = this.data; + const { BeginMonth, EndMonth, Type, Num } = this.data wx.ajax({ method: 'GET', url: '?r=zd/medication/list', @@ -400,22 +386,22 @@ Page({ page: newPage, }, }).then((res) => { - const list = res.list; + const list = res.list list.map((item) => { - let grade = 1; + let grade = 1 if (item.TotalScore < 5) { - grade = 1; + grade = 1 } else if (item.TotalScore >= 5 && item.TotalScore < 15) { - grade = 2; + grade = 2 } else { - grade = 3; + grade = 3 } - item.grade = grade; - item.fold = true; - item.Type = 2; - return item; - }); - const newList = res.page === 1 ? res.list : [...this.data.list, ...res.list]; + item.grade = grade + item.fold = true + item.Type = 2 + return item + }) + const newList = res.page === 1 ? res.list : [...this.data.list, ...res.list] this.setData({ list: newList, pagination: { @@ -423,11 +409,11 @@ Page({ pages: res.pages, count: res.count, }, - }); - }); + }) + }) }, getChart() { - const { BeginMonth, EndMonth, Type, Num } = this.data; + const { BeginMonth, EndMonth, Type, Num } = this.data wx.ajax({ method: 'GET', url: '?r=zd/adl/list', @@ -446,12 +432,12 @@ Page({ defaultList: res.list, count: res.list.length, defaultListLast: res.list.at(-1), - }); - const chart1 = await this.initChart(res.list); - const chart2 = await this.initHormoneChart(res.list); - echarts.connect([chart1, chart2]); + }) + const chart1 = await this.initChart(res.list) + const chart2 = await this.initHormoneChart(res.list) + echarts.connect([chart1, chart2]) } - }); + }) if (Number(Type) != 4) { wx.ajax({ method: 'GET', @@ -468,65 +454,65 @@ Page({ return { Date: item.InjectionDate, ...item, - }; - }); - const list = res.list; - const newList: any[] = this.mergeArr(list, medication); + } + }) + const list = res.list + const newList: any[] = this.mergeArr(list, medication) if (Number(Type) != 4) { this.setData({ defaultList: newList as never[], defaultListLast: newList.at(-1), count: list.length, - }); - const chart1 = await this.initChart(newList as never[]); - const chart2 = await this.initHormoneChart(newList as never[]); - echarts.connect([chart1, chart2]); + }) + const chart1 = await this.initChart(newList as never[]) + const chart2 = await this.initHormoneChart(newList as never[]) + echarts.connect([chart1, chart2]) } - }); + }) } }, mergeArr(array1: any[] = [], array2: any[] = []) { // 合并两个数组中相同Date字段的对象 - const mergedArray: any[] = []; - const mergedMap = new Map(); + const mergedArray: any[] = [] + const mergedMap = new Map() array1.concat(array2).forEach((obj) => { - const date = obj.Date; + const date = obj.Date if (mergedMap.has(date)) { - mergedMap.get(date).push(obj); + mergedMap.get(date).push(obj) } else { - mergedMap.set(date, [obj]); + mergedMap.set(date, [obj]) } - }); + }) mergedMap.forEach((objs: any) => { if (objs.length === 1) { - mergedArray.push(objs[0]); + mergedArray.push(objs[0]) } else { - const mergedObj = objs.reduce((acc, cur) => ({ ...acc, ...cur })); - mergedArray.push(mergedObj); + const mergedObj = objs.reduce((acc, cur) => ({ ...acc, ...cur })) + mergedArray.push(mergedObj) } - }); + }) // 按照Date字段对合并后的数组进行排序 mergedArray.sort((a, b) => { - return a.Date.localeCompare(b.Date); - }); - return mergedArray; + return a.Date.localeCompare(b.Date) + }) + return mergedArray }, initChart(defaultList = []) { - const { theme } = this.data; - const list: any = defaultList; + const { theme } = this.data + const list: any = defaultList return new Promise((reslove) => { this.ecDataTrendComponent.init((canvas, width, height, dpr) => { const chart = echarts.init(canvas, null, { width, height, devicePixelRatio: dpr, // new - }); - canvas.setChart(chart); + }) + canvas.setChart(chart) const option: any = { tooltip: { @@ -574,7 +560,7 @@ Page({ data: list.map((item) => dayjs(item.Date).format('MM-DD')), axisLabel: { formatter() { - return ''; + return '' }, }, }, @@ -647,7 +633,7 @@ Page({ endValue: 4, filterMode: 'none', }, - }; + } if (theme === 'DRUG') { const markLineData = list @@ -669,8 +655,8 @@ Page({ color: '#25D9C8', offset: [60, 0], }, - }; - }); + } + }) option.series.push({ name: '用药', data: list.map((item) => (item.InjectionBottles ? 0 : null)), @@ -693,7 +679,7 @@ Page({ symbol: ['none', 'none'], data: markLineData, }, - }); + }) // option.series.push({ // name: "用药时间", // data: list.map((item: any) => (item.InjectionBottles ? item.TotalScore : 0)), @@ -715,23 +701,23 @@ Page({ // }); } - chart.setOption(option); - reslove(chart); - return chart; - }); - }); + chart.setOption(option) + reslove(chart) + return chart + }) + }) }, initHormoneChart(defaultList = []) { - const { theme } = this.data; - const list: any = defaultList; + const { theme } = this.data + const list: any = defaultList return new Promise((reslove) => { this.ecDataHormoneComponent.init((canvas, width, height, dpr) => { const chart = echarts.init(canvas, null, { width, height, devicePixelRatio: dpr, // new - }); - canvas.setChart(chart); + }) + canvas.setChart(chart) const option: any = { tooltip: { @@ -784,12 +770,12 @@ Page({ type: 'value', minInterval: 1, max(value) { - return value.max + 20 > 999 ? 999 : value.max + 20; + return value.max + 20 > 999 ? 999 : value.max + 20 }, axisLabel: { // width: 20, formatter(value: number) { - return value; + return value }, }, }, @@ -811,7 +797,7 @@ Page({ color: '#18474e', z: 11, formatter({ value }) { - return `${value}mg`; + return `${value}mg` }, }, itemStyle: { @@ -860,7 +846,7 @@ Page({ endValue: 4, filterMode: 'none', }, - }; + } if (theme === 'DRUG') { const markLineData = list .filter((item) => item.InjectionBottles) @@ -880,9 +866,9 @@ Page({ color: '#25D9C8', offset: [60, 0], }, - }; - }); - const maxValue = Math.max(...list.map((item) => item.SteroidDailyDose)); + } + }) + const maxValue = Math.max(...list.map((item) => item.SteroidDailyDose)) option.series.push({ name: '用药', data: list.map((item) => (item.InjectionBottles ? 0 : null)), @@ -905,7 +891,7 @@ Page({ symbol: ['none', 'none'], data: markLineData, }, - }); + }) // option.series.push({ // name: "用药时间", // data: list.map((item: any) => (item.InjectionBottles ? item.TotalScore : 0)), @@ -927,68 +913,66 @@ Page({ // }); } - chart.setOption(option); - reslove(chart); - return chart; - }); - }); + chart.setOption(option) + reslove(chart) + return chart + }) + }) }, touchend(e) { - const { type } = e.currentTarget.dataset; - const { page, defaultList } = this.data; + const { type } = e.currentTarget.dataset + const { page, defaultList } = this.data if (type == 'left' && page > 0) { this.setData({ page: page - 1, - }); - this.initChart(defaultList); - this.initHormoneChart(defaultList); + }) + this.initChart(defaultList) + this.initHormoneChart(defaultList) } else if (type == 'right' && page < defaultList.length / 5 - 1) { this.setData({ page: page + 1, - }); - this.initChart(defaultList); - this.initHormoneChart(defaultList); + }) + this.initChart(defaultList) + this.initHormoneChart(defaultList) } }, handleFoldAll() { - const { list } = this.data; + const { list } = this.data this.setData({ list: list.map((item) => { - item.fold = !this.data.foldAll; - return item; + item.fold = !this.data.foldAll + return item }), foldAll: !this.data.foldAll, - }); + }) }, handleFold(e) { - const { index } = e.currentTarget.dataset; + const { index } = e.currentTarget.dataset this.setData({ [`list[${index}].fold`]: !this.data.list[index].fold, - }); + }) }, handleDetail(e) { - const { id, isi } = e.currentTarget.dataset; - const tab = this.data.tab; + const { id, isi } = e.currentTarget.dataset + const tab = this.data.tab if (isi == 1) { - return; + return } if (tab == 1) { - app.zdMpBehavior({ PageName: 'BTN_PATIENTHEALTHRECORDREPORTLIST' }); } if (tab == 2) { - app.zdMpBehavior({ PageName: 'BTN_PATIENTHEALTHRECORDNOTESLIST' }); } wx.navigateTo({ url: `/patient/pages/adlResult/index?id=${id}`, - }); + }) }, handleDel(e) { - const { id, index, isi } = e.currentTarget.dataset; + const { id, index, isi } = e.currentTarget.dataset if (isi == 1) { - return; + return } - if (index != 0) return; + if (index != 0) return wx.showModal({ title: '确认删除?', confirmColor: '#8c75d0', @@ -1001,50 +985,48 @@ Page({ Id: id, }, }).then(() => { - this.handleTabCallBack(); - }); + this.handleTabCallBack() + }) } }, - }); + }) }, handleAdd() { - app.zdMpBehavior({ PageName: 'BTN_PATIENTHEALTHRECORDASSESSMENT' }); wx.navigateTo({ url: '/patient/pages/adl/index', - }); + }) }, handleAddDrug() { - app.zdMpBehavior({ PageName: 'BTN_PATIENTHEALTHRECORDMEDICATION' }); wx.navigateTo({ url: '/patient/pages/drugRecord/index', - }); + }) }, handleChartDetail() { - const that = this; + const that = this wx.navigateTo({ url: '/gift/pages/myHealthRecordChart/index', success(res) { res.eventChannel.emit('acceptDataFromOpenerPage', { list: that.data.defaultList, selectLegends: that.data.selectLegends, - }); + }) }, - }); + }) }, handleDetailDrug(e) { - const { id, isi } = e.currentTarget.dataset; - app.zdMpBehavior({ PageName: 'BTN_PATIENTHEALTHRECORDMEDICATIONLIST' }); + const { id, isi } = e.currentTarget.dataset + if (isi == 1) { - return; + return } wx.navigateTo({ url: `/patient/pages/drugRecord/index?id=${id}`, - }); + }) }, handleDelDrug(e) { - const { id, isi } = e.currentTarget.dataset; + const { id, isi } = e.currentTarget.dataset if (isi == 1) { - return; + return } wx.showModal({ title: '确认删除?', @@ -1058,34 +1040,33 @@ Page({ Id: id, }, }).then(() => { - this.handleTabCallBack(); - }); + this.handleTabCallBack() + }) } }, - }); + }) }, toggleFold() { this.setData({ fold: !this.data.fold, - }); + }) }, handleShare() { - app.zdMpBehavior({ PageName: 'BTN_PATIENTHEALTHRECORDSHAREDUALCOMPLIANCEPOSTER' }); wx.navigateTo({ url: '/patient/pages/adlShare/index', - }); + }) }, handleBack() { wx.navigateBack({ fail() { - wx.reLaunch({ url: '/patient/pages/index/index' }); + wx.reLaunch({ url: '/patient/pages/index/index' }) }, - }); + }) }, onShareAppMessage() { return { title: 'MG-ADL测评表:评估重症肌无力患者症状对生活质量的影响', path: '/patient/pages/adl/index', - }; + } }, -}); +}) diff --git a/src/pages/d_interactive/index.ts b/src/pages/d_interactive/index.ts index a831432..ea3ad35 100644 --- a/src/pages/d_interactive/index.ts +++ b/src/pages/d_interactive/index.ts @@ -18,7 +18,7 @@ Page({ }); }, handleTapSearch() { - app.zdMpBehavior({ doctor: true, PageName: 'BTN_DOCTORINTERACTIONSEARCH' }); + }, handleSearch() { this.setData({ @@ -41,13 +41,13 @@ Page({ getList(newPage = 1) { const { active } = this.data; if (active == '' && newPage == 1) { - app.zdMpBehavior({ doctor: true, PageName: 'PG_DOCTORINTERACTIONALL' }); + } if (active == '1' && newPage == 1) { - app.zdMpBehavior({ doctor: true, PageName: 'PG_DOCTORINTERACTIONREAD' }); + } if (active == '2' && newPage == 1) { - app.zdMpBehavior({ doctor: true, PageName: 'PG_DOCTORINTERACTIONUNREAD' }); + } wx.ajax({ method: 'GET', @@ -77,7 +77,7 @@ Page({ } }, handleDetail(e) { - app.zdMpBehavior({ doctor: true, PageName: 'BTN_DOCTORINTERACTIONVIEW' }); + const { index } = e.currentTarget.dataset; const { list } = this.data; const listItem: any = list[index]; diff --git a/src/pages/d_interactiveDoctor/index.ts b/src/pages/d_interactiveDoctor/index.ts index fa90677..14bb948 100644 --- a/src/pages/d_interactiveDoctor/index.ts +++ b/src/pages/d_interactiveDoctor/index.ts @@ -54,7 +54,7 @@ Page({ }, onShow() { app.waitLogin({ type: [2] }).then((_res) => { - app.zdMpBehavior({ doctor: true, PageName: 'PG_DOCTORINTERACTIONDETAIL' }) + this.getDoctorDetail() this.getPatientDetail() this.getMessageList() @@ -168,7 +168,7 @@ Page({ }) }, handleSendDate() { - app.zdMpBehavior({ doctor: true, PageName: 'BTN_DOCTORINTERACTIONDETAILMYCLINICTIME' }) + const { messageList, doctor: { Clinic }, @@ -223,7 +223,7 @@ Page({ }) }, handleSendShow() { - app.zdMpBehavior({ doctor: true, PageName: 'BTN_DOCTORINTERACTIONDETAILSENDMESSAGE' }) + this.setData({ messageListShow: true, }) @@ -360,7 +360,7 @@ Page({ }) }, handlePatientDetail() { - app.zdMpBehavior({ doctor: true, PageName: 'BTN_DOCTORINTERACTIONDETAILPATIENTFILE' }) + wx.navigateTo({ url: `/pages/d_patientDetail/index?id=${this.data.patientId}`, }) diff --git a/src/pages/d_invite/index.ts b/src/pages/d_invite/index.ts index 11448d4..7832949 100644 --- a/src/pages/d_invite/index.ts +++ b/src/pages/d_invite/index.ts @@ -21,7 +21,7 @@ Page({ wx.showLoading({ title: '加载中', }) - app.zdMpBehavior({ doctor: true, PageName: 'PG_DOCTORINVITEPATIENT' }) + this.getDetail() }) }, diff --git a/src/pages/d_patient/index.ts b/src/pages/d_patient/index.ts index 2edd43a..ad5d62c 100644 --- a/src/pages/d_patient/index.ts +++ b/src/pages/d_patient/index.ts @@ -59,7 +59,7 @@ Page({ }, onShow() { app.waitLogin().then((_res) => { - app.zdMpBehavior({ doctor: true, PageName: 'PG_DOCTORPATIENTLIST' }) + this.getList() app.getUserInfo(2).then((userInfo) => { this.setData({ @@ -99,7 +99,7 @@ Page({ this.getList() }, handleTapSearch() { - app.zdMpBehavior({ doctor: true, PageName: 'BTN_DOCTORPATIENTLISTSEARCH' }) + }, handleNav(e) { const { active } = e.currentTarget.dataset @@ -185,7 +185,7 @@ Page({ }) }, handleDetail(e: any) { - app.zdMpBehavior({ doctor: true, PageName: 'BTN_DOCTORPATIENTLISTVIEW' }) + const { index } = e.currentTarget.dataset const item = this.data.list[index] @@ -200,7 +200,7 @@ Page({ }) }, handleSendGroup() { - app.zdMpBehavior({ doctor: true, PageName: 'BTN_DOCTORPATIENTLISTMASSMESSAGE' }) + wx.navigateTo({ url: '/pages/d_taskList/index', }) diff --git a/src/pages/d_patientDetail/index.ts b/src/pages/d_patientDetail/index.ts index f5113b7..62fbd9b 100644 --- a/src/pages/d_patientDetail/index.ts +++ b/src/pages/d_patientDetail/index.ts @@ -167,7 +167,7 @@ Page({ }) app.waitLogin({ type: [2] }).then(async (_res) => { - app.zdMpBehavior({ doctor: true, PageName: 'PG_DOCTORPATIENTDETAIL' }) + this.getDoctorDetail() await this.getDetail() app.getUserInfo(2).then((userInfo) => { @@ -887,7 +887,7 @@ Page({ }) }, handleRemark() { - app.zdMpBehavior({ doctor: true, PageName: 'BTN_DOCTORPATIENTDETAILREMARK' }) + this.setData({ popupRemarkShow: true, remark: this.data.detail.DoctorRemark, @@ -926,7 +926,7 @@ Page({ }, handleEditUser() { - app.zdMpBehavior({ doctor: true, PageName: 'BTN_DOCTORPATIENTDETAILEDIT' }) + this.setData({ popupEditShow: true, }) @@ -971,7 +971,7 @@ Page({ wx.navigateBack() }, handleSend() { - app.zdMpBehavior({ doctor: true, PageName: 'BTN_DOCTORPATIENTDETAILMESSAGE' }) + wx.navigateTo({ url: `/pages/d_interactiveDoctor/index?patientId=${this.data.detail.PatientId}`, }) @@ -980,10 +980,10 @@ Page({ handleNav(e, mp = true) { const { index } = e.currentTarget.dataset if (index == 0 && mp) { - app.zdMpBehavior({ doctor: true, PageName: 'BTN_DOCTORPATIENTDETAILREPORTGUIDE' }) + } if (index == 1 && mp) { - app.zdMpBehavior({ doctor: true, PageName: 'BTN_DOCTORPATIENTDETAILNOTEGUIDE' }) + } this.setData({ nav: index, diff --git a/src/pages/d_userInfo/index.ts b/src/pages/d_userInfo/index.ts index e419768..abe978f 100644 --- a/src/pages/d_userInfo/index.ts +++ b/src/pages/d_userInfo/index.ts @@ -57,7 +57,7 @@ Page({ onLoad() {}, onShow() { app.waitLogin({ type: [2] }).then((_res) => { - app.zdMpBehavior({ doctor: true, PageName: 'PG_DOCTORPERSONALINFO' }) + this.getDetail() }) }, @@ -120,7 +120,7 @@ Page({ this.handleWeekIntroduceSubmit() }, handleChangePhone() { - app.zdMpBehavior({ doctor: true, PageName: 'BTN_DOCTORPERSONALINFOCHANGEPHONE' }) + wx.navigateTo({ url: '/doctor/pages/d_changePhone/index', }) @@ -201,7 +201,7 @@ Page({ this.getDetail() }, handleSwitch() { - app.zdMpBehavior({ doctor: true, PageName: 'BTN_DOCTORPERSONALINFOSWITCHACCOUNT' }) + wx.navigateTo({ url: '/doctor/pages/d_changeDoctor/index', }) diff --git a/src/pages/home/index.ts b/src/pages/home/index.ts index 54daf33..b9989a1 100644 --- a/src/pages/home/index.ts +++ b/src/pages/home/index.ts @@ -101,7 +101,7 @@ Page({ data: {}, }).then((res) => { if (res.list.length) { - app.mpBehavior({ PositionId: '4', OperateType: '4', OperateId: res.list[0].Id }) + app.oldMpBehavior({ PositionId: '4', OperateType: '4', OperateId: res.list[0].Id }) } this.setData({ notice: res.list.map((item) => { @@ -121,7 +121,7 @@ Page({ handleNoticeDetail(e) { const { index } = e.currentTarget.dataset const { Id, Url } = this.data.notice[index] - app.mpBehavior({ PositionId: '4', OperateType: '1', OperateId: Id }) + app.oldMpBehavior({ PositionId: '4', OperateType: '1', OperateId: Id }) if (Url) { wx.navigateTo({ url: Url, @@ -143,7 +143,7 @@ Page({ const { Id } = this.data.notice[current] || {} if (Id) { - app.mpBehavior({ PositionId: '4', OperateType: '4', OperateId: Id }) + app.oldMpBehavior({ PositionId: '4', OperateType: '4', OperateId: Id }) } }, getBanner() { @@ -241,14 +241,14 @@ Page({ title: '加载中', mask: true, }) - app.mpBehavior({ PositionId: '1', OperateType: '2', OperateId: Id as string }) + app.oldMpBehavior({ PositionId: '1', OperateType: '2', OperateId: Id as string }) this.handleFile(params) }, handleDetail(e: any) { const { id, index } = e.currentTarget.dataset const params = this.data.list[index] if (params.ContentType === '5' && params.FileList[0]) { - app.mpBehavior({ PositionId: '1', OperateType: '1', OperateId: id as string }) + app.oldMpBehavior({ PositionId: '1', OperateType: '1', OperateId: id as string }) this.handleFile(params.FileList[0]) } else { wx.navigateTo({ @@ -330,7 +330,7 @@ Page({ onShareAppMessage(e) { if (e.from === 'button') { const { Title, CoverImgUrl, Id } = e.target.dataset.params - app.mpBehavior({ PositionId: '1', OperateType: '3', OperateId: Id }) + app.oldMpBehavior({ PositionId: '1', OperateType: '3', OperateId: Id }) return { title: Title, path: `/pages/informationDetail/index?id=${Id}`, diff --git a/src/pages/information/index.ts b/src/pages/information/index.ts index 4a3f00c..557f3fe 100644 --- a/src/pages/information/index.ts +++ b/src/pages/information/index.ts @@ -60,7 +60,7 @@ Page({ const { id, index } = e.currentTarget.dataset; const params = this.data.list[index]; if (params.ContentType === '5' && params.FileList[0]) { - app.mpBehavior({ PositionId: '1', OperateType: '1', OperateId: id as string }); + app.oldMpBehavior({ PositionId: '1', OperateType: '1', OperateId: id as string }); this.handleFile(params.FileList[0]); } else { wx.navigateTo({ @@ -108,7 +108,7 @@ Page({ onShareAppMessage(e) { if (e.from === 'button') { const { Title, CoverImgUrl, Id } = e.target.dataset.params; - app.mpBehavior({ PositionId: '2', OperateType: '3', OperateId: Id }); + app.oldMpBehavior({ PositionId: '2', OperateType: '3', OperateId: Id }); return { title: Title, path: `/pages/informationDetail/index?id=${Id}`, diff --git a/src/pages/informationDetail/index.ts b/src/pages/informationDetail/index.ts index 91b71a2..42a6d56 100644 --- a/src/pages/informationDetail/index.ts +++ b/src/pages/informationDetail/index.ts @@ -40,7 +40,7 @@ Page({ id: options.id, }); app.waitLogin({ type: [2] }).then(() => { - app.mpBehavior({ PositionId: '1', OperateType: '1', OperateId: options.id as string }); + app.oldMpBehavior({ PositionId: '1', OperateType: '1', OperateId: options.id as string }); this.getDetail(); }); }, @@ -116,7 +116,7 @@ Page({ title: '加载中', mask: true, }); - app.mpBehavior({ PositionId: '1', OperateType: '2', OperateId: detail.Id as string }); + app.oldMpBehavior({ PositionId: '1', OperateType: '2', OperateId: detail.Id as string }); wx.downloadFile({ url: params.FileUrl, filePath: `${wx.env.USER_DATA_PATH}/${params.FileName}`, @@ -161,7 +161,7 @@ Page({ onShareAppMessage() { const { Title, CoverImgUrl, Id } = this.data.detail; - app.mpBehavior({ PositionId: '1', OperateType: '3', OperateId: Id as string }); + app.oldMpBehavior({ PositionId: '1', OperateType: '3', OperateId: Id as string }); return { title: Title, path: `/pages/informationDetail/index?id=${Id}`, diff --git a/src/pages/message/index.ts b/src/pages/message/index.ts index 315c05d..de1cfd0 100644 --- a/src/pages/message/index.ts +++ b/src/pages/message/index.ts @@ -18,7 +18,7 @@ Page({ handleDetail(e) { const { index } = e.currentTarget.dataset; const { Id, Url } = this.data.list[index]; - app.mpBehavior({ PositionId: '4', OperateType: '1', OperateId: Id }); + app.oldMpBehavior({ PositionId: '4', OperateType: '1', OperateId: Id }); if (Url) { wx.navigateTo({ url: Url, diff --git a/src/patient/pages/adl/index.ts b/src/patient/pages/adl/index.ts index e1c8cc2..9afcf05 100644 --- a/src/patient/pages/adl/index.ts +++ b/src/patient/pages/adl/index.ts @@ -27,7 +27,7 @@ Page({ nrdl: options.nrdl, }); app.waitLogin({ type: [0, 1] }).then(() => { - app.zdMpBehavior({ PageName: 'PG_PATIENTASSESSMENTSTART' }); + app.getZdUserInfo(this, true); this.getAdlScore(); if (options.adlPushId) { @@ -39,7 +39,7 @@ Page({ } if (options.es === '201502') { app.globalData.IsAliQiWei = 1; - app.zdMpBehavior({ PageName: 'JUMP_INSURANCE_ADL_PAGE' }); + } }); }, @@ -87,13 +87,13 @@ Page({ } }, handleShare() { - app.zdMpBehavior({ PageName: 'BTN_PATIENTASSESSMENTSTARTSHARE' }); + wx.navigateTo({ url: '/patient/pages/adlShare/index', }); }, handleTest() { - app.zdMpBehavior({ PageName: 'BTN_PATIENTASSESSMENTSTART' }); + wx.navigateTo({ url: `/patient/pages/adlTest/index?m_d=${this.data.m_d}&nrdl=${this.data.nrdl}`, }); diff --git a/src/patient/pages/adlResult/index.ts b/src/patient/pages/adlResult/index.ts index d649a19..42fd778 100644 --- a/src/patient/pages/adlResult/index.ts +++ b/src/patient/pages/adlResult/index.ts @@ -92,7 +92,7 @@ Page({ idafa: options.idafa === '1', }); app.waitLogin({ type: [0, 1] }).then(() => { - app.zdMpBehavior({ PageName: 'PG_PATIENTASSESSMENTRESULTS' }); + app.getZdUserInfo(this, false); this.getUnreadCount(); this.getDetail(); @@ -222,7 +222,7 @@ Page({ app.zdPermissionVerification(3, 2, ``).then(() => {}); }, handleMyHealth() { - app.zdMpBehavior({ PageName: 'BTN_PATIENTASSESSMENTRESULTGETNOTES' }); + wx.navigateTo({ url: '/patient/pages/myHealthRecord/index', }); @@ -251,17 +251,17 @@ Page({ routerTo(e) { const { url } = e.currentTarget.dataset; if (url === '/patient/pages/interactivePatient/index') { - app.zdMpBehavior({ PageName: 'BTN_PATIENTASSESSMENTRESULTDOCTORCARD' }); + } if (url === '/patient/pages/webview/index') { - app.zdMpBehavior({ PageName: 'BTN_PATIENTASSESSMENTRESULTAPPLYINSURANCE' }); + } wx.navigateTo({ url, }); }, hanldeCodeLong() { - app.zdMpBehavior({ PageName: 'BTN_PATIENTASSESSMENTRESULTQRCODELONGPRESS' }); + }, onShareAppMessage() { return { diff --git a/src/patient/pages/adlShare/index.ts b/src/patient/pages/adlShare/index.ts index e2bddba..d579030 100644 --- a/src/patient/pages/adlShare/index.ts +++ b/src/patient/pages/adlShare/index.ts @@ -19,7 +19,7 @@ Page({ }) } app.zdWaitLogin({ loginPage: true }).then(() => { - app.zdMpBehavior({ PageName: 'PG_PATIENTPOSTER' }) + app.getZdUserInfo(this, true, () => { this.getPoster() }) @@ -47,7 +47,7 @@ Page({ }, handleDownload() { const that = this - app.zdMpBehavior({ PageName: 'BTN_PATIENTPOSTERDOWNLOAD' }) + wx.getSetting({ success(res) { console.log(res) diff --git a/src/patient/pages/adlTest/index.ts b/src/patient/pages/adlTest/index.ts index e3e178c..3d51007 100644 --- a/src/patient/pages/adlTest/index.ts +++ b/src/patient/pages/adlTest/index.ts @@ -280,7 +280,7 @@ Page({ }); }, handleSubmit() { - app.zdMpBehavior({ PageName: 'BTN_PATIENTASSESSMENTQ9COMPLETE' }); + wx.showLoading({ title: '提交中', }); @@ -407,6 +407,6 @@ Page({ 7: 'PG_PATIENTASSESSMENTQ8', 8: 'PG_PATIENTASSESSMENTQ9', }[index]; - app.zdMpBehavior({ PageName }); + }, }); diff --git a/src/patient/pages/doctor/index.ts b/src/patient/pages/doctor/index.ts index 3807d16..5c6aa11 100644 --- a/src/patient/pages/doctor/index.ts +++ b/src/patient/pages/doctor/index.ts @@ -49,7 +49,7 @@ Page({ app.zdWaitLogin().then((_res) => { if (options.es === '201504') { app.globalData.IsAliQiWei = 1 - app.zdMpBehavior({ PageName: 'PG_PATIENTVISITMAP_PAGE' }) + this.setData({ es: options.es, }) @@ -60,7 +60,7 @@ Page({ tabActive: Number(options.active), }) } else { - app.zdMpBehavior({ PageName: 'PG_PATIENTVISITMAPLIST' }) + } if (options.pid) { this.setData({ @@ -155,7 +155,7 @@ Page({ }) }, handleTapSite() { - app.zdMpBehavior({ PageName: 'BTN_PATIENTVISITMAPCHANGEAREA' }) + }, handleChangeSite(e: WechatMiniprogram.CustomEvent) { const detail = e.detail @@ -170,11 +170,11 @@ Page({ onChange(e: WechatMiniprogram.CustomEvent) { const index = e.detail.index if (index == 0) { - app.zdMpBehavior({ PageName: 'PG_PATIENTVISITMAPLIST' }) + } else if (index == 1) { - app.zdMpBehavior({ PageName: 'PG_PATIENTVISITMAPDUALCHANNELPHARMACY' }) + } else if (index == 2) { - app.zdMpBehavior({ PageName: 'PG_PATIENTVISITMAPDOCTORS' }) + } this.setData({ tabActive: index, @@ -320,11 +320,11 @@ Page({ const { url } = e.currentTarget.dataset const { tabActive } = this.data if (tabActive == 0) { - app.zdMpBehavior({ PageName: 'BTN_PATIENTVISITMAPLIST' }) + } else if (tabActive == 1) { - app.zdMpBehavior({ PageName: 'BTN_PATIENTVISITMAPDUALCHANNELPHARMACY' }) + } else if (tabActive == 2) { - app.zdMpBehavior({ PageName: 'BTN_PATIENTVISITMAPDOCTORS' }) + } wx.navigateTo({ url, diff --git a/src/patient/pages/doctor/siteShare/index.ts b/src/patient/pages/doctor/siteShare/index.ts index 21517b8..4d78e13 100644 --- a/src/patient/pages/doctor/siteShare/index.ts +++ b/src/patient/pages/doctor/siteShare/index.ts @@ -215,7 +215,7 @@ Component({ }, methods: { handleShow() { - app.zdMpBehavior({ PageName: 'BTN_PATIENTVISITMAPDIRECTSHARE' }) + this.setData({ show: true, ProvinceName: this.data.pname || '', diff --git a/src/patient/pages/enterInfo/index.ts b/src/patient/pages/enterInfo/index.ts index 31213b3..fad3d1e 100644 --- a/src/patient/pages/enterInfo/index.ts +++ b/src/patient/pages/enterInfo/index.ts @@ -41,7 +41,7 @@ Page({ ageRange: zdUserInfo.AgeRange, }) }) - app.zdMpBehavior({ PageName: 'PG_PATIENTINFOENTRY' }) + }) }, getDict() { @@ -87,7 +87,7 @@ Page({ }, handleSubmit() { if (this.data.submiting) return - app.zdMpBehavior({ PageName: 'BTN_PATIENTINFONEXT' }) + const { name, gender, ageRange, relationType, IsGraves, HasTedSurgery } = this.data const { registrationSource, registChannel, regBusinessId, WorkerId, IsAliQiWei } = app.globalData const { doctorId, inviteChan } = app.globalData.scene diff --git a/src/patient/pages/family/index.ts b/src/patient/pages/family/index.ts index 51fd07f..14bcf12 100644 --- a/src/patient/pages/family/index.ts +++ b/src/patient/pages/family/index.ts @@ -19,7 +19,7 @@ Page({ }, onLoad() { app.zdWaitLogin().then(() => { - app.zdMpBehavior({ PageName: 'PG_PATIENTMYRELATIVES' }) + this.getMpInfo() }) }, @@ -47,7 +47,7 @@ Page({ routerTo(e) { const { url } = e.currentTarget.dataset if (url === '/patient/pages/familyList/index') { - app.zdMpBehavior({ PageName: 'BTN_PATIENTFAMILYMEMBERSVIEW' }) + } wx.navigateTo({ url, diff --git a/src/patient/pages/familyList/index.ts b/src/patient/pages/familyList/index.ts index 3adeaef..f344b88 100644 --- a/src/patient/pages/familyList/index.ts +++ b/src/patient/pages/familyList/index.ts @@ -12,7 +12,7 @@ Page({ }, onLoad() { app.zdWaitLogin().then(() => { - app.zdMpBehavior({ PageName: 'PG_PATIENTMYRELATIVESLIST' }) + this.getFamilyList(); app.getZdUserInfo(this); }); diff --git a/src/patient/pages/index/index.ts b/src/patient/pages/index/index.ts index fa4f42f..965ed0d 100644 --- a/src/patient/pages/index/index.ts +++ b/src/patient/pages/index/index.ts @@ -70,14 +70,14 @@ Page({ }, onShow() { app.waitLogin({ type: [0, 1] }).then(() => { - app.zdMpBehavior({ PageName: 'PG_PATIENTHOME' }) + this.setData({ anyWhere: app.globalData.anyWhere, isLogin: app.globalData.isLogin, }) if (this.data.options.es === '201501') { app.globalData.IsAliQiWei = 1 - app.zdMpBehavior({ PageName: 'JUMP_PATIENT_HOME_INDEX' }) + this.setData({ options: {}, }) @@ -291,43 +291,43 @@ Page({ let { url, active, code } = e.currentTarget.dataset if (!url) return if (code === 'adl') { - app.zdMpBehavior({ PageName: 'BTN_PATIENTHOMEADLMODULE' }) + } if (code === 'drugs') { - app.zdMpBehavior({ PageName: 'BTN_PATIENTHOMEMEDICATIONMODULE' }) + } if (code === 'story' && url === '/patient/pages/story/index') { - app.zdMpBehavior({ PageName: 'BTN_PATIENTHOMESTORIESVIEWALL' }) + } if (code === 'story' && url.includes('/patient/pages/publishStoryDetail/index')) { - app.zdMpBehavior({ PageName: 'BTN_PATIENTHOMESTORYCLICK' }) + } if (code === 'activity2' && url === '/patient/pages/live/index') { - app.zdMpBehavior({ PageName: 'BTN_PATIENTHOMEONLINEACTIVITIESVIEWALL' }) + } if (code === 'activity2' && url === '/patient/pages/live/index?index=0') { - app.zdMpBehavior({ PageName: 'BTN_PATIENTHOMEONLINEACTIVITIESMONTHLYPOSTER' }) + } if (code === 'activity2' && url.includes('/patient/pages/liveDetail/index')) { - app.zdMpBehavior({ PageName: 'BTN_PATIENTHOMEONLINEACTIVITIESCARD' }) + } if (code === 'activity1' && url === '/patient/pages/live/index') { - app.zdMpBehavior({ PageName: 'BTN_PATIENTHOMEOFFLINEACTIVITIESVIEWALL' }) + } if (code === 'activity1' && url.includes('/patient/pages/liveDetail/index')) { - app.zdMpBehavior({ PageName: 'BTN_PATIENTHOMEOFFLINEACTIVITIESCARD' }) + } if (code === 'article' && url === '/patient/pages/repository/index') { - app.zdMpBehavior({ PageName: 'BTN_PATIENTHOMERECOMMENDEDREADINGVIEWALL' }) + } if (code === 'article' && url.includes('/patient/pages/repositoryDetail/index')) { - app.zdMpBehavior({ PageName: 'BTN_PATIENTHOMERECOMMENDEDREADINGARTICLE' }) + } if (code === 'serviceConf') { - app.zdMpBehavior({ PageName: 'BTN_PATIENTHOMESERVICE' }) + } if (url === '/patient/pages/interactivePatient/index') { - app.zdMpBehavior({ PageName: 'BTN_PATIENTHOMEDOCTORCARD' }) + } if (url === 'NRDL') { @@ -533,7 +533,7 @@ Page({ spread1: 'BTN_PATIENTHOMEBANNER1', spread2: 'BTN_PATIENTHOMEBANNER2', }[code] - app.zdMpBehavior({ PageName }) + }, handleRegClose() { this.setData({ diff --git a/src/patient/pages/interactivePatient/index.ts b/src/patient/pages/interactivePatient/index.ts index 8cb8c2a..4728247 100644 --- a/src/patient/pages/interactivePatient/index.ts +++ b/src/patient/pages/interactivePatient/index.ts @@ -54,7 +54,7 @@ Page({ useWebAudioImplement: true, }) app.waitLogin({ type: [1] }).then(() => { - app.zdMpBehavior({ PageName: 'PG_PATIENTINTERACTIONDETAILS' }) + this.getDoctorDetail() this.getQuestionList() this.getMessageList() @@ -288,7 +288,7 @@ Page({ }) }, handleFooter() { - app.zdMpBehavior({ PageName: 'BTN_PATIENTINTERACTIONCHOOSEQUESTION' }) + this.setData({ expend: !this.data.expend, }) diff --git a/src/patient/pages/live/index.ts b/src/patient/pages/live/index.ts index 5820f2e..15d12ea 100644 --- a/src/patient/pages/live/index.ts +++ b/src/patient/pages/live/index.ts @@ -49,7 +49,7 @@ Page({ app.globalData.active = ''; } app.waitLogin({ type: [0, 1] }).then(() => { - app.zdMpBehavior({ PageName: 'PG_PATIENTWEDNESDAYLECTURELIST' }); + this.getConfig(); app.getZdUserInfo(this, true); }); @@ -61,9 +61,9 @@ Page({ LAT: '', }); if (e.detail.index == 0) { - app.zdMpBehavior({ PageName: 'PG_PATIENTWEDNESDAYLECTURELIST' }); + } else if (e.detail.index == 1) { - app.zdMpBehavior({ PageName: 'PG_PATIENTWEDNESDAYACTIVITYLIST' }); + } this.getList(); }, @@ -232,9 +232,9 @@ Page({ handleDetail(e) { const { id } = e.currentTarget.dataset; if (this.data.active == 0) { - app.zdMpBehavior({ PageName: 'BTN_PATIENTWEDNESDAYTALKMEETINGLIST' }); + } else if (this.data.active == 1) { - app.zdMpBehavior({ PageName: 'BTN_PATIENTWEDNESDAYTALKACTIVITYLIST' }); + } wx.navigateTo({ url: `/patient/pages/liveDetail/index?id=${id}`, diff --git a/src/patient/pages/liveDetail/index.ts b/src/patient/pages/liveDetail/index.ts index 04cc92b..0f61201 100644 --- a/src/patient/pages/liveDetail/index.ts +++ b/src/patient/pages/liveDetail/index.ts @@ -80,12 +80,12 @@ Page({ this.videoContext = wx.createVideoContext('video') } if (res.Type == 1) { - app.zdMpBehavior({ PageName: 'PG_PATIENTLECTUREDETAILS' }) + wx.setNavigationBarTitle({ title: '会议详情', }) } else { - app.zdMpBehavior({ PageName: 'PG_PATIENTACTIVITYDETAILS' }) + wx.setNavigationBarTitle({ title: '活动详情', }) @@ -108,7 +108,7 @@ Page({ }) }, handleReplay() { - app.zdMpBehavior({ PageName: 'BTN_PATIENTMEETINGDETAILREPLAY' }) + this.videoContext.requestFullScreen({}) this.videoContext.seek(0) this.videoContext.play() @@ -151,9 +151,9 @@ Page({ const { UserType } = this.data.zdUserInfo if (Type == 1) { - app.zdMpBehavior({ PageName: 'BTN_PATIENTMEETINGDETAILSIGNUP' }) + } else if (Type == 2) { - app.zdMpBehavior({ PageName: 'BTN_PATIENTACTIVITYDETAILSIGNUP' }) + } wx.ajax({ diff --git a/src/patient/pages/login/index.ts b/src/patient/pages/login/index.ts index 21242d9..7daeb2a 100644 --- a/src/patient/pages/login/index.ts +++ b/src/patient/pages/login/index.ts @@ -17,7 +17,7 @@ Page({ page: options.page, }) app.waitLogin().then(() => { - app.zdMpBehavior({ PageName: 'PG_PATIENTLOGIN' }) + }) }, getCode() { @@ -66,7 +66,7 @@ Page({ }) }, handleSubmit() { - app.zdMpBehavior({ PageName: 'BTN_PATIENTLOGIN' }) + const { mobile, code } = this.data const { registrationSource, registChannel, regBusinessId } = app.globalData wx.ajax({ @@ -84,7 +84,7 @@ Page({ }) }, handleWxSubmit(e: WechatMiniprogram.CustomEvent) { - app.zdMpBehavior({ PageName: 'BTN_PATIENTQUICKPATIENTLOGIN' }) + const { iv, encryptedData } = e.detail const { registrationSource, registChannel, regBusinessId } = app.globalData if (iv && encryptedData) { @@ -129,7 +129,7 @@ Page({ }) }, handleVisitors() { - app.zdMpBehavior({ PageName: 'BTN_PATIENTLOOKAROUND' }) + wx.reLaunch({ url: '/patient/pages/index/index', }) diff --git a/src/patient/pages/my/index.ts b/src/patient/pages/my/index.ts index b58603b..3a0e981 100644 --- a/src/patient/pages/my/index.ts +++ b/src/patient/pages/my/index.ts @@ -32,7 +32,7 @@ Page({ }, onShow() { app.zdWaitLogin().then(() => { - app.zdMpBehavior({ PageName: 'PG_PATIENTMY' }) + app.getZdUserInfo(this, true, () => {}) this.getScore() }) @@ -49,7 +49,7 @@ Page({ }) }, handleMyHealthRecord(e) { - app.zdMpBehavior({ PageName: 'BTN_PATIENTMYPAGEHEALTHRECORD' }) + const { url } = e.currentTarget.dataset app.zdPermissionVerification(3, 0, url).then(() => { wx.navigateTo({ @@ -58,7 +58,7 @@ Page({ }) }, handleFamily(e) { - app.zdMpBehavior({ PageName: 'BTN_PATIENTMYPAGEFAMILYMEMBERS' }) + const { url } = e.currentTarget.dataset app.zdPermissionVerification(3, 0, url).then(() => { wx.navigateTo({ @@ -68,7 +68,7 @@ Page({ }, handleAdlChaneg(e) { if (!e.detail) { - app.zdMpBehavior({ PageName: 'BTN_PATIENTMYPAGECLOSEADLREMINDER' }) + } wx.ajax({ method: 'POST', @@ -89,16 +89,16 @@ Page({ }) } if (url === '/patient/pages/mySave/index') { - app.zdMpBehavior({ PageName: 'BTN_PATIENTMYPAGEFAVORITES' }) + } if (url === '/patient/pages/myLive/index') { - app.zdMpBehavior({ PageName: 'BTN_PATIENTMYPAGESIGNEDUPMEETINGS' }) + } if (url === '/patient/pages/personalInformation/index') { - app.zdMpBehavior({ PageName: 'BTN_PATIENTMYPAGEPERSONALINFO' }) + } if (url === '/patient/pages/storyList/index') { - app.zdMpBehavior({ PageName: 'BTN_PATIENTMYPAGEMYSTORIES' }) + } wx.navigateTo({ url, diff --git a/src/patient/pages/myLive/index.ts b/src/patient/pages/myLive/index.ts index ef44e26..47cb959 100644 --- a/src/patient/pages/myLive/index.ts +++ b/src/patient/pages/myLive/index.ts @@ -55,13 +55,13 @@ Page({ getList(newPage = 1) { const { active } = this.data if (newPage == 1 && active == 0) { - app.zdMpBehavior({ PageName: 'PG_PATIENTMYEVENTS_ALL' }) + } if (newPage == 1 && active == 1) { - app.zdMpBehavior({ PageName: 'PG_PATIENTMYEVENTS_ONLINE' }) + } if (newPage == 1 && active == 2) { - app.zdMpBehavior({ PageName: 'PG_PATIENTMYEVENTS_OFFLINE' }) + } wx.ajax({ method: 'GET', @@ -105,13 +105,13 @@ Page({ const { id } = e.currentTarget.dataset const { active } = this.data if (active == 0) { - app.zdMpBehavior({ PageName: 'BTN_PATIENTSIGNEDUPACTIVITIESALLLIST' }) + } if (active == 1) { - app.zdMpBehavior({ PageName: 'BTN_PATIENTSIGNEDUPACTIVITIESONLINELIST' }) + } if (active == 2) { - app.zdMpBehavior({ PageName: 'BTN_PATIENTSIGNEDUPACTIVITIESOFFLINELIST' }) + } wx.navigateTo({ url: `/patient/pages/liveDetail/index?id=${id}`, diff --git a/src/patient/pages/mySave/index.ts b/src/patient/pages/mySave/index.ts index f3ed749..7940b27 100644 --- a/src/patient/pages/mySave/index.ts +++ b/src/patient/pages/mySave/index.ts @@ -54,13 +54,13 @@ Page({ } if (active == 0 && pagination.page == 1) { - app.zdMpBehavior({ PageName: 'PG_PATIENTMYFAVORITES_KNOWLEDGEBASE' }) + } if (active == 1 && pagination.page == 1) { - app.zdMpBehavior({ PageName: 'PG_PATIENTMYFAVORITES_VIDEOCLASS' }) + } if (active == 2 && pagination.page == 1) { - app.zdMpBehavior({ PageName: 'PG_PATIENTMYFAVORITES_HEALTHQA' }) + } }, getInfoList(newPage = 1) { diff --git a/src/patient/pages/nrdl/index.ts b/src/patient/pages/nrdl/index.ts index fae0463..3651737 100644 --- a/src/patient/pages/nrdl/index.ts +++ b/src/patient/pages/nrdl/index.ts @@ -54,7 +54,7 @@ Page({ }); } app.zdWaitLogin().then((_res) => { - app.zdMpBehavior({ PageName: 'PG_PATIENTNRDL' }) + this.addOpenRecord(); this.getConfig(); this.getCode(); diff --git a/src/patient/pages/nrdlDetail/index.ts b/src/patient/pages/nrdlDetail/index.ts index 4aecd9a..ab65f4f 100644 --- a/src/patient/pages/nrdlDetail/index.ts +++ b/src/patient/pages/nrdlDetail/index.ts @@ -33,13 +33,13 @@ Page({ } app.zdWaitLogin().then((_res) => { if (options.id == '2') { - app.zdMpBehavior({ PageName: 'PG_PATIENTIGAMODREIMBURSEMENT' }) + } if (options.id == '4') { - app.zdMpBehavior({ PageName: 'PG_PATIENTIGAMODFAQ' }) + } if (options.id == '5') { - app.zdMpBehavior({ PageName: 'PG_PATIENTIGAMODINFO' }) + } this.addOpenRecord() this.getConfig() diff --git a/src/patient/pages/nrdlTable/index.ts b/src/patient/pages/nrdlTable/index.ts index 2699032..41b736c 100644 --- a/src/patient/pages/nrdlTable/index.ts +++ b/src/patient/pages/nrdlTable/index.ts @@ -856,7 +856,7 @@ Page({ }, onLoad() { app.zdWaitLogin().then((_res) => { - app.zdMpBehavior({ PageName: 'PG_PATIENTCITYHEALTHINSURANCE' }) + this.addOpenRecord(); }); }, diff --git a/src/patient/pages/personalInformation/index.ts b/src/patient/pages/personalInformation/index.ts index 5b4c5f8..7e48f5d 100644 --- a/src/patient/pages/personalInformation/index.ts +++ b/src/patient/pages/personalInformation/index.ts @@ -66,7 +66,7 @@ Page({ }) app.waitLogin({ type: [1] }).then(() => { - app.zdMpBehavior({ PageName: 'PG_PATIENTPERSONALINFO' }) + const that = this app.getZdUserInfo(that, true, that.formatUserInfo.bind(that)) this.getDict() @@ -247,7 +247,7 @@ Page({ }, handleChangeTel() { - app.zdMpBehavior({ PageName: 'PG_PATIENTPERSONALINFO_CHANGEPHONECLICK' }) + wx.navigateTo({ url: '/patient/pages/changePhone/index', }) @@ -258,7 +258,7 @@ Page({ }) }, handleLogout() { - app.zdMpBehavior({ PageName: 'BTN_PATIENTPERSONALINFOLOGOUT' }) + wx.navigateTo({ url: '/patient/pages/cancellation/index', }) @@ -269,7 +269,7 @@ Page({ routerTo(e) { const { url } = e.currentTarget.dataset if (url.includes('/doctor/patient/pages/d_login/index')) { - app.zdMpBehavior({ PageName: 'BTN_PATIENTPERSONALINFOSWITCHDOCTORPORTAL' }) + } wx.navigateTo({ url, diff --git a/src/patient/pages/privacyAgreement/index.ts b/src/patient/pages/privacyAgreement/index.ts index 38117fe..a7b41ad 100644 --- a/src/patient/pages/privacyAgreement/index.ts +++ b/src/patient/pages/privacyAgreement/index.ts @@ -13,15 +13,15 @@ Page({ id: options.id, }) app.zdWaitLogin({ isReg: false, loginPage: true }).then(() => { - app.zdMpBehavior({ PageName: 'PG_PATIENTINFORMEDCONSENT' }) + }) }, handleBack() { - app.zdMpBehavior({ PageName: 'BTN_PATIENTCONSENTDISAGREE' }) + wx.navigateBack() }, handleSure(e) { - app.zdMpBehavior({ PageName: 'BTN_PATIENTCONSENTAGREE' }) + const { replace } = e.currentTarget.dataset const { pagePath, id } = this.data if (replace) { diff --git a/src/patient/pages/publishStoryDetail/index.ts b/src/patient/pages/publishStoryDetail/index.ts index 207aa89..4d7ed2f 100644 --- a/src/patient/pages/publishStoryDetail/index.ts +++ b/src/patient/pages/publishStoryDetail/index.ts @@ -36,7 +36,7 @@ Page({ this.handleTimeOut(); }, onShow() { - app.zdMpBehavior({ PageName: 'PG_PATIENTSTORYDETAILS' }); + if (this.data.sendShare) { this.setData({ sendShare: false, @@ -99,7 +99,7 @@ Page({ }); }, handleStar() { - app.zdMpBehavior({ PageName: 'BTN_PATIENTSTORYDETAILSLIKE' }); + this.setData({ starShow: true, }); @@ -176,7 +176,7 @@ Page({ }); }, handleTapShare() { - app.zdMpBehavior({ PageName: 'BTN_PATIENTSTORYDETAILSSHARE' }); + }, onShareAppMessage() { const { Title, ListPicLink } = this.data.detail; diff --git a/src/patient/pages/repository/index.ts b/src/patient/pages/repository/index.ts index a04708d..391442a 100644 --- a/src/patient/pages/repository/index.ts +++ b/src/patient/pages/repository/index.ts @@ -31,7 +31,7 @@ Page({ }); }, onShow() { - app.zdMpBehavior({ PageName: 'PG_PATIENTMGINFO' }); + }, getConfig(options: any) { wx.ajax({ @@ -262,7 +262,7 @@ Page({ this.getList(); }, handleDetail(e: WechatMiniprogram.CustomEvent) { - app.zdMpBehavior({ PageName: 'BTN_PATIENTMGARTICLELIST' }); + const { id } = e.currentTarget.dataset; wx.navigateTo({ url: `/patient/pages/repositoryDetail/index?id=${id}`, diff --git a/src/patient/pages/repositoryDetail/index.ts b/src/patient/pages/repositoryDetail/index.ts index c8ef5f5..e96b2a7 100644 --- a/src/patient/pages/repositoryDetail/index.ts +++ b/src/patient/pages/repositoryDetail/index.ts @@ -38,7 +38,7 @@ Page({ }) }, onShow() { - app.zdMpBehavior({ PageName: 'PG_PATIENTKNOWLEDGEDETAILS' }) + if (this.data.sendShare) { this.setData({ sendShare: false, @@ -148,7 +148,7 @@ Page({ this.getDetail(true) }, handleStar() { - app.zdMpBehavior({ PageName: 'BTN_PATIENTKNOWLEDGEDETAILSLIKE' }) + this.setData({ starShow: true, }) @@ -180,7 +180,7 @@ Page({ }) }, handleToggleSave() { - app.zdMpBehavior({ PageName: 'BTN_PATIENTKNOWLEDGEDETAILSFAVORITE' }) + const { id, detail: { IsCollect }, @@ -297,7 +297,7 @@ Page({ } }, handleTapShare() { - app.zdMpBehavior({ PageName: 'BTN_PATIENTKNOWLEDGEDETAILSSHARE' }) + }, }) diff --git a/src/patient/pages/story/index.ts b/src/patient/pages/story/index.ts index 996bf22..c78444e 100644 --- a/src/patient/pages/story/index.ts +++ b/src/patient/pages/story/index.ts @@ -28,7 +28,7 @@ Page({ }, onShow() { app.waitLogin({ type: [0, 1] }).then((_res) => { - app.zdMpBehavior({ PageName: 'PG_PATIENTDESIREDLIFE' }); + this.getList(); app.getZdUserInfo(this, true); }); @@ -83,14 +83,14 @@ Page({ // '/patient/pages/storyGuide/index': 'BTN_STORY_SUBMIT', // }[url] // if (PageName) { - // app.zdMpBehavior({ PageName }) + // } if (url.includes('/patient/pages/publishStoryDetail/index')) { - app.zdMpBehavior({ PageName: 'BTN_PATIENTDESIRELIFESTORYLIST' }); + } if (url === '/patient/pages/storyGuide/index') { - app.zdMpBehavior({ PageName: 'BTN_PATIENTDESIRELIFESHARE' }); + } wx.navigateTo({ url, diff --git a/src/patient/pages/storyEnter/index.ts b/src/patient/pages/storyEnter/index.ts index f04d093..f878a0c 100644 --- a/src/patient/pages/storyEnter/index.ts +++ b/src/patient/pages/storyEnter/index.ts @@ -38,7 +38,7 @@ Page({ } app.zdWaitLogin().then(() => { - app.zdMpBehavior({ PageName: 'PG_PATIENTSUBMITTEDSTORIES' }) + app.getZdUserInfo(that, true) }) @@ -220,7 +220,7 @@ Page({ }) }, submit() { - app.zdMpBehavior({ PageName: 'BTN_PATIENTSUBMISSIONSTORYSUBMIT' }) + const { form, fileList, VoiceContent } = this.data let toast = '' if (!form.TreatmentExperience) { diff --git a/src/patient/pages/storyGuide/index.ts b/src/patient/pages/storyGuide/index.ts index e19ab8c..a2024cd 100644 --- a/src/patient/pages/storyGuide/index.ts +++ b/src/patient/pages/storyGuide/index.ts @@ -21,7 +21,7 @@ Page({ }) } app.zdWaitLogin().then((_res) => { - app.zdMpBehavior({ PageName: 'PG_PATIENTREWARDESSAY' }) + // this.getSettingInfo(); if (options.storyleadin) { this.setToSee() @@ -62,7 +62,7 @@ Page({ routerTo(e) { const { url } = e.currentTarget.dataset if (url.includes('/patient/pages/storyEnter/index')) { - app.zdMpBehavior({ PageName: 'BTN_PATIENTREWARDEDWRITINGSUBMIT' }) + } wx.navigateTo({ url, diff --git a/src/patient/pages/storyList/index.ts b/src/patient/pages/storyList/index.ts index 43fdd73..173ad91 100644 --- a/src/patient/pages/storyList/index.ts +++ b/src/patient/pages/storyList/index.ts @@ -21,7 +21,7 @@ Page({ }, onShow() { app.waitLogin({ type: [1] }).then((_res) => { - app.zdMpBehavior({ PageName: 'PG_PATIENTMYSTORIES' }); + this.getList(); app.getZdUserInfo(this, true); }); @@ -58,7 +58,7 @@ Page({ } }, handleDetail(e) { - app.zdMpBehavior({ PageName: 'BTN_PATIENTMYSTORIESLIST' }); + const { id } = e.currentTarget.dataset; wx.navigateTo({ url: `/patient/pages/storyDetail/index?id=${id}`, @@ -67,7 +67,7 @@ Page({ routerTo(e) { const { url } = e.currentTarget.dataset; if (url === '/patient/pages/storyGuide/index') { - app.zdMpBehavior({ PageName: 'BTN_PATIENTMYSTORIESCONTINUESUBMIT' }); + } wx.navigateTo({ url, diff --git a/src/patient/pages/taskAgreement/index.ts b/src/patient/pages/taskAgreement/index.ts index 5dae874..c4da202 100644 --- a/src/patient/pages/taskAgreement/index.ts +++ b/src/patient/pages/taskAgreement/index.ts @@ -11,7 +11,7 @@ Page({ pagePath: options.page, }) app.zdWaitLogin({ isReg: false, loginPage: true }).then(() => { - app.zdMpBehavior({ PageName: 'PG_PATIENTFOLLOWUPCONSENT' }) + }) }, handleBack() { @@ -20,9 +20,9 @@ Page({ handleSure(e) { const { replace, pcfu } = e.currentTarget.dataset if (pcfu == 1) { - app.zdMpBehavior({ PageName: 'BTN_PATIENTFOLLOWUPAGREE' }) + } else if (pcfu == 2) { - app.zdMpBehavior({ PageName: 'BTN_PATIENTFOLLOWUPDISAGREE' }) + } const { pagePath } = this.data if (replace) { diff --git a/src/patient/pages/uploadCert/index.ts b/src/patient/pages/uploadCert/index.ts index 15d5300..0d0cff5 100644 --- a/src/patient/pages/uploadCert/index.ts +++ b/src/patient/pages/uploadCert/index.ts @@ -22,7 +22,7 @@ Page({ }) app.zdWaitLogin({ isReg: true, loginPage: true }).then((res) => { app.getZdUserInfo(this, true) - app.zdMpBehavior({ PageName: 'PG_PATIENTJOINGASSTATION' }) + }) }, handleSetData(e: WechatMiniprogram.CustomEvent) { @@ -116,7 +116,7 @@ Page({ }) }, handleNewSubmit() { - app.zdMpBehavior({ PageName: 'BTN_PATIENTJOINSTATIONBANNER' }) + const { error, zdUserInfo } = this.data let urlKey = '' const backPage = app.globalData.backPage diff --git a/src/patient/pages/webview/index.ts b/src/patient/pages/webview/index.ts index 238bb0d..db80d39 100644 --- a/src/patient/pages/webview/index.ts +++ b/src/patient/pages/webview/index.ts @@ -23,7 +23,7 @@ Page({ if (options.es === '201503') { app.globalData.IsAliQiWei = 1 - app.zdMpBehavior({ PageName: 'WEIYI_WEBVIEW_PAGE' }) + } const { UserType } = app.globalData.zdUserInfo diff --git a/typings/index.d.ts b/typings/index.d.ts index 560a11a..a02228b 100644 --- a/typings/index.d.ts +++ b/typings/index.d.ts @@ -39,7 +39,8 @@ interface IAppOption { checkLoginType: (type: pageType[] | 'any', backPath?: string) => boolean getMenuInfo: (arg0: WechatMiniprogram.Page.Instance) => void getUserInfo: (type: 0 | 1 | 2) => Promise - mpBehavior: (data: { PositionId: string; OperateType: string; OperateId: string }) => void + mpBehavior: (data: { PageName: string }) => void + oldMpBehavior: (data: { PositionId: string; OperateType: string; OperateId: string }) => void zdMpBehavior: (data: { PageName: string; doctor?: boolean }) => void zdGetTheme: () => Promise<'PATIENT'> zdWaitLogin: (obj?: { isReg?: boolean; loginPage?: boolean; pub?: boolean }) => Promise