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

7
src/components/popup/index.ts

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

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

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

10
src/pages/d_interactive/index.ts

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

8
src/pages/d_interactiveDoctor/index.ts

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

2
src/pages/d_invite/index.ts

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

8
src/pages/d_patient/index.ts

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

12
src/pages/d_patientDetail/index.ts

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

6
src/pages/d_userInfo/index.ts

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

12
src/pages/home/index.ts

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

4
src/pages/information/index.ts

@ -60,7 +60,7 @@ Page({ @@ -60,7 +60,7 @@ Page({
const { id, index } = e.currentTarget.dataset;
const params = this.data.list[index];
if (params.ContentType === '5' && params.FileList[0]) {
app.mpBehavior({ PositionId: '1', OperateType: '1', OperateId: id as string });
app.oldMpBehavior({ PositionId: '1', OperateType: '1', OperateId: id as string });
this.handleFile(params.FileList[0]);
} else {
wx.navigateTo({
@ -108,7 +108,7 @@ Page({ @@ -108,7 +108,7 @@ Page({
onShareAppMessage(e) {
if (e.from === 'button') {
const { Title, CoverImgUrl, Id } = e.target.dataset.params;
app.mpBehavior({ PositionId: '2', OperateType: '3', OperateId: Id });
app.oldMpBehavior({ PositionId: '2', OperateType: '3', OperateId: Id });
return {
title: Title,
path: `/pages/informationDetail/index?id=${Id}`,

6
src/pages/informationDetail/index.ts

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

2
src/pages/message/index.ts

@ -18,7 +18,7 @@ Page({ @@ -18,7 +18,7 @@ Page({
handleDetail(e) {
const { index } = e.currentTarget.dataset;
const { Id, Url } = this.data.list[index];
app.mpBehavior({ PositionId: '4', OperateType: '1', OperateId: Id });
app.oldMpBehavior({ PositionId: '4', OperateType: '1', OperateId: Id });
if (Url) {
wx.navigateTo({
url: Url,

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

3
typings/index.d.ts vendored

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

Loading…
Cancel
Save