Browse Source

患者端迁移

dev
kola-web 4 weeks ago
parent
commit
3ba6a03cb1
  1. 3
      index.d.ts
  2. 281
      src/app.ts
  3. 16
      src/patient/pages/adl/index.ts
  4. 22
      src/patient/pages/adlResult/index.ts
  5. 6
      src/patient/pages/adlResult/index.wxml
  6. 10
      src/patient/pages/adlShare/index.ts
  7. 6
      src/patient/pages/adlTest/index.ts
  8. 4
      src/patient/pages/cancellation/index.ts
  9. 2
      src/patient/pages/certPending/index.ts
  10. 2
      src/patient/pages/certReslove/index.ts
  11. 2
      src/patient/pages/changeUser/index.ts
  12. 4
      src/patient/pages/doctor/index.ts
  13. 6
      src/patient/pages/doctor/index.wxml
  14. 2
      src/patient/pages/doctorDetail/index.ts
  15. 2
      src/patient/pages/doctorDetailBak/index.ts
  16. 2
      src/patient/pages/drugRecord/index.ts
  17. 16
      src/patient/pages/enterInfo/index.ts
  18. 4
      src/patient/pages/family/index.ts
  19. 2
      src/patient/pages/family/index.wxml
  20. 12
      src/patient/pages/familyList/index.ts
  21. 20
      src/patient/pages/familyScan/index.ts
  22. 12
      src/patient/pages/getUserInfo/index.ts
  23. 2
      src/patient/pages/hospital/index.ts
  24. 2
      src/patient/pages/hospital/index.wxml
  25. 86
      src/patient/pages/index/index.ts
  26. 40
      src/patient/pages/index/index.wxml
  27. 14
      src/patient/pages/interactivePatient/index.ts
  28. 10
      src/patient/pages/live/index.ts
  29. 24
      src/patient/pages/liveDetail/index.ts
  30. 10
      src/patient/pages/liveResult/index.ts
  31. 18
      src/patient/pages/login/index.ts
  32. 8
      src/patient/pages/login/index.wxml
  33. 36
      src/patient/pages/my/index.ts
  34. 20
      src/patient/pages/my/index.wxml
  35. 8
      src/patient/pages/myLive/index.ts
  36. 14
      src/patient/pages/mySave/index.ts
  37. 8
      src/patient/pages/nrdl/index.ts
  38. 4
      src/patient/pages/nrdlDetail/index.ts
  39. 2
      src/patient/pages/nrdlTable/index.ts
  40. 58
      src/patient/pages/personalInformation/index.ts
  41. 6
      src/patient/pages/personalInformation/index.wxml
  42. 4
      src/patient/pages/privacyAgreement/index.ts
  43. 4
      src/patient/pages/privacyAgreement/index.wxml
  44. 6
      src/patient/pages/publishStoryDetail/index.ts
  45. 6
      src/patient/pages/referral/index.ts
  46. 16
      src/patient/pages/repository/index.ts
  47. 10
      src/patient/pages/repositoryDetail/index.ts
  48. 8
      src/patient/pages/signIn/index.ts
  49. 16
      src/patient/pages/start/index.ts
  50. 2
      src/patient/pages/startPending/index.ts
  51. 8
      src/patient/pages/startReject/index.ts
  52. 14
      src/patient/pages/story/index.ts
  53. 4
      src/patient/pages/story/index.wxml
  54. 4
      src/patient/pages/storyDetail/index.ts
  55. 10
      src/patient/pages/storyEnter/index.ts
  56. 6
      src/patient/pages/storyEnterResult/index.ts
  57. 6
      src/patient/pages/storyGuide/index.ts
  58. 2
      src/patient/pages/storyGuide/index.wxml
  59. 12
      src/patient/pages/storyList/index.ts
  60. 4
      src/patient/pages/storyList/index.wxml
  61. 2
      src/patient/pages/taskAgreement/index.ts
  62. 4
      src/patient/pages/taskAgreement/index.wxml
  63. 2
      src/patient/pages/thePublic/index.ts
  64. 34
      src/patient/pages/uploadCert/index.ts
  65. 34
      src/patient/pages/uploadCertBak/index.ts
  66. 8
      src/patient/pages/vipLogin/index.ts
  67. 10
      src/patient/pages/webview/index.ts
  68. 27
      typings/index.d.ts

3
index.d.ts vendored

@ -1,3 +0,0 @@ @@ -1,3 +0,0 @@
{
"usingComponents": {}
}

281
src/app.ts

