Browse Source

删除所有再鼎的埋点

dev
kola-web 2 weeks ago
parent
commit
2498c2756c
  1. 5
      src/app.ts
  2. 7
      src/components/popup/index.ts
  3. 451
      src/gift/pages/myHealthRecord/index.ts
  4. 10
      src/pages/d_interactive/index.ts
  5. 8
      src/pages/d_interactiveDoctor/index.ts
  6. 2
      src/pages/d_invite/index.ts
  7. 8
      src/pages/d_patient/index.ts
  8. 12
      src/pages/d_patientDetail/index.ts
  9. 6
      src/pages/d_userInfo/index.ts
  10. 12
      src/pages/home/index.ts
  11. 4
      src/pages/information/index.ts
  12. 6
      src/pages/informationDetail/index.ts
  13. 2
      src/pages/message/index.ts
  14. 8
      src/patient/pages/adl/index.ts
  15. 10
      src/patient/pages/adlResult/index.ts
  16. 4
      src/patient/pages/adlShare/index.ts
  17. 4
      src/patient/pages/adlTest/index.ts
  18. 18
      src/patient/pages/doctor/index.ts
  19. 2
      src/patient/pages/doctor/siteShare/index.ts
  20. 4
      src/patient/pages/enterInfo/index.ts
  21. 4
      src/patient/pages/family/index.ts
  22. 2
      src/patient/pages/familyList/index.ts
  23. 32
      src/patient/pages/index/index.ts
  24. 4
      src/patient/pages/interactivePatient/index.ts
  25. 10
      src/patient/pages/live/index.ts
  26. 10
      src/patient/pages/liveDetail/index.ts
  27. 8
      src/patient/pages/login/index.ts
  28. 16
      src/patient/pages/my/index.ts
  29. 12
      src/patient/pages/myLive/index.ts
  30. 6
      src/patient/pages/mySave/index.ts
  31. 2
      src/patient/pages/nrdl/index.ts
  32. 6
      src/patient/pages/nrdlDetail/index.ts
  33. 2
      src/patient/pages/nrdlTable/index.ts
  34. 8
      src/patient/pages/personalInformation/index.ts
  35. 6
      src/patient/pages/privacyAgreement/index.ts
  36. 6
      src/patient/pages/publishStoryDetail/index.ts
  37. 4
      src/patient/pages/repository/index.ts
  38. 8
      src/patient/pages/repositoryDetail/index.ts
  39. 8
      src/patient/pages/story/index.ts
  40. 4
      src/patient/pages/storyEnter/index.ts
  41. 4
      src/patient/pages/storyGuide/index.ts
  42. 6
      src/patient/pages/storyList/index.ts
  43. 6
      src/patient/pages/taskAgreement/index.ts
  44. 4
      src/patient/pages/uploadCert/index.ts
  45. 2
      src/patient/pages/webview/index.ts
  46. 3
      typings/index.d.ts

5
src/app.ts

