diff --git a/index.d.ts b/index.d.ts deleted file mode 100644 index a97367d..0000000 --- a/index.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -{ - "usingComponents": {} -} diff --git a/src/app.ts b/src/app.ts index 54249f7..60a2e4f 100644 --- a/src/app.ts +++ b/src/app.ts @@ -33,6 +33,8 @@ App({ scene: null, backPath: '', + + zdUserInfo: {}, }, onLaunch() { Page = page as WechatMiniprogram.Page.Constructor; @@ -148,4 +150,283 @@ App({ 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); + }); + }, }); diff --git a/src/patient/pages/adl/index.ts b/src/patient/pages/adl/index.ts index 775b104..5cad891 100644 --- a/src/patient/pages/adl/index.ts +++ b/src/patient/pages/adl/index.ts @@ -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({ 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({ 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({ 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({ onShareAppMessage() { return { title: 'MG-ADL测评表:评估重症肌无力患者症状对生活质量的影响', - path: '/pages/adl/index', + path: '/patient/pages/adl/index', } }, }) diff --git a/src/patient/pages/adlResult/index.ts b/src/patient/pages/adlResult/index.ts index 2dab77a..0a8ea24 100644 --- a/src/patient/pages/adlResult/index.ts +++ b/src/patient/pages/adlResult/index.ts @@ -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({ 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({ }, }).then(() => { wx.redirectTo({ - url: '/pages/adlTest/index', + url: '/patient/pages/adlTest/index', }) }) } @@ -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({ }, 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({ onShareAppMessage() { return { title: 'MG-ADL测评表:评估重症肌无力患者症状对生活质量的影响', - path: '/pages/adl/index', + path: '/patient/pages/adl/index', } }, }) diff --git a/src/patient/pages/adlResult/index.wxml b/src/patient/pages/adlResult/index.wxml index c5ebb1b..ff34c99 100644 --- a/src/patient/pages/adlResult/index.wxml +++ b/src/patient/pages/adlResult/index.wxml @@ -133,7 +133,7 @@ 您的激素用量超过了20mg,建议定期复诊 - + {{unreadCount ? '去看看':'去咨询'}} @@ -352,11 +352,11 @@ - + - + 立即查看医保报销详细解读 {{patientInfo.PatientNum}}人正在关注 diff --git a/src/patient/pages/adlShare/index.ts b/src/patient/pages/adlShare/index.ts index 152390d..160c1c3 100644 --- a/src/patient/pages/adlShare/index.ts +++ b/src/patient/pages/adlShare/index.ts @@ -4,7 +4,7 @@ Page({ data: { poster: '', params: {}, - userInfo: {} as any, + zdUserInfo: {} as any, posterUrl: '', }, onLoad() { @@ -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({ 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({ onShareAppMessage() { return { title: 'MG-ADL测评表:重症肌无力患者评估表', - path: '/pages/adl/index', + path: '/patient/pages/adl/index', } }, }) diff --git a/src/patient/pages/adlTest/index.ts b/src/patient/pages/adlTest/index.ts index f98095b..aa4ed23 100644 --- a/src/patient/pages/adlTest/index.ts +++ b/src/patient/pages/adlTest/index.ts @@ -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({ 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({ onShareAppMessage() { return { title: 'MG-ADL测评表:评估重症肌无力患者症状对生活质量的影响', - path: '/pages/adl/index', + path: '/patient/pages/adl/index', } }, diff --git a/src/patient/pages/cancellation/index.ts b/src/patient/pages/cancellation/index.ts index 28b6f87..20ad257 100644 --- a/src/patient/pages/cancellation/index.ts +++ b/src/patient/pages/cancellation/index.ts @@ -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", }); }); } diff --git a/src/patient/pages/certPending/index.ts b/src/patient/pages/certPending/index.ts index 74dc5b4..dcdbdde 100644 --- a/src/patient/pages/certPending/index.ts +++ b/src/patient/pages/certPending/index.ts @@ -13,7 +13,7 @@ Page({ backPage = ""; } wx.reLaunch({ - url: backPage || "/pages/index/index", + url: backPage || "/patient/pages/index/index", }); }, getCode() { diff --git a/src/patient/pages/certReslove/index.ts b/src/patient/pages/certReslove/index.ts index cb9a684..a8b3d3f 100644 --- a/src/patient/pages/certReslove/index.ts +++ b/src/patient/pages/certReslove/index.ts @@ -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", }); }, }); diff --git a/src/patient/pages/changeUser/index.ts b/src/patient/pages/changeUser/index.ts index 5d8c51a..0a4bc4e 100644 --- a/src/patient/pages/changeUser/index.ts +++ b/src/patient/pages/changeUser/index.ts @@ -72,7 +72,7 @@ Page({ .then((res) => { console.log(res); wx.reLaunch({ - url: "/pages/index/index", + url: "/patient/pages/index/index", }); }) .catch((err) => { diff --git a/src/patient/pages/doctor/index.ts b/src/patient/pages/doctor/index.ts index 52ec5bf..156627e 100644 --- a/src/patient/pages/doctor/index.ts +++ b/src/patient/pages/doctor/index.ts @@ -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({ }) }, 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}` diff --git a/src/patient/pages/doctor/index.wxml b/src/patient/pages/doctor/index.wxml index 36f2332..5f594ed 100644 --- a/src/patient/pages/doctor/index.wxml +++ b/src/patient/pages/doctor/index.wxml @@ -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}}" > @@ -101,7 +101,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}}" > diff --git a/src/patient/pages/doctorDetail/index.ts b/src/patient/pages/doctorDetail/index.ts index 115e7cf..cd5a8d6 100644 --- a/src/patient/pages/doctorDetail/index.ts +++ b/src/patient/pages/doctorDetail/index.ts @@ -21,7 +21,7 @@ Page({ bottom, }) } - app.waitLogin().then((_res) => { + app.zdWaitLogin().then((_res) => { this.setData({ id: options.id, }) diff --git a/src/patient/pages/doctorDetailBak/index.ts b/src/patient/pages/doctorDetailBak/index.ts index d684e45..e109044 100644 --- a/src/patient/pages/doctorDetailBak/index.ts +++ b/src/patient/pages/doctorDetailBak/index.ts @@ -13,7 +13,7 @@ Page({ }, }, onLoad(options) { - app.waitLogin().then((_res) => { + app.zdWaitLogin().then((_res) => { this.setData({ id: options.id, }); diff --git a/src/patient/pages/drugRecord/index.ts b/src/patient/pages/drugRecord/index.ts index c778a11..b8523ee 100644 --- a/src/patient/pages/drugRecord/index.ts +++ b/src/patient/pages/drugRecord/index.ts @@ -32,7 +32,7 @@ Page({ disabled: Boolean(options.id), }) if (options.id) { - app.waitLogin().then((res) => { + app.zdWaitLogin().then((res) => { this.getDetail() }) } diff --git a/src/patient/pages/enterInfo/index.ts b/src/patient/pages/enterInfo/index.ts index 25e91c8..17a3aa3 100644 --- a/src/patient/pages/enterInfo/index.ts +++ b/src/patient/pages/enterInfo/index.ts @@ -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({ 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({ }, }) .then((_res) => { - app.getUserInfo(this, true, () => { + app.getZdUserInfo(this, true, () => { wx.reLaunch({ url: navUrl, }) diff --git a/src/patient/pages/family/index.ts b/src/patient/pages/family/index.ts index 03029d4..b3e7551 100644 --- a/src/patient/pages/family/index.ts +++ b/src/patient/pages/family/index.ts @@ -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({ }, 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({ diff --git a/src/patient/pages/family/index.wxml b/src/patient/pages/family/index.wxml index db84488..9d36288 100644 --- a/src/patient/pages/family/index.wxml +++ b/src/patient/pages/family/index.wxml @@ -15,7 +15,7 @@ 请使用微信扫一扫绑定 - + 查看我的家庭成员 diff --git a/src/patient/pages/familyList/index.ts b/src/patient/pages/familyList/index.ts index 9b207fe..72163e0 100644 --- a/src/patient/pages/familyList/index.ts +++ b/src/patient/pages/familyList/index.ts @@ -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({ 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({ wx.navigateBack({ fail() { wx.reLaunch({ - url: "/pages/index/index", + url: "/patient/pages/index/index", }); }, }); diff --git a/src/patient/pages/familyScan/index.ts b/src/patient/pages/familyScan/index.ts index 29aa426..419e517 100644 --- a/src/patient/pages/familyScan/index.ts +++ b/src/patient/pages/familyScan/index.ts @@ -9,7 +9,7 @@ Page({ reload: false, mpPatientInfo: {}, ignoreAgreement: {}, - userInfo: {} as any, + zdUserInfo: {} as any, }, onLoad(options) { this.setData({ @@ -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({ 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({ }, handleHome() { wx.reLaunch({ - url: "/pages/index/index", + url: "/patient/pages/index/index", }); }, handleResetBind() { @@ -88,7 +88,7 @@ Page({ } // wx.reLaunch({ - // url: "/pages/login/index", + // url: "/patient/pages/login/index", // }); // return; @@ -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", }); }); }); diff --git a/src/patient/pages/getUserInfo/index.ts b/src/patient/pages/getUserInfo/index.ts index 2447d76..e8c60b4 100644 --- a/src/patient/pages/getUserInfo/index.ts +++ b/src/patient/pages/getUserInfo/index.ts @@ -3,7 +3,7 @@ const app = getApp(); Page({ data: { list: [], - userInfo: { + zdUserInfo: { avatarUrl: "", }, }, @@ -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({ icon: "none", }); that.setData({ - ["userInfo.UserImg"]: avatarUrl, + ["zdUserInfo.UserImg"]: avatarUrl, }); }) .catch(() => { @@ -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); }, }); diff --git a/src/patient/pages/hospital/index.ts b/src/patient/pages/hospital/index.ts index 0189cf5..f534932 100644 --- a/src/patient/pages/hospital/index.ts +++ b/src/patient/pages/hospital/index.ts @@ -20,7 +20,7 @@ Page({ }, }, onLoad(options) { - app.waitLogin().then((_res) => { + app.zdWaitLogin().then((_res) => { this.setData({ id: options.id, }) diff --git a/src/patient/pages/hospital/index.wxml b/src/patient/pages/hospital/index.wxml index afc2d24..0cd1228 100644 --- a/src/patient/pages/hospital/index.wxml +++ b/src/patient/pages/hospital/index.wxml @@ -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}}" > diff --git a/src/patient/pages/index/index.ts b/src/patient/pages/index/index.ts index 9b04bee..901ecca 100644 --- a/src/patient/pages/index/index.ts +++ b/src/patient/pages/index/index.ts @@ -9,7 +9,7 @@ Page({ configList: [], infoList: [], storyList: [], - userInfo: {} as any, + zdUserInfo: {} as any, anyWhere: false, regGuide: true, @@ -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({ }); }, onShow() { - app.waitLogin({}).then(() => { + app.zdWaitLogin({}).then(() => { app.zdMpBehavior({ PageName: 'PG_PATIENTHOME' }); this.setData({ anyWhere: app.globalData.anyWhere, @@ -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({ }); }); }, - getConfig(userInfo: any) { - let UserType = userInfo.UserType; + getConfig(zdUserInfo: any) { + let UserType = zdUserInfo.UserType; if (UserType <= 2) { UserType = 1; } @@ -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({ 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({ 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({ 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({ }); }, handleReg() { - app.permissionVerification(3, 0, ''); + app.zdPermissionVerification(3, 0, ''); }, handleMiniDoctor(e) { const { link } = e.currentTarget.dataset; @@ -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({ 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({ }); }, 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({ 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({ 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({ }, }).then((_res) => { wx.navigateTo({ - url: '/pages/interactivePatient/index', + url: '/patient/pages/interactivePatient/index', }); }); this.handleToastCancel(null, false); diff --git a/src/patient/pages/index/index.wxml b/src/patient/pages/index/index.wxml index cca1c8d..ab25e8d 100644 --- a/src/patient/pages/index/index.wxml +++ b/src/patient/pages/index/index.wxml @@ -4,7 +4,7 @@ - + {{today}} @@ -14,7 +14,7 @@ - + @@ -97,7 +97,7 @@ 最近一次测评 {{adlNewRecord.newCreateTime}} - + 立即自测 查看健康档案 @@ -170,7 +170,7 @@ {{detail.days}} - + 更新记录 @@ -183,7 +183,7 @@ 展示您的注射信息 开启您的专属服务 - + 开始记录 @@ -213,7 +213,7 @@ {{card.name}} - + 查看全部 @@ -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}}" > @@ -237,14 +237,14 @@ {{card.name}} - + 查看全部 - + @@ -295,7 +295,7 @@ - + @@ -345,7 +345,7 @@ {{card.name}} - + 查看全部 @@ -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}}" > @@ -397,7 +397,7 @@ {{card.name}} - + 查看全部 @@ -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}}" > diff --git a/src/patient/pages/interactivePatient/index.ts b/src/patient/pages/interactivePatient/index.ts index b5271ac..9f6ade5 100644 --- a/src/patient/pages/interactivePatient/index.ts +++ b/src/patient/pages/interactivePatient/index.ts @@ -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({ 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({ }, handleAdl() { wx.navigateTo({ - url: '/pages/adl/index', + url: '/patient/pages/adl/index', }) }, handleAudio(e) { @@ -334,7 +334,7 @@ Page({ }, handleFillUserInfo() { wx.navigateTo({ - url: '/pages/personalInformation/index', + url: '/patient/pages/personalInformation/index', }) }, handleReferral() { diff --git a/src/patient/pages/live/index.ts b/src/patient/pages/live/index.ts index e3efd3f..6f77847 100644 --- a/src/patient/pages/live/index.ts +++ b/src/patient/pages/live/index.ts @@ -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({ }) 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({ app.zdMpBehavior({ PageName: 'BTN_PATIENTWEDNESDAYTALKACTIVITYLIST' }) } wx.navigateTo({ - url: `/pages/liveDetail/index?id=${id}`, + url: `/patient/pages/liveDetail/index?id=${id}`, }) }, onReachBottom() { diff --git a/src/patient/pages/liveDetail/index.ts b/src/patient/pages/liveDetail/index.ts index 3eae2a4..c44d1bf 100644 --- a/src/patient/pages/liveDetail/index.ts +++ b/src/patient/pages/liveDetail/index.ts @@ -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({ }, 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({ 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({ 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({ // }, 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({ }, }).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({ 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({ 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, } }, diff --git a/src/patient/pages/liveResult/index.ts b/src/patient/pages/liveResult/index.ts index 456696d..1ccee68 100644 --- a/src/patient/pages/liveResult/index.ts +++ b/src/patient/pages/liveResult/index.ts @@ -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({ 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({ }, 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}`, }; }, diff --git a/src/patient/pages/login/index.ts b/src/patient/pages/login/index.ts index 7640856..0d7a97d 100644 --- a/src/patient/pages/login/index.ts +++ b/src/patient/pages/login/index.ts @@ -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({ 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({ 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({ 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) { diff --git a/src/patient/pages/login/index.wxml b/src/patient/pages/login/index.wxml index f12507e..cfc9394 100644 --- a/src/patient/pages/login/index.wxml +++ b/src/patient/pages/login/index.wxml @@ -6,9 +6,9 @@ 在您加入gMG 给力加油站平台之前,请您阅读并充分理解 - 《个人信息及隐私保护政策》 + 《个人信息及隐私保护政策》 ,了解您的权益及相关数据处理方法,我们将严格按照法律法规及 - 《个人信息及隐私保护政策》 + 《个人信息及隐私保护政策》 的相关规定保证您的个人信息不受侵犯。 @@ -50,7 +50,7 @@ > 我已阅读并同意 - 《个人信息及隐私协议政策》 + 《个人信息及隐私协议政策》 @@ -70,7 +70,7 @@ > 我特此同意依照此 - 《个人信息及隐私保护政策》 + 《个人信息及隐私保护政策》 规定收集我的个人敏感信息 diff --git a/src/patient/pages/my/index.ts b/src/patient/pages/my/index.ts index 8d8cde0..e49aac1 100644 --- a/src/patient/pages/my/index.ts +++ b/src/patient/pages/my/index.ts @@ -4,7 +4,7 @@ const app = getApp() 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({ adlNewRecord: {} as any, }, onLoad() { - app.getTheme().then((res) => { + app.zdGetTheme().then((res) => { this.setData({ theme: res, }) @@ -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({ 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({ 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({ AdlNotifySwitch: e.detail ? 1 : 2, }, }).then(() => { - app.getUserInfo(this, true) + app.getZdUserInfo(this, true) }) }, routerTo(e) { @@ -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({ }) }, 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({ handleMiniDoctor() { wx.navigateTo({ - url: '/pages/webview/index', + url: '/patient/pages/webview/index', }) }, }) diff --git a/src/patient/pages/my/index.wxml b/src/patient/pages/my/index.wxml index a22c751..c9dcc55 100644 --- a/src/patient/pages/my/index.wxml +++ b/src/patient/pages/my/index.wxml @@ -9,7 +9,7 @@ mode="aspectFill" src="{{userInfo.UserImg}}" bind:tap="routerTo" - data-url="/pages/getUserInfo/index" + data-url="/patient/pages/getUserInfo/index" > @@ -31,9 +31,9 @@ 能量 - 能量明细 + 能量明细 - 能量规则 + 能量规则 @@ -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" > - + 健康档案 - + - + - + - + - + { + app.zdWaitLogin().then(() => { this.getConfig() - app.getUserInfo(this, true) + app.getZdUserInfo(this, true) }) }, getConfig() { @@ -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() { diff --git a/src/patient/pages/mySave/index.ts b/src/patient/pages/mySave/index.ts index 428558e..309a83d 100644 --- a/src/patient/pages/mySave/index.ts +++ b/src/patient/pages/mySave/index.ts @@ -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({ `${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({ `${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({ }) return { title: Title, - path: `/pages/repositoryDetail/index?id=${id}`, + path: `/patient/pages/repositoryDetail/index?id=${id}`, imageUrl: TitlePicLink, } } else { @@ -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', } } }, diff --git a/src/patient/pages/nrdl/index.ts b/src/patient/pages/nrdl/index.ts index 869df00..b62581d 100644 --- a/src/patient/pages/nrdl/index.ts +++ b/src/patient/pages/nrdl/index.ts @@ -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({ 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({ }, handleHos() { wx.navigateTo({ - url: "/pages/doctor/index", + url: "/patient/pages/doctor/index", }); this.handleDtpRecord(); }, diff --git a/src/patient/pages/nrdlDetail/index.ts b/src/patient/pages/nrdlDetail/index.ts index 0712c2a..9110e51 100644 --- a/src/patient/pages/nrdlDetail/index.ts +++ b/src/patient/pages/nrdlDetail/index.ts @@ -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({ if (this.data.id == '2') { if (this.data.NrdlCityListSwitch == '1') { wx.navigateTo({ - url: '/pages/nrdlTable/index', + url: '/patient/pages/nrdlTable/index', }) } else { wx.showToast({ diff --git a/src/patient/pages/nrdlTable/index.ts b/src/patient/pages/nrdlTable/index.ts index 90c0622..4264366 100644 --- a/src/patient/pages/nrdlTable/index.ts +++ b/src/patient/pages/nrdlTable/index.ts @@ -855,7 +855,7 @@ Page({ asideType: "13", }, onLoad() { - app.waitLogin().then((_res) => { + app.zdWaitLogin().then((_res) => { app.zdMpBehavior({ PageName: 'PG_PATIENTCITYHEALTHINSURANCE' }) this.addOpenRecord(); }); diff --git a/src/patient/pages/personalInformation/index.ts b/src/patient/pages/personalInformation/index.ts index b89c611..8cb1001 100644 --- a/src/patient/pages/personalInformation/index.ts +++ b/src/patient/pages/personalInformation/index.ts @@ -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({ 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({ 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({ 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({ 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({ 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({ 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({ 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({ 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({ 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({ handleRadio(e) { const { id, key } = e.currentTarget.dataset this.setData({ - [`userInfo.${key}`]: id, + [`zdUserInfo.${key}`]: id, }) this.updateUserInfo(true) }, @@ -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({ 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({ 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({ }, 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({ diff --git a/src/patient/pages/personalInformation/index.wxml b/src/patient/pages/personalInformation/index.wxml index aef310c..c73f2e4 100644 --- a/src/patient/pages/personalInformation/index.wxml +++ b/src/patient/pages/personalInformation/index.wxml @@ -233,7 +233,7 @@ - + @@ -248,11 +248,11 @@ - + 切换账号 - 切换医生端 + 切换医生端 注销 diff --git a/src/patient/pages/privacyAgreement/index.ts b/src/patient/pages/privacyAgreement/index.ts index a8e3cba..38117fe 100644 --- a/src/patient/pages/privacyAgreement/index.ts +++ b/src/patient/pages/privacyAgreement/index.ts @@ -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({ }) } 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`, }) } }, diff --git a/src/patient/pages/privacyAgreement/index.wxml b/src/patient/pages/privacyAgreement/index.wxml index 9cc72de..e6f78f6 100644 --- a/src/patient/pages/privacyAgreement/index.wxml +++ b/src/patient/pages/privacyAgreement/index.wxml @@ -1,12 +1,12 @@ - + - + 不同意 同意 diff --git a/src/patient/pages/publishStoryDetail/index.ts b/src/patient/pages/publishStoryDetail/index.ts index 36dc9d1..eaca2ec 100644 --- a/src/patient/pages/publishStoryDetail/index.ts +++ b/src/patient/pages/publishStoryDetail/index.ts @@ -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({ }) }, 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({ 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({ diff --git a/src/patient/pages/referral/index.ts b/src/patient/pages/referral/index.ts index 1c6b8f5..182c189 100644 --- a/src/patient/pages/referral/index.ts +++ b/src/patient/pages/referral/index.ts @@ -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({ }, handleAdl() { wx.navigateTo({ - url: '/gift/pages/myHealthRecord/index', + url: '/gift/patient/pages/myHealthRecord/index', }) }, }) diff --git a/src/patient/pages/repository/index.ts b/src/patient/pages/repository/index.ts index df60ab4..5610249 100644 --- a/src/patient/pages/repository/index.ts +++ b/src/patient/pages/repository/index.ts @@ -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({ 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({ }) return { title: Title, - path: `/pages/repositoryDetail/index?id=${id}`, + path: `/patient/pages/repositoryDetail/index?id=${id}`, imageUrl: TitlePicLink, } } else { @@ -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', } } }, diff --git a/src/patient/pages/repositoryDetail/index.ts b/src/patient/pages/repositoryDetail/index.ts index 0716286..c9dbaa2 100644 --- a/src/patient/pages/repositoryDetail/index.ts +++ b/src/patient/pages/repositoryDetail/index.ts @@ -32,7 +32,7 @@ Page({ this.setData({ id, }) - app.waitLogin().then(() => { + app.zdWaitLogin().then(() => { this.getDetail(true) }) }, @@ -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({ 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({ }) 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, } }, diff --git a/src/patient/pages/signIn/index.ts b/src/patient/pages/signIn/index.ts index 84bb6d2..69fac12 100644 --- a/src/patient/pages/signIn/index.ts +++ b/src/patient/pages/signIn/index.ts @@ -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({ 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({ }, 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`, }; }, diff --git a/src/patient/pages/start/index.ts b/src/patient/pages/start/index.ts index 373325f..479366c 100644 --- a/src/patient/pages/start/index.ts +++ b/src/patient/pages/start/index.ts @@ -3,30 +3,30 @@ const app = getApp() 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', }) }) }, diff --git a/src/patient/pages/startPending/index.ts b/src/patient/pages/startPending/index.ts index 1596f82..711af70 100644 --- a/src/patient/pages/startPending/index.ts +++ b/src/patient/pages/startPending/index.ts @@ -11,7 +11,7 @@ Page({ backPage = ""; } wx.reLaunch({ - url: backPage || "/pages/index/index", + url: backPage || "/patient/pages/index/index", }); }, }); diff --git a/src/patient/pages/startReject/index.ts b/src/patient/pages/startReject/index.ts index 07a1447..4f9e2f1 100644 --- a/src/patient/pages/startReject/index.ts +++ b/src/patient/pages/startReject/index.ts @@ -3,21 +3,21 @@ const app = getApp(); 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", }); }, }); diff --git a/src/patient/pages/story/index.ts b/src/patient/pages/story/index.ts index fcbff02..8a20d8c 100644 --- a/src/patient/pages/story/index.ts +++ b/src/patient/pages/story/index.ts @@ -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({ } }, 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({ 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({ diff --git a/src/patient/pages/story/index.wxml b/src/patient/pages/story/index.wxml index ac030f7..acc5fbf 100644 --- a/src/patient/pages/story/index.wxml +++ b/src/patient/pages/story/index.wxml @@ -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}}" > @@ -38,7 +38,7 @@ - + diff --git a/src/patient/pages/storyDetail/index.ts b/src/patient/pages/storyDetail/index.ts index b62d428..cb6b8ca 100644 --- a/src/patient/pages/storyDetail/index.ts +++ b/src/patient/pages/storyDetail/index.ts @@ -19,7 +19,7 @@ Page({ this.setData({ id: options.id, }); - app.waitLogin().then(() => { + app.zdWaitLogin().then(() => { this.getDetail(); }); }, @@ -124,7 +124,7 @@ Page({ }, handleHome() { wx.reLaunch({ - url: "/pages/index/index", + url: "/patient/pages/index/index", }); }, handleBack() { diff --git a/src/patient/pages/storyEnter/index.ts b/src/patient/pages/storyEnter/index.ts index 6d7d59f..f6f6c32 100644 --- a/src/patient/pages/storyEnter/index.ts +++ b/src/patient/pages/storyEnter/index.ts @@ -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({ }) } - 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({ wx.navigateBack({ fail() { wx.reLaunch({ - url: '/pages/index/index', + url: '/patient/pages/index/index', }) }, }) @@ -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}`, }) }) }, diff --git a/src/patient/pages/storyEnterResult/index.ts b/src/patient/pages/storyEnterResult/index.ts index 993d541..1b4cdf1 100644 --- a/src/patient/pages/storyEnterResult/index.ts +++ b/src/patient/pages/storyEnterResult/index.ts @@ -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({ }, handleHome() { wx.reLaunch({ - url: "/pages/index/index", + url: "/patient/pages/index/index", }); }, }); diff --git a/src/patient/pages/storyGuide/index.ts b/src/patient/pages/storyGuide/index.ts index d559979..c81f8bc 100644 --- a/src/patient/pages/storyGuide/index.ts +++ b/src/patient/pages/storyGuide/index.ts @@ -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({ }, 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({ }, handleProtocols() { wx.redirectTo({ - url: '/pages/privacyAgreement/index?page=/pages/storyGuide/index', + url: '/patient/pages/privacyAgreement/index?page=/patient/pages/storyGuide/index', }) }, handleBack() { diff --git a/src/patient/pages/storyGuide/index.wxml b/src/patient/pages/storyGuide/index.wxml index 9d60e80..33b1c2e 100644 --- a/src/patient/pages/storyGuide/index.wxml +++ b/src/patient/pages/storyGuide/index.wxml @@ -31,7 +31,7 @@ - + 立即投稿 diff --git a/src/patient/pages/storyList/index.ts b/src/patient/pages/storyList/index.ts index 73f719d..7983bc1 100644 --- a/src/patient/pages/storyList/index.ts +++ b/src/patient/pages/storyList/index.ts @@ -8,7 +8,7 @@ Page({ pages: 1, count: 1, }, - userInfo: {}, + zdUserInfo: {}, }, onLoad() { const SystemInfo = app.globalSystemInfo @@ -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({ 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({ wx.navigateBack({ fail() { wx.reLaunch({ - url: '/pages/index/index', + url: '/patient/pages/index/index', }) }, }) diff --git a/src/patient/pages/storyList/index.wxml b/src/patient/pages/storyList/index.wxml index 9d0ec5d..1de32f4 100644 --- a/src/patient/pages/storyList/index.wxml +++ b/src/patient/pages/storyList/index.wxml @@ -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" > - + @@ -26,6 +26,6 @@ - 继续投稿 + 继续投稿 diff --git a/src/patient/pages/taskAgreement/index.ts b/src/patient/pages/taskAgreement/index.ts index 363c641..5dae874 100644 --- a/src/patient/pages/taskAgreement/index.ts +++ b/src/patient/pages/taskAgreement/index.ts @@ -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' }) }) }, diff --git a/src/patient/pages/taskAgreement/index.wxml b/src/patient/pages/taskAgreement/index.wxml index 473ec3d..ed2a4ab 100644 --- a/src/patient/pages/taskAgreement/index.wxml +++ b/src/patient/pages/taskAgreement/index.wxml @@ -1,13 +1,13 @@ - + - + 不同意 同意 diff --git a/src/patient/pages/thePublic/index.ts b/src/patient/pages/thePublic/index.ts index 4a99bc0..402f8ac 100644 --- a/src/patient/pages/thePublic/index.ts +++ b/src/patient/pages/thePublic/index.ts @@ -13,7 +13,7 @@ Page({ bottom: bottom, }); } - app.waitLogin().then((_res) => { + app.zdWaitLogin().then((_res) => { this.getCode(); }); }, diff --git a/src/patient/pages/uploadCert/index.ts b/src/patient/pages/uploadCert/index.ts index 71c9503..11263c0 100644 --- a/src/patient/pages/uploadCert/index.ts +++ b/src/patient/pages/uploadCert/index.ts @@ -9,7 +9,7 @@ Page({ verify: false, audit: false, - userInfo: app.globalData.userInfo, + zdUserInfo: app.globalData.zdUserInfo, proces: '', Hash: '', @@ -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({ }, 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({ imgHash: Hash, }, }).then((_res) => { - app.getUserInfo(this, true, () => { + app.getZdUserInfo(this, true, () => { if (navUrl) { wx.reLaunch({ url: navUrl, @@ -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({ 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({ }, loading: true, }).then((_res) => { - app.getUserInfo(this, true, () => { + app.getZdUserInfo(this, true, () => { if (navUrl) { wx.reLaunch({ url: navUrl, diff --git a/src/patient/pages/uploadCertBak/index.ts b/src/patient/pages/uploadCertBak/index.ts index d18f822..a09520c 100644 --- a/src/patient/pages/uploadCertBak/index.ts +++ b/src/patient/pages/uploadCertBak/index.ts @@ -9,7 +9,7 @@ Page({ verify: false, audit: false, - userInfo: app.globalData.userInfo, + zdUserInfo: app.globalData.zdUserInfo, proces: "", Hash: "", }, @@ -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({ }, 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({ imgHash: Hash, }, }).then((_res) => { - app.getUserInfo(this, true, () => { + app.getZdUserInfo(this, true, () => { if (navUrl) { wx.reLaunch({ url: navUrl, @@ -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({ imgHash: "", }, }).then((_res) => { - app.getUserInfo(this, true, () => { + app.getZdUserInfo(this, true, () => { if (navUrl) { wx.reLaunch({ url: navUrl, @@ -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() { diff --git a/src/patient/pages/vipLogin/index.ts b/src/patient/pages/vipLogin/index.ts index 588d58c..7379406 100644 --- a/src/patient/pages/vipLogin/index.ts +++ b/src/patient/pages/vipLogin/index.ts @@ -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({ }); } else { wx.navigateTo({ - url: "/pages/vipLoginReject/index", + url: "/patient/pages/vipLoginReject/index", success(subRes) { subRes.eventChannel.emit("durgInfo", { drugsCode: DrugsCode, diff --git a/src/patient/pages/webview/index.ts b/src/patient/pages/webview/index.ts index 89cfbc8..9c9c0e0 100644 --- a/src/patient/pages/webview/index.ts +++ b/src/patient/pages/webview/index.ts @@ -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({ 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({ 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({ wx.navigateBack({ fail() { wx.reLaunch({ - url: '/pages/index/index', + url: '/patient/pages/index/index', }) }, }) diff --git a/typings/index.d.ts b/typings/index.d.ts index 922045d..f3eab60 100644 --- a/typings/index.d.ts +++ b/typings/index.d.ts @@ -1,14 +1,36 @@ interface IAppOption { globalData: { - userInfo?: IUserInfo; + userInfo?: Partial; 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; @@ -17,6 +39,7 @@ interface IAppOption { getUserInfo: (type: 0 | 1 | 2) => Promise; mpBehavior: (data: { PositionId: string; OperateType: string; OperateId: string }) => void; zdMpBehavior: (data: { PageName: string; doctor?: boolean }) => void; + [propName: string]: any; } interface IAgaxParams extends WechatMiniprogram.RequestOption {