|
|
@ -9,7 +9,7 @@ Page({ |
|
|
|
configList: [], |
|
|
|
configList: [], |
|
|
|
infoList: [], |
|
|
|
infoList: [], |
|
|
|
storyList: [], |
|
|
|
storyList: [], |
|
|
|
userInfo: {} as any, |
|
|
|
zdUserInfo: {} as any, |
|
|
|
anyWhere: false, |
|
|
|
anyWhere: false, |
|
|
|
regGuide: true, |
|
|
|
regGuide: true, |
|
|
|
|
|
|
|
|
|
|
@ -49,7 +49,7 @@ Page({ |
|
|
|
onLoad(options) { |
|
|
|
onLoad(options) { |
|
|
|
const systemInfo = wx.getSystemInfoSync(); |
|
|
|
const systemInfo = wx.getSystemInfoSync(); |
|
|
|
|
|
|
|
|
|
|
|
app.getTheme().then((res) => { |
|
|
|
app.zdGetTheme().then((res) => { |
|
|
|
this.setData({ |
|
|
|
this.setData({ |
|
|
|
theme: res, |
|
|
|
theme: res, |
|
|
|
}); |
|
|
|
}); |
|
|
@ -61,7 +61,7 @@ Page({ |
|
|
|
}); |
|
|
|
}); |
|
|
|
}, |
|
|
|
}, |
|
|
|
onShow() { |
|
|
|
onShow() { |
|
|
|
app.waitLogin({}).then(() => { |
|
|
|
app.zdWaitLogin({}).then(() => { |
|
|
|
app.zdMpBehavior({ PageName: 'PG_PATIENTHOME' }); |
|
|
|
app.zdMpBehavior({ PageName: 'PG_PATIENTHOME' }); |
|
|
|
this.setData({ |
|
|
|
this.setData({ |
|
|
|
anyWhere: app.globalData.anyWhere, |
|
|
|
anyWhere: app.globalData.anyWhere, |
|
|
@ -73,19 +73,19 @@ Page({ |
|
|
|
options: {}, |
|
|
|
options: {}, |
|
|
|
}); |
|
|
|
}); |
|
|
|
} |
|
|
|
} |
|
|
|
app.getUserInfo(this, true, (userInfo) => { |
|
|
|
app.getZdUserInfo(this, true, (zdUserInfo) => { |
|
|
|
this.setData({ |
|
|
|
this.setData({ |
|
|
|
userInfo, |
|
|
|
zdUserInfo, |
|
|
|
publicCard: userInfo.isShowFollowGuide == 1, |
|
|
|
publicCard: zdUserInfo.isShowFollowGuide == 1, |
|
|
|
}); |
|
|
|
}); |
|
|
|
this.getPopup(); |
|
|
|
this.getPopup(); |
|
|
|
this.getConfig(userInfo); |
|
|
|
this.getConfig(zdUserInfo); |
|
|
|
this.getSystemConfig(); |
|
|
|
this.getSystemConfig(); |
|
|
|
if (userInfo.ExclusiveDoctorId > 0) { |
|
|
|
if (zdUserInfo.ExclusiveDoctorId > 0) { |
|
|
|
this.getUnreadCount(); |
|
|
|
this.getUnreadCount(); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
if (userInfo.UserType == 4) { |
|
|
|
if (zdUserInfo.UserType == 4) { |
|
|
|
this.getLastRecord(); |
|
|
|
this.getLastRecord(); |
|
|
|
} |
|
|
|
} |
|
|
|
}); |
|
|
|
}); |
|
|
@ -127,8 +127,8 @@ Page({ |
|
|
|
}); |
|
|
|
}); |
|
|
|
}); |
|
|
|
}); |
|
|
|
}, |
|
|
|
}, |
|
|
|
getConfig(userInfo: any) { |
|
|
|
getConfig(zdUserInfo: any) { |
|
|
|
let UserType = userInfo.UserType; |
|
|
|
let UserType = zdUserInfo.UserType; |
|
|
|
if (UserType <= 2) { |
|
|
|
if (UserType <= 2) { |
|
|
|
UserType = 1; |
|
|
|
UserType = 1; |
|
|
|
} |
|
|
|
} |
|
|
@ -146,10 +146,10 @@ Page({ |
|
|
|
// if (item.name === 'BANNER-MINIDOVTOR') {
|
|
|
|
// if (item.name === 'BANNER-MINIDOVTOR') {
|
|
|
|
// item.subList = item.subList
|
|
|
|
// item.subList = item.subList
|
|
|
|
// .filter((subItem: any) => {
|
|
|
|
// .filter((subItem: any) => {
|
|
|
|
// return subItem.linkUrl !== 'MINIDOCTOR' || userInfo.EntryThreePeriod === 1
|
|
|
|
// return subItem.linkUrl !== 'MINIDOCTOR' || zdUserInfo.EntryThreePeriod === 1
|
|
|
|
// })
|
|
|
|
// })
|
|
|
|
// .filter((subItem: any) => {
|
|
|
|
// .filter((subItem: any) => {
|
|
|
|
// return subItem.linkUrl !== 'MINIDOCTOR-1.0' || userInfo.EntryTwoPeriod === 1
|
|
|
|
// return subItem.linkUrl !== 'MINIDOCTOR-1.0' || zdUserInfo.EntryTwoPeriod === 1
|
|
|
|
// })
|
|
|
|
// })
|
|
|
|
// }
|
|
|
|
// }
|
|
|
|
return item; |
|
|
|
return item; |
|
|
@ -231,7 +231,7 @@ Page({ |
|
|
|
Type: 2, |
|
|
|
Type: 2, |
|
|
|
}, |
|
|
|
}, |
|
|
|
}); |
|
|
|
}); |
|
|
|
if (data2.showAlert && this.data.userInfo.UserType == 4) { |
|
|
|
if (data2.showAlert && this.data.zdUserInfo.UserType == 4) { |
|
|
|
this.setData({ |
|
|
|
this.setData({ |
|
|
|
toastShow: data2.showAlert, |
|
|
|
toastShow: data2.showAlert, |
|
|
|
toastType: 'aldAlert', |
|
|
|
toastType: 'aldAlert', |
|
|
@ -363,37 +363,37 @@ Page({ |
|
|
|
if (code === 'drugs') { |
|
|
|
if (code === 'drugs') { |
|
|
|
app.zdMpBehavior({ PageName: 'BTN_PATIENTHOMEMEDICATIONMODULE' }); |
|
|
|
app.zdMpBehavior({ PageName: 'BTN_PATIENTHOMEMEDICATIONMODULE' }); |
|
|
|
} |
|
|
|
} |
|
|
|
if (code === 'story' && url === '/pages/story/index') { |
|
|
|
if (code === 'story' && url === '/patient/pages/story/index') { |
|
|
|
app.zdMpBehavior({ PageName: 'BTN_PATIENTHOMESTORIESVIEWALL' }); |
|
|
|
app.zdMpBehavior({ PageName: 'BTN_PATIENTHOMESTORIESVIEWALL' }); |
|
|
|
} |
|
|
|
} |
|
|
|
if (code === 'story' && url.includes('/pages/publishStoryDetail/index')) { |
|
|
|
if (code === 'story' && url.includes('/patient/pages/publishStoryDetail/index')) { |
|
|
|
app.zdMpBehavior({ PageName: 'BTN_PATIENTHOMESTORYCLICK' }); |
|
|
|
app.zdMpBehavior({ PageName: 'BTN_PATIENTHOMESTORYCLICK' }); |
|
|
|
} |
|
|
|
} |
|
|
|
if (code === 'activity2' && url === '/pages/live/index') { |
|
|
|
if (code === 'activity2' && url === '/patient/pages/live/index') { |
|
|
|
app.zdMpBehavior({ PageName: 'BTN_PATIENTHOMEONLINEACTIVITIESVIEWALL' }); |
|
|
|
app.zdMpBehavior({ PageName: 'BTN_PATIENTHOMEONLINEACTIVITIESVIEWALL' }); |
|
|
|
} |
|
|
|
} |
|
|
|
if (code === 'activity2' && url === '/pages/live/index?index=0') { |
|
|
|
if (code === 'activity2' && url === '/patient/pages/live/index?index=0') { |
|
|
|
app.zdMpBehavior({ PageName: 'BTN_PATIENTHOMEONLINEACTIVITIESMONTHLYPOSTER' }); |
|
|
|
app.zdMpBehavior({ PageName: 'BTN_PATIENTHOMEONLINEACTIVITIESMONTHLYPOSTER' }); |
|
|
|
} |
|
|
|
} |
|
|
|
if (code === 'activity2' && url.includes('/pages/liveDetail/index')) { |
|
|
|
if (code === 'activity2' && url.includes('/patient/pages/liveDetail/index')) { |
|
|
|
app.zdMpBehavior({ PageName: 'BTN_PATIENTHOMEONLINEACTIVITIESCARD' }); |
|
|
|
app.zdMpBehavior({ PageName: 'BTN_PATIENTHOMEONLINEACTIVITIESCARD' }); |
|
|
|
} |
|
|
|
} |
|
|
|
if (code === 'activity1' && url === '/pages/live/index') { |
|
|
|
if (code === 'activity1' && url === '/patient/pages/live/index') { |
|
|
|
app.zdMpBehavior({ PageName: 'BTN_PATIENTHOMEOFFLINEACTIVITIESVIEWALL' }); |
|
|
|
app.zdMpBehavior({ PageName: 'BTN_PATIENTHOMEOFFLINEACTIVITIESVIEWALL' }); |
|
|
|
} |
|
|
|
} |
|
|
|
if (code === 'activity1' && url.includes('/pages/liveDetail/index')) { |
|
|
|
if (code === 'activity1' && url.includes('/patient/pages/liveDetail/index')) { |
|
|
|
app.zdMpBehavior({ PageName: 'BTN_PATIENTHOMEOFFLINEACTIVITIESCARD' }); |
|
|
|
app.zdMpBehavior({ PageName: 'BTN_PATIENTHOMEOFFLINEACTIVITIESCARD' }); |
|
|
|
} |
|
|
|
} |
|
|
|
if (code === 'article' && url === '/pages/repository/index') { |
|
|
|
if (code === 'article' && url === '/patient/pages/repository/index') { |
|
|
|
app.zdMpBehavior({ PageName: 'BTN_PATIENTHOMERECOMMENDEDREADINGVIEWALL' }); |
|
|
|
app.zdMpBehavior({ PageName: 'BTN_PATIENTHOMERECOMMENDEDREADINGVIEWALL' }); |
|
|
|
} |
|
|
|
} |
|
|
|
if (code === 'article' && url.includes('/pages/repositoryDetail/index')) { |
|
|
|
if (code === 'article' && url.includes('/patient/pages/repositoryDetail/index')) { |
|
|
|
app.zdMpBehavior({ PageName: 'BTN_PATIENTHOMERECOMMENDEDREADINGARTICLE' }); |
|
|
|
app.zdMpBehavior({ PageName: 'BTN_PATIENTHOMERECOMMENDEDREADINGARTICLE' }); |
|
|
|
} |
|
|
|
} |
|
|
|
if (code === 'serviceConf') { |
|
|
|
if (code === 'serviceConf') { |
|
|
|
app.zdMpBehavior({ PageName: 'BTN_PATIENTHOMESERVICE' }); |
|
|
|
app.zdMpBehavior({ PageName: 'BTN_PATIENTHOMESERVICE' }); |
|
|
|
} |
|
|
|
} |
|
|
|
if (url === '/pages/interactivePatient/index') { |
|
|
|
if (url === '/patient/pages/interactivePatient/index') { |
|
|
|
app.zdMpBehavior({ PageName: 'BTN_PATIENTHOMEDOCTORCARD' }); |
|
|
|
app.zdMpBehavior({ PageName: 'BTN_PATIENTHOMEDOCTORCARD' }); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
@ -405,7 +405,7 @@ Page({ |
|
|
|
|
|
|
|
|
|
|
|
if (url.includes('loginState')) { |
|
|
|
if (url.includes('loginState')) { |
|
|
|
url = url + encodeURIComponent(app.globalData.loginState); |
|
|
|
url = url + encodeURIComponent(app.globalData.loginState); |
|
|
|
app.permissionVerification(2, 11, `/pages/repository/index`).then(() => { |
|
|
|
app.zdPermissionVerification(2, 11, `/patient/pages/repository/index`).then(() => { |
|
|
|
wx.navigateTo({ |
|
|
|
wx.navigateTo({ |
|
|
|
url, |
|
|
|
url, |
|
|
|
}); |
|
|
|
}); |
|
|
@ -424,7 +424,7 @@ Page({ |
|
|
|
}); |
|
|
|
}); |
|
|
|
}, |
|
|
|
}, |
|
|
|
handleReg() { |
|
|
|
handleReg() { |
|
|
|
app.permissionVerification(3, 0, ''); |
|
|
|
app.zdPermissionVerification(3, 0, ''); |
|
|
|
}, |
|
|
|
}, |
|
|
|
handleMiniDoctor(e) { |
|
|
|
handleMiniDoctor(e) { |
|
|
|
const { link } = e.currentTarget.dataset; |
|
|
|
const { link } = e.currentTarget.dataset; |
|
|
@ -433,16 +433,16 @@ Page({ |
|
|
|
period = '2'; |
|
|
|
period = '2'; |
|
|
|
} |
|
|
|
} |
|
|
|
wx.navigateTo({ |
|
|
|
wx.navigateTo({ |
|
|
|
url: `/pages/webview/index?period=${period}`, |
|
|
|
url: `/patient/pages/webview/index?period=${period}`, |
|
|
|
}); |
|
|
|
}); |
|
|
|
}, |
|
|
|
}, |
|
|
|
handleQuestion() { |
|
|
|
handleQuestion() { |
|
|
|
app.permissionVerification(2, 11, `/pages/repository/index`).then(() => { |
|
|
|
app.zdPermissionVerification(2, 11, `/patient/pages/repository/index`).then(() => { |
|
|
|
const webviewUrl = encodeURIComponent( |
|
|
|
const webviewUrl = encodeURIComponent( |
|
|
|
`${app.globalData.url}/zdcare/#/info?loginState=${app.globalData.loginState}`, |
|
|
|
`${app.globalData.url}/zdcare/#/info?loginState=${app.globalData.loginState}`, |
|
|
|
); |
|
|
|
); |
|
|
|
wx.navigateTo({ |
|
|
|
wx.navigateTo({ |
|
|
|
url: `/pages/webview/index?url=${webviewUrl}`, |
|
|
|
url: `/patient/pages/webview/index?url=${webviewUrl}`, |
|
|
|
}); |
|
|
|
}); |
|
|
|
}); |
|
|
|
}); |
|
|
|
}, |
|
|
|
}, |
|
|
@ -455,13 +455,13 @@ Page({ |
|
|
|
this.handleNRDL(); |
|
|
|
this.handleNRDL(); |
|
|
|
}, |
|
|
|
}, |
|
|
|
handleNRDL() { |
|
|
|
handleNRDL() { |
|
|
|
app.permissionVerification(3, 12, `/pages/index/index`).then(() => { |
|
|
|
app.zdPermissionVerification(3, 12, `/patient/pages/index/index`).then(() => { |
|
|
|
wx.navigateTo({ |
|
|
|
wx.navigateTo({ |
|
|
|
url: `/pages/nrdl/index`, |
|
|
|
url: `/patient/pages/nrdl/index`, |
|
|
|
}); |
|
|
|
}); |
|
|
|
// if (this.data.userInfo.has7DayAdl === 1) {
|
|
|
|
// if (this.data.zdUserInfo.has7DayAdl === 1) {
|
|
|
|
// wx.navigateTo({
|
|
|
|
// wx.navigateTo({
|
|
|
|
// url: `/pages/nrdl/index`,
|
|
|
|
// url: `/patient/pages/nrdl/index`,
|
|
|
|
// });
|
|
|
|
// });
|
|
|
|
// } else {
|
|
|
|
// } else {
|
|
|
|
// this.setData({
|
|
|
|
// this.setData({
|
|
|
@ -472,22 +472,22 @@ Page({ |
|
|
|
}); |
|
|
|
}); |
|
|
|
}, |
|
|
|
}, |
|
|
|
routerVipTo() { |
|
|
|
routerVipTo() { |
|
|
|
const { MedicineAuditSwitch, UseDrugsAuditStatus, isFollow } = this.data.userInfo; |
|
|
|
const { MedicineAuditSwitch, UseDrugsAuditStatus, isFollow } = this.data.zdUserInfo; |
|
|
|
if (MedicineAuditSwitch === '0') { |
|
|
|
if (MedicineAuditSwitch === '0') { |
|
|
|
wx.navigateTo({ |
|
|
|
wx.navigateTo({ |
|
|
|
url: '/pages/vipLogin/index', |
|
|
|
url: '/patient/pages/vipLogin/index', |
|
|
|
}); |
|
|
|
}); |
|
|
|
} else if (MedicineAuditSwitch === '1') { |
|
|
|
} else if (MedicineAuditSwitch === '1') { |
|
|
|
const pendPath = { |
|
|
|
const pendPath = { |
|
|
|
0: '/gift/pages/vipPending/index', |
|
|
|
0: '/gift/patient/pages/vipPending/index', |
|
|
|
1: '/gift/pages/vipStartPending/index', |
|
|
|
1: '/gift/patient/pages/vipStartPending/index', |
|
|
|
}[isFollow]; |
|
|
|
}[isFollow]; |
|
|
|
const url = { |
|
|
|
const url = { |
|
|
|
1: pendPath, |
|
|
|
1: pendPath, |
|
|
|
2: '/gift/pages/vipReject/index', |
|
|
|
2: '/gift/patient/pages/vipReject/index', |
|
|
|
}[UseDrugsAuditStatus]; |
|
|
|
}[UseDrugsAuditStatus]; |
|
|
|
wx.navigateTo({ |
|
|
|
wx.navigateTo({ |
|
|
|
url: url || '/gift/pages/vipCert/index', |
|
|
|
url: url || '/gift/patient/pages/vipCert/index', |
|
|
|
}); |
|
|
|
}); |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
wx.showToast({ |
|
|
|
wx.showToast({ |
|
|
@ -503,7 +503,7 @@ Page({ |
|
|
|
this.handleToastCancel(); |
|
|
|
this.handleToastCancel(); |
|
|
|
} else if (toastType === 'aldAlert') { |
|
|
|
} else if (toastType === 'aldAlert') { |
|
|
|
wx.navigateTo({ |
|
|
|
wx.navigateTo({ |
|
|
|
url: '/pages/adl/index', |
|
|
|
url: '/patient/pages/adl/index', |
|
|
|
}); |
|
|
|
}); |
|
|
|
this.handleToastCancel(); |
|
|
|
this.handleToastCancel(); |
|
|
|
} else if (toastType === 'healthCare') { |
|
|
|
} else if (toastType === 'healthCare') { |
|
|
@ -512,12 +512,12 @@ Page({ |
|
|
|
this.handleToastCancel(); |
|
|
|
this.handleToastCancel(); |
|
|
|
} else if (toastType === 'ndrlAldAlert') { |
|
|
|
} else if (toastType === 'ndrlAldAlert') { |
|
|
|
wx.navigateTo({ |
|
|
|
wx.navigateTo({ |
|
|
|
url: '/pages/adl/index?nrdl=1', |
|
|
|
url: '/patient/pages/adl/index?nrdl=1', |
|
|
|
}); |
|
|
|
}); |
|
|
|
this.handleToastCancel(); |
|
|
|
this.handleToastCancel(); |
|
|
|
} else if (toastType === 'doubleStandards') { |
|
|
|
} else if (toastType === 'doubleStandards') { |
|
|
|
wx.navigateTo({ |
|
|
|
wx.navigateTo({ |
|
|
|
url: '/pages/adl/index', |
|
|
|
url: '/patient/pages/adl/index', |
|
|
|
}); |
|
|
|
}); |
|
|
|
this.handleToastCancel(); |
|
|
|
this.handleToastCancel(); |
|
|
|
} else if (toastType === 'dedicatedDoctor') { |
|
|
|
} else if (toastType === 'dedicatedDoctor') { |
|
|
@ -529,7 +529,7 @@ Page({ |
|
|
|
}, |
|
|
|
}, |
|
|
|
}).then((_res) => { |
|
|
|
}).then((_res) => { |
|
|
|
wx.navigateTo({ |
|
|
|
wx.navigateTo({ |
|
|
|
url: '/pages/interactivePatient/index', |
|
|
|
url: '/patient/pages/interactivePatient/index', |
|
|
|
}); |
|
|
|
}); |
|
|
|
}); |
|
|
|
}); |
|
|
|
this.handleToastCancel(null, false); |
|
|
|
this.handleToastCancel(null, false); |
|
|
|