@ -233,7 +233,10 @@ App<IAppOption>({
data: {}, data: {},
}) as Promise<never> }) as Promise<never>
}, },
mpBehavior(data) { mpBehavior(data: { PageName: string }) {
console.log(data)
},
oldMpBehavior(data) {
wx.ajax({ wx.ajax({
method: 'POST', method: 'POST',
url: '?r=xd/doctor/index/operate-action-submit', url: '?r=xd/doctor/index/operate-action-submit',

7
src/components/popup/index.ts

@ -1,5 +1,3 @@
import { wxPromiseWrapper } from 'XrFrame/core/utils'
const app = getApp<IAppOption>() const app = getApp<IAppOption>()
Component({ Component({
@ -44,11 +42,6 @@ Component({
url, url,
}) })
}, },
handlePopup1Check1() {
if (this.data.popup1Check1) {
app.mpBehavior({ PageName: 'BTN_PATIENTPRIVACY' })
}
},
handleSelectStatus(e) { handleSelectStatus(e) {
const { status } = e.currentTarget.dataset const { status } = e.currentTarget.dataset
this.triggerEvent('ok', { type: 'selectStatusComplete', status }) this.triggerEvent('ok', { type: 'selectStatusComplete', status })

451
src/gift/pages/myHealthRecord/index.ts

@ -1,8 +1,8 @@
import dayjs from 'dayjs'; import dayjs from 'dayjs'
const app = getApp<IAppOption>(); const app = getApp<IAppOption>()
const licia = require('miniprogram-licia'); const licia = require('miniprogram-licia')
let echarts: any = null; let echarts: any = null
Page({ Page({
data: { data: {
@ -109,39 +109,38 @@ Page({
app.zdGetTheme().then((res) => { app.zdGetTheme().then((res) => {
this.setData({ this.setData({
theme: res, theme: res,
}); })
}); })
}, },
async onShow() { async onShow() {
echarts = await require.async('../../compontnts/echart/echarts.js'); echarts = await require.async('../../compontnts/echart/echarts.js')
this.ecDataTrendComponent = this.selectComponent('#mychart-dom-bar'); this.ecDataTrendComponent = this.selectComponent('#mychart-dom-bar')
this.ecDataHormoneComponent = this.selectComponent('#mychart-hormone'); this.ecDataHormoneComponent = this.selectComponent('#mychart-hormone')
this.setData({ this.setData({
calendarDate: dayjs().format('YYYY-MM'), calendarDate: dayjs().format('YYYY-MM'),
}); })
this.handleChangeType(); this.handleChangeType()
app.waitLogin().then(() => { app.waitLogin().then(() => {
// 强制疾病患者以上身份 // 强制疾病患者以上身份
app.zdPermissionVerification(3, 0, `/gift/pages/myHealthRecord/index`).then(() => { app.zdPermissionVerification(3, 0, `/gift/pages/myHealthRecord/index`).then(() => {
app.zdMpBehavior({ PageName: 'PG_PATIENTHEALTHRECORD' });
app.getZdUserInfo(this, true, (res) => { app.getZdUserInfo(this, true, (res) => {
if (res.UserType != 4) { if (res.UserType != 4) {
this.setData({ this.setData({
tab: 2, tab: 2,
}); })
} }
this.getCale(); this.getCale()
this.handleTabCallBack(); this.handleTabCallBack()
this.getMedicationAlertAdl(); this.getMedicationAlertAdl()
}); })
}); })
}); })
}, },
handleChangeInput() { handleChangeInput() {
if (Number(this.data.Num) > 100) { if (Number(this.data.Num) > 100) {
this.setData({ this.setData({
Num: 100, Num: 100,
}); })
} }
}, },
getCale() { getCale() {
@ -152,44 +151,44 @@ Page({
Month: this.data.calendarDate, Month: this.data.calendarDate,
}, },
}).then((res) => { }).then((res) => {
this.setCalendarTodos(res); this.setCalendarTodos(res)
}); })
}, },
setCalendarTodos({ adl = [], medication = [] }: { adl: any[]; medication: string[] }) { setCalendarTodos({ adl = [], medication = [] }: { adl: any[]; medication: string[] }) {
const theme = this.data.theme; const theme = this.data.theme
const calendar = this.selectComponent('#calendar').calendar; const calendar = this.selectComponent('#calendar').calendar
const adlDate = adl.map((item) => item.Date); const adlDate = adl.map((item) => item.Date)
const dates: any[] = []; const dates: any[] = []
const intersectDate = licia.intersect(adlDate, medication); const intersectDate = licia.intersect(adlDate, medication)
const filterAdlDate = adl.filter((item) => !intersectDate.includes(item.Date)); const filterAdlDate = adl.filter((item) => !intersectDate.includes(item.Date))
const filterMedication = medication.filter((item) => !intersectDate.includes(item)); const filterMedication = medication.filter((item) => !intersectDate.includes(item))
const intersectAdlDate = adl.filter((item) => intersectDate.includes(item.Date)); const intersectAdlDate = adl.filter((item) => intersectDate.includes(item.Date))
const doc = theme === 'DRUG' ? 'doc' : ' '; const doc = theme === 'DRUG' ? 'doc' : ' '
filterMedication.forEach((Date: string) => { filterMedication.forEach((Date: string) => {
dates.push({ dates.push({
year: Date.split('-')[0], year: Date.split('-')[0],
month: Date.split('-')[1], month: Date.split('-')[1],
date: Date.split('-')[2], date: Date.split('-')[2],
class: doc, class: doc,
}); })
}); })
intersectAdlDate.forEach(({ Date, TotalScore, LastTotalScore }) => { intersectAdlDate.forEach(({ Date, TotalScore, LastTotalScore }) => {
dates.push({ dates.push({
year: Date.split('-')[0], year: Date.split('-')[0],
month: Date.split('-')[1], month: Date.split('-')[1],
date: Date.split('-')[2], date: Date.split('-')[2],
class: TotalScore > 5 || TotalScore - LastTotalScore >= 2 ? `error ${doc}` : `primary ${doc}`, class: TotalScore > 5 || TotalScore - LastTotalScore >= 2 ? `error ${doc}` : `primary ${doc}`,
}); })
}); })
filterAdlDate.forEach(({ Date, TotalScore, LastTotalScore }) => { filterAdlDate.forEach(({ Date, TotalScore, LastTotalScore }) => {
dates.push({ dates.push({
year: Date.split('-')[0], year: Date.split('-')[0],
month: Date.split('-')[1], month: Date.split('-')[1],
date: Date.split('-')[2], date: Date.split('-')[2],
class: TotalScore > 5 || TotalScore - LastTotalScore >= 2 ? 'error' : 'primary', class: TotalScore > 5 || TotalScore - LastTotalScore >= 2 ? 'error' : 'primary',
}); })
}); })
calendar.setDateStyle(dates); calendar.setDateStyle(dates)
}, },
getMedicationAlertAdl() { getMedicationAlertAdl() {
wx.ajax({ wx.ajax({
@ -199,47 +198,37 @@ Page({
}).then((res) => { }).then((res) => {
this.setData({ this.setData({
alertAdl: res, alertAdl: res,
}); })
}); })
}, },
handleWhenChangeMonth(e: { detail: { next: any } }) { handleWhenChangeMonth(e: { detail: { next: any } }) {
const current = e.detail.next; const current = e.detail.next
this.setData({ this.setData({
calendarDate: dayjs(`${current.year}-${current.month}`).format('YYYY-MM'), calendarDate: dayjs(`${current.year}-${current.month}`).format('YYYY-MM'),
}); })
this.getCale(); this.getCale()
}, },
handleChangeType(e?: WechatMiniprogram.CustomEvent) { handleChangeType(e?: WechatMiniprogram.CustomEvent) {
let type = ''; let type = ''
let callback = true; let callback = true
if (e) { if (e) {
type = e.currentTarget.dataset.type; type = e.currentTarget.dataset.type
} else { } else {
type = this.data.Type; type = this.data.Type
callback = false; callback = false
} }
let EndMonth = ''; let EndMonth = ''
let BeginMonth = ''; let BeginMonth = ''
if (type == '1') { if (type == '1') {
if (e) { EndMonth = dayjs().format('YYYY-MM-DD')
app.zdMpBehavior({ PageName: 'BTN_PATIENTHEALTHRECORDDAILYCURVE' }); 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') { } else if (type == '2') {
if (e) { EndMonth = dayjs().format('YYYY-MM')
app.zdMpBehavior({ PageName: 'BTN_PATIENTHEALTHRECORDMONTHLYCURVE' }); 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') { } else if (type == '3') {
if (e) { EndMonth = dayjs().format('YYYY')
app.zdMpBehavior({ PageName: 'BTN_PATIENTHEALTHRECORDYEARLYCURVE' }); BeginMonth = dayjs().subtract(1, 'y').format('YYYY')
}
EndMonth = dayjs().format('YYYY');
BeginMonth = dayjs().subtract(1, 'y').format('YYYY');
} else if (type == '4' && e) { } else if (type == '4' && e) {
app.zdMpBehavior({ PageName: 'BTN_PATIENTHEALTHRECORDTIMECURVE' });
} }
this.setData({ this.setData({
page: 0, page: 0,
@ -247,52 +236,49 @@ Page({
Num: '5', Num: '5',
EndMonth, EndMonth,
BeginMonth, BeginMonth,
}); })
if (callback) { if (callback) {
this.handleTabCallBack(); this.handleTabCallBack()
} }
}, },
handleChange() { handleChange() {
this.handleTabCallBack(); this.handleTabCallBack()
}, },
handleTab(e) { handleTab(e) {
const { index } = e.currentTarget.dataset; const { index } = e.currentTarget.dataset
this.setData({ this.setData({
tab: index, tab: index,
}); })
if (index == 1) { if (index == 1) {
app.zdMpBehavior({ PageName: 'BTN_PATIENTHEALTHRECORDCOMPREHENSIVEREPORT' });
} }
if (index == 2) { if (index == 2) {
app.zdMpBehavior({ PageName: 'BTN_PATIENTHEALTHRECORDDUALCOMPLIANCENOTES' });
} }
if (index == 3) { if (index == 3) {
app.zdMpBehavior({ PageName: 'BTN_PATIENTHEALTHRECORDMEDICATIONRECORD' });
} }
this.handleTabCallBack(); this.handleTabCallBack()
}, },
handleTabCallBack() { handleTabCallBack() {
const tab = this.data.tab; const tab = this.data.tab
this.setData({ this.setData({
pagination: { pagination: {
page: 1, page: 1,
pages: 1, pages: 1,
count: 1, count: 1,
}, },
}); })
if (tab == 1) { if (tab == 1) {
this.getAllList(); this.getAllList()
} }
if (tab == 2) { if (tab == 2) {
this.getList(); this.getList()
} }
if (tab == 3) { if (tab == 3) {
this.getMedicationList(); this.getMedicationList()
} }
this.getChart(); this.getChart()
}, },
getAllList(newPage = 1) { getAllList(newPage = 1) {
const { BeginMonth, EndMonth, Type, Num } = this.data; const { BeginMonth, EndMonth, Type, Num } = this.data
wx.ajax({ wx.ajax({
method: 'GET', method: 'GET',
url: '?r=zd/adl/composite-list', url: '?r=zd/adl/composite-list',
@ -305,22 +291,22 @@ Page({
page: newPage, page: newPage,
}, },
}).then((res) => { }).then((res) => {
const list = res.list; const list = res.list
list.map((item) => { list.map((item) => {
let grade = 1; let grade = 1
if (item.TotalScore < 5) { if (item.TotalScore < 5) {
grade = 1; grade = 1
} else if (item.TotalScore >= 5 && item.TotalScore < 15) { } else if (item.TotalScore >= 5 && item.TotalScore < 15) {
grade = 2; grade = 2
} else { } else {
grade = 3; grade = 3
} }
item.grade = grade; item.grade = grade
item.fold = true; item.fold = true
return item; 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({ this.setData({
list: newList, list: newList,
pagination: { pagination: {
@ -328,26 +314,26 @@ Page({
pages: res.pages, pages: res.pages,
count: res.count, count: res.count,
}, },
}); })
}); })
}, },
onReachBottom() { onReachBottom() {
const { page, pages } = this.data.pagination; const { page, pages } = this.data.pagination
const tab = this.data.tab; const tab = this.data.tab
if (pages > page) { if (pages > page) {
if (tab == 1) { if (tab == 1) {
this.getAllList(page + 1); this.getAllList(page + 1)
} }
if (tab == 2) { if (tab == 2) {
this.getList(page + 1); this.getList(page + 1)
} }
if (tab == 3) { if (tab == 3) {
this.getMedicationList(page + 1); this.getMedicationList(page + 1)
} }
} }
}, },
getList(newPage = 1) { getList(newPage = 1) {
const { BeginMonth, EndMonth, Type, Num } = this.data; const { BeginMonth, EndMonth, Type, Num } = this.data
wx.ajax({ wx.ajax({
method: 'GET', method: 'GET',
url: '?r=zd/adl/list', url: '?r=zd/adl/list',
@ -360,22 +346,22 @@ Page({
page: newPage, page: newPage,
}, },
}).then((res) => { }).then((res) => {
const list = res.list; const list = res.list
list.map((item) => { list.map((item) => {
let grade = 1; let grade = 1
if (item.TotalScore < 5) { if (item.TotalScore < 5) {
grade = 1; grade = 1
} else if (item.TotalScore >= 5 && item.TotalScore < 15) { } else if (item.TotalScore >= 5 && item.TotalScore < 15) {
grade = 2; grade = 2
} else { } else {
grade = 3; grade = 3
} }
item.grade = grade; item.grade = grade
item.fold = true; item.fold = true
item.Type = 1; item.Type = 1
return item; 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({ this.setData({
list: newList, list: newList,
pagination: { pagination: {
@ -383,11 +369,11 @@ Page({
pages: res.pages, pages: res.pages,
count: res.count, count: res.count,
}, },
}); })
}); })
}, },
getMedicationList(newPage = 1) { getMedicationList(newPage = 1) {
const { BeginMonth, EndMonth, Type, Num } = this.data; const { BeginMonth, EndMonth, Type, Num } = this.data
wx.ajax({ wx.ajax({
method: 'GET', method: 'GET',
url: '?r=zd/medication/list', url: '?r=zd/medication/list',
@ -400,22 +386,22 @@ Page({
page: newPage, page: newPage,
}, },
}).then((res) => { }).then((res) => {
const list = res.list; const list = res.list
list.map((item) => { list.map((item) => {
let grade = 1; let grade = 1
if (item.TotalScore < 5) { if (item.TotalScore < 5) {
grade = 1; grade = 1
} else if (item.TotalScore >= 5 && item.TotalScore < 15) { } else if (item.TotalScore >= 5 && item.TotalScore < 15) {
grade = 2; grade = 2
} else { } else {
grade = 3; grade = 3
} }
item.grade = grade; item.grade = grade
item.fold = true; item.fold = true
item.Type = 2; item.Type = 2
return item; 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({ this.setData({
list: newList, list: newList,
pagination: { pagination: {
@ -423,11 +409,11 @@ Page({
pages: res.pages, pages: res.pages,
count: res.count, count: res.count,
}, },
}); })
}); })
}, },
getChart() { getChart() {
const { BeginMonth, EndMonth, Type, Num } = this.data; const { BeginMonth, EndMonth, Type, Num } = this.data
wx.ajax({ wx.ajax({
method: 'GET', method: 'GET',
url: '?r=zd/adl/list', url: '?r=zd/adl/list',
@ -446,12 +432,12 @@ Page({
defaultList: res.list, defaultList: res.list,
count: res.list.length, count: res.list.length,
defaultListLast: res.list.at(-1), defaultListLast: res.list.at(-1),
}); })
const chart1 = await this.initChart(res.list); const chart1 = await this.initChart(res.list)
const chart2 = await this.initHormoneChart(res.list); const chart2 = await this.initHormoneChart(res.list)
echarts.connect([chart1, chart2]); echarts.connect([chart1, chart2])
} }
}); })
if (Number(Type) != 4) { if (Number(Type) != 4) {
wx.ajax({ wx.ajax({
method: 'GET', method: 'GET',
@ -468,65 +454,65 @@ Page({
return { return {
Date: item.InjectionDate, Date: item.InjectionDate,
...item, ...item,
}; }
}); })
const list = res.list; const list = res.list
const newList: any[] = this.mergeArr(list, medication); const newList: any[] = this.mergeArr(list, medication)
if (Number(Type) != 4) { if (Number(Type) != 4) {
this.setData({ this.setData({
defaultList: newList as never[], defaultList: newList as never[],
defaultListLast: newList.at(-1), defaultListLast: newList.at(-1),
count: list.length, count: list.length,
}); })
const chart1 = await this.initChart(newList as never[]); const chart1 = await this.initChart(newList as never[])
const chart2 = await this.initHormoneChart(newList as never[]); const chart2 = await this.initHormoneChart(newList as never[])
echarts.connect([chart1, chart2]); echarts.connect([chart1, chart2])
} }
}); })
} }
}, },
mergeArr(array1: any[] = [], array2: any[] = []) { mergeArr(array1: any[] = [], array2: any[] = []) {
// 合并两个数组中相同Date字段的对象 // 合并两个数组中相同Date字段的对象
const mergedArray: any[] = []; const mergedArray: any[] = []
const mergedMap = new Map(); const mergedMap = new Map()
array1.concat(array2).forEach((obj) => { array1.concat(array2).forEach((obj) => {
const date = obj.Date; const date = obj.Date
if (mergedMap.has(date)) { if (mergedMap.has(date)) {
mergedMap.get(date).push(obj); mergedMap.get(date).push(obj)
} else { } else {
mergedMap.set(date, [obj]); mergedMap.set(date, [obj])
} }
}); })
mergedMap.forEach((objs: any) => { mergedMap.forEach((objs: any) => {
if (objs.length === 1) { if (objs.length === 1) {
mergedArray.push(objs[0]); mergedArray.push(objs[0])
} else { } else {
const mergedObj = objs.reduce((acc, cur) => ({ ...acc, ...cur })); const mergedObj = objs.reduce((acc, cur) => ({ ...acc, ...cur }))
mergedArray.push(mergedObj); mergedArray.push(mergedObj)
} }
}); })
// 按照Date字段对合并后的数组进行排序 // 按照Date字段对合并后的数组进行排序
mergedArray.sort((a, b) => { mergedArray.sort((a, b) => {
return a.Date.localeCompare(b.Date); return a.Date.localeCompare(b.Date)
}); })
return mergedArray; return mergedArray
}, },
initChart(defaultList = []) { initChart(defaultList = []) {
const { theme } = this.data; const { theme } = this.data
const list: any = defaultList; const list: any = defaultList
return new Promise((reslove) => { return new Promise((reslove) => {
this.ecDataTrendComponent.init((canvas, width, height, dpr) => { this.ecDataTrendComponent.init((canvas, width, height, dpr) => {
const chart = echarts.init(canvas, null, { const chart = echarts.init(canvas, null, {
width, width,
height, height,
devicePixelRatio: dpr, // new devicePixelRatio: dpr, // new
}); })
canvas.setChart(chart); canvas.setChart(chart)
const option: any = { const option: any = {
tooltip: { tooltip: {
@ -574,7 +560,7 @@ Page({
data: list.map((item) => dayjs(item.Date).format('MM-DD')), data: list.map((item) => dayjs(item.Date).format('MM-DD')),
axisLabel: { axisLabel: {
formatter() { formatter() {
return ''; return ''
}, },
}, },
}, },
@ -647,7 +633,7 @@ Page({
endValue: 4, endValue: 4,
filterMode: 'none', filterMode: 'none',
}, },
}; }
if (theme === 'DRUG') { if (theme === 'DRUG') {
const markLineData = list const markLineData = list
@ -669,8 +655,8 @@ Page({
color: '#25D9C8', color: '#25D9C8',
offset: [60, 0], offset: [60, 0],
}, },
}; }
}); })
option.series.push({ option.series.push({
name: '用药', name: '用药',
data: list.map((item) => (item.InjectionBottles ? 0 : null)), data: list.map((item) => (item.InjectionBottles ? 0 : null)),
@ -693,7 +679,7 @@ Page({
symbol: ['none', 'none'], symbol: ['none', 'none'],
data: markLineData, data: markLineData,
}, },
}); })
// option.series.push({ // option.series.push({
// name: "用药时间", // name: "用药时间",
// data: list.map((item: any) => (item.InjectionBottles ? item.TotalScore : 0)), // data: list.map((item: any) => (item.InjectionBottles ? item.TotalScore : 0)),
@ -715,23 +701,23 @@ Page({
// }); // });
} }
chart.setOption(option); chart.setOption(option)
reslove(chart); reslove(chart)
return chart; return chart
}); })
}); })
}, },
initHormoneChart(defaultList = []) { initHormoneChart(defaultList = []) {
const { theme } = this.data; const { theme } = this.data
const list: any = defaultList; const list: any = defaultList
return new Promise((reslove) => { return new Promise((reslove) => {
this.ecDataHormoneComponent.init((canvas, width, height, dpr) => { this.ecDataHormoneComponent.init((canvas, width, height, dpr) => {
const chart = echarts.init(canvas, null, { const chart = echarts.init(canvas, null, {
width, width,
height, height,
devicePixelRatio: dpr, // new devicePixelRatio: dpr, // new
}); })
canvas.setChart(chart); canvas.setChart(chart)
const option: any = { const option: any = {
tooltip: { tooltip: {
@ -784,12 +770,12 @@ Page({
type: 'value', type: 'value',
minInterval: 1, minInterval: 1,
max(value) { max(value) {
return value.max + 20 > 999 ? 999 : value.max + 20; return value.max + 20 > 999 ? 999 : value.max + 20
}, },
axisLabel: { axisLabel: {
// width: 20, // width: 20,
formatter(value: number) { formatter(value: number) {
return value; return value
}, },
}, },
}, },
@ -811,7 +797,7 @@ Page({
color: '#18474e', color: '#18474e',
z: 11, z: 11,
formatter({ value }) { formatter({ value }) {
return `${value}mg`; return `${value}mg`
}, },
}, },
itemStyle: { itemStyle: {
@ -860,7 +846,7 @@ Page({
endValue: 4, endValue: 4,
filterMode: 'none', filterMode: 'none',
}, },
}; }
if (theme === 'DRUG') { if (theme === 'DRUG') {
const markLineData = list const markLineData = list
.filter((item) => item.InjectionBottles) .filter((item) => item.InjectionBottles)
@ -880,9 +866,9 @@ Page({
color: '#25D9C8', color: '#25D9C8',
offset: [60, 0], offset: [60, 0],
}, },
}; }
}); })
const maxValue = Math.max(...list.map((item) => item.SteroidDailyDose)); const maxValue = Math.max(...list.map((item) => item.SteroidDailyDose))
option.series.push({ option.series.push({
name: '用药', name: '用药',
data: list.map((item) => (item.InjectionBottles ? 0 : null)), data: list.map((item) => (item.InjectionBottles ? 0 : null)),
@ -905,7 +891,7 @@ Page({
symbol: ['none', 'none'], symbol: ['none', 'none'],
data: markLineData, data: markLineData,
}, },
}); })
// option.series.push({ // option.series.push({
// name: "用药时间", // name: "用药时间",
// data: list.map((item: any) => (item.InjectionBottles ? item.TotalScore : 0)), // data: list.map((item: any) => (item.InjectionBottles ? item.TotalScore : 0)),
@ -927,68 +913,66 @@ Page({
// }); // });
} }
chart.setOption(option); chart.setOption(option)
reslove(chart); reslove(chart)
return chart; return chart
}); })
}); })
}, },
touchend(e) { touchend(e) {
const { type } = e.currentTarget.dataset; const { type } = e.currentTarget.dataset
const { page, defaultList } = this.data; const { page, defaultList } = this.data
if (type == 'left' && page > 0) { if (type == 'left' && page > 0) {
this.setData({ this.setData({
page: page - 1, page: page - 1,
}); })
this.initChart(defaultList); this.initChart(defaultList)
this.initHormoneChart(defaultList); this.initHormoneChart(defaultList)
} else if (type == 'right' && page < defaultList.length / 5 - 1) { } else if (type == 'right' && page < defaultList.length / 5 - 1) {
this.setData({ this.setData({
page: page + 1, page: page + 1,
}); })
this.initChart(defaultList); this.initChart(defaultList)
this.initHormoneChart(defaultList); this.initHormoneChart(defaultList)
} }
}, },
handleFoldAll() { handleFoldAll() {
const { list } = this.data; const { list } = this.data
this.setData({ this.setData({
list: list.map((item) => { list: list.map((item) => {
item.fold = !this.data.foldAll; item.fold = !this.data.foldAll
return item; return item
}), }),
foldAll: !this.data.foldAll, foldAll: !this.data.foldAll,
}); })
}, },
handleFold(e) { handleFold(e) {
const { index } = e.currentTarget.dataset; const { index } = e.currentTarget.dataset
this.setData({ this.setData({
[`list[${index}].fold`]: !this.data.list[index].fold, [`list[${index}].fold`]: !this.data.list[index].fold,
}); })
}, },
handleDetail(e) { handleDetail(e) {
const { id, isi } = e.currentTarget.dataset; const { id, isi } = e.currentTarget.dataset
const tab = this.data.tab; const tab = this.data.tab
if (isi == 1) { if (isi == 1) {
return; return
} }
if (tab == 1) { if (tab == 1) {
app.zdMpBehavior({ PageName: 'BTN_PATIENTHEALTHRECORDREPORTLIST' });
} }
if (tab == 2) { if (tab == 2) {
app.zdMpBehavior({ PageName: 'BTN_PATIENTHEALTHRECORDNOTESLIST' });
} }
wx.navigateTo({ wx.navigateTo({
url: `/patient/pages/adlResult/index?id=${id}`, url: `/patient/pages/adlResult/index?id=${id}`,
}); })
}, },
handleDel(e) { handleDel(e) {
const { id, index, isi } = e.currentTarget.dataset; const { id, index, isi } = e.currentTarget.dataset
if (isi == 1) { if (isi == 1) {
return; return
} }
if (index != 0) return; if (index != 0) return
wx.showModal({ wx.showModal({
title: '确认删除?', title: '确认删除?',
confirmColor: '#8c75d0', confirmColor: '#8c75d0',
@ -1001,50 +985,48 @@ Page({
Id: id, Id: id,
}, },
}).then(() => { }).then(() => {
this.handleTabCallBack(); this.handleTabCallBack()
}); })
} }
}, },
}); })
}, },
handleAdd() { handleAdd() {
app.zdMpBehavior({ PageName: 'BTN_PATIENTHEALTHRECORDASSESSMENT' });
wx.navigateTo({ wx.navigateTo({
url: '/patient/pages/adl/index', url: '/patient/pages/adl/index',
}); })
}, },
handleAddDrug() { handleAddDrug() {
app.zdMpBehavior({ PageName: 'BTN_PATIENTHEALTHRECORDMEDICATION' });
wx.navigateTo({ wx.navigateTo({
url: '/patient/pages/drugRecord/index', url: '/patient/pages/drugRecord/index',
}); })
}, },
handleChartDetail() { handleChartDetail() {
const that = this; const that = this
wx.navigateTo({ wx.navigateTo({
url: '/gift/pages/myHealthRecordChart/index', url: '/gift/pages/myHealthRecordChart/index',
success(res) { success(res) {
res.eventChannel.emit('acceptDataFromOpenerPage', { res.eventChannel.emit('acceptDataFromOpenerPage', {
list: that.data.defaultList, list: that.data.defaultList,
selectLegends: that.data.selectLegends, selectLegends: that.data.selectLegends,
}); })
}, },
}); })
}, },
handleDetailDrug(e) { handleDetailDrug(e) {
const { id, isi } = e.currentTarget.dataset; const { id, isi } = e.currentTarget.dataset
app.zdMpBehavior({ PageName: 'BTN_PATIENTHEALTHRECORDMEDICATIONLIST' });
if (isi == 1) { if (isi == 1) {
return; return
} }
wx.navigateTo({ wx.navigateTo({
url: `/patient/pages/drugRecord/index?id=${id}`, url: `/patient/pages/drugRecord/index?id=${id}`,
}); })
}, },
handleDelDrug(e) { handleDelDrug(e) {
const { id, isi } = e.currentTarget.dataset; const { id, isi } = e.currentTarget.dataset
if (isi == 1) { if (isi == 1) {
return; return
} }
wx.showModal({ wx.showModal({
title: '确认删除?', title: '确认删除?',
@ -1058,34 +1040,33 @@ Page({
Id: id, Id: id,
}, },
}).then(() => { }).then(() => {
this.handleTabCallBack(); this.handleTabCallBack()
}); })
} }
}, },
}); })
}, },
toggleFold() { toggleFold() {
this.setData({ this.setData({
fold: !this.data.fold, fold: !this.data.fold,
}); })
}, },
handleShare() { handleShare() {
app.zdMpBehavior({ PageName: 'BTN_PATIENTHEALTHRECORDSHAREDUALCOMPLIANCEPOSTER' });
wx.navigateTo({ wx.navigateTo({
url: '/patient/pages/adlShare/index', url: '/patient/pages/adlShare/index',
}); })
}, },
handleBack() { handleBack() {
wx.navigateBack({ wx.navigateBack({
fail() { fail() {
wx.reLaunch({ url: '/patient/pages/index/index' }); wx.reLaunch({ url: '/patient/pages/index/index' })
}, },
}); })
}, },
onShareAppMessage() { onShareAppMessage() {
return { return {
title: 'MG-ADL测评表:评估重症肌无力患者症状对生活质量的影响', title: 'MG-ADL测评表:评估重症肌无力患者症状对生活质量的影响',
path: '/patient/pages/adl/index', path: '/patient/pages/adl/index',
}; }
}, },
}); })

10
src/pages/d_interactive/index.ts

@ -18,7 +18,7 @@ Page({
}); });
}, },
handleTapSearch() { handleTapSearch() {
app.zdMpBehavior({ doctor: true, PageName: 'BTN_DOCTORINTERACTIONSEARCH' });
}, },
handleSearch() { handleSearch() {
this.setData({ this.setData({
@ -41,13 +41,13 @@ Page({
getList(newPage = 1) { getList(newPage = 1) {
const { active } = this.data; const { active } = this.data;
if (active == '' && newPage == 1) { if (active == '' && newPage == 1) {
app.zdMpBehavior({ doctor: true, PageName: 'PG_DOCTORINTERACTIONALL' });
} }
if (active == '1' && newPage == 1) { if (active == '1' && newPage == 1) {
app.zdMpBehavior({ doctor: true, PageName: 'PG_DOCTORINTERACTIONREAD' });
} }
if (active == '2' && newPage == 1) { if (active == '2' && newPage == 1) {
app.zdMpBehavior({ doctor: true, PageName: 'PG_DOCTORINTERACTIONUNREAD' });
} }
wx.ajax({ wx.ajax({
method: 'GET', method: 'GET',
@ -77,7 +77,7 @@ Page({
} }
}, },
handleDetail(e) { handleDetail(e) {
app.zdMpBehavior({ doctor: true, PageName: 'BTN_DOCTORINTERACTIONVIEW' });
const { index } = e.currentTarget.dataset; const { index } = e.currentTarget.dataset;
const { list } = this.data; const { list } = this.data;
const listItem: any = list[index]; const listItem: any = list[index];

8
src/pages/d_interactiveDoctor/index.ts

@ -54,7 +54,7 @@ Page({
}, },
onShow() { onShow() {
app.waitLogin({ type: [2] }).then((_res) => { app.waitLogin({ type: [2] }).then((_res) => {
app.zdMpBehavior({ doctor: true, PageName: 'PG_DOCTORINTERACTIONDETAIL' })
this.getDoctorDetail() this.getDoctorDetail()
this.getPatientDetail() this.getPatientDetail()
this.getMessageList() this.getMessageList()
@ -168,7 +168,7 @@ Page({
}) })
}, },
handleSendDate() { handleSendDate() {
app.zdMpBehavior({ doctor: true, PageName: 'BTN_DOCTORINTERACTIONDETAILMYCLINICTIME' })
const { const {
messageList, messageList,
doctor: { Clinic }, doctor: { Clinic },
@ -223,7 +223,7 @@ Page({
}) })
}, },
handleSendShow() { handleSendShow() {
app.zdMpBehavior({ doctor: true, PageName: 'BTN_DOCTORINTERACTIONDETAILSENDMESSAGE' })
this.setData({ this.setData({
messageListShow: true, messageListShow: true,
}) })
@ -360,7 +360,7 @@ Page({
}) })
}, },
handlePatientDetail() { handlePatientDetail() {
app.zdMpBehavior({ doctor: true, PageName: 'BTN_DOCTORINTERACTIONDETAILPATIENTFILE' })
wx.navigateTo({ wx.navigateTo({
url: `/pages/d_patientDetail/index?id=${this.data.patientId}`, url: `/pages/d_patientDetail/index?id=${this.data.patientId}`,
}) })

2
src/pages/d_invite/index.ts

@ -21,7 +21,7 @@ Page({
wx.showLoading({ wx.showLoading({
title: '加载中', title: '加载中',
}) })
app.zdMpBehavior({ doctor: true, PageName: 'PG_DOCTORINVITEPATIENT' })
this.getDetail() this.getDetail()
}) })
}, },

8
src/pages/d_patient/index.ts

@ -59,7 +59,7 @@ Page({
}, },
onShow() { onShow() {
app.waitLogin().then((_res) => { app.waitLogin().then((_res) => {
app.zdMpBehavior({ doctor: true, PageName: 'PG_DOCTORPATIENTLIST' })
this.getList() this.getList()
app.getUserInfo(2).then((userInfo) => { app.getUserInfo(2).then((userInfo) => {
this.setData({ this.setData({
@ -99,7 +99,7 @@ Page({
this.getList() this.getList()
}, },
handleTapSearch() { handleTapSearch() {
app.zdMpBehavior({ doctor: true, PageName: 'BTN_DOCTORPATIENTLISTSEARCH' })
}, },
handleNav(e) { handleNav(e) {
const { active } = e.currentTarget.dataset const { active } = e.currentTarget.dataset
@ -185,7 +185,7 @@ Page({
}) })
}, },
handleDetail(e: any) { handleDetail(e: any) {
app.zdMpBehavior({ doctor: true, PageName: 'BTN_DOCTORPATIENTLISTVIEW' })
const { index } = e.currentTarget.dataset const { index } = e.currentTarget.dataset
const item = this.data.list[index] const item = this.data.list[index]
@ -200,7 +200,7 @@ Page({
}) })
}, },
handleSendGroup() { handleSendGroup() {
app.zdMpBehavior({ doctor: true, PageName: 'BTN_DOCTORPATIENTLISTMASSMESSAGE' })
wx.navigateTo({ wx.navigateTo({
url: '/pages/d_taskList/index', url: '/pages/d_taskList/index',
}) })

12
src/pages/d_patientDetail/index.ts

@ -167,7 +167,7 @@ Page({
}) })
app.waitLogin({ type: [2] }).then(async (_res) => { app.waitLogin({ type: [2] }).then(async (_res) => {
app.zdMpBehavior({ doctor: true, PageName: 'PG_DOCTORPATIENTDETAIL' })
this.getDoctorDetail() this.getDoctorDetail()
await this.getDetail() await this.getDetail()
app.getUserInfo(2).then((userInfo) => { app.getUserInfo(2).then((userInfo) => {
@ -887,7 +887,7 @@ Page({
}) })
}, },
handleRemark() { handleRemark() {
app.zdMpBehavior({ doctor: true, PageName: 'BTN_DOCTORPATIENTDETAILREMARK' })
this.setData({ this.setData({
popupRemarkShow: true, popupRemarkShow: true,
remark: this.data.detail.DoctorRemark, remark: this.data.detail.DoctorRemark,
@ -926,7 +926,7 @@ Page({
}, },
handleEditUser() { handleEditUser() {
app.zdMpBehavior({ doctor: true, PageName: 'BTN_DOCTORPATIENTDETAILEDIT' })
this.setData({ this.setData({
popupEditShow: true, popupEditShow: true,
}) })
@ -971,7 +971,7 @@ Page({
wx.navigateBack() wx.navigateBack()
}, },
handleSend() { handleSend() {
app.zdMpBehavior({ doctor: true, PageName: 'BTN_DOCTORPATIENTDETAILMESSAGE' })
wx.navigateTo({ wx.navigateTo({
url: `/pages/d_interactiveDoctor/index?patientId=${this.data.detail.PatientId}`, url: `/pages/d_interactiveDoctor/index?patientId=${this.data.detail.PatientId}`,
}) })
@ -980,10 +980,10 @@ Page({
handleNav(e, mp = true) { handleNav(e, mp = true) {
const { index } = e.currentTarget.dataset const { index } = e.currentTarget.dataset
if (index == 0 && mp) { if (index == 0 && mp) {
app.zdMpBehavior({ doctor: true, PageName: 'BTN_DOCTORPATIENTDETAILREPORTGUIDE' })
} }
if (index == 1 && mp) { if (index == 1 && mp) {
app.zdMpBehavior({ doctor: true, PageName: 'BTN_DOCTORPATIENTDETAILNOTEGUIDE' })
} }
this.setData({ this.setData({
nav: index, nav: index,

6
src/pages/d_userInfo/index.ts

@ -57,7 +57,7 @@ Page({
onLoad() {}, onLoad() {},
onShow() { onShow() {
app.waitLogin({ type: [2] }).then((_res) => { app.waitLogin({ type: [2] }).then((_res) => {
app.zdMpBehavior({ doctor: true, PageName: 'PG_DOCTORPERSONALINFO' })
this.getDetail() this.getDetail()
}) })
}, },
@ -120,7 +120,7 @@ Page({
this.handleWeekIntroduceSubmit() this.handleWeekIntroduceSubmit()
}, },
handleChangePhone() { handleChangePhone() {
app.zdMpBehavior({ doctor: true, PageName: 'BTN_DOCTORPERSONALINFOCHANGEPHONE' })
wx.navigateTo({ wx.navigateTo({
url: '/doctor/pages/d_changePhone/index', url: '/doctor/pages/d_changePhone/index',
}) })
@ -201,7 +201,7 @@ Page({
this.getDetail() this.getDetail()
}, },
handleSwitch() { handleSwitch() {
app.zdMpBehavior({ doctor: true, PageName: 'BTN_DOCTORPERSONALINFOSWITCHACCOUNT' })
wx.navigateTo({ wx.navigateTo({
url: '/doctor/pages/d_changeDoctor/index', url: '/doctor/pages/d_changeDoctor/index',
}) })

12
src/pages/home/index.ts

@ -101,7 +101,7 @@ Page({
data: {}, data: {},
}).then((res) => { }).then((res) => {
if (res.list.length) { 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({ this.setData({
notice: res.list.map((item) => { notice: res.list.map((item) => {
@ -121,7 +121,7 @@ Page({
handleNoticeDetail(e) { handleNoticeDetail(e) {
const { index } = e.currentTarget.dataset const { index } = e.currentTarget.dataset
const { Id, Url } = this.data.notice[index] 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) { if (Url) {
wx.navigateTo({ wx.navigateTo({
url: Url, url: Url,
@ -143,7 +143,7 @@ Page({
const { Id } = this.data.notice[current] || {} const { Id } = this.data.notice[current] || {}
if (Id) { if (Id) {
app.mpBehavior({ PositionId: '4', OperateType: '4', OperateId: Id }) app.oldMpBehavior({ PositionId: '4', OperateType: '4', OperateId: Id })
} }
}, },
getBanner() { getBanner() {
@ -241,14 +241,14 @@ Page({
title: '加载中', title: '加载中',
mask: true, 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) this.handleFile(params)
}, },
handleDetail(e: any) { handleDetail(e: any) {
const { id, index } = e.currentTarget.dataset const { id, index } = e.currentTarget.dataset
const params = this.data.list[index] const params = this.data.list[index]
if (params.ContentType === '5' && params.FileList[0]) { 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]) this.handleFile(params.FileList[0])
} else { } else {
wx.navigateTo({ wx.navigateTo({
@ -330,7 +330,7 @@ Page({
onShareAppMessage(e) { onShareAppMessage(e) {
if (e.from === 'button') { if (e.from === 'button') {
const { Title, CoverImgUrl, Id } = e.target.dataset.params 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 { return {
title: Title, title: Title,
path: `/pages/informationDetail/index?id=${Id}`, path: `/pages/informationDetail/index?id=${Id}`,

4
src/pages/information/index.ts

@ -60,7 +60,7 @@ Page({
const { id, index } = e.currentTarget.dataset; const { id, index } = e.currentTarget.dataset;
const params = this.data.list[index]; const params = this.data.list[index];
if (params.ContentType === '5' && params.FileList[0]) { 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]); this.handleFile(params.FileList[0]);
} else { } else {
wx.navigateTo({ wx.navigateTo({
@ -108,7 +108,7 @@ Page({
onShareAppMessage(e) { onShareAppMessage(e) {
if (e.from === 'button') { if (e.from === 'button') {
const { Title, CoverImgUrl, Id } = e.target.dataset.params; 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 { return {
title: Title, title: Title,
path: `/pages/informationDetail/index?id=${Id}`, path: `/pages/informationDetail/index?id=${Id}`,

6
src/pages/informationDetail/index.ts

@ -40,7 +40,7 @@ Page({
id: options.id, id: options.id,
}); });
app.waitLogin({ type: [2] }).then(() => { 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(); this.getDetail();
}); });
}, },
@ -116,7 +116,7 @@ Page({
title: '加载中', title: '加载中',
mask: true, 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({ wx.downloadFile({
url: params.FileUrl, url: params.FileUrl,
filePath: `${wx.env.USER_DATA_PATH}/${params.FileName}`, filePath: `${wx.env.USER_DATA_PATH}/${params.FileName}`,
@ -161,7 +161,7 @@ Page({
onShareAppMessage() { onShareAppMessage() {
const { Title, CoverImgUrl, Id } = this.data.detail; 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 { return {
title: Title, title: Title,
path: `/pages/informationDetail/index?id=${Id}`, path: `/pages/informationDetail/index?id=${Id}`,

2
src/pages/message/index.ts

@ -18,7 +18,7 @@ Page({
handleDetail(e) { handleDetail(e) {
const { index } = e.currentTarget.dataset; const { index } = e.currentTarget.dataset;
const { Id, Url } = this.data.list[index]; 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) { if (Url) {
wx.navigateTo({ wx.navigateTo({
url: Url, url: Url,

8
src/patient/pages/adl/index.ts

@ -27,7 +27,7 @@ Page({
nrdl: options.nrdl, nrdl: options.nrdl,
}); });
app.waitLogin({ type: [0, 1] }).then(() => { app.waitLogin({ type: [0, 1] }).then(() => {
app.zdMpBehavior({ PageName: 'PG_PATIENTASSESSMENTSTART' });
app.getZdUserInfo(this, true); app.getZdUserInfo(this, true);
this.getAdlScore(); this.getAdlScore();
if (options.adlPushId) { if (options.adlPushId) {
@ -39,7 +39,7 @@ Page({
} }
if (options.es === '201502') { if (options.es === '201502') {
app.globalData.IsAliQiWei = 1; app.globalData.IsAliQiWei = 1;
app.zdMpBehavior({ PageName: 'JUMP_INSURANCE_ADL_PAGE' });
} }
}); });
}, },
@ -87,13 +87,13 @@ Page({
} }
}, },
handleShare() { handleShare() {
app.zdMpBehavior({ PageName: 'BTN_PATIENTASSESSMENTSTARTSHARE' });
wx.navigateTo({ wx.navigateTo({
url: '/patient/pages/adlShare/index', url: '/patient/pages/adlShare/index',
}); });
}, },
handleTest() { handleTest() {
app.zdMpBehavior({ PageName: 'BTN_PATIENTASSESSMENTSTART' });
wx.navigateTo({ wx.navigateTo({
url: `/patient/pages/adlTest/index?m_d=${this.data.m_d}&nrdl=${this.data.nrdl}`, url: `/patient/pages/adlTest/index?m_d=${this.data.m_d}&nrdl=${this.data.nrdl}`,
}); });

10
src/patient/pages/adlResult/index.ts

@ -92,7 +92,7 @@ Page({
idafa: options.idafa === '1', idafa: options.idafa === '1',
}); });
app.waitLogin({ type: [0, 1] }).then(() => { app.waitLogin({ type: [0, 1] }).then(() => {
app.zdMpBehavior({ PageName: 'PG_PATIENTASSESSMENTRESULTS' });
app.getZdUserInfo(this, false); app.getZdUserInfo(this, false);
this.getUnreadCount(); this.getUnreadCount();
this.getDetail(); this.getDetail();
@ -222,7 +222,7 @@ Page({
app.zdPermissionVerification(3, 2, ``).then(() => {}); app.zdPermissionVerification(3, 2, ``).then(() => {});
}, },
handleMyHealth() { handleMyHealth() {
app.zdMpBehavior({ PageName: 'BTN_PATIENTASSESSMENTRESULTGETNOTES' });
wx.navigateTo({ wx.navigateTo({
url: '/patient/pages/myHealthRecord/index', url: '/patient/pages/myHealthRecord/index',
}); });
@ -251,17 +251,17 @@ Page({
routerTo(e) { routerTo(e) {
const { url } = e.currentTarget.dataset; const { url } = e.currentTarget.dataset;
if (url === '/patient/pages/interactivePatient/index') { if (url === '/patient/pages/interactivePatient/index') {
app.zdMpBehavior({ PageName: 'BTN_PATIENTASSESSMENTRESULTDOCTORCARD' });
} }
if (url === '/patient/pages/webview/index') { if (url === '/patient/pages/webview/index') {
app.zdMpBehavior({ PageName: 'BTN_PATIENTASSESSMENTRESULTAPPLYINSURANCE' });
} }
wx.navigateTo({ wx.navigateTo({
url, url,
}); });
}, },
hanldeCodeLong() { hanldeCodeLong() {
app.zdMpBehavior({ PageName: 'BTN_PATIENTASSESSMENTRESULTQRCODELONGPRESS' });
}, },
onShareAppMessage() { onShareAppMessage() {
return { return {

4
src/patient/pages/adlShare/index.ts

@ -19,7 +19,7 @@ Page({
}) })
} }
app.zdWaitLogin({ loginPage: true }).then(() => { app.zdWaitLogin({ loginPage: true }).then(() => {
app.zdMpBehavior({ PageName: 'PG_PATIENTPOSTER' })
app.getZdUserInfo(this, true, () => { app.getZdUserInfo(this, true, () => {
this.getPoster() this.getPoster()
}) })
@ -47,7 +47,7 @@ Page({
}, },
handleDownload() { handleDownload() {
const that = this const that = this
app.zdMpBehavior({ PageName: 'BTN_PATIENTPOSTERDOWNLOAD' })
wx.getSetting({ wx.getSetting({
success(res) { success(res) {
console.log(res) console.log(res)

4
src/patient/pages/adlTest/index.ts

@ -280,7 +280,7 @@ Page({
}); });
}, },
handleSubmit() { handleSubmit() {
app.zdMpBehavior({ PageName: 'BTN_PATIENTASSESSMENTQ9COMPLETE' });
wx.showLoading({ wx.showLoading({
title: '提交中', title: '提交中',
}); });
@ -407,6 +407,6 @@ Page({
7: 'PG_PATIENTASSESSMENTQ8', 7: 'PG_PATIENTASSESSMENTQ8',
8: 'PG_PATIENTASSESSMENTQ9', 8: 'PG_PATIENTASSESSMENTQ9',
}[index]; }[index];
app.zdMpBehavior({ PageName });
}, },
}); });

18
src/patient/pages/doctor/index.ts

@ -49,7 +49,7 @@ Page({
app.zdWaitLogin().then((_res) => { app.zdWaitLogin().then((_res) => {
if (options.es === '201504') { if (options.es === '201504') {
app.globalData.IsAliQiWei = 1 app.globalData.IsAliQiWei = 1
app.zdMpBehavior({ PageName: 'PG_PATIENTVISITMAP_PAGE' })
this.setData({ this.setData({
es: options.es, es: options.es,
}) })
@ -60,7 +60,7 @@ Page({
tabActive: Number(options.active), tabActive: Number(options.active),
}) })
} else { } else {
app.zdMpBehavior({ PageName: 'PG_PATIENTVISITMAPLIST' })
} }
if (options.pid) { if (options.pid) {
this.setData({ this.setData({
@ -155,7 +155,7 @@ Page({
}) })
}, },
handleTapSite() { handleTapSite() {
app.zdMpBehavior({ PageName: 'BTN_PATIENTVISITMAPCHANGEAREA' })
}, },
handleChangeSite(e: WechatMiniprogram.CustomEvent) { handleChangeSite(e: WechatMiniprogram.CustomEvent) {
const detail = e.detail const detail = e.detail
@ -170,11 +170,11 @@ Page({
onChange(e: WechatMiniprogram.CustomEvent) { onChange(e: WechatMiniprogram.CustomEvent) {
const index = e.detail.index const index = e.detail.index
if (index == 0) { if (index == 0) {
app.zdMpBehavior({ PageName: 'PG_PATIENTVISITMAPLIST' })
} else if (index == 1) { } else if (index == 1) {
app.zdMpBehavior({ PageName: 'PG_PATIENTVISITMAPDUALCHANNELPHARMACY' })
} else if (index == 2) { } else if (index == 2) {
app.zdMpBehavior({ PageName: 'PG_PATIENTVISITMAPDOCTORS' })
} }
this.setData({ this.setData({
tabActive: index, tabActive: index,
@ -320,11 +320,11 @@ Page({
const { url } = e.currentTarget.dataset const { url } = e.currentTarget.dataset
const { tabActive } = this.data const { tabActive } = this.data
if (tabActive == 0) { if (tabActive == 0) {
app.zdMpBehavior({ PageName: 'BTN_PATIENTVISITMAPLIST' })
} else if (tabActive == 1) { } else if (tabActive == 1) {
app.zdMpBehavior({ PageName: 'BTN_PATIENTVISITMAPDUALCHANNELPHARMACY' })
} else if (tabActive == 2) { } else if (tabActive == 2) {
app.zdMpBehavior({ PageName: 'BTN_PATIENTVISITMAPDOCTORS' })
} }
wx.navigateTo({ wx.navigateTo({
url, url,

2
src/patient/pages/doctor/siteShare/index.ts

@ -215,7 +215,7 @@ Component({
}, },
methods: { methods: {
handleShow() { handleShow() {
app.zdMpBehavior({ PageName: 'BTN_PATIENTVISITMAPDIRECTSHARE' })
this.setData({ this.setData({
show: true, show: true,
ProvinceName: this.data.pname || '', ProvinceName: this.data.pname || '',

4
src/patient/pages/enterInfo/index.ts

@ -41,7 +41,7 @@ Page({
ageRange: zdUserInfo.AgeRange, ageRange: zdUserInfo.AgeRange,
}) })
}) })
app.zdMpBehavior({ PageName: 'PG_PATIENTINFOENTRY' })
}) })
}, },
getDict() { getDict() {
@ -87,7 +87,7 @@ Page({
}, },
handleSubmit() { handleSubmit() {
if (this.data.submiting) return if (this.data.submiting) return
app.zdMpBehavior({ PageName: 'BTN_PATIENTINFONEXT' })
const { name, gender, ageRange, relationType, IsGraves, HasTedSurgery } = this.data const { name, gender, ageRange, relationType, IsGraves, HasTedSurgery } = this.data
const { registrationSource, registChannel, regBusinessId, WorkerId, IsAliQiWei } = app.globalData const { registrationSource, registChannel, regBusinessId, WorkerId, IsAliQiWei } = app.globalData
const { doctorId, inviteChan } = app.globalData.scene const { doctorId, inviteChan } = app.globalData.scene

4
src/patient/pages/family/index.ts

@ -19,7 +19,7 @@ Page({
}, },
onLoad() { onLoad() {
app.zdWaitLogin().then(() => { app.zdWaitLogin().then(() => {
app.zdMpBehavior({ PageName: 'PG_PATIENTMYRELATIVES' })
this.getMpInfo() this.getMpInfo()
}) })
}, },
@ -47,7 +47,7 @@ Page({
routerTo(e) { routerTo(e) {
const { url } = e.currentTarget.dataset const { url } = e.currentTarget.dataset
if (url === '/patient/pages/familyList/index') { if (url === '/patient/pages/familyList/index') {
app.zdMpBehavior({ PageName: 'BTN_PATIENTFAMILYMEMBERSVIEW' })
} }
wx.navigateTo({ wx.navigateTo({
url, url,

2
src/patient/pages/familyList/index.ts

@ -12,7 +12,7 @@ Page({
}, },
onLoad() { onLoad() {
app.zdWaitLogin().then(() => { app.zdWaitLogin().then(() => {
app.zdMpBehavior({ PageName: 'PG_PATIENTMYRELATIVESLIST' })
this.getFamilyList(); this.getFamilyList();
app.getZdUserInfo(this); app.getZdUserInfo(this);
}); });

32
src/patient/pages/index/index.ts

@ -70,14 +70,14 @@ Page({
}, },
onShow() { onShow() {
app.waitLogin({ type: [0, 1] }).then(() => { app.waitLogin({ type: [0, 1] }).then(() => {
app.zdMpBehavior({ PageName: 'PG_PATIENTHOME' })
this.setData({ this.setData({
anyWhere: app.globalData.anyWhere, anyWhere: app.globalData.anyWhere,
isLogin: app.globalData.isLogin, isLogin: app.globalData.isLogin,
}) })
if (this.data.options.es === '201501') { if (this.data.options.es === '201501') {
app.globalData.IsAliQiWei = 1 app.globalData.IsAliQiWei = 1
app.zdMpBehavior({ PageName: 'JUMP_PATIENT_HOME_INDEX' })
this.setData({ this.setData({
options: {}, options: {},
}) })
@ -291,43 +291,43 @@ Page({
let { url, active, code } = e.currentTarget.dataset let { url, active, code } = e.currentTarget.dataset
if (!url) return if (!url) return
if (code === 'adl') { if (code === 'adl') {
app.zdMpBehavior({ PageName: 'BTN_PATIENTHOMEADLMODULE' })
} }
if (code === 'drugs') { if (code === 'drugs') {
app.zdMpBehavior({ PageName: 'BTN_PATIENTHOMEMEDICATIONMODULE' })
} }
if (code === 'story' && url === '/patient/pages/story/index') { if (code === 'story' && url === '/patient/pages/story/index') {
app.zdMpBehavior({ PageName: 'BTN_PATIENTHOMESTORIESVIEWALL' })
} }
if (code === 'story' && url.includes('/patient/pages/publishStoryDetail/index')) { if (code === 'story' && url.includes('/patient/pages/publishStoryDetail/index')) {
app.zdMpBehavior({ PageName: 'BTN_PATIENTHOMESTORYCLICK' })
} }
if (code === 'activity2' && url === '/patient/pages/live/index') { if (code === 'activity2' && url === '/patient/pages/live/index') {
app.zdMpBehavior({ PageName: 'BTN_PATIENTHOMEONLINEACTIVITIESVIEWALL' })
} }
if (code === 'activity2' && url === '/patient/pages/live/index?index=0') { if (code === 'activity2' && url === '/patient/pages/live/index?index=0') {
app.zdMpBehavior({ PageName: 'BTN_PATIENTHOMEONLINEACTIVITIESMONTHLYPOSTER' })
} }
if (code === 'activity2' && url.includes('/patient/pages/liveDetail/index')) { if (code === 'activity2' && url.includes('/patient/pages/liveDetail/index')) {
app.zdMpBehavior({ PageName: 'BTN_PATIENTHOMEONLINEACTIVITIESCARD' })
} }
if (code === 'activity1' && url === '/patient/pages/live/index') { if (code === 'activity1' && url === '/patient/pages/live/index') {
app.zdMpBehavior({ PageName: 'BTN_PATIENTHOMEOFFLINEACTIVITIESVIEWALL' })
} }
if (code === 'activity1' && url.includes('/patient/pages/liveDetail/index')) { if (code === 'activity1' && url.includes('/patient/pages/liveDetail/index')) {
app.zdMpBehavior({ PageName: 'BTN_PATIENTHOMEOFFLINEACTIVITIESCARD' })
} }
if (code === 'article' && url === '/patient/pages/repository/index') { if (code === 'article' && url === '/patient/pages/repository/index') {
app.zdMpBehavior({ PageName: 'BTN_PATIENTHOMERECOMMENDEDREADINGVIEWALL' })
} }
if (code === 'article' && url.includes('/patient/pages/repositoryDetail/index')) { if (code === 'article' && url.includes('/patient/pages/repositoryDetail/index')) {
app.zdMpBehavior({ PageName: 'BTN_PATIENTHOMERECOMMENDEDREADINGARTICLE' })
} }
if (code === 'serviceConf') { if (code === 'serviceConf') {
app.zdMpBehavior({ PageName: 'BTN_PATIENTHOMESERVICE' })
} }
if (url === '/patient/pages/interactivePatient/index') { if (url === '/patient/pages/interactivePatient/index') {
app.zdMpBehavior({ PageName: 'BTN_PATIENTHOMEDOCTORCARD' })
} }
if (url === 'NRDL') { if (url === 'NRDL') {
@ -533,7 +533,7 @@ Page({
spread1: 'BTN_PATIENTHOMEBANNER1', spread1: 'BTN_PATIENTHOMEBANNER1',
spread2: 'BTN_PATIENTHOMEBANNER2', spread2: 'BTN_PATIENTHOMEBANNER2',
}[code] }[code]
app.zdMpBehavior({ PageName })
}, },
handleRegClose() { handleRegClose() {
this.setData({ this.setData({

4
src/patient/pages/interactivePatient/index.ts

@ -54,7 +54,7 @@ Page({
useWebAudioImplement: true, useWebAudioImplement: true,
}) })
app.waitLogin({ type: [1] }).then(() => { app.waitLogin({ type: [1] }).then(() => {
app.zdMpBehavior({ PageName: 'PG_PATIENTINTERACTIONDETAILS' })
this.getDoctorDetail() this.getDoctorDetail()
this.getQuestionList() this.getQuestionList()
this.getMessageList() this.getMessageList()
@ -288,7 +288,7 @@ Page({
}) })
}, },
handleFooter() { handleFooter() {
app.zdMpBehavior({ PageName: 'BTN_PATIENTINTERACTIONCHOOSEQUESTION' })
this.setData({ this.setData({
expend: !this.data.expend, expend: !this.data.expend,
}) })

10
src/patient/pages/live/index.ts

@ -49,7 +49,7 @@ Page({
app.globalData.active = ''; app.globalData.active = '';
} }
app.waitLogin({ type: [0, 1] }).then(() => { app.waitLogin({ type: [0, 1] }).then(() => {
app.zdMpBehavior({ PageName: 'PG_PATIENTWEDNESDAYLECTURELIST' });
this.getConfig(); this.getConfig();
app.getZdUserInfo(this, true); app.getZdUserInfo(this, true);
}); });
@ -61,9 +61,9 @@ Page({
LAT: '', LAT: '',
}); });
if (e.detail.index == 0) { if (e.detail.index == 0) {
app.zdMpBehavior({ PageName: 'PG_PATIENTWEDNESDAYLECTURELIST' });
} else if (e.detail.index == 1) { } else if (e.detail.index == 1) {
app.zdMpBehavior({ PageName: 'PG_PATIENTWEDNESDAYACTIVITYLIST' });
} }
this.getList(); this.getList();
}, },
@ -232,9 +232,9 @@ Page({
handleDetail(e) { handleDetail(e) {
const { id } = e.currentTarget.dataset; const { id } = e.currentTarget.dataset;
if (this.data.active == 0) { if (this.data.active == 0) {
app.zdMpBehavior({ PageName: 'BTN_PATIENTWEDNESDAYTALKMEETINGLIST' });
} else if (this.data.active == 1) { } else if (this.data.active == 1) {
app.zdMpBehavior({ PageName: 'BTN_PATIENTWEDNESDAYTALKACTIVITYLIST' });
} }
wx.navigateTo({ wx.navigateTo({
url: `/patient/pages/liveDetail/index?id=${id}`, url: `/patient/pages/liveDetail/index?id=${id}`,

10
src/patient/pages/liveDetail/index.ts

@ -80,12 +80,12 @@ Page({
this.videoContext = wx.createVideoContext('video') this.videoContext = wx.createVideoContext('video')
} }
if (res.Type == 1) { if (res.Type == 1) {
app.zdMpBehavior({ PageName: 'PG_PATIENTLECTUREDETAILS' })
wx.setNavigationBarTitle({ wx.setNavigationBarTitle({
title: '会议详情', title: '会议详情',
}) })
} else { } else {
app.zdMpBehavior({ PageName: 'PG_PATIENTACTIVITYDETAILS' })
wx.setNavigationBarTitle({ wx.setNavigationBarTitle({
title: '活动详情', title: '活动详情',
}) })
@ -108,7 +108,7 @@ Page({
}) })
}, },
handleReplay() { handleReplay() {
app.zdMpBehavior({ PageName: 'BTN_PATIENTMEETINGDETAILREPLAY' })
this.videoContext.requestFullScreen({}) this.videoContext.requestFullScreen({})
this.videoContext.seek(0) this.videoContext.seek(0)
this.videoContext.play() this.videoContext.play()
@ -151,9 +151,9 @@ Page({
const { UserType } = this.data.zdUserInfo const { UserType } = this.data.zdUserInfo
if (Type == 1) { if (Type == 1) {
app.zdMpBehavior({ PageName: 'BTN_PATIENTMEETINGDETAILSIGNUP' })
} else if (Type == 2) { } else if (Type == 2) {
app.zdMpBehavior({ PageName: 'BTN_PATIENTACTIVITYDETAILSIGNUP' })
} }
wx.ajax({ wx.ajax({

8
src/patient/pages/login/index.ts

@ -17,7 +17,7 @@ Page({
page: options.page, page: options.page,
}) })
app.waitLogin().then(() => { app.waitLogin().then(() => {
app.zdMpBehavior({ PageName: 'PG_PATIENTLOGIN' })
}) })
}, },
getCode() { getCode() {
@ -66,7 +66,7 @@ Page({
}) })
}, },
handleSubmit() { handleSubmit() {
app.zdMpBehavior({ PageName: 'BTN_PATIENTLOGIN' })
const { mobile, code } = this.data const { mobile, code } = this.data
const { registrationSource, registChannel, regBusinessId } = app.globalData const { registrationSource, registChannel, regBusinessId } = app.globalData
wx.ajax({ wx.ajax({
@ -84,7 +84,7 @@ Page({
}) })
}, },
handleWxSubmit(e: WechatMiniprogram.CustomEvent) { handleWxSubmit(e: WechatMiniprogram.CustomEvent) {
app.zdMpBehavior({ PageName: 'BTN_PATIENTQUICKPATIENTLOGIN' })
const { iv, encryptedData } = e.detail const { iv, encryptedData } = e.detail
const { registrationSource, registChannel, regBusinessId } = app.globalData const { registrationSource, registChannel, regBusinessId } = app.globalData
if (iv && encryptedData) { if (iv && encryptedData) {
@ -129,7 +129,7 @@ Page({
}) })
}, },
handleVisitors() { handleVisitors() {
app.zdMpBehavior({ PageName: 'BTN_PATIENTLOOKAROUND' })
wx.reLaunch({ wx.reLaunch({
url: '/patient/pages/index/index', url: '/patient/pages/index/index',
}) })

16
src/patient/pages/my/index.ts

@ -32,7 +32,7 @@ Page({
}, },
onShow() { onShow() {
app.zdWaitLogin().then(() => { app.zdWaitLogin().then(() => {
app.zdMpBehavior({ PageName: 'PG_PATIENTMY' })
app.getZdUserInfo(this, true, () => {}) app.getZdUserInfo(this, true, () => {})
this.getScore() this.getScore()
}) })
@ -49,7 +49,7 @@ Page({
}) })
}, },
handleMyHealthRecord(e) { handleMyHealthRecord(e) {
app.zdMpBehavior({ PageName: 'BTN_PATIENTMYPAGEHEALTHRECORD' })
const { url } = e.currentTarget.dataset const { url } = e.currentTarget.dataset
app.zdPermissionVerification(3, 0, url).then(() => { app.zdPermissionVerification(3, 0, url).then(() => {
wx.navigateTo({ wx.navigateTo({
@ -58,7 +58,7 @@ Page({
}) })
}, },
handleFamily(e) { handleFamily(e) {
app.zdMpBehavior({ PageName: 'BTN_PATIENTMYPAGEFAMILYMEMBERS' })
const { url } = e.currentTarget.dataset const { url } = e.currentTarget.dataset
app.zdPermissionVerification(3, 0, url).then(() => { app.zdPermissionVerification(3, 0, url).then(() => {
wx.navigateTo({ wx.navigateTo({
@ -68,7 +68,7 @@ Page({
}, },
handleAdlChaneg(e) { handleAdlChaneg(e) {
if (!e.detail) { if (!e.detail) {
app.zdMpBehavior({ PageName: 'BTN_PATIENTMYPAGECLOSEADLREMINDER' })
} }
wx.ajax({ wx.ajax({
method: 'POST', method: 'POST',
@ -89,16 +89,16 @@ Page({
}) })
} }
if (url === '/patient/pages/mySave/index') { if (url === '/patient/pages/mySave/index') {
app.zdMpBehavior({ PageName: 'BTN_PATIENTMYPAGEFAVORITES' })
} }
if (url === '/patient/pages/myLive/index') { if (url === '/patient/pages/myLive/index') {
app.zdMpBehavior({ PageName: 'BTN_PATIENTMYPAGESIGNEDUPMEETINGS' })
} }
if (url === '/patient/pages/personalInformation/index') { if (url === '/patient/pages/personalInformation/index') {
app.zdMpBehavior({ PageName: 'BTN_PATIENTMYPAGEPERSONALINFO' })
} }
if (url === '/patient/pages/storyList/index') { if (url === '/patient/pages/storyList/index') {
app.zdMpBehavior({ PageName: 'BTN_PATIENTMYPAGEMYSTORIES' })
} }
wx.navigateTo({ wx.navigateTo({
url, url,

12
src/patient/pages/myLive/index.ts

@ -55,13 +55,13 @@ Page({
getList(newPage = 1) { getList(newPage = 1) {
const { active } = this.data const { active } = this.data
if (newPage == 1 && active == 0) { if (newPage == 1 && active == 0) {
app.zdMpBehavior({ PageName: 'PG_PATIENTMYEVENTS_ALL' })
} }
if (newPage == 1 && active == 1) { if (newPage == 1 && active == 1) {
app.zdMpBehavior({ PageName: 'PG_PATIENTMYEVENTS_ONLINE' })
} }
if (newPage == 1 && active == 2) { if (newPage == 1 && active == 2) {
app.zdMpBehavior({ PageName: 'PG_PATIENTMYEVENTS_OFFLINE' })
} }
wx.ajax({ wx.ajax({
method: 'GET', method: 'GET',
@ -105,13 +105,13 @@ Page({
const { id } = e.currentTarget.dataset const { id } = e.currentTarget.dataset
const { active } = this.data const { active } = this.data
if (active == 0) { if (active == 0) {
app.zdMpBehavior({ PageName: 'BTN_PATIENTSIGNEDUPACTIVITIESALLLIST' })
} }
if (active == 1) { if (active == 1) {
app.zdMpBehavior({ PageName: 'BTN_PATIENTSIGNEDUPACTIVITIESONLINELIST' })
} }
if (active == 2) { if (active == 2) {
app.zdMpBehavior({ PageName: 'BTN_PATIENTSIGNEDUPACTIVITIESOFFLINELIST' })
} }
wx.navigateTo({ wx.navigateTo({
url: `/patient/pages/liveDetail/index?id=${id}`, url: `/patient/pages/liveDetail/index?id=${id}`,

6
src/patient/pages/mySave/index.ts

@ -54,13 +54,13 @@ Page({
} }
if (active == 0 && pagination.page == 1) { if (active == 0 && pagination.page == 1) {
app.zdMpBehavior({ PageName: 'PG_PATIENTMYFAVORITES_KNOWLEDGEBASE' })
} }
if (active == 1 && pagination.page == 1) { if (active == 1 && pagination.page == 1) {
app.zdMpBehavior({ PageName: 'PG_PATIENTMYFAVORITES_VIDEOCLASS' })
} }
if (active == 2 && pagination.page == 1) { if (active == 2 && pagination.page == 1) {
app.zdMpBehavior({ PageName: 'PG_PATIENTMYFAVORITES_HEALTHQA' })
} }
}, },
getInfoList(newPage = 1) { getInfoList(newPage = 1) {

2
src/patient/pages/nrdl/index.ts

@ -54,7 +54,7 @@ Page({
}); });
} }
app.zdWaitLogin().then((_res) => { app.zdWaitLogin().then((_res) => {
app.zdMpBehavior({ PageName: 'PG_PATIENTNRDL' })
this.addOpenRecord(); this.addOpenRecord();
this.getConfig(); this.getConfig();
this.getCode(); this.getCode();

6
src/patient/pages/nrdlDetail/index.ts

@ -33,13 +33,13 @@ Page({
} }
app.zdWaitLogin().then((_res) => { app.zdWaitLogin().then((_res) => {
if (options.id == '2') { if (options.id == '2') {
app.zdMpBehavior({ PageName: 'PG_PATIENTIGAMODREIMBURSEMENT' })
} }
if (options.id == '4') { if (options.id == '4') {
app.zdMpBehavior({ PageName: 'PG_PATIENTIGAMODFAQ' })
} }
if (options.id == '5') { if (options.id == '5') {
app.zdMpBehavior({ PageName: 'PG_PATIENTIGAMODINFO' })
} }
this.addOpenRecord() this.addOpenRecord()
this.getConfig() this.getConfig()

2
src/patient/pages/nrdlTable/index.ts

@ -856,7 +856,7 @@ Page({
}, },
onLoad() { onLoad() {
app.zdWaitLogin().then((_res) => { app.zdWaitLogin().then((_res) => {
app.zdMpBehavior({ PageName: 'PG_PATIENTCITYHEALTHINSURANCE' })
this.addOpenRecord(); this.addOpenRecord();
}); });
}, },

8
src/patient/pages/personalInformation/index.ts

@ -66,7 +66,7 @@ Page({
}) })
app.waitLogin({ type: [1] }).then(() => { app.waitLogin({ type: [1] }).then(() => {
app.zdMpBehavior({ PageName: 'PG_PATIENTPERSONALINFO' })
const that = this const that = this
app.getZdUserInfo(that, true, that.formatUserInfo.bind(that)) app.getZdUserInfo(that, true, that.formatUserInfo.bind(that))
this.getDict() this.getDict()
@ -247,7 +247,7 @@ Page({
}, },
handleChangeTel() { handleChangeTel() {
app.zdMpBehavior({ PageName: 'PG_PATIENTPERSONALINFO_CHANGEPHONECLICK' })
wx.navigateTo({ wx.navigateTo({
url: '/patient/pages/changePhone/index', url: '/patient/pages/changePhone/index',
}) })
@ -258,7 +258,7 @@ Page({
}) })
}, },
handleLogout() { handleLogout() {
app.zdMpBehavior({ PageName: 'BTN_PATIENTPERSONALINFOLOGOUT' })
wx.navigateTo({ wx.navigateTo({
url: '/patient/pages/cancellation/index', url: '/patient/pages/cancellation/index',
}) })
@ -269,7 +269,7 @@ Page({
routerTo(e) { routerTo(e) {
const { url } = e.currentTarget.dataset const { url } = e.currentTarget.dataset
if (url.includes('/doctor/patient/pages/d_login/index')) { if (url.includes('/doctor/patient/pages/d_login/index')) {
app.zdMpBehavior({ PageName: 'BTN_PATIENTPERSONALINFOSWITCHDOCTORPORTAL' })
} }
wx.navigateTo({ wx.navigateTo({
url, url,

6
src/patient/pages/privacyAgreement/index.ts

@ -13,15 +13,15 @@ Page({
id: options.id, id: options.id,
}) })
app.zdWaitLogin({ isReg: false, loginPage: true }).then(() => { app.zdWaitLogin({ isReg: false, loginPage: true }).then(() => {
app.zdMpBehavior({ PageName: 'PG_PATIENTINFORMEDCONSENT' })
}) })
}, },
handleBack() { handleBack() {
app.zdMpBehavior({ PageName: 'BTN_PATIENTCONSENTDISAGREE' })
wx.navigateBack() wx.navigateBack()
}, },
handleSure(e) { handleSure(e) {
app.zdMpBehavior({ PageName: 'BTN_PATIENTCONSENTAGREE' })
const { replace } = e.currentTarget.dataset const { replace } = e.currentTarget.dataset
const { pagePath, id } = this.data const { pagePath, id } = this.data
if (replace) { if (replace) {

6
src/patient/pages/publishStoryDetail/index.ts

@ -36,7 +36,7 @@ Page({
this.handleTimeOut(); this.handleTimeOut();
}, },
onShow() { onShow() {
app.zdMpBehavior({ PageName: 'PG_PATIENTSTORYDETAILS' });
if (this.data.sendShare) { if (this.data.sendShare) {
this.setData({ this.setData({
sendShare: false, sendShare: false,
@ -99,7 +99,7 @@ Page({
}); });
}, },
handleStar() { handleStar() {
app.zdMpBehavior({ PageName: 'BTN_PATIENTSTORYDETAILSLIKE' });
this.setData({ this.setData({
starShow: true, starShow: true,
}); });
@ -176,7 +176,7 @@ Page({
}); });
}, },
handleTapShare() { handleTapShare() {
app.zdMpBehavior({ PageName: 'BTN_PATIENTSTORYDETAILSSHARE' });
}, },
onShareAppMessage() { onShareAppMessage() {
const { Title, ListPicLink } = this.data.detail; const { Title, ListPicLink } = this.data.detail;

4
src/patient/pages/repository/index.ts

@ -31,7 +31,7 @@ Page({
}); });
}, },
onShow() { onShow() {
app.zdMpBehavior({ PageName: 'PG_PATIENTMGINFO' });
}, },
getConfig(options: any) { getConfig(options: any) {
wx.ajax({ wx.ajax({
@ -262,7 +262,7 @@ Page({
this.getList(); this.getList();
}, },
handleDetail(e: WechatMiniprogram.CustomEvent) { handleDetail(e: WechatMiniprogram.CustomEvent) {
app.zdMpBehavior({ PageName: 'BTN_PATIENTMGARTICLELIST' });
const { id } = e.currentTarget.dataset; const { id } = e.currentTarget.dataset;
wx.navigateTo({ wx.navigateTo({
url: `/patient/pages/repositoryDetail/index?id=${id}`, url: `/patient/pages/repositoryDetail/index?id=${id}`,

8
src/patient/pages/repositoryDetail/index.ts

@ -38,7 +38,7 @@ Page({
}) })
}, },
onShow() { onShow() {
app.zdMpBehavior({ PageName: 'PG_PATIENTKNOWLEDGEDETAILS' })
if (this.data.sendShare) { if (this.data.sendShare) {
this.setData({ this.setData({
sendShare: false, sendShare: false,
@ -148,7 +148,7 @@ Page({
this.getDetail(true) this.getDetail(true)
}, },
handleStar() { handleStar() {
app.zdMpBehavior({ PageName: 'BTN_PATIENTKNOWLEDGEDETAILSLIKE' })
this.setData({ this.setData({
starShow: true, starShow: true,
}) })
@ -180,7 +180,7 @@ Page({
}) })
}, },
handleToggleSave() { handleToggleSave() {
app.zdMpBehavior({ PageName: 'BTN_PATIENTKNOWLEDGEDETAILSFAVORITE' })
const { const {
id, id,
detail: { IsCollect }, detail: { IsCollect },
@ -297,7 +297,7 @@ Page({
} }
}, },
handleTapShare() { handleTapShare() {
app.zdMpBehavior({ PageName: 'BTN_PATIENTKNOWLEDGEDETAILSSHARE' })
}, },
}) })

8
src/patient/pages/story/index.ts

@ -28,7 +28,7 @@ Page({
}, },
onShow() { onShow() {
app.waitLogin({ type: [0, 1] }).then((_res) => { app.waitLogin({ type: [0, 1] }).then((_res) => {
app.zdMpBehavior({ PageName: 'PG_PATIENTDESIREDLIFE' });
this.getList(); this.getList();
app.getZdUserInfo(this, true); app.getZdUserInfo(this, true);
}); });
@ -83,14 +83,14 @@ Page({
// '/patient/pages/storyGuide/index': 'BTN_STORY_SUBMIT', // '/patient/pages/storyGuide/index': 'BTN_STORY_SUBMIT',
// }[url] // }[url]
// if (PageName) { // if (PageName) {
// app.zdMpBehavior({ PageName })
// } // }
if (url.includes('/patient/pages/publishStoryDetail/index')) { if (url.includes('/patient/pages/publishStoryDetail/index')) {
app.zdMpBehavior({ PageName: 'BTN_PATIENTDESIRELIFESTORYLIST' });
} }
if (url === '/patient/pages/storyGuide/index') { if (url === '/patient/pages/storyGuide/index') {
app.zdMpBehavior({ PageName: 'BTN_PATIENTDESIRELIFESHARE' });
} }
wx.navigateTo({ wx.navigateTo({
url, url,

4
src/patient/pages/storyEnter/index.ts

@ -38,7 +38,7 @@ Page({
} }
app.zdWaitLogin().then(() => { app.zdWaitLogin().then(() => {
app.zdMpBehavior({ PageName: 'PG_PATIENTSUBMITTEDSTORIES' })
app.getZdUserInfo(that, true) app.getZdUserInfo(that, true)
}) })
@ -220,7 +220,7 @@ Page({
}) })
}, },
submit() { submit() {
app.zdMpBehavior({ PageName: 'BTN_PATIENTSUBMISSIONSTORYSUBMIT' })
const { form, fileList, VoiceContent } = this.data const { form, fileList, VoiceContent } = this.data
let toast = '' let toast = ''
if (!form.TreatmentExperience) { if (!form.TreatmentExperience) {

4
src/patient/pages/storyGuide/index.ts

@ -21,7 +21,7 @@ Page({
}) })
} }
app.zdWaitLogin().then((_res) => { app.zdWaitLogin().then((_res) => {
app.zdMpBehavior({ PageName: 'PG_PATIENTREWARDESSAY' })
// this.getSettingInfo(); // this.getSettingInfo();
if (options.storyleadin) { if (options.storyleadin) {
this.setToSee() this.setToSee()
@ -62,7 +62,7 @@ Page({
routerTo(e) { routerTo(e) {
const { url } = e.currentTarget.dataset const { url } = e.currentTarget.dataset
if (url.includes('/patient/pages/storyEnter/index')) { if (url.includes('/patient/pages/storyEnter/index')) {
app.zdMpBehavior({ PageName: 'BTN_PATIENTREWARDEDWRITINGSUBMIT' })
} }
wx.navigateTo({ wx.navigateTo({
url, url,

6
src/patient/pages/storyList/index.ts

@ -21,7 +21,7 @@ Page({
}, },
onShow() { onShow() {
app.waitLogin({ type: [1] }).then((_res) => { app.waitLogin({ type: [1] }).then((_res) => {
app.zdMpBehavior({ PageName: 'PG_PATIENTMYSTORIES' });
this.getList(); this.getList();
app.getZdUserInfo(this, true); app.getZdUserInfo(this, true);
}); });
@ -58,7 +58,7 @@ Page({
} }
}, },
handleDetail(e) { handleDetail(e) {
app.zdMpBehavior({ PageName: 'BTN_PATIENTMYSTORIESLIST' });
const { id } = e.currentTarget.dataset; const { id } = e.currentTarget.dataset;
wx.navigateTo({ wx.navigateTo({
url: `/patient/pages/storyDetail/index?id=${id}`, url: `/patient/pages/storyDetail/index?id=${id}`,
@ -67,7 +67,7 @@ Page({
routerTo(e) { routerTo(e) {
const { url } = e.currentTarget.dataset; const { url } = e.currentTarget.dataset;
if (url === '/patient/pages/storyGuide/index') { if (url === '/patient/pages/storyGuide/index') {
app.zdMpBehavior({ PageName: 'BTN_PATIENTMYSTORIESCONTINUESUBMIT' });
} }
wx.navigateTo({ wx.navigateTo({
url, url,

6
src/patient/pages/taskAgreement/index.ts

@ -11,7 +11,7 @@ Page({
pagePath: options.page, pagePath: options.page,
}) })
app.zdWaitLogin({ isReg: false, loginPage: true }).then(() => { app.zdWaitLogin({ isReg: false, loginPage: true }).then(() => {
app.zdMpBehavior({ PageName: 'PG_PATIENTFOLLOWUPCONSENT' })
}) })
}, },
handleBack() { handleBack() {
@ -20,9 +20,9 @@ Page({
handleSure(e) { handleSure(e) {
const { replace, pcfu } = e.currentTarget.dataset const { replace, pcfu } = e.currentTarget.dataset
if (pcfu == 1) { if (pcfu == 1) {
app.zdMpBehavior({ PageName: 'BTN_PATIENTFOLLOWUPAGREE' })
} else if (pcfu == 2) { } else if (pcfu == 2) {
app.zdMpBehavior({ PageName: 'BTN_PATIENTFOLLOWUPDISAGREE' })
} }
const { pagePath } = this.data const { pagePath } = this.data
if (replace) { if (replace) {

4
src/patient/pages/uploadCert/index.ts

@ -22,7 +22,7 @@ Page({
}) })
app.zdWaitLogin({ isReg: true, loginPage: true }).then((res) => { app.zdWaitLogin({ isReg: true, loginPage: true }).then((res) => {
app.getZdUserInfo(this, true) app.getZdUserInfo(this, true)
app.zdMpBehavior({ PageName: 'PG_PATIENTJOINGASSTATION' })
}) })
}, },
handleSetData(e: WechatMiniprogram.CustomEvent) { handleSetData(e: WechatMiniprogram.CustomEvent) {
@ -116,7 +116,7 @@ Page({
}) })
}, },
handleNewSubmit() { handleNewSubmit() {
app.zdMpBehavior({ PageName: 'BTN_PATIENTJOINSTATIONBANNER' })
const { error, zdUserInfo } = this.data const { error, zdUserInfo } = this.data
let urlKey = '' let urlKey = ''
const backPage = app.globalData.backPage const backPage = app.globalData.backPage

2
src/patient/pages/webview/index.ts

@ -23,7 +23,7 @@ Page({
if (options.es === '201503') { if (options.es === '201503') {
app.globalData.IsAliQiWei = 1 app.globalData.IsAliQiWei = 1
app.zdMpBehavior({ PageName: 'WEIYI_WEBVIEW_PAGE' })
} }
const { UserType } = app.globalData.zdUserInfo const { UserType } = app.globalData.zdUserInfo

3
typings/index.d.ts vendored

@ -39,7 +39,8 @@ interface IAppOption {
checkLoginType: (type: pageType[] | 'any', backPath?: string) => boolean checkLoginType: (type: pageType[] | 'any', backPath?: string) => boolean
getMenuInfo: (arg0: WechatMiniprogram.Page.Instance<any, any>) => void getMenuInfo: (arg0: WechatMiniprogram.Page.Instance<any, any>) => void
getUserInfo: (type: 0 | 1 | 2) => Promise<never> getUserInfo: (type: 0 | 1 | 2) => Promise<never>
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 zdMpBehavior: (data: { PageName: string; doctor?: boolean }) => void
zdGetTheme: () => Promise<'PATIENT'> zdGetTheme: () => Promise<'PATIENT'>
zdWaitLogin: (obj?: { isReg?: boolean; loginPage?: boolean; pub?: boolean }) => Promise<any> zdWaitLogin: (obj?: { isReg?: boolean; loginPage?: boolean; pub?: boolean }) => Promise<any>

Loading…
Cancel
Save