From fed56d9a4309ea85b45a9c232179dd4d37762f59 Mon Sep 17 00:00:00 2001 From: kola-web Date: Sat, 16 Aug 2025 12:19:25 +0800 Subject: [PATCH] =?UTF-8?q?=E7=99=BB=E5=BD=95=E6=8B=A6=E6=88=AA=E8=B0=83?= =?UTF-8?q?=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/app.ts | 17 +- src/components/customTable/index.wxml | 110 +++--- src/gift/pages/cutaneous/index.wxml | 24 +- src/gift/pages/cutaneousDetail/index.wxml | 2 +- src/gift/pages/cutaneousVideo/index.wxml | 2 +- src/gift/pages/dtpDurg/index.wxml | 14 +- src/gift/pages/giftDetail/index.ts | 4 +- src/gift/pages/giftList/index.ts | 2 +- src/gift/pages/giftList/index.wxml | 10 +- src/gift/pages/myHealthRecord/index.ts | 470 +++++++++++------------ src/gift/pages/myHealthRecord/index.wxml | 34 +- src/gift/pages/myHealthRecordChart/index.ts | 574 ++++++++++++++-------------- src/gift/pages/orderDetail/index.wxml | 4 +- src/gift/pages/orderEnd/index.wxml | 2 +- src/gift/pages/priceDetail/index.wxml | 4 +- src/gift/pages/scoreRule/index.wxml | 8 +- src/gift/pages/siteEdit/index.wxml | 2 +- src/gift/pages/siteList/index.wxml | 2 +- src/gift/pages/vipCert/index.ts | 12 +- src/gift/pages/vipCert/index.wxml | 4 +- src/gift/pages/vipPending/index.ts | 2 +- src/gift/pages/vipPending/index.wxml | 2 +- src/gift/pages/vipReject/index.ts | 2 +- src/gift/pages/vipReject/index.wxml | 8 +- src/gift/pages/vipStartPending/index.ts | 2 +- src/gift/pages/vipStartPending/index.wxml | 4 +- src/pages/login/index.ts | 31 +- src/pages/my/index.ts | 10 +- src/patient/pages/adlResult/index.ts | 2 +- src/patient/pages/adlTest/index.wxml | 2 +- src/patient/pages/doctor/index.wxml | 2 +- src/patient/pages/index/index.ts | 8 +- src/patient/pages/index/index.wxml | 4 +- src/patient/pages/my/index.ts | 8 +- src/patient/pages/my/index.wxml | 6 +- src/patient/pages/referral/index.ts | 2 +- src/patient/pages/uploadCert/index.ts | 2 +- 37 files changed, 702 insertions(+), 696 deletions(-) diff --git a/src/app.ts b/src/app.ts index 6129079..023dd56 100644 --- a/src/app.ts +++ b/src/app.ts @@ -160,12 +160,19 @@ App({ } if (isLogin !== 1) { - if (type.includes(0) && loginType === 0) { + if (type.includes(0) && [0, 1].includes(loginType)) { return true; } - wx.reLaunch({ - url: '/patient/pages/login/index', - }); + if (loginType === 1) { + wx.reLaunch({ + url: '/patient/pages/login/index', + }); + } + if (loginType === 2) { + wx.reLaunch({ + url: '/pages/login/index', + }); + } return false; } @@ -183,7 +190,7 @@ App({ if (!type.includes(loginType)) { const typePageUrl = { 1: '/patient/pages/index/index', - 2: '/pages/index/index', + 2: '/pages/home/index', }[loginType as 1 | 2]; wx.reLaunch({ url: typePageUrl, diff --git a/src/components/customTable/index.wxml b/src/components/customTable/index.wxml index 9fde26d..3a263b4 100644 --- a/src/components/customTable/index.wxml +++ b/src/components/customTable/index.wxml @@ -1,55 +1,55 @@ - - - - - - - 0分 - 1分 - 2分 - 3分 - - - - - 延髓 - 呼吸 - 四肢 - 眼肌 - - - - {{item.title}} - - - {{lItem.title}} - - - - - - - - - - - - - + + + + + + + 0分 + 1分 + 2分 + 3分 + + + + + 延髓 + 呼吸 + 四肢 + 眼肌 + + + + {{item.title}} + + + {{lItem.title}} + + + + + + + + + + + + + diff --git a/src/gift/pages/cutaneous/index.wxml b/src/gift/pages/cutaneous/index.wxml index 02c1d1b..909588e 100644 --- a/src/gift/pages/cutaneous/index.wxml +++ b/src/gift/pages/cutaneous/index.wxml @@ -1,18 +1,18 @@ - + - + diff --git a/src/gift/pages/cutaneousVideo/index.wxml b/src/gift/pages/cutaneousVideo/index.wxml index 56d244e..709760d 100644 --- a/src/gift/pages/cutaneousVideo/index.wxml +++ b/src/gift/pages/cutaneousVideo/index.wxml @@ -1,6 +1,6 @@ diff --git a/src/gift/pages/dtpDurg/index.wxml b/src/gift/pages/dtpDurg/index.wxml index f2bb77a..3d19ab7 100644 --- a/src/gift/pages/dtpDurg/index.wxml +++ b/src/gift/pages/dtpDurg/index.wxml @@ -1,16 +1,16 @@ - + {{detail.Name}} - + 自有输注中心 - + 合作输注中心 @@ -23,13 +23,13 @@ - + 地址 - + 电话 @@ -39,7 +39,7 @@ 自有输注中心 @@ -48,7 +48,7 @@ - + 合作输注中心 {{detail.CooperationInfusionCenterName}} diff --git a/src/gift/pages/giftDetail/index.ts b/src/gift/pages/giftDetail/index.ts index f709ceb..e128e9d 100644 --- a/src/gift/pages/giftDetail/index.ts +++ b/src/gift/pages/giftDetail/index.ts @@ -20,8 +20,8 @@ Page({ this.setData({ id: options.id, toastParams: { - doc: `

为让用户更好的享受再鼎gMG给力加油站的服务,gMG给力加油站平台向用户提供了能量兑换服务,并提供了丰富的礼品,平台注册用户可使用有效的能量兑换礼品。

gMG给力加油站的礼品库将提供:

1) 查看用户在能量商城选择兑换的商品信息;

2) 确认兑换商品的订单信息;

3) 实施兑换商品的物流配送服务。

基于以上服务内容,我们在此特别声明:

gMG给力加油站非常重视用户个人信息保护,我们制定了详细的《知情同意书》,我们将按照公示的政策及相关法律法规的要求,对您的个人信息予以保护。为了完整的向您提供能量的商品兑换服务,gMG给力加油站将需要您提供用户真实姓名、手机号、地址信息,以便完成您所兑换商品的物流配送。其中,当用户准备对兑换商品进行结算时,平台会生成兑换该商品的订单,同时该订单中会载明订单号、所兑换的商品或服务信息、应支付的能量值。以上所有信息构成用户的“订单信息”,平台将使用订单信息来进行用户的身份核验、确定交易、支付结算、完成配送。

用户点击本协议的"同意"按钮即视为完全接受以上声明条款,在点击之前请用户再次确认已知悉并完全理解声明的全部内容。

`, - // doc:`

为让用户更好的享受再鼎gMG给力加油站的服务,gMG给力加油站平台向用户提供了能量兑换服务,并提供了丰富的礼品,平台注册用户可使用有效的能量兑换礼品。

gMG给力加油站的礼品库将提供:

1) 查看用户在能量商城选择兑换的商品信息;

2) 确认兑换商品的订单信息;

3) 实施兑换商品的物流配送服务。

基于以上服务内容,我们在此特别声明:

gMG给力加油站非常重视用户个人信息保护,我们制定了详细的《知情同意书》,我们将按照公示的政策及相关法律法规的要求,对您的个人信息予以保护。为了完整的向您提供能量的商品兑换服务,gMG给力加油站将需要您提供用户真实姓名、手机号、地址信息,以便完成您所兑换商品的物流配送。其中,当用户准备对兑换商品进行结算时,平台会生成兑换该商品的订单,同时该订单中会载明订单号、所兑换的商品或服务信息、应支付的能量值。以上所有信息构成用户的“订单信息”,平台将使用订单信息来进行用户的身份核验、确定交易、支付结算、完成配送。

用户点击本协议的"同意"按钮即视为完全接受以上声明条款,在点击之前请用户再次确认已知悉并完全理解声明的全部内容。

` + doc: `

为让用户更好的享受再鼎gMG给力加油站的服务,gMG给力加油站平台向用户提供了能量兑换服务,并提供了丰富的礼品,平台注册用户可使用有效的能量兑换礼品。

gMG给力加油站的礼品库将提供:

1) 查看用户在能量商城选择兑换的商品信息;

2) 为让用户更好的享受再鼎gMG给力加油站的服务,gMG给力加油站平台向用户提供了能量兑换服务,并提供了丰富的礼品,平台注册用户可使用有效的能量兑换礼品。

gMG给力加油站的礼品库将提供:

1) 查看用户在能量商城选择兑换的商品信息;

2) 确认兑换商品的订单信 ... (very long line, trimmed to 1000 chars) }, }); app.waitLogin().then(() => { diff --git a/src/gift/pages/giftList/index.ts b/src/gift/pages/giftList/index.ts index acab010..6ed7bb9 100644 --- a/src/gift/pages/giftList/index.ts +++ b/src/gift/pages/giftList/index.ts @@ -102,7 +102,7 @@ Page({ }, handleBack() { wx.reLaunch({ - url: "/pages/my/index", + url: "/patient/pages/my/index", }); }, onReachBottom() { diff --git a/src/gift/pages/giftList/index.wxml b/src/gift/pages/giftList/index.wxml index 651528a..c9fbf3f 100644 --- a/src/gift/pages/giftList/index.wxml +++ b/src/gift/pages/giftList/index.wxml @@ -1,9 +1,9 @@ - + - + 你有{{selfScore.expire.expireScore}}能量将于7月1日过期 - + 全部 {{item.cateName}} diff --git a/src/gift/pages/myHealthRecord/index.ts b/src/gift/pages/myHealthRecord/index.ts index fa7debe..87c70ef 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,39 @@ 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.mpBehavior({ PageName: 'PG_PATIENTHEALTHRECORD' }) + 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 +152,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 +199,47 @@ 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.mpBehavior({ PageName: 'BTN_PATIENTHEALTHRECORDDAILYCURVE' }) + 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.mpBehavior({ PageName: 'BTN_PATIENTHEALTHRECORDMONTHLYCURVE' }) + 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.mpBehavior({ PageName: 'BTN_PATIENTHEALTHRECORDYEARLYCURVE' }) + 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.mpBehavior({ PageName: 'BTN_PATIENTHEALTHRECORDTIMECURVE' }) + app.zdMpBehavior({ PageName: 'BTN_PATIENTHEALTHRECORDTIMECURVE' }); } this.setData({ page: 0, @@ -247,52 +247,52 @@ 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.mpBehavior({ PageName: 'BTN_PATIENTHEALTHRECORDCOMPREHENSIVEREPORT' }) + app.zdMpBehavior({ PageName: 'BTN_PATIENTHEALTHRECORDCOMPREHENSIVEREPORT' }); } if (index == 2) { - app.mpBehavior({ PageName: 'BTN_PATIENTHEALTHRECORDDUALCOMPLIANCENOTES' }) + app.zdMpBehavior({ PageName: 'BTN_PATIENTHEALTHRECORDDUALCOMPLIANCENOTES' }); } if (index == 3) { - app.mpBehavior({ PageName: 'BTN_PATIENTHEALTHRECORDMEDICATIONRECORD' }) + 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 +305,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 +328,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 +360,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 +383,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 +400,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 +423,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 +446,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 +468,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 +574,7 @@ Page({ data: list.map((item) => dayjs(item.Date).format('MM-DD')), axisLabel: { formatter() { - return '' + return ''; }, }, }, @@ -647,7 +647,7 @@ Page({ endValue: 4, filterMode: 'none', }, - } + }; if (theme === 'DRUG') { const markLineData = list @@ -669,8 +669,8 @@ Page({ color: '#25D9C8', offset: [60, 0], }, - } - }) + }; + }); option.series.push({ name: '用药', data: list.map((item) => (item.InjectionBottles ? 0 : null)), @@ -693,7 +693,7 @@ Page({ symbol: ['none', 'none'], data: markLineData, }, - }) + }); // option.series.push({ // name: "用药时间", // data: list.map((item: any) => (item.InjectionBottles ? item.TotalScore : 0)), @@ -715,23 +715,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 +784,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 +811,7 @@ Page({ color: '#18474e', z: 11, formatter({ value }) { - return `${value}mg` + return `${value}mg`; }, }, itemStyle: { @@ -860,7 +860,7 @@ Page({ endValue: 4, filterMode: 'none', }, - } + }; if (theme === 'DRUG') { const markLineData = list .filter((item) => item.InjectionBottles) @@ -880,9 +880,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 +905,7 @@ Page({ symbol: ['none', 'none'], data: markLineData, }, - }) + }); // option.series.push({ // name: "用药时间", // data: list.map((item: any) => (item.InjectionBottles ? item.TotalScore : 0)), @@ -927,68 +927,68 @@ 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.mpBehavior({ PageName: 'BTN_PATIENTHEALTHRECORDREPORTLIST' }) + app.zdMpBehavior({ PageName: 'BTN_PATIENTHEALTHRECORDREPORTLIST' }); } if (tab == 2) { - app.mpBehavior({ PageName: 'BTN_PATIENTHEALTHRECORDNOTESLIST' }) + app.zdMpBehavior({ PageName: 'BTN_PATIENTHEALTHRECORDNOTESLIST' }); } wx.navigateTo({ - url: `/pages/adlResult/index?id=${id}`, - }) + 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: '#cf5375', @@ -1001,50 +1001,50 @@ Page({ Id: id, }, }).then(() => { - this.handleTabCallBack() - }) + this.handleTabCallBack(); + }); } }, - }) + }); }, handleAdd() { - app.mpBehavior({ PageName: 'BTN_PATIENTHEALTHRECORDASSESSMENT' }) + app.zdMpBehavior({ PageName: 'BTN_PATIENTHEALTHRECORDASSESSMENT' }); wx.navigateTo({ - url: '/pages/adl/index', - }) + url: '/patient/pages/adl/index', + }); }, handleAddDrug() { - app.mpBehavior({ PageName: 'BTN_PATIENTHEALTHRECORDMEDICATION' }) + app.zdMpBehavior({ PageName: 'BTN_PATIENTHEALTHRECORDMEDICATION' }); wx.navigateTo({ - url: '/pages/drugRecord/index', - }) + 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.mpBehavior({ PageName: 'BTN_PATIENTHEALTHRECORDMEDICATIONLIST' }) + const { id, isi } = e.currentTarget.dataset; + app.zdMpBehavior({ PageName: 'BTN_PATIENTHEALTHRECORDMEDICATIONLIST' }); if (isi == 1) { - return + return; } wx.navigateTo({ - url: `/pages/drugRecord/index?id=${id}`, - }) + 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 +1058,34 @@ Page({ Id: id, }, }).then(() => { - this.handleTabCallBack() - }) + this.handleTabCallBack(); + }); } }, - }) + }); }, toggleFold() { this.setData({ fold: !this.data.fold, - }) + }); }, handleShare() { - app.mpBehavior({ PageName: 'BTN_PATIENTHEALTHRECORDSHAREDUALCOMPLIANCEPOSTER' }) + app.zdMpBehavior({ PageName: 'BTN_PATIENTHEALTHRECORDSHAREDUALCOMPLIANCEPOSTER' }); wx.navigateTo({ - url: '/pages/adlShare/index', - }) + url: '/patient/pages/adlShare/index', + }); }, handleBack() { wx.navigateBack({ fail() { - wx.reLaunch({ url: '/pages/index/index' }) + wx.reLaunch({ url: '/patient/pages/index/index' }); }, - }) + }); }, onShareAppMessage() { return { title: 'MG-ADL测评表:评估重症肌无力患者症状对生活质量的影响', - path: '/pages/adl/index', - } + path: '/patient/pages/adl/index', + }; }, -}) +}); diff --git a/src/gift/pages/myHealthRecord/index.wxml b/src/gift/pages/myHealthRecord/index.wxml index 5ab22d4..ca94ddd 100644 --- a/src/gift/pages/myHealthRecord/index.wxml +++ b/src/gift/pages/myHealthRecord/index.wxml @@ -11,7 +11,7 @@ - + 用药 ADL评分异常 @@ -32,7 +32,7 @@ 年度 次数 - + @@ -76,7 +76,7 @@ - + 双达标达成! @@ -89,17 +89,17 @@ ADL分数 - + 用药时间 - + - + @@ -117,16 +117,16 @@ 单位(mg) - + - + @@ -276,7 +276,7 @@ 0分 1分 @@ -298,28 +298,28 @@ @@ -381,12 +381,12 @@ - + - + - + diff --git a/src/gift/pages/myHealthRecordChart/index.ts b/src/gift/pages/myHealthRecordChart/index.ts index f8e8b29..2eecd13 100644 --- a/src/gift/pages/myHealthRecordChart/index.ts +++ b/src/gift/pages/myHealthRecordChart/index.ts @@ -1,287 +1,287 @@ -/* eslint-disable */ -const app = getApp() -const licia = require('miniprogram-licia') -import dayjs from 'dayjs' - -let echarts: any = null - -Page({ - data: { - ec: { - lazyLoad: true, - }, - foldAll: true, - - BeginMonth: '', - EndMonth: '', - Type: '1', - Num: '' as string | number, - fields: { - 1: 'day', - 2: 'month', - 3: 'year', - }, - - detail: {}, - partNameList: app.globalData.partNameList, - list: [], - defaultList: [], - count: 0, - - zdUserInfo: {}, - todayBg: '', - selectLegends: {}, - - page: 0, - safeAreaLeft: 20, - - theme: '', - }, - ecDataTrendComponent: null as any, - async onLoad() { - app.zdGetTheme().then((res) => { - this.setData({ - theme: res, - }) - }) - - const that = this - - that.getSystemInfo() - echarts = await require.async('../../../resource/components/echart/echarts.js') - - that.ecDataTrendComponent = that.selectComponent('#mychart-dom-bar') - - const eventChannel = that.getOpenerEventChannel() - eventChannel.on('acceptDataFromOpenerPage', function (data) { - console.log(data) - that.setData({ - defaultList: data.list, - selectLegends: { ...data.selectLegends }, - zdUserInfo: app.globalData.zdUserInfo, - }) - that.initChart(data.list) - }) - - that.initChart(that.data.defaultList as any) - }, - - initChart(defaultList = []) { - const { selectLegends, theme } = this.data - // const list = defaultList.slice(page * 15, (page + 1) * 8); - const list = defaultList - this.ecDataTrendComponent.init((canvas, width, height, dpr) => { - let chart = echarts.init(canvas, null, { - width: width, - height: height, - devicePixelRatio: dpr, // new - }) - canvas.setChart(chart) - - var option = { - dataZoom: [ - { - type: 'inside', // 内置于坐标系中 - // start: 0, - // end: 15, - startValue: 0, - endValue: 15, - xAxisIndex: [0], - }, - ], - tooltip: { - trigger: 'axis', - axisPointer: { - type: 'shadow', - }, - confine: true, - backgroundColor: 'rgba(0, 0, 0, 0.5)', - textStyle: { - color: '#fff', - fontSize: 10, - }, - order: 'seriesDesc', - }, - legend: { - bottom: 0, - padding: 0, - itemGap: 5, - itemWidth: 8, - itemHeight: 8, - icon: 'circle', - selected: selectLegends, - }, - grid: { - top: '5', - left: '0', - right: '0', - bottom: '15', - containLabel: true, - }, - xAxis: [ - { - type: 'category', - axisTick: { - show: false, - }, - axisLine: { - lineStyle: { - color: '#8C8C8C', - type: 'dashed', - }, - }, - axisLabel: { - //x轴文字的配置 - show: true, - interval: 0, //使x轴文字显示全 - rotate: -20, - }, - data: list.map((item) => item.Date), - }, - ], - yAxis: [ - { - type: 'value', - }, - ], - series: [ - { - name: '延髓', - type: 'bar', - stack: 'Ad', - emphasis: { - disabled: true, - focus: 'none', - }, - data: list.map((item) => item.MedullaTypeScore * 1), - barWidth: '16', - itemStyle: { - // borderColor: "#fff", - // borderWidth: 2, - color: '#7FBDA6', - }, - }, - { - name: '呼吸', - type: 'bar', - stack: 'Ad', - emphasis: { - disabled: true, - focus: 'none', - }, - data: list.map((item) => item.BreathTypeScore * 1), - itemStyle: { - // borderColor: "#fff", - // borderWidth: 2, - color: '#F1CE8F', - }, - }, - { - name: '肢体', - type: 'bar', - stack: 'Ad', - emphasis: { - disabled: true, - focus: 'none', - }, - data: list.map((item) => item.LimbsTypeScore * 1), - itemStyle: { - // borderColor: "#fff", - // borderWidth: 2, - color: '#9ED0DE', - }, - }, - { - name: '眼肌', - type: 'bar', - stack: 'Ad', - emphasis: { - disabled: true, - focus: 'none', - }, - data: list.map((item) => item.EyeTypeScore * 1), - itemStyle: { - // borderColor: "#fff", - // borderWidth: 2, - color: '#D37862', - }, - }, - { - name: '总分', - data: list.map((item) => item.TotalScore), - type: 'line', - symbol: 'circle', - connectNulls: true, - itemStyle: { - color: '#CF5375', - }, - }, - ], - // dataZoom: { - // show: true, // 为true 滚动条出现 - // realtime: true, - // type: "slider", // 有type这个属性,滚动条在最下面,也可以不行,写y:36,这表示距离顶端36px,一般就是在图上面。 - // height: 20, // 表示滚动条的高度,也就是粗细 - // start: 20, // 表示默认展示20%~80%这一段。 - // end: 80, - // }, - } - if (theme === 'DRUG') { - let markLineData = list - .filter((item) => item.InjectionBottles) - .map((item) => { - return { - name: '', - xAxis: item.Date, - lineStyle: { - color: '#25D9C8', - cap: '', - type: 'solid', - }, - label: { - formatter: '', - position: 'insideEndBottom', - rotate: 0, - color: '#25D9C8', - offset: [60, 0], - }, - } - }) - option.series.push({ - name: '用药', - data: list.map((item) => item.InjectionBottles), - type: 'line', - symbol: 'none', - itemStyle: { - color: '#25D9C8', - }, - lineStyle: { - width: 0, - }, - markLine: { - symbol: ['none', 'none'], - data: markLineData, - }, - }) - } - - chart.setOption(option) - return chart - }) - }, - getSystemInfo() { - wx.getSystemInfo({ - success: (res) => { - this.setData({ - safeAreaLeft: res.safeArea.left || 20, - }) - }, - }) - }, - onShareAppMessage() { - return { - title: 'MG-ADL测评表:评估重症肌无力患者症状对生活质量的影响', - path: '/pages/adl/index', - } - }, -}) +/* eslint-disable */ +const app = getApp() +const licia = require('miniprogram-licia') +import dayjs from 'dayjs' + +let echarts: any = null + +Page({ + data: { + ec: { + lazyLoad: true, + }, + foldAll: true, + + BeginMonth: '', + EndMonth: '', + Type: '1', + Num: '' as string | number, + fields: { + 1: 'day', + 2: 'month', + 3: 'year', + }, + + detail: {}, + partNameList: app.globalData.partNameList, + list: [], + defaultList: [], + count: 0, + + zdUserInfo: {}, + todayBg: '', + selectLegends: {}, + + page: 0, + safeAreaLeft: 20, + + theme: '', + }, + ecDataTrendComponent: null as any, + async onLoad() { + app.zdGetTheme().then((res) => { + this.setData({ + theme: res, + }) + }) + + const that = this + + that.getSystemInfo() + echarts = await require.async('../../compontnts/echart/echarts.js') + + that.ecDataTrendComponent = that.selectComponent('#mychart-dom-bar') + + const eventChannel = that.getOpenerEventChannel() + eventChannel.on('acceptDataFromOpenerPage', function (data) { + console.log(data) + that.setData({ + defaultList: data.list, + selectLegends: { ...data.selectLegends }, + zdUserInfo: app.globalData.zdUserInfo, + }) + that.initChart(data.list) + }) + + that.initChart(that.data.defaultList as any) + }, + + initChart(defaultList = []) { + const { selectLegends, theme } = this.data + // const list = defaultList.slice(page * 15, (page + 1) * 8); + const list = defaultList + this.ecDataTrendComponent.init((canvas, width, height, dpr) => { + let chart = echarts.init(canvas, null, { + width: width, + height: height, + devicePixelRatio: dpr, // new + }) + canvas.setChart(chart) + + var option = { + dataZoom: [ + { + type: 'inside', // 内置于坐标系中 + // start: 0, + // end: 15, + startValue: 0, + endValue: 15, + xAxisIndex: [0], + }, + ], + tooltip: { + trigger: 'axis', + axisPointer: { + type: 'shadow', + }, + confine: true, + backgroundColor: 'rgba(0, 0, 0, 0.5)', + textStyle: { + color: '#fff', + fontSize: 10, + }, + order: 'seriesDesc', + }, + legend: { + bottom: 0, + padding: 0, + itemGap: 5, + itemWidth: 8, + itemHeight: 8, + icon: 'circle', + selected: selectLegends, + }, + grid: { + top: '5', + left: '0', + right: '0', + bottom: '15', + containLabel: true, + }, + xAxis: [ + { + type: 'category', + axisTick: { + show: false, + }, + axisLine: { + lineStyle: { + color: '#8C8C8C', + type: 'dashed', + }, + }, + axisLabel: { + //x轴文字的配置 + show: true, + interval: 0, //使x轴文字显示全 + rotate: -20, + }, + data: list.map((item) => item.Date), + }, + ], + yAxis: [ + { + type: 'value', + }, + ], + series: [ + { + name: '延髓', + type: 'bar', + stack: 'Ad', + emphasis: { + disabled: true, + focus: 'none', + }, + data: list.map((item) => item.MedullaTypeScore * 1), + barWidth: '16', + itemStyle: { + // borderColor: "#fff", + // borderWidth: 2, + color: '#7FBDA6', + }, + }, + { + name: '呼吸', + type: 'bar', + stack: 'Ad', + emphasis: { + disabled: true, + focus: 'none', + }, + data: list.map((item) => item.BreathTypeScore * 1), + itemStyle: { + // borderColor: "#fff", + // borderWidth: 2, + color: '#F1CE8F', + }, + }, + { + name: '肢体', + type: 'bar', + stack: 'Ad', + emphasis: { + disabled: true, + focus: 'none', + }, + data: list.map((item) => item.LimbsTypeScore * 1), + itemStyle: { + // borderColor: "#fff", + // borderWidth: 2, + color: '#9ED0DE', + }, + }, + { + name: '眼肌', + type: 'bar', + stack: 'Ad', + emphasis: { + disabled: true, + focus: 'none', + }, + data: list.map((item) => item.EyeTypeScore * 1), + itemStyle: { + // borderColor: "#fff", + // borderWidth: 2, + color: '#D37862', + }, + }, + { + name: '总分', + data: list.map((item) => item.TotalScore), + type: 'line', + symbol: 'circle', + connectNulls: true, + itemStyle: { + color: '#CF5375', + }, + }, + ], + // dataZoom: { + // show: true, // 为true 滚动条出现 + // realtime: true, + // type: "slider", // 有type这个属性,滚动条在最下面,也可以不行,写y:36,这表示距离顶端36px,一般就是在图上面。 + // height: 20, // 表示滚动条的高度,也就是粗细 + // start: 20, // 表示默认展示20%~80%这一段。 + // end: 80, + // }, + } + if (theme === 'DRUG') { + let markLineData = list + .filter((item) => item.InjectionBottles) + .map((item) => { + return { + name: '', + xAxis: item.Date, + lineStyle: { + color: '#25D9C8', + cap: '', + type: 'solid', + }, + label: { + formatter: '', + position: 'insideEndBottom', + rotate: 0, + color: '#25D9C8', + offset: [60, 0], + }, + } + }) + option.series.push({ + name: '用药', + data: list.map((item) => item.InjectionBottles), + type: 'line', + symbol: 'none', + itemStyle: { + color: '#25D9C8', + }, + lineStyle: { + width: 0, + }, + markLine: { + symbol: ['none', 'none'], + data: markLineData, + }, + }) + } + + chart.setOption(option) + return chart + }) + }, + getSystemInfo() { + wx.getSystemInfo({ + success: (res) => { + this.setData({ + safeAreaLeft: res.safeArea.left || 20, + }) + }, + }) + }, + onShareAppMessage() { + return { + title: 'MG-ADL测评表:评估重症肌无力患者症状对生活质量的影响', + path: '/patient/pages/adl/index', + } + }, +}) diff --git a/src/gift/pages/orderDetail/index.wxml b/src/gift/pages/orderDetail/index.wxml index 00da7ec..3e8a81e 100644 --- a/src/gift/pages/orderDetail/index.wxml +++ b/src/gift/pages/orderDetail/index.wxml @@ -1,10 +1,10 @@ - + {{detail.statusName}} - + {{detail.receiveUserName}} {{detail.receiveTelephone}} {{detail.receiveAddress}} diff --git a/src/gift/pages/orderEnd/index.wxml b/src/gift/pages/orderEnd/index.wxml index 7d3cf3e..aa9350c 100644 --- a/src/gift/pages/orderEnd/index.wxml +++ b/src/gift/pages/orderEnd/index.wxml @@ -1,5 +1,5 @@ - + 下单成功 订单号:{{detail.orderNo}} 查看订单详情 diff --git a/src/gift/pages/priceDetail/index.wxml b/src/gift/pages/priceDetail/index.wxml index 068c6a9..fa85b63 100644 --- a/src/gift/pages/priceDetail/index.wxml +++ b/src/gift/pages/priceDetail/index.wxml @@ -1,11 +1,11 @@ 能量收支明细 diff --git a/src/gift/pages/scoreRule/index.wxml b/src/gift/pages/scoreRule/index.wxml index 124e04b..39c7323 100644 --- a/src/gift/pages/scoreRule/index.wxml +++ b/src/gift/pages/scoreRule/index.wxml @@ -1,12 +1,12 @@ - + - + {{list[1].content}} @@ -32,7 +32,7 @@ - + {{list[2].content}} diff --git a/src/gift/pages/siteEdit/index.wxml b/src/gift/pages/siteEdit/index.wxml index 6359f21..1fcb06c 100644 --- a/src/gift/pages/siteEdit/index.wxml +++ b/src/gift/pages/siteEdit/index.wxml @@ -39,7 +39,7 @@ placeholder="请选择省市区、街道" /> - + 定位 diff --git a/src/gift/pages/siteList/index.wxml b/src/gift/pages/siteList/index.wxml index caa5930..ebf7a1d 100644 --- a/src/gift/pages/siteList/index.wxml +++ b/src/gift/pages/siteList/index.wxml @@ -8,7 +8,7 @@ {{item.receiveUserName}} {{item.receiveTelephone}} - + diff --git a/src/gift/pages/vipCert/index.ts b/src/gift/pages/vipCert/index.ts index 3a88260..e5ae5bf 100644 --- a/src/gift/pages/vipCert/index.ts +++ b/src/gift/pages/vipCert/index.ts @@ -17,10 +17,10 @@ Page({ app.getZdUserInfo(this, true, (zdUserInfo) => { if (zdUserInfo.UserType == 4) { wx.reLaunch({ - url: "/pages/my/index", + url: "/patient/pages/my/index", }); } - app.zdPermissionVerification(3, 0, `/pages/index/index`); + app.zdPermissionVerification(3, 0, `/patient/pages/index/index`); }); }); }, @@ -78,7 +78,7 @@ Page({ } const navUrl = { - reslove: "/pages/index/index", + reslove: "/patient/pages/index/index", pending: "/gift/pages/vipPending/index", nopending: "/gift/pages/vimStartPending/index", }[urlKey] as string; @@ -115,12 +115,12 @@ Page({ handleVisitors() { app.globalData.anyWhere = true; wx.reLaunch({ - url: "/pages/index/index", + url: "/patient/pages/index/index", }); }, handleVip() { wx.navigateTo({ - url: "/pages/vipLogin/index", + url: "/patient/pages/vipLogin/index", }); }, handleBack() { @@ -128,7 +128,7 @@ Page({ }, handleVipScan() { wx.navigateTo({ - url: "/pages/vipLogin/index", + url: "/patient/pages/vipLogin/index", }); }, }); diff --git a/src/gift/pages/vipCert/index.wxml b/src/gift/pages/vipCert/index.wxml index 193cc76..e464403 100644 --- a/src/gift/pages/vipCert/index.wxml +++ b/src/gift/pages/vipCert/index.wxml @@ -1,5 +1,5 @@ - + 专属身份认证 @@ -20,7 +20,7 @@ upload="{{!diagnoseImg}}" > - + 点击上传 diff --git a/src/gift/pages/vipPending/index.ts b/src/gift/pages/vipPending/index.ts index 62f4318..99bc5fb 100644 --- a/src/gift/pages/vipPending/index.ts +++ b/src/gift/pages/vipPending/index.ts @@ -11,7 +11,7 @@ Page({ }, handleVisitors() { wx.reLaunch({ - url: "/pages/index/index", + url: "/patient/pages/index/index", }); }, getCode() { diff --git a/src/gift/pages/vipPending/index.wxml b/src/gift/pages/vipPending/index.wxml index d303efb..2b956f2 100644 --- a/src/gift/pages/vipPending/index.wxml +++ b/src/gift/pages/vipPending/index.wxml @@ -1,5 +1,5 @@ - + 提交成功,审核中 diff --git a/src/gift/pages/vipReject/index.ts b/src/gift/pages/vipReject/index.ts index f23b49c..a21f603 100644 --- a/src/gift/pages/vipReject/index.ts +++ b/src/gift/pages/vipReject/index.ts @@ -16,7 +16,7 @@ Page({ }, handleVisitors() { wx.reLaunch({ - url: "/pages/index/index", + url: "/patient/pages/index/index", }); }, handleBack() { diff --git a/src/gift/pages/vipReject/index.wxml b/src/gift/pages/vipReject/index.wxml index afc8c9a..e6b43a3 100644 --- a/src/gift/pages/vipReject/index.wxml +++ b/src/gift/pages/vipReject/index.wxml @@ -1,12 +1,12 @@ - + - + 未通过原因:{{zdUserInfo.UseDrugsRejectReason}} - + 审核未通过 很遗憾您的审核未通过 @@ -17,7 +17,7 @@ - + 回到首页 diff --git a/src/gift/pages/vipStartPending/index.ts b/src/gift/pages/vipStartPending/index.ts index 64fe6a2..cbdcd9b 100644 --- a/src/gift/pages/vipStartPending/index.ts +++ b/src/gift/pages/vipStartPending/index.ts @@ -5,7 +5,7 @@ Page({ onLoad() {}, handleVisitors() { wx.reLaunch({ - url: "/pages/index/index", + url: "/patient/pages/index/index", }); }, handleBack() { diff --git a/src/gift/pages/vipStartPending/index.wxml b/src/gift/pages/vipStartPending/index.wxml index 064eb99..ac66a9c 100644 --- a/src/gift/pages/vipStartPending/index.wxml +++ b/src/gift/pages/vipStartPending/index.wxml @@ -1,8 +1,8 @@ - + - + 提交成功,审核中 人工审核周期24小时~48小时 diff --git a/src/pages/login/index.ts b/src/pages/login/index.ts index 06a288a..a68ae76 100644 --- a/src/pages/login/index.ts +++ b/src/pages/login/index.ts @@ -106,8 +106,8 @@ Page({ }, showMsg: false, }) - .then((res) => { - this.submitCallback(res); + .then(() => { + this.submitCallback(); }) .catch((err) => { if (err.data.code == 100) { @@ -132,8 +132,8 @@ Page({ }, showMsg: false, }) - .then((res) => { - this.submitCallback(res); + .then(() => { + this.submitCallback(); }) .catch((err) => { if (err.data.code == 100) { @@ -147,21 +147,20 @@ Page({ }); } }, - submitCallback(res) { - console.log('DEBUGPRINT[79]: index.ts:112: res=', res); - app.globalData.loginType = res.loginType; - app.globalData.isLogin = res.isLogin; - if (res.isLogin == 1) { - if (res.loginType == 2) { - wx.reLaunch({ - url: '/pages/home/index', - }); + submitCallback() { + app.updateLoginInfo((res) => { + if (res.isLogin == 1) { + if (res.loginType == 2) { + wx.reLaunch({ + url: '/pages/home/index', + }); + } else { + this.handleShowPopup(); + } } else { this.handleShowPopup(); } - } else { - this.handleShowPopup(); - } + }); }, handleShowPopup() { this.setData({ diff --git a/src/pages/my/index.ts b/src/pages/my/index.ts index 7ca2324..ae376b5 100644 --- a/src/pages/my/index.ts +++ b/src/pages/my/index.ts @@ -40,11 +40,11 @@ Page({ method: 'POST', url: '?r=xd/user/reg-logout', data: {}, - }).then((res) => { - app.globalData.isLogin = res.isLogin; - app.globalData.loginType = res.loginType; - wx.reLaunch({ - url: '/pages/start/index', + }).then(() => { + app.startLogin(() => { + wx.reLaunch({ + url: '/pages/start/index', + }); }); }); } diff --git a/src/patient/pages/adlResult/index.ts b/src/patient/pages/adlResult/index.ts index 993541a..a19dd55 100644 --- a/src/patient/pages/adlResult/index.ts +++ b/src/patient/pages/adlResult/index.ts @@ -224,7 +224,7 @@ Page({ handleMyHealth() { app.zdMpBehavior({ PageName: 'BTN_PATIENTASSESSMENTRESULTGETNOTES' }); wx.navigateTo({ - url: '/gift/patient/pages/myHealthRecord/index', + url: '/patient/pages/myHealthRecord/index', }); }, handleShare() { diff --git a/src/patient/pages/adlTest/index.wxml b/src/patient/pages/adlTest/index.wxml index 844901a..8c3cd28 100644 --- a/src/patient/pages/adlTest/index.wxml +++ b/src/patient/pages/adlTest/index.wxml @@ -44,7 +44,7 @@ - + {{item+1}}片 diff --git a/src/patient/pages/doctor/index.wxml b/src/patient/pages/doctor/index.wxml index 5f594ed..6480a1f 100644 --- a/src/patient/pages/doctor/index.wxml +++ b/src/patient/pages/doctor/index.wxml @@ -101,7 +101,7 @@ diff --git a/src/patient/pages/index/index.ts b/src/patient/pages/index/index.ts index 22861d2..7ce0519 100644 --- a/src/patient/pages/index/index.ts +++ b/src/patient/pages/index/index.ts @@ -479,15 +479,15 @@ Page({ }); } else if (MedicineAuditSwitch === '1') { const pendPath = { - 0: '/gift/patient/pages/vipPending/index', - 1: '/gift/patient/pages/vipStartPending/index', + 0: '/patient/pages/vipPending/index', + 1: '/patient/pages/vipStartPending/index', }[isFollow]; const url = { 1: pendPath, - 2: '/gift/patient/pages/vipReject/index', + 2: '/patient/pages/vipReject/index', }[UseDrugsAuditStatus]; wx.navigateTo({ - url: url || '/gift/patient/pages/vipCert/index', + url: url || '/patient/pages/vipCert/index', }); } else { wx.showToast({ diff --git a/src/patient/pages/index/index.wxml b/src/patient/pages/index/index.wxml index 71223a3..c56a25e 100644 --- a/src/patient/pages/index/index.wxml +++ b/src/patient/pages/index/index.wxml @@ -107,7 +107,7 @@ 查看健康档案 diff --git a/src/patient/pages/my/index.ts b/src/patient/pages/my/index.ts index 0b2a211..5dd1882 100644 --- a/src/patient/pages/my/index.ts +++ b/src/patient/pages/my/index.ts @@ -112,15 +112,15 @@ Page({ }) } else if (MedicineAuditSwitch === '1') { const pendPath = { - 0: '/gift/patient/pages/vipPending/index', - 1: '/gift/patient/pages/vipStartPending/index', + 0: '/patient/pages/vipPending/index', + 1: '/patient/pages/vipStartPending/index', }[isFollow] const url = { 1: pendPath, - 2: '/gift/patient/pages/vipReject/index', + 2: '/patient/pages/vipReject/index', }[UseDrugsAuditStatus] wx.navigateTo({ - url: url || '/gift/patient/pages/vipCert/index', + url: url || '/patient/pages/vipCert/index', }) } else { wx.showToast({ diff --git a/src/patient/pages/my/index.wxml b/src/patient/pages/my/index.wxml index d4dfe5a..b8fe8f4 100644 --- a/src/patient/pages/my/index.wxml +++ b/src/patient/pages/my/index.wxml @@ -35,9 +35,9 @@ 能量 - 能量明细 + 能量明细 - 能量规则 + 能量规则 @@ -46,7 +46,7 @@ class="option" style="width: 54rpx; height: 60rpx" bind:tap="routerTo" - data-url="/gift/patient/pages/giftList/index" + data-url="/patient/pages/giftList/index" >