@ -33,6 +33,8 @@ App<IAppOption>({ @@ -33,6 +33,8 @@ App<IAppOption>({
scene: null,
backPath: '',
zdUserInfo: {},
},
onLaunch() {
Page = page as WechatMiniprogram.Page.Constructor;
@ -148,4 +150,283 @@ App<IAppOption>({ @@ -148,4 +150,283 @@ App<IAppOption>({
menuButtonInfo,
});
},
// zd相关函数
zdGetTheme() {
return new Promise((resolve) => {
const checkUserType = () => {
const zdUserInfo = this.globalData.zdUserInfo;
if (zdUserInfo.UserType) {
// resolve(zdUserInfo.UserType >= 4 ? 'DRUG' : 'PATIENT')
resolve('PATIENT');
return true;
}
return false;
};
const tryResolve = () => {
if (!checkUserType()) {
setTimeout(tryResolve, 30);
}
};
tryResolve();
});
},
zdWaitLogin({ isReg = true, loginPage = false, pub = false } = { isReg: true, loginPage: false, pub: false }) {
let time: number;
const regFun = (resolve) => {
if (this.zdVerifySys(pub)) {
if (this.globalData.loginType === 1) {
this.zdRegistrationVerification(() => resolve(), loginPage);
} else {
resolve();
}
}
};
const unRegFun = (resolve) => {
if (!this.zdVerifySys(pub)) return;
resolve();
};
return new Promise((resolve: (value?) => void) => {
if (isReg) {
if (Object.keys(this.globalData.zdUserInfo).length) {
regFun(resolve);
return;
}
time = setInterval(() => {
if (Object.keys(this.globalData.zdUserInfo).length) {
clearInterval(time);
regFun(resolve);
}
}, 500);
return;
}
this.globalData.anyWhere = true;
if (this.globalData.loginState) {
unRegFun(resolve);
return;
}
time = setInterval(() => {
if (this.globalData.loginState) {
clearInterval(time);
unRegFun(resolve);
}
}, 500);
});
},
zdRegistrationVerification(callback: () => void, loginPage = false) {
// 1-空白用户,2-注册用户,3-疾病患者,4-用药患者
const { PatientId, AuditStatus, isFollow, UserType } = this.globalData.zdUserInfo;
const { anyWhere, first } = this.globalData;
if (loginPage || (anyWhere && first)) {
callback();
return;
}
if (UserType == 4) {
this.globalData.first = false;
callback();
return;
}
if (UserType == 1) {
this.globalData.registChannel = 0;
this.globalData.first = false;
wx.reLaunch({
url: '/patient/pages/login/index',
});
return;
}
let urlKey = '';
if (!PatientId) {
urlKey = 'enterInfo';
} else if (AuditStatus == 0) {
urlKey = 'noCert';
} else if (AuditStatus == 1) {
urlKey = isFollow ? 'nopending' : 'pending';
} else if (AuditStatus == 2) {
urlKey = 'reject';
}
let navUrl = {
enterInfo: '/patient/pages/enterInfo/index',
noCert: '/patient/pages/enterInfo/index',
reject: '/patient/pages/enterInfo/index',
pending: '/patient/pages/enterInfo/index',
nopending: '/patient/pages/enterInfo/index',
}[urlKey];
if (navUrl && first) {
this.globalData.registChannel = 0;
this.globalData.first = false;
wx.reLaunch({
url: navUrl,
});
this.globalData.first = false;
return;
}
this.globalData.first = false;
callback();
},
zdVerifySys(pub = false) {
// 1:患者 2:医生
const { loginType, isLogin, anyWhere } = this.globalData;
const pages = getCurrentPages();
const currentPage = pages[pages.length - 1];
const url = currentPage.route;
const options = currentPage.options;
const ignorePath = ['pages/start/index'];
// 未登录用户
if (!isLogin) {
// 医生端页面重定向到医生端登录页
if (url.includes('doctor/pages')) {
wx.reLaunch({
url: '/doctor/pages/d_login/index',
});
return false;
}
// 患者端随便看看
if (anyWhere) {
return true;
}
wx.reLaunch({
url: '/patient/pages/login/index',
});
return false;
}
if (ignorePath.includes(url)) return true;
if (loginType === 1) {
if (url.includes('doctor/pages')) {
wx.reLaunch({
url: '/pages/index/index',
});
return false;
} else {
return true;
}
}
if (loginType === 2 && !pub) {
if (url.includes('doctor/pages')) {
return true;
} else {
const params = Object.entries(options)
.map(([key, value]) => `${key}=${value}`)
.join('&');
wx.reLaunch({
url: '/doctor/pages/d_trans/index?path=' + encodeURIComponent(`/${url}?${params}`),
});
return false;
}
}
return true;
},
zdPermissionVerification(grade = 1, registChannel = 0, backPage = null, regBusinessId = '') {
// 1-空白用户,2-注册用户,3-疾病患者,4-用药患者
const { PatientId, AuditStatus, isFollow, UserType } = this.globalData.zdUserInfo;
const that = this;
this.globalData.registChannel = registChannel;
this.globalData.regBusinessId = regBusinessId;
let isReject = false;
return new Promise((resolve, reject) => {
if (grade == 2 && Number(UserType) < 2) {
wx.reLaunch({
url: '/patient/pages/login/index',
});
isReject = true;
}
if (grade == 3 && Number(UserType) < 3) {
if (UserType == 1) {
wx.reLaunch({
url: '/patient/pages/login/index',
});
isReject = true;
}
if (UserType == 2) {
let urlKey = '';
if (!PatientId) {
urlKey = 'enterInfo';
} else if (AuditStatus == 0) {
urlKey = 'noCert';
} else if (AuditStatus == 1) {
if (backPage && (backPage as string).includes('liveResult')) {
urlKey = 'liveResult';
} else {
urlKey = isFollow ? 'nopending' : 'pending';
}
} else if (AuditStatus == 2) {
urlKey = 'reject';
}
let navUrl = {
enterInfo: '/patient/pages/enterInfo/index',
noCert: '/patient/pages/enterInfo/index',
reject: '/patient/pages/enterInfo/index',
pending: '/patient/pages/enterInfo/index',
nopending: '/patient/pages/enterInfo/index',
liveResult: backPage,
}[urlKey];
if (urlKey == 'liveResult') {
wx.navigateTo({
url: navUrl as string,
});
} else {
wx.reLaunch({
url: navUrl as string,
});
}
isReject = true;
}
}
if (grade == 4 && Number(UserType) < 4) {
wx.reLaunch({
url: '/patient/pages/vipLogin/index',
});
isReject = true;
}
if (isReject) {
that.globalData.backPage = backPage;
reject(null);
return;
}
resolve(null);
});
},
getZdUserInfo(self, update = false, callback = (_zdUserInfo) => {}) {
if (this.globalData.zdUserInfo?.UserId && !update) {
self?.setData({
zdUserInfo: this.globalData.zdUserInfo,
});
callback(this.globalData.zdUserInfo);
return;
}
wx.ajax({
method: 'GET',
url: '?r=zd/account/info',
showMsg: false,
}).then((res) => {
res.UserType = res.UserType || 1;
if (res.UserType > 2) {
this.globalData.anyWhere = false;
}
this.globalData.zdUserInfo = res;
self?.setData({
zdUserInfo: res,
});
const { doctorId, inviteChan } = this.globalData.scene;
if (doctorId && res.InviteDoctorId != doctorId && this.globalData.isLogin && res.PatientId) {
wx.ajax({
method: 'POST',
url: '?r=zd/account/update-doctor',
data: {
inviteDoctorId: doctorId,
inviteChannel: inviteChan,
},
});
}
callback(res);
});
},
});

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

@ -7,7 +7,7 @@ Page({ @@ -7,7 +7,7 @@ Page({
url: 'https://voice-hb.oss-cn-beijing.aliyuncs.com/zaiding/voice_1690445548-5.mp3',
size: 50,
},
userInfo: {},
zdUserInfo: {},
m_d: '',
nrdl: '',
@ -26,9 +26,9 @@ Page({ @@ -26,9 +26,9 @@ Page({
m_d: options.m_d,
nrdl: options.nrdl,
})
app.waitLogin({ isReg: false }).then(() => {
app.zdWaitLogin({ isReg: false }).then(() => {
app.zdMpBehavior({ PageName: 'PG_PATIENTASSESSMENTSTART' })
app.getUserInfo(this, true)
app.getZdUserInfo(this, true)
this.getAdlScore()
if (options.adlPushId) {
wx.ajax({
@ -55,9 +55,9 @@ Page({ @@ -55,9 +55,9 @@ Page({
options.scene?.includes('doctorId') &&
options.scene?.includes('inviteChan')
) {
app.permissionVerification(3, 15, `/pages/index/index`).then(() => {
app.zdPermissionVerification(3, 15, `/patient/pages/index/index`).then(() => {
wx.reLaunch({
url: '/pages/index/index',
url: '/patient/pages/index/index',
})
})
} else {
@ -89,13 +89,13 @@ Page({ @@ -89,13 +89,13 @@ Page({
handleShare() {
app.zdMpBehavior({ PageName: 'BTN_PATIENTASSESSMENTSTARTSHARE' })
wx.navigateTo({
url: '/pages/adlShare/index',
url: '/patient/pages/adlShare/index',
})
},
handleTest() {
app.zdMpBehavior({ PageName: 'BTN_PATIENTASSESSMENTSTART' })
wx.navigateTo({
url: `/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}`,
})
},
handleBack() {
@ -104,7 +104,7 @@ Page({ @@ -104,7 +104,7 @@ Page({
onShareAppMessage() {
return {
title: 'MG-ADL测评表:评估重症肌无力患者症状对生活质量的影响',
path: '/pages/adl/index',
path: '/patient/pages/adl/index',
}
},
})

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

@ -70,7 +70,7 @@ Page({ @@ -70,7 +70,7 @@ Page({
},
onLoad(options) {
console.log(options)
app.getTheme().then((res) => {
app.zdGetTheme().then((res) => {
this.setData({
theme: res,
})
@ -91,9 +91,9 @@ Page({ @@ -91,9 +91,9 @@ Page({
sendWeiYi: options.wy === '1',
idafa: options.idafa === '1',
})
app.waitLogin({ loginPage: true }).then(() => {
app.zdWaitLogin({ loginPage: true }).then(() => {
app.zdMpBehavior({ PageName: 'PG_PATIENTASSESSMENTRESULTS' })
app.getUserInfo(this, false)
app.getZdUserInfo(this, false)
this.getUnreadCount()
this.getDetail()
this.getQrCode()
@ -211,7 +211,7 @@ Page({ @@ -211,7 +211,7 @@ Page({
},
}).then(() => {
wx.redirectTo({
url: '/pages/adlTest/index',
url: '/patient/pages/adlTest/index',
})
})
}
@ -219,23 +219,23 @@ Page({ @@ -219,23 +219,23 @@ Page({
})
},
handleSave() {
app.permissionVerification(3, 2, ``).then(() => {})
app.zdPermissionVerification(3, 2, ``).then(() => {})
},
handleMyHealth() {
app.zdMpBehavior({ PageName: 'BTN_PATIENTASSESSMENTRESULTGETNOTES' })
wx.navigateTo({
url: '/gift/pages/myHealthRecord/index',
url: '/gift/patient/pages/myHealthRecord/index',
})
},
handleShare() {
wx.navigateTo({
url: '/pages/adlShare/index',
url: '/patient/pages/adlShare/index',
})
},
handleToastOk() {
if (this.data.toastType === 'adlLevelUp') {
wx.navigateTo({
url: '/pages/webview/index',
url: '/patient/pages/webview/index',
})
}
this.handleToastCancel()
@ -250,10 +250,10 @@ Page({ @@ -250,10 +250,10 @@ Page({
},
routerTo(e) {
const { url } = e.currentTarget.dataset
if (url === '/pages/interactivePatient/index') {
if (url === '/patient/pages/interactivePatient/index') {
app.zdMpBehavior({ PageName: 'BTN_PATIENTASSESSMENTRESULTDOCTORCARD' })
}
if (url === '/pages/webview/index') {
if (url === '/patient/pages/webview/index') {
app.zdMpBehavior({ PageName: 'BTN_PATIENTASSESSMENTRESULTAPPLYINSURANCE' })
}
wx.navigateTo({
@ -266,7 +266,7 @@ Page({ @@ -266,7 +266,7 @@ Page({
onShareAppMessage() {
return {
title: 'MG-ADL测评表:评估重症肌无力患者症状对生活质量的影响',
path: '/pages/adl/index',
path: '/patient/pages/adl/index',
}
},
})

6
src/patient/pages/adlResult/index.wxml

@ -133,7 +133,7 @@ @@ -133,7 +133,7 @@
</view>
<view class="content" wx:elif="{{detail.SteroidDailyDose>=20}}">您的激素用量超过了20mg,建议定期复诊</view>
</view>
<view class="btn" bind:tap="routerTo" data-url="/pages/interactivePatient/index">
<view class="btn" bind:tap="routerTo" data-url="/patient/pages/interactivePatient/index">
{{unreadCount ? '去看看':'去咨询'}}
<van-icon name="arrow" />
</view>
@ -352,11 +352,11 @@ @@ -352,11 +352,11 @@
</view>
</view>
<view class="shangbao-footer" bind:tap="routerTo" data-url="/pages/webview/index" wx:if="{{m_d==2 || sendWeiYi || idafa}}">
<view class="shangbao-footer" bind:tap="routerTo" data-url="/patient/pages/webview/index" wx:if="{{m_d==2 || sendWeiYi || idafa}}">
<image class="btn" src="{{imageUrl}}za-images/2/adl-result-btn.gif?t={{Timestamp}}"></image>
</view>
<view class="navback" bind:tap="routerTo" data-url="/pages/nrdl/index" wx:if="{{nrdl==1}}">
<view class="navback" bind:tap="routerTo" data-url="/patient/pages/nrdl/index" wx:if="{{nrdl==1}}">
立即查看医保报销详细解读
<van-icon name="arrow" />
<view class="sub">{{patientInfo.PatientNum}}人正在关注</view>

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

@ -4,7 +4,7 @@ Page({ @@ -4,7 +4,7 @@ Page({
data: {
poster: '',
params: {},
userInfo: {} as any,
zdUserInfo: {} as any,
posterUrl: '',
},
onLoad() {
@ -18,9 +18,9 @@ Page({ @@ -18,9 +18,9 @@ Page({
bottom,
})
}
app.waitLogin({ loginPage: true }).then(() => {
app.zdWaitLogin({ loginPage: true }).then(() => {
app.zdMpBehavior({ PageName: 'PG_PATIENTPOSTER' })
app.getUserInfo(this, true, () => {
app.getZdUserInfo(this, true, () => {
this.getPoster()
})
})
@ -31,7 +31,7 @@ Page({ @@ -31,7 +31,7 @@ Page({
url: '?r=poster/prepare',
data: {
posterId: 'adl2-invite',
userId: this.data.userInfo.UserId,
userId: this.data.zdUserInfo.UserId,
},
}).then((res) => {
this.setData({
@ -128,7 +128,7 @@ Page({ @@ -128,7 +128,7 @@ Page({
onShareAppMessage() {
return {
title: 'MG-ADL测评表:重症肌无力患者评估表',
path: '/pages/adl/index',
path: '/patient/pages/adl/index',
}
},
})

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

@ -238,7 +238,7 @@ Page({ @@ -238,7 +238,7 @@ Page({
nrdl: options.nrdl,
})
app.waitLogin({ isReg: false }).then(() => {
app.zdWaitLogin({ isReg: false }).then(() => {
this.handleMp(this.data.nav)
})
},
@ -373,7 +373,7 @@ Page({ @@ -373,7 +373,7 @@ Page({
wx.hideLoading()
wx.setStorageSync('adlResultInfo', params.ScoreInfo)
wx.redirectTo({
url: `/pages/adlResult/index?id=${id}&reset=1&m_d=${m_d}&nrdl=${nrdl}&wy=${Number(params.sendWeiYi)}&idafa=${Number(params.inviteDoctorAndFirstAdl)}`,
url: `/patient/pages/adlResult/index?id=${id}&reset=1&m_d=${m_d}&nrdl=${nrdl}&wy=${Number(params.sendWeiYi)}&idafa=${Number(params.inviteDoctorAndFirstAdl)}`,
})
})
},
@ -391,7 +391,7 @@ Page({ @@ -391,7 +391,7 @@ Page({
onShareAppMessage() {
return {
title: 'MG-ADL测评表:评估重症肌无力患者症状对生活质量的影响',
path: '/pages/adl/index',
path: '/patient/pages/adl/index',
}
},

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

@ -32,10 +32,10 @@ Page({ @@ -32,10 +32,10 @@ Page({
}).then(() => {
app.globalData.backPage = "";
app.globalData.loginState = "";
app.globalData.userInfo = {};
app.globalData.zdUserInfo = {};
app.startLogin();
wx.reLaunch({
url: "/pages/login/index",
url: "/patient/pages/login/index",
});
});
}

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

@ -13,7 +13,7 @@ Page({ @@ -13,7 +13,7 @@ Page({
backPage = "";
}
wx.reLaunch({
url: backPage || "/pages/index/index",
url: backPage || "/patient/pages/index/index",
});
},
getCode() {

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

@ -42,7 +42,7 @@ Page({ @@ -42,7 +42,7 @@ Page({
const backPage = app.globalData.backPage;
app.globalData.backPage = "";
wx.reLaunch({
url: backPage || "/pages/index/index",
url: backPage || "/patient/pages/index/index",
});
},
});

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

@ -72,7 +72,7 @@ Page({ @@ -72,7 +72,7 @@ Page({
.then((res) => {
console.log(res);
wx.reLaunch({
url: "/pages/index/index",
url: "/patient/pages/index/index",
});
})
.catch((err) => {

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

@ -46,7 +46,7 @@ Page({ @@ -46,7 +46,7 @@ Page({
bottom,
})
}
app.waitLogin().then((_res) => {
app.zdWaitLogin().then((_res) => {
if (options.es === '201504') {
app.globalData.IsAliQiWei = 1
app.zdMpBehavior({ PageName: 'PG_PATIENTVISITMAP_PAGE' })
@ -413,7 +413,7 @@ Page({ @@ -413,7 +413,7 @@ Page({
})
},
onShareAppMessage(e: any) {
let path = `/pages/doctor/index?active=${this.data.tabActive}&es=${this.data.es}`
let path = `/patient/pages/doctor/index?active=${this.data.tabActive}&es=${this.data.es}`
const { toastType, toastParams } = this.data
if (toastType === 'siteConform' && e.from === 'button') {
path = `${path}&pid=${toastParams.ProvinceId}&cid=${toastParams.CityId}&pn=${toastParams.ProvinceName}&cn=${toastParams.CityName}`

6
src/patient/pages/doctor/index.wxml

@ -59,7 +59,7 @@ @@ -59,7 +59,7 @@
wx:for="{{HosList}}"
wx:key="index"
bind:tap="handleDetail"
data-url="/pages/hospital/index?id={{item.Id}}"
data-url="/patient/pages/hospital/index?id={{item.Id}}"
>
<view class="follow" wx:if="{{item.IsTop==1}}">已关注</view>
<view class="hosttipat-img">
@ -101,7 +101,7 @@ @@ -101,7 +101,7 @@
<view
class="dtp-item"
bind:tap="handleDetail"
data-url="/gift/pages/dtpDurg/index?id={{item.Id}}"
data-url="/gift/patient/pages/dtpDurg/index?id={{item.Id}}"
wx:for="{{dtpList}}"
wx:key="index"
>
@ -142,7 +142,7 @@ @@ -142,7 +142,7 @@
wx:key="index"
bind:tap="handleDoctor"
bind:tap="handleDetail"
data-url="/pages/doctorDetail/index?id={{item.Id}}"
data-url="/patient/pages/doctorDetail/index?id={{item.Id}}"
>
<view class="c-header">
<image class="avatar" mode="aspectFill" src="{{item.Img}}"></image>

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

@ -21,7 +21,7 @@ Page({ @@ -21,7 +21,7 @@ Page({
bottom,
})
}
app.waitLogin().then((_res) => {
app.zdWaitLogin().then((_res) => {
this.setData({
id: options.id,
})

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

@ -13,7 +13,7 @@ Page({ @@ -13,7 +13,7 @@ Page({
},
},
onLoad(options) {
app.waitLogin().then((_res) => {
app.zdWaitLogin().then((_res) => {
this.setData({
id: options.id,
});

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

@ -32,7 +32,7 @@ Page({ @@ -32,7 +32,7 @@ Page({
disabled: Boolean(options.id),
})
if (options.id) {
app.waitLogin().then((res) => {
app.zdWaitLogin().then((res) => {
this.getDetail()
})
}

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

@ -27,13 +27,13 @@ Page({ @@ -27,13 +27,13 @@ Page({
pagePath: options.page,
proces: options.proces,
})
app.waitLogin({ isReg: false, loginPage: true }).then(() => {
app.getUserInfo(this, true, (userInfo) => {
app.zdWaitLogin({ isReg: false, loginPage: true }).then(() => {
app.getZdUserInfo(this, true, (zdUserInfo) => {
this.setData({
relationType: userInfo.RelationType || '1',
name: userInfo.PatientName,
gender: userInfo.Gender,
ageRange: userInfo.AgeRange,
relationType: zdUserInfo.RelationType || '1',
name: zdUserInfo.PatientName,
gender: zdUserInfo.Gender,
ageRange: zdUserInfo.AgeRange,
})
})
app.zdMpBehavior({ PageName: 'PG_PATIENTINFOENTRY' })
@ -104,7 +104,7 @@ Page({ @@ -104,7 +104,7 @@ Page({
const backPage = app.globalData.backPage
const navUrl =
typeof backPage === 'string' && backPage.includes('liveResult') ? backPage : '/pages/certReslove/index'
typeof backPage === 'string' && backPage.includes('liveResult') ? backPage : '/patient/pages/certReslove/index'
this.setData({
submiting: true,
@ -130,7 +130,7 @@ Page({ @@ -130,7 +130,7 @@ Page({
},
})
.then((_res) => {
app.getUserInfo(this, true, () => {
app.getZdUserInfo(this, true, () => {
wx.reLaunch({
url: navUrl,
})

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

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

2
src/patient/pages/family/index.wxml

@ -15,7 +15,7 @@ @@ -15,7 +15,7 @@
</van-image>
<view class="tip">请使用微信扫一扫绑定</view>
</view>
<view bind:tap="routerTo" class="link" data-url="/pages/familyList/index">
<view bind:tap="routerTo" class="link" data-url="/patient/pages/familyList/index">
查看我的家庭成员
<van-icon name="arrow" />
</view>

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

@ -7,14 +7,14 @@ Page({ @@ -7,14 +7,14 @@ Page({
// toastShow:true,
// toastType:"familyUnbind",
familyList: [],
userInfo: {},
zdUserInfo: {},
UserId: "",
},
onLoad() {
app.waitLogin().then(() => {
app.zdWaitLogin().then(() => {
app.zdMpBehavior({ PageName: 'PG_PATIENTMYRELATIVESLIST' })
this.getFamilyList();
app.getUserInfo(this);
app.getZdUserInfo(this);
});
},
getFamilyList(loading = true) {
@ -52,8 +52,8 @@ Page({ @@ -52,8 +52,8 @@ Page({
icon: "none",
title: "解绑成功",
success: () => {
app.getUserInfo(this, true, (_userInfo) => {
app.waitLogin().then(() => {
app.getZdUserInfo(this, true, (_zdUserInfo) => {
app.zdWaitLogin().then(() => {
this.getFamilyList(false);
});
});
@ -71,7 +71,7 @@ Page({ @@ -71,7 +71,7 @@ Page({
wx.navigateBack({
fail() {
wx.reLaunch({
url: "/pages/index/index",
url: "/patient/pages/index/index",
});
},
});

20
src/patient/pages/familyScan/index.ts

@ -9,7 +9,7 @@ Page({ @@ -9,7 +9,7 @@ Page({
reload: false,
mpPatientInfo: {},
ignoreAgreement: {},
userInfo: {} as any,
zdUserInfo: {} as any,
},
onLoad(options) {
this.setData({
@ -24,14 +24,14 @@ Page({ @@ -24,14 +24,14 @@ Page({
PatientId: scene.pId,
});
}
app.waitLogin({ isReg: false }).then(() => {
app.getUserInfo(this, true, () => {
app.zdWaitLogin({ isReg: false }).then(() => {
app.getZdUserInfo(this, true, () => {
this.getMpPatientInfo();
});
});
},
getMpPatientInfo() {
const { UserType } = this.data.userInfo;
const { UserType } = this.data.zdUserInfo;
wx.ajax({
method: "GET",
url: "?r=xd/account/mp-patient-info",
@ -45,11 +45,11 @@ Page({ @@ -45,11 +45,11 @@ Page({
if (!this.data.ignoreAgreement) {
if (UserType >= 2) {
wx.navigateTo({
url: `/pages/privacyAgreement/index?page=/pages/familyScan/index`,
url: `/patient/pages/privacyAgreement/index?page=/patient/pages/familyScan/index`,
});
} else {
wx.navigateTo({
url: `/pages/login/index?page=/pages/familyScan/index`,
url: `/patient/pages/login/index?page=/patient/pages/familyScan/index`,
});
}
}
@ -63,7 +63,7 @@ Page({ @@ -63,7 +63,7 @@ Page({
},
handleHome() {
wx.reLaunch({
url: "/pages/index/index",
url: "/patient/pages/index/index",
});
},
handleResetBind() {
@ -88,7 +88,7 @@ Page({ @@ -88,7 +88,7 @@ Page({
}
// wx.reLaunch({
// url: "/pages/login/index",
// url: "/patient/pages/login/index",
// });
// return;
@ -101,9 +101,9 @@ Page({ @@ -101,9 +101,9 @@ Page({
},
loading: true,
}).then(() => {
app.getUserInfo(this, true, (userInfo) => {
app.getZdUserInfo(this, true, (zdUserInfo) => {
wx.reLaunch({
url: "/pages/index/index",
url: "/patient/pages/index/index",
});
});
});

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

@ -3,7 +3,7 @@ const app = getApp<IAppOption>(); @@ -3,7 +3,7 @@ const app = getApp<IAppOption>();
Page({
data: {
list: [],
userInfo: {
zdUserInfo: {
avatarUrl: "",
},
},
@ -17,8 +17,8 @@ Page({ @@ -17,8 +17,8 @@ Page({
}
},
onShow() {
app.waitLogin().then((_res) => {
app.getUserInfo(this, true);
app.zdWaitLogin().then((_res) => {
app.getZdUserInfo(this, true);
});
},
onChooseAvatar(e) {
@ -49,7 +49,7 @@ Page({ @@ -49,7 +49,7 @@ Page({
icon: "none",
});
that.setData({
["userInfo.UserImg"]: avatarUrl,
["zdUserInfo.UserImg"]: avatarUrl,
});
})
.catch(() => {
@ -68,10 +68,10 @@ Page({ @@ -68,10 +68,10 @@ Page({
});
},
handleSubmit() {
console.log(this.data.userInfo);
console.log(this.data.zdUserInfo);
},
handleBack() {
wx.navigateBack();
app.getUserInfo(this, true);
app.getZdUserInfo(this, true);
},
});

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

@ -20,7 +20,7 @@ Page({ @@ -20,7 +20,7 @@ Page({
},
},
onLoad(options) {
app.waitLogin().then((_res) => {
app.zdWaitLogin().then((_res) => {
this.setData({
id: options.id,
})

2
src/patient/pages/hospital/index.wxml

@ -39,7 +39,7 @@ @@ -39,7 +39,7 @@
wx:for="{{detail.doctors}}"
wx:key="index"
bind:tap="routerTo"
data-url="/pages/doctorDetail/index?id={{item.Id}}"
data-url="/patient/pages/doctorDetail/index?id={{item.Id}}"
>
<image class="avatar" mode="aspectFill" src="{{item.Img}}"></image>
<view class="content">

86
src/patient/pages/index/index.ts

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

40
src/patient/pages/index/index.wxml

@ -4,7 +4,7 @@ @@ -4,7 +4,7 @@
<view class="page-container">
<pageNavbar drug="{{theme === 'DRUG'}}"></pageNavbar>
<view class="user" wx:if="{{userInfo.UserType!=1}}">
<image class="avatar" src="{{userInfo.UserImg}}" bind:tap="routerTo" data-url="/pages/getUserInfo/index"></image>
<image class="avatar" src="{{userInfo.UserImg}}" bind:tap="routerTo" data-url="/patient/pages/getUserInfo/index"></image>
<view class="content">
<view class="name">{{today}}</view>
<view class="info" wx:if="{{userInfo.UserType>=3}}">
@ -14,7 +14,7 @@ @@ -14,7 +14,7 @@
</view>
</view>
</view>
<view wx:if="{{userInfo.UserType>=3}}" class="referral" bind:tap="routerTo" data-url="/pages/referral/index">
<view wx:if="{{userInfo.UserType>=3}}" class="referral" bind:tap="routerTo" data-url="/patient/pages/referral/index">
<image class="referral-img" src="{{imageUrl}}za-images/5/referral-card.png?t={{Timestamp}}"></image>
</view>
<view
@ -22,7 +22,7 @@ @@ -22,7 +22,7 @@
wx:if="{{userInfo.ExclusiveDoctorId}}"
style="background: url({{imageUrl}}za-images/2/doctor-home{{theme === 'DRUG' ? '-drug':''}}-bg.png?t={{Timestamp}}) no-repeat 16rpx 9rpx/606rpx 173rpx,{{theme === 'DRUG'? 'linear-gradient( 360deg, #25D9C8 0%, #25D9C8 73%, #B5EFEA 100%)':'linear-gradient( 360deg, #CF5375 0%, #CF5375 74%, #EE9FB9 100%) no-repeat top center/100% 100%'}}"
bind:tap="routerTo"
data-url="/pages/interactivePatient/index"
data-url="/patient/pages/interactivePatient/index"
>
<view class="container">
<view class="avatar">
@ -97,7 +97,7 @@ @@ -97,7 +97,7 @@
<view
class="other"
catch:tap="routerTo"
data-url="/gift/pages/myHealthRecord/index"
data-url="/gift/patient/pages/myHealthRecord/index"
data-code="{{card.code}}"
>
<image
@ -110,12 +110,12 @@ @@ -110,12 +110,12 @@
class="status"
wx:if="{{adlNewRecord.TotalScore}}"
catch:tap="routerTo"
data-url="/pages/adl/index"
data-url="/patient/pages/adl/index"
data-code="{{card.code}}"
>
最近一次测评 {{adlNewRecord.newCreateTime}}
</view>
<view class="btn" wx:else catch:tap="routerTo" data-url="/pages/adl/index" data-code="{{card.code}}">
<view class="btn" wx:else catch:tap="routerTo" data-url="/patient/pages/adl/index" data-code="{{card.code}}">
立即自测
<image
wx:if="{{theme === 'DRUG'}}"
@ -145,7 +145,7 @@ @@ -145,7 +145,7 @@
<view
class="more"
catch:tap="routerTo"
data-url="/gift/pages/myHealthRecord/index"
data-url="/gift/patient/pages/myHealthRecord/index"
data-code="{{card.code}}"
>
查看健康档案
@ -170,7 +170,7 @@ @@ -170,7 +170,7 @@
<view class="box">{{detail.days}}</view>
<view class="sub">天</view>
</view>
<view class="more" catch:tap="routerTo" data-url="/pages/drugRecord/index" data-code="{{card.code}}">
<view class="more" catch:tap="routerTo" data-url="/patient/pages/drugRecord/index" data-code="{{card.code}}">
更新记录
<van-icon name="arrow" />
</view>
@ -183,7 +183,7 @@ @@ -183,7 +183,7 @@
<view>展示您的注射信息</view>
<view>开启您的专属服务</view>
</view>
<view class="btn" catch:tap="routerTo" data-url="/pages/drugRecord/index" data-code="{{card.code}}">
<view class="btn" catch:tap="routerTo" data-url="/patient/pages/drugRecord/index" data-code="{{card.code}}">
开始记录
<image class="icon" src="{{imageUrl}}za-images/1.5/btn-drug.png?t={{Timestamp}}"></image>
</view>
@ -213,7 +213,7 @@ @@ -213,7 +213,7 @@
<view class="live" wx:if="{{card.code == 'activity1' && card.showStatus == 1 }}">
<view class="header" wx:if="{{card.name}}">
<view class="title">{{card.name}}</view>
<view class="more" bind:tap="routerTo" data-url="/pages/live/index" data-active="1" data-code="{{card.code}}">
<view class="more" bind:tap="routerTo" data-url="/patient/pages/live/index" data-active="1" data-code="{{card.code}}">
查看全部
<van-icon name="arrow" />
</view>
@ -225,7 +225,7 @@ @@ -225,7 +225,7 @@
wx:for="{{liveDownList}}"
wx:key="index"
bind:tap="routerTo"
data-url="/pages/liveDetail/index?id={{item.Id}}"
data-url="/patient/pages/liveDetail/index?id={{item.Id}}"
data-code="{{card.code}}"
>
<image class="live-img" mode="aspectFill" src="{{item.IntroductionUrl}}"></image>
@ -237,14 +237,14 @@ @@ -237,14 +237,14 @@
<view class="live-up" wx:if="{{card.code == 'activity2' && card.showStatus == 1 && false }}">
<view class="header" wx:if="{{card.name}}">
<view class="title">{{card.name}}</view>
<view class="more" bind:tap="routerTo" data-url="/pages/live/index" data-active="0" data-code="{{card.code}}">
<view class="more" bind:tap="routerTo" data-url="/patient/pages/live/index" data-active="0" data-code="{{card.code}}">
查看全部
<van-icon name="arrow" />
</view>
</view>
<view class="live-container {{theme === 'DRUG' && 'live-container-drugs'}}">
<view class="scroll">
<view class="live-item" bind:tap="routerTo" data-url="/pages/live/index?index=0" data-code="{{card.code}}">
<view class="live-item" bind:tap="routerTo" data-url="/patient/pages/live/index?index=0" data-code="{{card.code}}">
<image class="live-img" mode="aspectFill" src="{{imageUrl}}za-images/1/3.png?t={{Timestamp}}"></image>
</view>
<view
@ -252,7 +252,7 @@ @@ -252,7 +252,7 @@
wx:for="{{liveList}}"
wx:key="index"
bind:tap="routerTo"
data-url="/pages/liveDetail/index?id={{item.Id}}"
data-url="/patient/pages/liveDetail/index?id={{item.Id}}"
data-code="{{card.code}}"
>
<view class="photo-wrap">
@ -295,7 +295,7 @@ @@ -295,7 +295,7 @@
</view>
</view>
<view class="live-up-new" wx:if="{{card.code == 'activity2' && card.showStatus == 1 }}">
<view class="l-banner" bind:tap="routerTo" data-url="/pages/live/index?index=0" data-code="{{card.code}}">
<view class="l-banner" bind:tap="routerTo" data-url="/patient/pages/live/index?index=0" data-code="{{card.code}}">
<image class="live-img" mode="aspectFill" src="{{imageUrl}}za-images/live-banner.png?t={{Timestamp}}"></image>
</view>
<view
@ -303,7 +303,7 @@ @@ -303,7 +303,7 @@
wx:for="{{liveList}}"
wx:key="index"
bind:tap="routerTo"
data-url="/pages/liveDetail/index?id={{item.Id}}"
data-url="/patient/pages/liveDetail/index?id={{item.Id}}"
data-code="{{card.code}}"
>
<view class="photo-wrap">
@ -345,7 +345,7 @@ @@ -345,7 +345,7 @@
<view class="story" wx:if="{{card.code == 'story' && card.showStatus == 1}}">
<view class="header" wx:if="{{card.name}}">
<view class="title">{{card.name}}</view>
<view class="more" bind:tap="routerTo" data-url="/pages/story/index" data-code="{{card.code}}">
<view class="more" bind:tap="routerTo" data-url="/patient/pages/story/index" data-code="{{card.code}}">
查看全部
<van-icon name="arrow" />
</view>
@ -356,7 +356,7 @@ @@ -356,7 +356,7 @@
class="story-item"
wx:for="{{storyList}}"
bind:tap="routerTo"
data-url="/pages/publishStoryDetail/index?id={{item.Id}}"
data-url="/patient/pages/publishStoryDetail/index?id={{item.Id}}"
data-code="{{card.code}}"
>
<image class="story-img" mode="aspectFill" src="{{item.ListPicLink}}"></image>
@ -397,7 +397,7 @@ @@ -397,7 +397,7 @@
<view class="book" wx:if="{{card.code == 'article' && card.showStatus == 1 && infoList.length}}">
<view class="header" wx:if="{{card.name}}">
<view class="title">{{card.name}}</view>
<view bind:tap="routerTo" class="more" data-url="/pages/repository/index" data-code="{{card.code}}">
<view bind:tap="routerTo" class="more" data-url="/patient/pages/repository/index" data-code="{{card.code}}">
查看全部
<van-icon name="arrow" />
</view>
@ -416,7 +416,7 @@ @@ -416,7 +416,7 @@
wx:for="{{info}}"
wx:key="index"
bind:tap="routerTo"
data-url="/pages/repositoryDetail/index?id={{item.ArticleId}}"
data-url="/patient/pages/repositoryDetail/index?id={{item.ArticleId}}"
data-code="{{card.code}}"
>
<view class="cover">

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

@ -46,21 +46,21 @@ Page({ @@ -46,21 +46,21 @@ Page({
week: ['周一', '周二', '周三', '周四', '周五', '周六', '周日'],
timeDay: { 1: '上午', 2: '下午' },
userInfo: {},
zdUserInfo: {},
},
innerAudioContext: null as WechatMiniprogram.InnerAudioContext | null,
onLoad(options) {
this.innerAudioContext = wx.createInnerAudioContext({
useWebAudioImplement: true,
})
app.waitLogin({}).then(() => {
app.zdWaitLogin({}).then(() => {
app.zdMpBehavior({ PageName: 'PG_PATIENTINTERACTIONDETAILS' })
this.getDoctorDetail()
this.getQuestionList()
this.getMessageList()
app.getUserInfo(this, true, (userInfo) => {
app.getZdUserInfo(this, true, (zdUserInfo) => {
this.setData({
userInfo,
zdUserInfo,
})
})
if (options.adlPushId) {
@ -276,7 +276,7 @@ Page({ @@ -276,7 +276,7 @@ Page({
handleDoctorDetail() {
const { doctorId } = this.data.doctorDetail
wx.navigateTo({
url: `/pages/doctorDetail/index?id=${doctorId}`,
url: `/patient/pages/doctorDetail/index?id=${doctorId}`,
})
},
handleRead() {
@ -300,7 +300,7 @@ Page({ @@ -300,7 +300,7 @@ Page({
},
handleAdl() {
wx.navigateTo({
url: '/pages/adl/index',
url: '/patient/pages/adl/index',
})
},
handleAudio(e) {
@ -334,7 +334,7 @@ Page({ @@ -334,7 +334,7 @@ Page({
},
handleFillUserInfo() {
wx.navigateTo({
url: '/pages/personalInformation/index',
url: '/patient/pages/personalInformation/index',
})
},
handleReferral() {

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

@ -20,10 +20,10 @@ Page({ @@ -20,10 +20,10 @@ Page({
},
liveStatus: app.globalData.liveStatus,
activityStatus: app.globalData.activityStatus,
userInfo: {},
zdUserInfo: {},
},
onLoad() {
app.getTheme().then((res) => {
app.zdGetTheme().then((res) => {
this.setData({
theme: res,
})
@ -48,10 +48,10 @@ Page({ @@ -48,10 +48,10 @@ Page({
})
app.globalData.active = ''
}
app.waitLogin().then(() => {
app.zdWaitLogin().then(() => {
app.zdMpBehavior({ PageName: 'PG_PATIENTWEDNESDAYLECTURELIST' })
this.getConfig()
app.getUserInfo(this, true)
app.getZdUserInfo(this, true)
})
},
tabChange(e) {
@ -237,7 +237,7 @@ Page({ @@ -237,7 +237,7 @@ Page({
app.zdMpBehavior({ PageName: 'BTN_PATIENTWEDNESDAYTALKACTIVITYLIST' })
}
wx.navigateTo({
url: `/pages/liveDetail/index?id=${id}`,
url: `/patient/pages/liveDetail/index?id=${id}`,
})
},
onReachBottom() {

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

@ -7,7 +7,7 @@ Page({ @@ -7,7 +7,7 @@ Page({
id: '',
shareShow: false,
detail: {} as any,
userInfo: {} as any,
zdUserInfo: {} as any,
posterUrl: '',
params: {},
play: false,
@ -31,10 +31,10 @@ Page({ @@ -31,10 +31,10 @@ Page({
}, 1000)
},
onShow() {
app.waitLogin({ isReg: false }).then(() => {
app.zdWaitLogin({ isReg: false }).then(() => {
this.getDetail()
this.setView()
app.getUserInfo(this, true, () => {
app.getZdUserInfo(this, true, () => {
this.getPosterParams()
})
})
@ -49,7 +49,7 @@ Page({ @@ -49,7 +49,7 @@ Page({
data: {
posterId: 'activity-invite',
activityId: this.data.id,
userId: this.data.userInfo.UserId,
userId: this.data.zdUserInfo.UserId,
},
}).then((res) => {
this.setData({
@ -119,7 +119,7 @@ Page({ @@ -119,7 +119,7 @@ Page({
handleLive() {
const { Type } = this.data.detail
app
.permissionVerification(3, Type == 1 ? 1 : 10, `/pages/liveDetail/index?id=${this.data.id}`, this.data.id)
.zdPermissionVerification(3, Type == 1 ? 1 : 10, `/patient/pages/liveDetail/index?id=${this.data.id}`, this.data.id)
.then(() => {
const { TencentMeetingCode } = this.data.detail
wx.navigateToMiniProgram({
@ -138,12 +138,12 @@ Page({ @@ -138,12 +138,12 @@ Page({
// },
handleResult() {
wx.navigateTo({
url: `/pages/liveResult/index?id=${this.data.id}`,
url: `/patient/pages/liveResult/index?id=${this.data.id}`,
})
},
handleSignUp() {
const { Type } = this.data.detail
const { UserType } = this.data.userInfo
const { UserType } = this.data.zdUserInfo
if (Type == 1) {
app.zdMpBehavior({ PageName: 'BTN_PATIENTMEETINGDETAILSIGNUP' })
@ -160,15 +160,15 @@ Page({ @@ -160,15 +160,15 @@ Page({
},
}).then((res) => {
app
.permissionVerification(
.zdPermissionVerification(
3,
Type == 1 ? 1 : 10,
`/pages/liveResult/index?id=${this.data.id}&rewardScore=${res.rewardScore}`,
`/patient/pages/liveResult/index?id=${this.data.id}&rewardScore=${res.rewardScore}`,
this.data.id,
)
.then(() => {
wx.navigateTo({
url: `/pages/liveResult/index?id=${this.data.id}&rewardScore=${res.rewardScore}`,
url: `/patient/pages/liveResult/index?id=${this.data.id}&rewardScore=${res.rewardScore}`,
})
})
})
@ -180,7 +180,7 @@ Page({ @@ -180,7 +180,7 @@ Page({
this.saveShare()
},
saveShare() {
const { UserType } = this.data.userInfo
const { UserType } = this.data.zdUserInfo
wx.ajax({
method: 'POST',
url: '?r=xd/activity/share',
@ -296,7 +296,7 @@ Page({ @@ -296,7 +296,7 @@ Page({
this.saveShare()
return {
title: `【会议报名】${this.data.detail.Name}`,
path: `/pages/liveDetail/index?id=${this.data.id}`,
path: `/patient/pages/liveDetail/index?id=${this.data.id}`,
// imageUrl: this.data.detail.IntroductionUrl,
}
},

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

@ -7,7 +7,7 @@ Page({ @@ -7,7 +7,7 @@ Page({
id: "",
detail: {} as any,
liveDetail: {} as any,
userInfo: {},
zdUserInfo: {},
codeUrl: "",
dateValue: "" as string | number,
rewardScore: 0 as number | undefined,
@ -28,11 +28,11 @@ Page({ @@ -28,11 +28,11 @@ Page({
dateValue: dayjs().valueOf(),
});
}, 1000);
app.waitLogin().then((_res) => {
app.zdWaitLogin().then((_res) => {
this.getLiveDetail();
this.getDetail();
this.getCode();
app.getUserInfo(this, true);
app.getZdUserInfo(this, true);
});
},
getDetail() {
@ -87,13 +87,13 @@ Page({ @@ -87,13 +87,13 @@ Page({
},
handleHome() {
wx.reLaunch({
url: "/pages/index/index",
url: "/patient/pages/index/index",
});
},
onShareAppMessage() {
return {
title: this.data.detail.ActivityName,
path: `/pages/liveDetail/index?id=${this.data.detail.ActivityId}`,
path: `/patient/pages/liveDetail/index?id=${this.data.detail.ActivityId}`,
imageUrl: `${this.data.liveDetail.IntroductionUrl}`,
};
},

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

@ -16,7 +16,7 @@ Page({ @@ -16,7 +16,7 @@ Page({
this.setData({
page: options.page,
});
app.waitLogin({ isReg: false, loginPage: true }).then(() => {
app.zdWaitLogin({ isReg: false, loginPage: true }).then(() => {
app.zdMpBehavior({ PageName: 'PG_PATIENTLOGIN' });
});
},
@ -112,10 +112,10 @@ Page({ @@ -112,10 +112,10 @@ Page({
submitCallback() {
const { page } = this.data;
app.globalData.loginType = 1;
app.globalData.isLogin = true;
app.getUserInfo(this, true, (userInfo) => {
app.globalData.isLogin = 1;
app.getZdUserInfo(this, true, (zdUserInfo) => {
// 1-空白用户,2-注册用户,3-疾病患者,4-用药患者
const { PatientId, AuditStatus, UserType } = userInfo;
const { PatientId, AuditStatus, UserType } = zdUserInfo;
const backPage = app.globalData.backPage;
let urlKey = '';
if (UserType >= 3) {
@ -128,9 +128,9 @@ Page({ @@ -128,9 +128,9 @@ Page({
urlKey = 'enterInfo';
}
const navUrl = {
home: backPage || '/pages/index/index',
agreement: `/pages/enterInfo/index`,
enterInfo: '/pages/enterInfo/index',
home: backPage || '/patient/pages/index/index',
agreement: `/patient/pages/enterInfo/index`,
enterInfo: '/patient/pages/enterInfo/index',
}[urlKey];
if (['agreement', 'enterInfo'].includes(urlKey)) {
@ -150,12 +150,12 @@ Page({ @@ -150,12 +150,12 @@ Page({
app.globalData.first = true;
app.globalData.loginType = 1;
wx.reLaunch({
url: '/pages/index/index',
url: '/patient/pages/index/index',
});
},
handleDoctor() {
wx.reLaunch({
url: '/doctor/pages/d_login/index',
url: '/doctor/patient/pages/d_login/index',
});
},
handleLink(e: any) {

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

@ -6,9 +6,9 @@ @@ -6,9 +6,9 @@
<image class="title" src="{{imageUrl}}za-images/1/login-title.png?t={{Timestamp}}"></image>
<view class="content">
在您加入gMG 给力加油站平台之前,请您阅读并充分理解
<text class="link" bind:tap="handleLink" data-url="/doc/pages/doc2/index">《个人信息及隐私保护政策》</text>
<text class="link" bind:tap="handleLink" data-url="/doc/patient/pages/doc2/index">《个人信息及隐私保护政策》</text>
,了解您的权益及相关数据处理方法,我们将严格按照法律法规及
<text class="link" bind:tap="handleLink" data-url="/doc/pages/doc2/index">《个人信息及隐私保护政策》</text>
<text class="link" bind:tap="handleLink" data-url="/doc/patient/pages/doc2/index">《个人信息及隐私保护政策》</text>
的相关规定保证您的个人信息不受侵犯。
</view>
<!-- <view class="form"> -->
@ -50,7 +50,7 @@ @@ -50,7 +50,7 @@
></image>
<view class="a-content">
我已阅读并同意
<text class="link" bind:tap="handleLink" data-url="/doc/pages/doc2/index">《个人信息及隐私协议政策》</text>
<text class="link" bind:tap="handleLink" data-url="/doc/patient/pages/doc2/index">《个人信息及隐私协议政策》</text>
</view>
</view>
<view class="a-col">
@ -70,7 +70,7 @@ @@ -70,7 +70,7 @@
></image>
<view class="a-content">
我特此同意依照此
<text class="link" bind:tap="handleLink" data-url="/doc/pages/doc2/index">《个人信息及隐私保护政策》</text>
<text class="link" bind:tap="handleLink" data-url="/doc/patient/pages/doc2/index">《个人信息及隐私保护政策》</text>
规定收集我的个人敏感信息
</view>
</view>

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

@ -4,7 +4,7 @@ const app = getApp<IAppOption>() @@ -4,7 +4,7 @@ const app = getApp<IAppOption>()
Page({
data: {
today: dayjs().format('YYYY年MM月DD日 dddd'),
userInfo: {} as any,
zdUserInfo: {} as any,
RegDay: 0,
RegDaysName: '',
integral: 0,
@ -15,7 +15,7 @@ Page({ @@ -15,7 +15,7 @@ Page({
adlNewRecord: {} as any,
},
onLoad() {
app.getTheme().then((res) => {
app.zdGetTheme().then((res) => {
this.setData({
theme: res,
})
@ -31,9 +31,9 @@ Page({ @@ -31,9 +31,9 @@ Page({
wx.hideShareMenu()
},
onShow() {
app.waitLogin().then(() => {
app.zdWaitLogin().then(() => {
app.zdMpBehavior({ PageName: 'PG_PATIENTMY' })
app.getUserInfo(this, true, () => {})
app.getZdUserInfo(this, true, () => {})
this.getScore()
})
},
@ -51,7 +51,7 @@ Page({ @@ -51,7 +51,7 @@ Page({
handleMyHealthRecord(e) {
app.zdMpBehavior({ PageName: 'BTN_PATIENTMYPAGEHEALTHRECORD' })
const { url } = e.currentTarget.dataset
app.permissionVerification(3, 0, url).then(() => {
app.zdPermissionVerification(3, 0, url).then(() => {
wx.navigateTo({
url,
})
@ -60,7 +60,7 @@ Page({ @@ -60,7 +60,7 @@ Page({
handleFamily(e) {
app.zdMpBehavior({ PageName: 'BTN_PATIENTMYPAGEFAMILYMEMBERS' })
const { url } = e.currentTarget.dataset
app.permissionVerification(3, 0, url).then(() => {
app.zdPermissionVerification(3, 0, url).then(() => {
wx.navigateTo({
url,
})
@ -77,7 +77,7 @@ Page({ @@ -77,7 +77,7 @@ Page({
AdlNotifySwitch: e.detail ? 1 : 2,
},
}).then(() => {
app.getUserInfo(this, true)
app.getZdUserInfo(this, true)
})
},
routerTo(e) {
@ -88,16 +88,16 @@ Page({ @@ -88,16 +88,16 @@ Page({
title: '工程师正在努力建设中,敬请期待!',
})
}
if (url === '/pages/mySave/index') {
if (url === '/patient/pages/mySave/index') {
app.zdMpBehavior({ PageName: 'BTN_PATIENTMYPAGEFAVORITES' })
}
if (url === '/pages/myLive/index') {
if (url === '/patient/pages/myLive/index') {
app.zdMpBehavior({ PageName: 'BTN_PATIENTMYPAGESIGNEDUPMEETINGS' })
}
if (url === '/pages/personalInformation/index') {
if (url === '/patient/pages/personalInformation/index') {
app.zdMpBehavior({ PageName: 'BTN_PATIENTMYPAGEPERSONALINFO' })
}
if (url === '/pages/storyList/index') {
if (url === '/patient/pages/storyList/index') {
app.zdMpBehavior({ PageName: 'BTN_PATIENTMYPAGEMYSTORIES' })
}
wx.navigateTo({
@ -105,22 +105,22 @@ Page({ @@ -105,22 +105,22 @@ Page({
})
},
routerVipTo() {
const { MedicineAuditSwitch, UseDrugsAuditStatus, isFollow } = this.data.userInfo
const { MedicineAuditSwitch, UseDrugsAuditStatus, isFollow } = this.data.zdUserInfo
if (MedicineAuditSwitch === '0') {
wx.navigateTo({
url: '/pages/vipLogin/index',
url: '/patient/pages/vipLogin/index',
})
} else if (MedicineAuditSwitch === '1') {
const pendPath = {
0: '/gift/pages/vipPending/index',
1: '/gift/pages/vipStartPending/index',
0: '/gift/patient/pages/vipPending/index',
1: '/gift/patient/pages/vipStartPending/index',
}[isFollow]
const url = {
1: pendPath,
2: '/gift/pages/vipReject/index',
2: '/gift/patient/pages/vipReject/index',
}[UseDrugsAuditStatus]
wx.navigateTo({
url: url || '/gift/pages/vipCert/index',
url: url || '/gift/patient/pages/vipCert/index',
})
} else {
wx.showToast({
@ -132,7 +132,7 @@ Page({ @@ -132,7 +132,7 @@ Page({
handleMiniDoctor() {
wx.navigateTo({
url: '/pages/webview/index',
url: '/patient/pages/webview/index',
})
},
})

20
src/patient/pages/my/index.wxml

@ -9,7 +9,7 @@ @@ -9,7 +9,7 @@
mode="aspectFill"
src="{{userInfo.UserImg}}"
bind:tap="routerTo"
data-url="/pages/getUserInfo/index"
data-url="/patient/pages/getUserInfo/index"
></image>
<view class="inner">
<!-- <view class="name">Hi,{{userInfo.PatientName}}{{userInfo.RelationType== 2 ? '亲友':''}}</view> -->
@ -31,9 +31,9 @@ @@ -31,9 +31,9 @@
<text class="sub">能量</text>
</view>
<view class="content">
<view bind:tap="routerTo" data-url="/gift/pages/priceDetail/index">能量明细</view>
<view bind:tap="routerTo" data-url="/gift/patient/pages/priceDetail/index">能量明细</view>
<text class="line"></text>
<view bind:tap="routerTo" data-url="/gift/pages/scoreRule/index">能量规则</view>
<view bind:tap="routerTo" data-url="/gift/patient/pages/scoreRule/index">能量规则</view>
</view>
</view>
</view>
@ -42,7 +42,7 @@ @@ -42,7 +42,7 @@
class="option"
style="width: 54rpx; height: 60rpx"
bind:tap="routerTo"
data-url="/gift/pages/giftList/index"
data-url="/gift/patient/pages/giftList/index"
>
<image
class="icon"
@ -60,14 +60,14 @@ @@ -60,14 +60,14 @@
</view>
</view>
<view class="common-operations">
<view bind:tap="handleMyHealthRecord" class="item" data-url="/gift/pages/myHealthRecord/index">
<view bind:tap="handleMyHealthRecord" class="item" data-url="/gift/patient/pages/myHealthRecord/index">
<image
class="icon"
src="{{imageUrl}}za-images/{{theme === 'DRUG'?1.5:1}}/my-common-icon1.png?t={{Timestamp}}"
></image>
<view class="name">健康档案</view>
</view>
<view bind:tap="routerTo" class="item" data-url="/pages/mySave/index">
<view bind:tap="routerTo" class="item" data-url="/patient/pages/mySave/index">
<image
class="icon"
src="{{imageUrl}}za-images/{{theme === 'DRUG'?1.5:1}}/my-common-icon2.png?t={{Timestamp}}"
@ -76,7 +76,7 @@ @@ -76,7 +76,7 @@
</view>
</view>
<view class="options-list">
<view bind:tap="routerTo" class="row" data-url="/pages/myLive/index">
<view bind:tap="routerTo" class="row" data-url="/patient/pages/myLive/index">
<view class="col">
<image
class="icon"
@ -88,7 +88,7 @@ @@ -88,7 +88,7 @@
<van-icon name="arrow" />
</view>
</view>
<view bind:tap="handleFamily" class="row" data-url="/pages/family/index">
<view bind:tap="handleFamily" class="row" data-url="/patient/pages/family/index">
<view class="col">
<image
class="icon"
@ -100,7 +100,7 @@ @@ -100,7 +100,7 @@
<van-icon name="arrow" />
</view>
</view>
<view bind:tap="routerTo" class="row" data-url="/pages/personalInformation/index">
<view bind:tap="routerTo" class="row" data-url="/patient/pages/personalInformation/index">
<view class="col">
<image
class="icon"
@ -112,7 +112,7 @@ @@ -112,7 +112,7 @@
<van-icon name="arrow" />
</view>
</view>
<view bind:tap="routerTo" class="row" data-url="/pages/storyList/index">
<view bind:tap="routerTo" class="row" data-url="/patient/pages/storyList/index">
<view class="col">
<image
class="icon"

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

@ -15,7 +15,7 @@ Page({ @@ -15,7 +15,7 @@ Page({
offline_open_status: 1, // 线下
liveStatus: app.globalData.liveStatus,
activityStatus: app.globalData.activityStatus,
userInfo: {},
zdUserInfo: {},
},
onLoad() {
this.setData({
@ -29,9 +29,9 @@ Page({ @@ -29,9 +29,9 @@ Page({
dateValue: dayjs().valueOf(),
})
}, 1000)
app.waitLogin().then(() => {
app.zdWaitLogin().then(() => {
this.getConfig()
app.getUserInfo(this, true)
app.getZdUserInfo(this, true)
})
},
getConfig() {
@ -114,7 +114,7 @@ Page({ @@ -114,7 +114,7 @@ Page({
app.zdMpBehavior({ PageName: 'BTN_PATIENTSIGNEDUPACTIVITIESOFFLINELIST' })
}
wx.navigateTo({
url: `/pages/liveDetail/index?id=${id}`,
url: `/patient/pages/liveDetail/index?id=${id}`,
})
},
onReachBottom() {

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

@ -16,7 +16,7 @@ Page({ @@ -16,7 +16,7 @@ Page({
config: {} as any,
},
onLoad() {
app.waitLogin().then(() => {
app.zdWaitLogin().then(() => {
wx.ajax({
method: 'GET',
url: '?r=xd/common/get-config',
@ -217,11 +217,11 @@ Page({ @@ -217,11 +217,11 @@ Page({
`${app.globalData.url}/zdcare/#/book?loginState=${app.globalData.loginState}&Id=${id}`,
)
wx.navigateTo({
url: `/pages/webview/index?url=${webviewUrl}`,
url: `/patient/pages/webview/index?url=${webviewUrl}`,
})
} else {
wx.navigateTo({
url: `/pages/repositoryDetail/index?id=${id}`,
url: `/patient/pages/repositoryDetail/index?id=${id}`,
})
}
},
@ -231,7 +231,7 @@ Page({ @@ -231,7 +231,7 @@ Page({
`${app.globalData.url}/zdcare/#/info-detail?loginState=${app.globalData.loginState}&Id=${id}`,
)
wx.navigateTo({
url: `/pages/webview/index?url=${webviewUrl}`,
url: `/patient/pages/webview/index?url=${webviewUrl}`,
})
},
handleVideoToggleSave(e: WechatMiniprogram.CustomEvent) {
@ -316,7 +316,7 @@ Page({ @@ -316,7 +316,7 @@ Page({
})
return {
title: Title,
path: `/pages/repositoryDetail/index?id=${id}`,
path: `/patient/pages/repositoryDetail/index?id=${id}`,
imageUrl: TitlePicLink,
}
} else {
@ -331,14 +331,14 @@ Page({ @@ -331,14 +331,14 @@ Page({
})
return {
title: Title,
path: `/pages/repository/index?id=${id}&active=1&title=${Title}`,
path: `/patient/pages/repository/index?id=${id}&active=1&title=${Title}`,
imageUrl: ImageUrl,
}
}
} else {
return {
title: '知识库',
path: '/pages/repository/index',
path: '/patient/pages/repository/index',
}
}
},

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

@ -53,7 +53,7 @@ Page({ @@ -53,7 +53,7 @@ Page({
bottom: bottom,
});
}
app.waitLogin().then((_res) => {
app.zdWaitLogin().then((_res) => {
app.zdMpBehavior({ PageName: 'PG_PATIENTNRDL' })
this.addOpenRecord();
this.getConfig();
@ -105,12 +105,12 @@ Page({ @@ -105,12 +105,12 @@ Page({
const { id } = e.currentTarget.dataset;
if (id == 3) {
wx.navigateTo({
url: "/pages/nrdlTable/index",
url: "/patient/pages/nrdlTable/index",
});
return;
}
wx.navigateTo({
url: `/pages/nrdlDetail/index?id=${id}`,
url: `/patient/pages/nrdlDetail/index?id=${id}`,
});
},
getCode() {
@ -424,7 +424,7 @@ Page({ @@ -424,7 +424,7 @@ Page({
},
handleHos() {
wx.navigateTo({
url: "/pages/doctor/index",
url: "/patient/pages/doctor/index",
});
this.handleDtpRecord();
},

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

@ -31,7 +31,7 @@ Page({ @@ -31,7 +31,7 @@ Page({
title: titles[options.id],
})
}
app.waitLogin().then((_res) => {
app.zdWaitLogin().then((_res) => {
if (options.id == '2') {
app.zdMpBehavior({ PageName: 'PG_PATIENTIGAMODREIMBURSEMENT' })
}
@ -73,7 +73,7 @@ Page({ @@ -73,7 +73,7 @@ Page({
if (this.data.id == '2') {
if (this.data.NrdlCityListSwitch == '1') {
wx.navigateTo({
url: '/pages/nrdlTable/index',
url: '/patient/pages/nrdlTable/index',
})
} else {
wx.showToast({

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

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

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

@ -7,7 +7,7 @@ Page({ @@ -7,7 +7,7 @@ Page({
isEdit: false,
area: [] as string[][],
city: [] as string[][],
userInfo: {} as any,
zdUserInfo: {} as any,
areaValue: '',
bron: '',
age: '',
@ -165,10 +165,10 @@ Page({ @@ -165,10 +165,10 @@ Page({
ageEnd,
})
app.waitLogin().then(() => {
app.zdWaitLogin().then(() => {
app.zdMpBehavior({ PageName: 'PG_PATIENTPERSONALINFO' })
const that = this
app.getUserInfo(that, true, that.formatUserInfo.bind(that))
app.getZdUserInfo(that, true, that.formatUserInfo.bind(that))
})
},
@ -203,8 +203,8 @@ Page({ @@ -203,8 +203,8 @@ Page({
this.setData({
bron,
age,
'userInfo.Birth': Birth,
'userInfo.AgeYear': Number(dayjs().format('YYYY')) - Birth.split('-')[0],
'zdUserInfo.Birth': Birth,
'zdUserInfo.AgeYear': Number(dayjs().format('YYYY')) - Birth.split('-')[0],
})
},
@ -217,7 +217,7 @@ Page({ @@ -217,7 +217,7 @@ Page({
const DiagnosisTime = e.detail.value
this.setData({
DiagnosisTime: dayjs(DiagnosisTime).format('YYYY年MM月'),
'userInfo.DiagnosisTime': DiagnosisTime,
'zdUserInfo.DiagnosisTime': DiagnosisTime,
})
this.updateUserInfo(update)
},
@ -225,7 +225,7 @@ Page({ @@ -225,7 +225,7 @@ Page({
handleInput(e) {
const { key } = e.currentTarget.dataset
this.setData({
[`userInfo.${key}`]: e.detail.value,
[`zdUserInfo.${key}`]: e.detail.value,
})
},
handleChangeRT(e, update = true) {
@ -233,7 +233,7 @@ Page({ @@ -233,7 +233,7 @@ Page({
const id = this.data.RTList.filter((_item, index) => index == value)[0]?.id
this.setData({
rtValue: value,
'userInfo.RelationType': id,
'zdUserInfo.RelationType': id,
})
this.updateUserInfo(update)
},
@ -242,7 +242,7 @@ Page({ @@ -242,7 +242,7 @@ Page({
const id = this.data.GenderList.filter((_item, index) => index == value)[0]?.id
this.setData({
genderValue: value,
'userInfo.Gender': id,
'zdUserInfo.Gender': id,
})
this.updateUserInfo(update)
},
@ -251,7 +251,7 @@ Page({ @@ -251,7 +251,7 @@ Page({
const id = this.data.TaskList.filter((_item, index) => index == value)[0]?.id
this.setData({
taskValue: value,
'userInfo.PatientCanFollowUp': id,
'zdUserInfo.PatientCanFollowUp': id,
})
this.updateUserInfo(update)
},
@ -260,7 +260,7 @@ Page({ @@ -260,7 +260,7 @@ Page({
const id = this.data.ageRangeList.filter((_item, index) => index == value)[0]?.id
this.setData({
ageRangeValue: value,
'userInfo.AgeRange': id,
'zdUserInfo.AgeRange': id,
})
this.updateUserInfo(update)
},
@ -269,7 +269,7 @@ Page({ @@ -269,7 +269,7 @@ Page({
const id = this.data.DTList.filter((_item, index) => index == rangeIndex)[0]?.id
this.setData({
diagnoseTypeValue: rangeIndex,
'userInfo.DiagnoseType': id,
'zdUserInfo.DiagnoseType': id,
})
if (update) {
this.handleDiagnoseTypeShow()
@ -280,7 +280,7 @@ Page({ @@ -280,7 +280,7 @@ Page({
handleRadio(e) {
const { id, key } = e.currentTarget.dataset
this.setData({
[`userInfo.${key}`]: id,
[`zdUserInfo.${key}`]: id,
})
this.updateUserInfo(true)
},
@ -298,13 +298,13 @@ Page({ @@ -298,13 +298,13 @@ Page({
handleRedioSelect(e) {
const { key, id } = e.currentTarget.dataset
this.setData({
[`userInfo.${key}`]: id,
[`zdUserInfo.${key}`]: id,
})
this.updateUserInfo()
},
updateUserInfo(update = true) {
if (!update) return
const { PatientName, RelationType, Gender, Birth, DiagnosisTime, DiagnoseType, ...userInfo } = this.data.userInfo
const { PatientName, RelationType, Gender, Birth, DiagnosisTime, DiagnoseType, ...zdUserInfo } = this.data.zdUserInfo
wx.ajax({
method: 'POST',
url: '?r=xd/account/update-info',
@ -315,14 +315,14 @@ Page({ @@ -315,14 +315,14 @@ Page({
birth: Birth,
diagnosisTime: DiagnosisTime,
diagnoseType: DiagnoseType,
ageRange: userInfo.AgeRange,
patientCanFollowUp: userInfo.PatientCanFollowUp,
antibodyType: userInfo.AntibodyType,
thyroidAbnormal: userInfo.ThyroidAbnormal,
previousConvulsion: userInfo.PreviousConvulsion,
traditionalImmunosuppressant: userInfo.TraditionalImmunosuppressant,
medicalInsuranceType: userInfo.MedicalInsuranceType,
...userInfo,
ageRange: zdUserInfo.AgeRange,
patientCanFollowUp: zdUserInfo.PatientCanFollowUp,
antibodyType: zdUserInfo.AntibodyType,
thyroidAbnormal: zdUserInfo.ThyroidAbnormal,
previousConvulsion: zdUserInfo.PreviousConvulsion,
traditionalImmunosuppressant: zdUserInfo.TraditionalImmunosuppressant,
medicalInsuranceType: zdUserInfo.MedicalInsuranceType,
...zdUserInfo,
},
})
.then((_res) => {
@ -330,32 +330,32 @@ Page({ @@ -330,32 +330,32 @@ Page({
title: '修改成功',
icon: 'none',
})
app.getUserInfo(this, true, this.formatUserInfo.bind(this))
app.getZdUserInfo(this, true, this.formatUserInfo.bind(this))
})
.catch((err) => {
wx.showToast({
title: err.data.msg,
icon: 'none',
})
app.getUserInfo(this, true, this.formatUserInfo.bind(this))
app.getZdUserInfo(this, true, this.formatUserInfo.bind(this))
})
},
handleChangeTel() {
app.zdMpBehavior({ PageName: 'PG_PATIENTPERSONALINFO_CHANGEPHONECLICK' })
wx.navigateTo({
url: '/pages/changePhone/index',
url: '/patient/pages/changePhone/index',
})
},
handleChangeUser() {
wx.navigateTo({
url: '/pages/changeUser/index',
url: '/patient/pages/changeUser/index',
})
},
handleLogout() {
app.zdMpBehavior({ PageName: 'BTN_PATIENTPERSONALINFOLOGOUT' })
wx.navigateTo({
url: '/pages/cancellation/index',
url: '/patient/pages/cancellation/index',
})
},
handleBack() {
@ -363,7 +363,7 @@ Page({ @@ -363,7 +363,7 @@ Page({
},
routerTo(e) {
const { url } = e.currentTarget.dataset
if (url.includes('/doctor/pages/d_login/index')) {
if (url.includes('/doctor/patient/pages/d_login/index')) {
app.zdMpBehavior({ PageName: 'BTN_PATIENTPERSONALINFOSWITCHDOCTORPORTAL' })
}
wx.navigateTo({

6
src/patient/pages/personalInformation/index.wxml

@ -233,7 +233,7 @@ @@ -233,7 +233,7 @@
<!-- <view -->
<!-- class="book" -->
<!-- bind:tap="redirectTo" -->
<!-- data-url="/pages/taskAgreement/index?page=/pages/personalInformation/index" -->
<!-- data-url="/patient/pages/taskAgreement/index?page=/patient/pages/personalInformation/index" -->
<!-- > -->
<!-- 《电话随访知情同意书》 -->
<!-- </view> -->
@ -248,11 +248,11 @@ @@ -248,11 +248,11 @@
</view>
<!-- <view class="footer-new"> -->
<!-- <view class="btn1" wx:if="{{userInfo.IsRootUser==1}}" bind:tap="handleLogout">注销账号</view> -->
<!-- <view class="btn2" bind:tap="routerTo" data-url="/doctor/pages/d_login/index?back=1">切换医生端</view> -->
<!-- <view class="btn2" bind:tap="routerTo" data-url="/doctor/patient/pages/d_login/index?back=1">切换医生端</view> -->
<!-- <view class="btn3" bind:tap="handleChangeUser">切换账号</view> -->
<!-- </view> -->
<view class="cancellation" bind:tap="handleChangeUser">切换账号</view>
<view class="cancellation" bind:tap="routerTo" data-url="/doctor/pages/d_login/index?back=1">切换医生端</view>
<view class="cancellation" bind:tap="routerTo" data-url="/doctor/patient/pages/d_login/index?back=1">切换医生端</view>
<view wx:if="{{userInfo.IsRootUser==1}}" class="cancellation" bind:tap="handleLogout">注销</view>
</view>
</view>

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

@ -12,7 +12,7 @@ Page({ @@ -12,7 +12,7 @@ Page({
pagePath: options.page,
id: options.id,
})
app.waitLogin({ isReg: false, loginPage: true }).then(() => {
app.zdWaitLogin({ isReg: false, loginPage: true }).then(() => {
app.zdMpBehavior({ PageName: 'PG_PATIENTINFORMEDCONSENT' })
})
},
@ -30,7 +30,7 @@ Page({ @@ -30,7 +30,7 @@ Page({
})
} else {
wx.navigateTo({
url: `${pagePath}?page=/pages/enterInfo/index&ignoreAgreement=1&id=${id}&proces=1`,
url: `${pagePath}?page=/patient/pages/enterInfo/index&ignoreAgreement=1&id=${id}&proces=1`,
})
}
},

4
src/patient/pages/privacyAgreement/index.wxml

@ -1,12 +1,12 @@ @@ -1,12 +1,12 @@
<view class="page">
<image class="bg" mode="widthFix" src="{{imageUrl}}za-images/1/login-bg.png?t={{Timestamp}}"></image>
<view class="page-container">
<navBar wx:if="{{pagePath != '/pages/enterInfo/index'}}" background="{{background}}" title="隐私协议"></navBar>
<navBar wx:if="{{pagePath != '/patient/pages/enterInfo/index'}}" background="{{background}}" title="隐私协议"></navBar>
<view class="content">
<mp-html class="mp-html" container-style="overflow: visible" content="{{Content}}"></mp-html>
<!-- <view class="mask"></view> -->
</view>
<view class="footer" wx:if="{{pagePath == '/pages/enterInfo/index' || pagePath == '/pages/familyScan/index'}}">
<view class="footer" wx:if="{{pagePath == '/patient/pages/enterInfo/index' || pagePath == '/patient/pages/familyScan/index'}}">
<view bind:tap="handleBack" class="btn">不同意</view>
<view bind:tap="handleSure" class="btn sure">同意</view>
</view>

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

@ -29,7 +29,7 @@ Page({ @@ -29,7 +29,7 @@ Page({
this.setData({
id,
})
app.waitLogin().then(() => {
app.zdWaitLogin().then(() => {
this.getInfoDetail(id)
this.handleView(id)
})
@ -131,7 +131,7 @@ Page({ @@ -131,7 +131,7 @@ Page({
})
},
handleBack() {
app.permissionVerification(3, 5, `/pages/publishStoryDetail/index?id=${this.data.id}`, this.data.id).then(() => {
app.zdPermissionVerification(3, 5, `/patient/pages/publishStoryDetail/index?id=${this.data.id}`, this.data.id).then(() => {
wx.navigateBack()
})
},
@ -179,7 +179,7 @@ Page({ @@ -179,7 +179,7 @@ Page({
onShareAppMessage() {
const { Title, ListPicLink } = this.data.detail
const title = `【向往的生活】${Title}`
const path = `/pages/publishStoryDetail/index?id=${this.data.id}`
const path = `/patient/pages/publishStoryDetail/index?id=${this.data.id}`
this.handleShare()
if (!this.data.shareLock) {
this.setData({

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

@ -16,9 +16,9 @@ Page({ @@ -16,9 +16,9 @@ Page({
referralFromParams: null as any,
},
onLoad(options) {
app.waitLogin().then(() => {
app.zdWaitLogin().then(() => {
// 强制疾病患者以上身份
app.permissionVerification(3, 0, `/pages/referral/index`).then(() => {
app.zdPermissionVerification(3, 0, `/patient/pages/referral/index`).then(() => {
this.getList()
if (options.pushId) {
this.updatePush(options.pushId)
@ -110,7 +110,7 @@ Page({ @@ -110,7 +110,7 @@ Page({
},
handleAdl() {
wx.navigateTo({
url: '/gift/pages/myHealthRecord/index',
url: '/gift/patient/pages/myHealthRecord/index',
})
},
})

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

@ -19,15 +19,15 @@ Page({ @@ -19,15 +19,15 @@ Page({
videoStatus: 0,
},
onLoad(options) {
app.getTheme().then((res) => {
app.zdGetTheme().then((res) => {
this.setData({
theme: res,
})
})
app.waitLogin().then(() => {
app.zdWaitLogin().then(() => {
this.getConfig(options)
this.getBanner()
app.getUserInfo(this, true)
app.getZdUserInfo(this, true)
})
},
onShow() {
@ -265,14 +265,14 @@ Page({ @@ -265,14 +265,14 @@ Page({
app.zdMpBehavior({ PageName: 'BTN_PATIENTMGARTICLELIST' })
const { id } = e.currentTarget.dataset
wx.navigateTo({
url: `/pages/repositoryDetail/index?id=${id}`,
url: `/patient/pages/repositoryDetail/index?id=${id}`,
})
},
handleVideoToggleSave(e: WechatMiniprogram.CustomEvent) {
const { id, collect, index } = e.currentTarget.dataset
const { list } = this.data
const title = list[index].Title
app.permissionVerification(3, 4, `/pages/repository/index?active=1&title=${title}`, id).then(() => {
app.zdPermissionVerification(3, 4, `/patient/pages/repository/index?active=1&title=${title}`, id).then(() => {
if (collect == 1) {
wx.ajax({
method: 'POST',
@ -352,7 +352,7 @@ Page({ @@ -352,7 +352,7 @@ Page({
})
return {
title: Title,
path: `/pages/repositoryDetail/index?id=${id}`,
path: `/patient/pages/repositoryDetail/index?id=${id}`,
imageUrl: TitlePicLink,
}
} else {
@ -367,14 +367,14 @@ Page({ @@ -367,14 +367,14 @@ Page({
})
return {
title: Title,
path: `/pages/repository/index?id=${id}&active=1&title=${Title}`,
path: `/patient/pages/repository/index?id=${id}&active=1&title=${Title}`,
imageUrl: ImageUrl,
}
}
} else {
return {
title: '重症肌无力加油站,MG全知道',
path: '/pages/repository/index',
path: '/patient/pages/repository/index',
}
}
},

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

@ -32,7 +32,7 @@ Page({ @@ -32,7 +32,7 @@ Page({
this.setData({
id,
})
app.waitLogin().then(() => {
app.zdWaitLogin().then(() => {
this.getDetail(true)
})
},
@ -181,7 +181,7 @@ Page({ @@ -181,7 +181,7 @@ Page({
id,
detail: { IsCollect },
} = this.data
app.permissionVerification(3, 3, `/pages/repositoryDetail/index?id=${id}`, id).then(() => {
app.zdPermissionVerification(3, 3, `/patient/pages/repositoryDetail/index?id=${id}`, id).then(() => {
if (IsCollect == 1) {
wx.ajax({
method: 'POST',
@ -224,12 +224,12 @@ Page({ @@ -224,12 +224,12 @@ Page({
handleBack() {
const { id } = this.data
app
.permissionVerification(3, 3, `/pages/repositoryDetail/index?id=${id}`, id)
.zdPermissionVerification(3, 3, `/patient/pages/repositoryDetail/index?id=${id}`, id)
.then(() => {
wx.navigateBack({
fail() {
wx.reLaunch({
url: '/pages/index/index',
url: '/patient/pages/index/index',
})
},
})
@ -289,7 +289,7 @@ Page({ @@ -289,7 +289,7 @@ Page({
})
return {
title: this.data.detail.Title,
path: `/pages/repositoryDetail/index?id=${this.data.id}`,
path: `/patient/pages/repositoryDetail/index?id=${this.data.id}`,
imageUrl: this.data.detail.TitlePicLink,
}
},

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

@ -7,7 +7,7 @@ Page({ @@ -7,7 +7,7 @@ Page({
codeUrl: "",
},
onShow() {
app.waitLogin().then(() => {
app.zdWaitLogin().then(() => {
// const options = wx.getEnterOptionsSync();
const scene = app.globalData.scene;
if (scene.id) {
@ -15,7 +15,7 @@ Page({ @@ -15,7 +15,7 @@ Page({
id: scene.id,
});
}
app.permissionVerification(3, 1, `/pages/liveDetail/index?id=${this.data.id}`, this.data.id).then(() => {
app.zdPermissionVerification(3, 1, `/patient/pages/liveDetail/index?id=${this.data.id}`, this.data.id).then(() => {
this.getCode();
this.signIn();
this.getDetail();
@ -64,13 +64,13 @@ Page({ @@ -64,13 +64,13 @@ Page({
},
handleHome() {
wx.reLaunch({
url: "/pages/index/index",
url: "/patient/pages/index/index",
});
},
onShareAppMessage() {
return {
title: this.detail.ActivityName,
path: `/pages/liveDetail/index?id=${this.data.detail.ActivityId}`,
path: `/patient/pages/liveDetail/index?id=${this.data.detail.ActivityId}`,
imageUrl: `${getApp().globalData.imageUrl}1/1.png`,
};
},

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

@ -3,30 +3,30 @@ const app = getApp<IAppOption>() @@ -3,30 +3,30 @@ const app = getApp<IAppOption>()
Page({
data: {},
onLoad() {
app.waitLogin().then((_res) => {
app.zdWaitLogin().then((_res) => {
const { isLogin, anyWhere } = app.globalData
if (isLogin) {
const url = {
1: '/pages/index/index',
2: '/doctor/pages/d_home/index',
1: '/patient/pages/index/index',
2: '/doctor/patient/pages/d_home/index',
}[app.globalData.loginType]
wx.reLaunch({
url: url || '/pages/index/index',
url: url || '/patient/pages/index/index',
})
return
}
if (anyWhere) {
wx.reLaunch({
url: '/pages/index/index',
url: '/patient/pages/index/index',
})
return
}
const url = {
1: '/pages/login/index',
2: '/doctor/pages/d_login/index',
1: '/patient/pages/login/index',
2: '/doctor/patient/pages/d_login/index',
}[app.globalData.loginType]
wx.reLaunch({
url: url || '/pages/login/index',
url: url || '/patient/pages/login/index',
})
})
},

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

@ -11,7 +11,7 @@ Page({ @@ -11,7 +11,7 @@ Page({
backPage = "";
}
wx.reLaunch({
url: backPage || "/pages/index/index",
url: backPage || "/patient/pages/index/index",
});
},
});

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

@ -3,21 +3,21 @@ const app = getApp<IAppOption>(); @@ -3,21 +3,21 @@ const app = getApp<IAppOption>();
Page({
data: {},
onLoad() {
app.waitLogin().then((res) => {
app.getUserInfo(this, true, (res) => {
app.zdWaitLogin().then((res) => {
app.getZdUserInfo(this, true, (res) => {
console.log(res);
});
});
},
handleSubmit() {
wx.reLaunch({
url: "/pages/enterInfo/index",
url: "/patient/pages/enterInfo/index",
});
},
handleVisitors() {
app.globalData.anyWhere = true;
wx.reLaunch({
url: "/pages/index/index",
url: "/patient/pages/index/index",
});
},
});

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

@ -9,10 +9,10 @@ Page({ @@ -9,10 +9,10 @@ Page({
count: 1,
},
alertPending: false,
userInfo: {},
zdUserInfo: {},
},
onLoad() {
app.getTheme().then((res) => {
app.zdGetTheme().then((res) => {
this.setData({
theme: res,
})
@ -27,10 +27,10 @@ Page({ @@ -27,10 +27,10 @@ Page({
}
},
onShow() {
app.waitLogin().then((_res) => {
app.zdWaitLogin().then((_res) => {
app.zdMpBehavior({ PageName: 'PG_PATIENTDESIREDLIFE' })
this.getList()
app.getUserInfo(this, true)
app.getZdUserInfo(this, true)
})
},
@ -80,16 +80,16 @@ Page({ @@ -80,16 +80,16 @@ Page({
routerTo(e) {
const { url } = e.currentTarget.dataset
// let PageName = {
// '/pages/storyGuide/index': 'BTN_STORY_SUBMIT',
// '/patient/pages/storyGuide/index': 'BTN_STORY_SUBMIT',
// }[url]
// if (PageName) {
// app.zdMpBehavior({ PageName })
// }
if (url.includes('/pages/publishStoryDetail/index')) {
if (url.includes('/patient/pages/publishStoryDetail/index')) {
app.zdMpBehavior({ PageName: 'BTN_PATIENTDESIRELIFESTORYLIST' })
}
if (url === '/pages/storyGuide/index') {
if (url === '/patient/pages/storyGuide/index') {
app.zdMpBehavior({ PageName: 'BTN_PATIENTDESIRELIFESHARE' })
}
wx.navigateTo({

4
src/patient/pages/story/index.wxml

@ -9,7 +9,7 @@ @@ -9,7 +9,7 @@
wx:for="{{list}}"
wx:key="*this"
bind:tap="routerTo"
data-url="/pages/publishStoryDetail/index?id={{item.Id}}"
data-url="/patient/pages/publishStoryDetail/index?id={{item.Id}}"
>
<view class="photo">
<image class="photo-img" mode="aspectFill" src="{{item.ListPicLink}}" />
@ -38,7 +38,7 @@ @@ -38,7 +38,7 @@
<pagination pagination="{{pagination}}"></pagination>
</view>
<view class="more" bind:tap="routerTo" data-url="/pages/storyGuide/index">
<view class="more" bind:tap="routerTo" data-url="/patient/pages/storyGuide/index">
<image class="icon" src="{{imageUrl}}za-images//{{theme === 'DRUG'?1.5:1}}/story-share.png?t={{Timestamp}}"></image>
</view>
</view>

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

@ -19,7 +19,7 @@ Page({ @@ -19,7 +19,7 @@ Page({
this.setData({
id: options.id,
});
app.waitLogin().then(() => {
app.zdWaitLogin().then(() => {
this.getDetail();
});
},
@ -124,7 +124,7 @@ Page({ @@ -124,7 +124,7 @@ Page({
},
handleHome() {
wx.reLaunch({
url: "/pages/index/index",
url: "/patient/pages/index/index",
});
},
handleBack() {

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

@ -22,7 +22,7 @@ Page({ @@ -22,7 +22,7 @@ Page({
VoiceContent: [] as { size: string | number; url: string }[],
StoryLeadIn: '0' as string | undefined,
userInfo: {},
zdUserInfo: {},
},
onLoad(options) {
const that = this
@ -37,9 +37,9 @@ Page({ @@ -37,9 +37,9 @@ Page({
})
}
app.waitLogin().then(() => {
app.zdWaitLogin().then(() => {
app.zdMpBehavior({ PageName: 'PG_PATIENTSUBMITTEDSTORIES' })
app.getUserInfo(that, true)
app.getZdUserInfo(that, true)
})
that.record = wx.getRecorderManager()
@ -124,7 +124,7 @@ Page({ @@ -124,7 +124,7 @@ Page({
wx.navigateBack({
fail() {
wx.reLaunch({
url: '/pages/index/index',
url: '/patient/pages/index/index',
})
},
})
@ -272,7 +272,7 @@ Page({ @@ -272,7 +272,7 @@ Page({
}).then((res) => {
console.log('res: ', res)
wx.redirectTo({
url: `/pages/storyEnterResult/index?id=${res.Id}`,
url: `/patient/pages/storyEnterResult/index?id=${res.Id}`,
})
})
},

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

@ -17,14 +17,14 @@ Page({ @@ -17,14 +17,14 @@ Page({
this.setData({
id: options.id,
});
app.waitLogin().then((_res) => {
app.zdWaitLogin().then((_res) => {
this.getConfig();
this.getCode();
});
},
handleMyReplaceList() {
wx.navigateTo({
url: "/pages/storyList/index",
url: "/patient/pages/storyList/index",
});
},
getConfig() {
@ -56,7 +56,7 @@ Page({ @@ -56,7 +56,7 @@ Page({
},
handleHome() {
wx.reLaunch({
url: "/pages/index/index",
url: "/patient/pages/index/index",
});
},
});

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

@ -20,7 +20,7 @@ Page({ @@ -20,7 +20,7 @@ Page({
bottom,
})
}
app.waitLogin().then((_res) => {
app.zdWaitLogin().then((_res) => {
app.zdMpBehavior({ PageName: 'PG_PATIENTREWARDESSAY' })
// this.getSettingInfo();
if (options.storyleadin) {
@ -61,7 +61,7 @@ Page({ @@ -61,7 +61,7 @@ Page({
},
routerTo(e) {
const { url } = e.currentTarget.dataset
if (url.includes('/pages/storyEnter/index')) {
if (url.includes('/patient/pages/storyEnter/index')) {
app.zdMpBehavior({ PageName: 'BTN_PATIENTREWARDEDWRITINGSUBMIT' })
}
wx.navigateTo({
@ -70,7 +70,7 @@ Page({ @@ -70,7 +70,7 @@ Page({
},
handleProtocols() {
wx.redirectTo({
url: '/pages/privacyAgreement/index?page=/pages/storyGuide/index',
url: '/patient/pages/privacyAgreement/index?page=/patient/pages/storyGuide/index',
})
},
handleBack() {

2
src/patient/pages/storyGuide/index.wxml

@ -31,7 +31,7 @@ @@ -31,7 +31,7 @@
</view>
</view>
<view class="progress-box" wx:else></view>
<view class="submit" bind:tap="routerTo" data-url="/pages/storyEnter/index?storyleadin={{StoryLeadIn}}">
<view class="submit" bind:tap="routerTo" data-url="/patient/pages/storyEnter/index?storyleadin={{StoryLeadIn}}">
立即投稿
</view>
<!-- <view class="protocols"> -->

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

@ -8,7 +8,7 @@ Page({ @@ -8,7 +8,7 @@ Page({
pages: 1,
count: 1,
},
userInfo: {},
zdUserInfo: {},
},
onLoad() {
const SystemInfo = app.globalSystemInfo
@ -20,10 +20,10 @@ Page({ @@ -20,10 +20,10 @@ Page({
}
},
onShow() {
app.waitLogin().then((_res) => {
app.zdWaitLogin().then((_res) => {
app.zdMpBehavior({ PageName: 'PG_PATIENTMYSTORIES' })
this.getList()
app.getUserInfo(this, true)
app.getZdUserInfo(this, true)
})
},
getList(newPage = 1) {
@ -61,12 +61,12 @@ Page({ @@ -61,12 +61,12 @@ Page({
app.zdMpBehavior({ PageName: 'BTN_PATIENTMYSTORIESLIST' })
const { id } = e.currentTarget.dataset
wx.navigateTo({
url: `/pages/storyDetail/index?id=${id}`,
url: `/patient/pages/storyDetail/index?id=${id}`,
})
},
routerTo(e) {
const { url } = e.currentTarget.dataset
if (url === '/pages/storyGuide/index') {
if (url === '/patient/pages/storyGuide/index') {
app.zdMpBehavior({ PageName: 'BTN_PATIENTMYSTORIESCONTINUESUBMIT' })
}
wx.navigateTo({
@ -77,7 +77,7 @@ Page({ @@ -77,7 +77,7 @@ Page({
wx.navigateBack({
fail() {
wx.reLaunch({
url: '/pages/index/index',
url: '/patient/pages/index/index',
})
},
})

4
src/patient/pages/storyList/index.wxml

@ -3,7 +3,7 @@ @@ -3,7 +3,7 @@
style="background: url({{imageUrl}}za-images/1/storyDetail-bg.png?t={{Timestamp}}) no-repeat top center / 100% ;padding-top:{{bottom}}px"
>
<navBar back bind:back="handleBack" background="{{background}}" title="我的故事" fixed></navBar>
<!-- <view bind:tap="routerTo" class="alert" data-url="/pages/thePublic/index?id=204" wx:if="{{userInfo.isFollow==0}}"> -->
<!-- <view bind:tap="routerTo" class="alert" data-url="/patient/pages/thePublic/index?id=204" wx:if="{{userInfo.isFollow==0}}"> -->
<!-- 点击关注公众号,接收通知提醒 -->
<!-- </view> -->
<view class="list">
@ -26,6 +26,6 @@ @@ -26,6 +26,6 @@
<pagination pagination="{{pagination}}"></pagination>
</view>
<view class="footer">
<view class="submit" bind:tap="routerTo" data-url="/pages/storyGuide/index">继续投稿</view>
<view class="submit" bind:tap="routerTo" data-url="/patient/pages/storyGuide/index">继续投稿</view>
</view>
</view>

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

@ -10,7 +10,7 @@ Page({ @@ -10,7 +10,7 @@ Page({
this.setData({
pagePath: options.page,
})
app.waitLogin({ isReg: false, loginPage: true }).then(() => {
app.zdWaitLogin({ isReg: false, loginPage: true }).then(() => {
app.zdMpBehavior({ PageName: 'PG_PATIENTFOLLOWUPCONSENT' })
})
},

4
src/patient/pages/taskAgreement/index.wxml

@ -1,13 +1,13 @@ @@ -1,13 +1,13 @@
<view class="page">
<image class="bg" mode="widthFix" src="{{imageUrl}}za-images/1/login-bg.png?t={{Timestamp}}"></image>
<view class="page-container">
<loginNavbar wx:if="{{pagePath == '/pages/enterInfo/index'}}" class="navbar" num="{{1}}"></loginNavbar>
<loginNavbar wx:if="{{pagePath == '/patient/pages/enterInfo/index'}}" class="navbar" num="{{1}}"></loginNavbar>
<navBar wx:else background="{{background}}" title="随访知情同意书"></navBar>
<view class="content">
<mp-html class="mp-html" container-style="overflow: visible" content="{{Content}}"></mp-html>
<!-- <view class="mask"></view> -->
</view>
<view class="footer" wx:if="{{pagePath == '/pages/enterInfo/index' || pagePath == '/pages/familyScan/index'}}">
<view class="footer" wx:if="{{pagePath == '/patient/pages/enterInfo/index' || pagePath == '/patient/pages/familyScan/index'}}">
<view bind:tap="handleSure" data-pcfu="2" class="btn">不同意</view>
<view bind:tap="handleSure" data-pcfu="1" class="btn sure">同意</view>
</view>

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

@ -13,7 +13,7 @@ Page({ @@ -13,7 +13,7 @@ Page({
bottom: bottom,
});
}
app.waitLogin().then((_res) => {
app.zdWaitLogin().then((_res) => {
this.getCode();
});
},

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

@ -9,7 +9,7 @@ Page({ @@ -9,7 +9,7 @@ Page({
verify: false,
audit: false,
userInfo: app.globalData.userInfo,
zdUserInfo: app.globalData.zdUserInfo,
proces: '',
Hash: '',
@ -20,8 +20,8 @@ Page({ @@ -20,8 +20,8 @@ Page({
proces: options.proces,
showVip: !app.globalData.backPage,
})
app.waitLogin({ isReg: true, loginPage: true }).then((res) => {
app.getUserInfo(this, true)
app.zdWaitLogin({ isReg: true, loginPage: true }).then((res) => {
app.getZdUserInfo(this, true)
app.zdMpBehavior({ PageName: 'PG_PATIENTJOINGASSTATION' })
})
},
@ -69,20 +69,20 @@ Page({ @@ -69,20 +69,20 @@ Page({
},
handleSubmit() {
const { registrationSource, registChannel, regBusinessId } = app.globalData
const { diagnoseImg, error, userInfo, Hash } = this.data
const { diagnoseImg, error, zdUserInfo, Hash } = this.data
let urlKey = ''
const backPage = app.globalData.backPage
if (backPage && backPage.includes('liveResult')) {
urlKey = 'backPage'
} else if (error) {
urlKey = userInfo.isFollow ? 'nopending' : 'pending'
urlKey = zdUserInfo.isFollow ? 'nopending' : 'pending'
} else {
urlKey = 'reslove'
}
const navUrl = {
reslove: '/pages/certReslove/index',
pending: '/pages/certPending/index',
nopending: '/pages/startPending/index',
reslove: '/patient/pages/certReslove/index',
pending: '/patient/pages/certPending/index',
nopending: '/patient/pages/startPending/index',
backPage,
}[urlKey]
wx.ajax({
@ -97,7 +97,7 @@ Page({ @@ -97,7 +97,7 @@ Page({
imgHash: Hash,
},
}).then((_res) => {
app.getUserInfo(this, true, () => {
app.getZdUserInfo(this, true, () => {
if (navUrl) {
wx.reLaunch({
url: navUrl,
@ -117,20 +117,20 @@ Page({ @@ -117,20 +117,20 @@ Page({
},
handleNewSubmit() {
app.zdMpBehavior({ PageName: 'BTN_PATIENTJOINSTATIONBANNER' })
const { error, userInfo } = this.data
const { error, zdUserInfo } = this.data
let urlKey = ''
const backPage = app.globalData.backPage
if (backPage && backPage.includes('liveResult')) {
urlKey = 'backPage'
} else if (error) {
urlKey = userInfo.isFollow ? 'nopending' : 'pending'
urlKey = zdUserInfo.isFollow ? 'nopending' : 'pending'
} else {
urlKey = 'reslove'
}
const navUrl = {
reslove: '/pages/certReslove/index',
pending: '/pages/certPending/index',
nopending: '/pages/startPending/index',
reslove: '/patient/pages/certReslove/index',
pending: '/patient/pages/certPending/index',
nopending: '/patient/pages/startPending/index',
backPage,
}[urlKey]
this.createDisease(navUrl)
@ -138,11 +138,11 @@ Page({ @@ -138,11 +138,11 @@ Page({
handleVisitors() {
app.globalData.anyWhere = true
wx.reLaunch({
url: '/pages/index/index',
url: '/patient/pages/index/index',
})
},
handleVip() {
this.createDisease('/gift/pages/vipCert/index')
this.createDisease('/gift/patient/pages/vipCert/index')
},
createDisease(navUrl: string) {
const { registrationSource, registChannel, regBusinessId } = app.globalData
@ -160,7 +160,7 @@ Page({ @@ -160,7 +160,7 @@ Page({
},
loading: true,
}).then((_res) => {
app.getUserInfo(this, true, () => {
app.getZdUserInfo(this, true, () => {
if (navUrl) {
wx.reLaunch({
url: navUrl,

34
src/patient/pages/uploadCertBak/index.ts

@ -9,7 +9,7 @@ Page({ @@ -9,7 +9,7 @@ Page({
verify: false,
audit: false,
userInfo: app.globalData.userInfo,
zdUserInfo: app.globalData.zdUserInfo,
proces: "",
Hash: "",
},
@ -17,8 +17,8 @@ Page({ @@ -17,8 +17,8 @@ Page({
this.setData({
proces: options.proces,
});
app.waitLogin({ loginPage: true }).then((res) => {
app.getUserInfo(this, true);
app.zdWaitLogin({ loginPage: true }).then((res) => {
app.getZdUserInfo(this, true);
});
},
handleSetData(e: WechatMiniprogram.CustomEvent) {
@ -65,20 +65,20 @@ Page({ @@ -65,20 +65,20 @@ Page({
},
handleSubmit() {
const { registrationSource, registChannel, regBusinessId } = app.globalData;
const { diagnoseImg, error, userInfo, Hash } = this.data;
const { diagnoseImg, error, zdUserInfo, Hash } = this.data;
let urlKey = "";
const backPage = app.globalData.backPage;
if (backPage && backPage.includes("liveResult")) {
urlKey = "backPage";
} else if (error) {
urlKey = userInfo.isFollow ? "nopending" : "pending";
urlKey = zdUserInfo.isFollow ? "nopending" : "pending";
} else {
urlKey = "reslove";
}
let navUrl = {
reslove: "/pages/certReslove/index",
pending: "/pages/certPending/index",
nopending: "/pages/startPending/index",
reslove: "/patient/pages/certReslove/index",
pending: "/patient/pages/certPending/index",
nopending: "/patient/pages/startPending/index",
backPage,
}[urlKey];
wx.ajax({
@ -93,7 +93,7 @@ Page({ @@ -93,7 +93,7 @@ Page({
imgHash: Hash,
},
}).then((_res) => {
app.getUserInfo(this, true, () => {
app.getZdUserInfo(this, true, () => {
if (navUrl) {
wx.reLaunch({
url: navUrl,
@ -113,20 +113,20 @@ Page({ @@ -113,20 +113,20 @@ Page({
},
handleNewSubmit() {
const { registrationSource, registChannel, regBusinessId } = app.globalData;
const { diagnoseImg, error, userInfo, Hash } = this.data;
const { diagnoseImg, error, zdUserInfo, Hash } = this.data;
let urlKey = "";
const backPage = app.globalData.backPage;
if (backPage && backPage.includes("liveResult")) {
urlKey = "backPage";
} else if (error) {
urlKey = userInfo.isFollow ? "nopending" : "pending";
urlKey = zdUserInfo.isFollow ? "nopending" : "pending";
} else {
urlKey = "reslove";
}
let navUrl = {
reslove: "/pages/certReslove/index",
pending: "/pages/certPending/index",
nopending: "/pages/startPending/index",
reslove: "/patient/pages/certReslove/index",
pending: "/patient/pages/certPending/index",
nopending: "/patient/pages/startPending/index",
backPage,
}[urlKey];
wx.ajax({
@ -141,7 +141,7 @@ Page({ @@ -141,7 +141,7 @@ Page({
imgHash: "",
},
}).then((_res) => {
app.getUserInfo(this, true, () => {
app.getZdUserInfo(this, true, () => {
if (navUrl) {
wx.reLaunch({
url: navUrl,
@ -153,13 +153,13 @@ Page({ @@ -153,13 +153,13 @@ Page({
handleVisitors() {
app.globalData.anyWhere = true;
wx.reLaunch({
url: "/pages/index/index",
url: "/patient/pages/index/index",
});
},
handleVip() {
if (this.data.audit) return;
wx.navigateTo({
url: "/pages/vipLogin/index",
url: "/patient/pages/vipLogin/index",
});
},
handleBack() {

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

@ -70,9 +70,9 @@ Page({ @@ -70,9 +70,9 @@ Page({
urlKey = "reslove";
}
let navUrl = {
reslove: "/pages/certReslove/index?drug=1",
pending: "/pages/certPending/index",
nopending: "/pages/startPending/index",
reslove: "/patient/pages/certReslove/index?drug=1",
pending: "/patient/pages/certPending/index",
nopending: "/patient/pages/startPending/index",
backPage,
}[urlKey];
wx.reLaunch({
@ -80,7 +80,7 @@ Page({ @@ -80,7 +80,7 @@ Page({
});
} else {
wx.navigateTo({
url: "/pages/vipLoginReject/index",
url: "/patient/pages/vipLoginReject/index",
success(subRes) {
subRes.eventChannel.emit("durgInfo", {
drugsCode: DrugsCode,

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

@ -18,7 +18,7 @@ Page({ @@ -18,7 +18,7 @@ Page({
url: options.url ? decodeURIComponent(options.url) : '',
period: options.period === '2' ? '2' : '3',
})
app.waitLogin().then(() => {
app.zdWaitLogin().then(() => {
if (options.url) return
if (options.es === '201503') {
@ -26,9 +26,9 @@ Page({ @@ -26,9 +26,9 @@ Page({
app.zdMpBehavior({ PageName: 'WEIYI_WEBVIEW_PAGE' })
}
const { UserType } = app.globalData.userInfo
const { UserType } = app.globalData.zdUserInfo
if (!UserType || UserType < 3) {
app.permissionVerification(3, 13, `/pages/webview/index`).then(() => {})
app.zdPermissionVerification(3, 13, `/patient/pages/webview/index`).then(() => {})
return
}
this.getAdl()
@ -57,7 +57,7 @@ Page({ @@ -57,7 +57,7 @@ Page({
const { toastType } = this.data
if (toastType === 'aldAlertTest') {
wx.navigateTo({
url: '/pages/adl/index?m_d=2',
url: '/patient/pages/adl/index?m_d=2',
})
}
},
@ -66,7 +66,7 @@ Page({ @@ -66,7 +66,7 @@ Page({
wx.navigateBack({
fail() {
wx.reLaunch({
url: '/pages/index/index',
url: '/patient/pages/index/index',
})
},
})

27
typings/index.d.ts vendored

@ -1,14 +1,36 @@ @@ -1,14 +1,36 @@
interface IAppOption {
globalData: {
userInfo?: IUserInfo;
userInfo?: Partial<IUserInfo>;
url: string;
upFileUrl: string;
imageUrl: string;
loginState: string;
isLogin: 0 | 1 | 999;
loginType: 0 | 1 | 2;
scene: null | { [key: string]: any };
backPath: string;
zdUserInfo: {
UserId?: string;
PatientId?: number;
PatientName?: string;
AuditStatus?: number;
UserType?: number;
RelationType?: number;
isFollow?: number;
UserRegTime?: string;
IsRootUser?: number;
AgeYear?: number;
AgeMonth?: number;
Birth?: string;
DiagnosisTime?: string;
DiagnoseType?: number;
DiagnoseImg?: string;
CommitTime?: string;
IsSick?: number;
IsUseDrugs?: number;
IsAliQiWei?: 0 | 1;
};
[propName: string]: any;
};
userInfoReadyCallback?: WechatMiniprogram.GetUserInfoSuccessCallback;
waitLogin: (params?: { type?: 0 | 1 | 2 | 'any' }) => Promise<void>;
@ -17,6 +39,7 @@ interface IAppOption { @@ -17,6 +39,7 @@ interface IAppOption {
getUserInfo: (type: 0 | 1 | 2) => Promise<never>;
mpBehavior: (data: { PositionId: string; OperateType: string; OperateId: string }) => void;
zdMpBehavior: (data: { PageName: string; doctor?: boolean }) => void;
[propName: string]: any;
}
interface IAgaxParams extends WechatMiniprogram.RequestOption {

Loading…
Cancel
Save