Browse Source

患者端迁移bug处理

dev
kola-web 4 weeks ago
parent
commit
069b32a473
  1. 20
      src/app.ts
  2. 9
      src/pages/start/index.ts
  3. 66
      src/patient/pages/adl/index.ts
  4. 120
      src/patient/pages/adlResult/index.ts
  5. 136
      src/patient/pages/adlTest/index.ts
  6. 4
      src/patient/pages/start/index.json
  7. 4
      src/patient/pages/start/index.scss
  8. 33
      src/patient/pages/start/index.ts
  9. 1
      src/patient/pages/start/index.wxml
  10. 2
      typings/index.d.ts

20
src/app.ts

@ -140,7 +140,7 @@ App<IAppOption>({
return new Promise((resolve) => { return new Promise((resolve) => {
const checkLogin = () => { const checkLogin = () => {
if (this.globalData.loginState) { if (this.globalData.loginState) {
if (this.checkLoginType(type)) { if (this.checkLoginType(type as pageType[] | 'any')) {
resolve(); resolve();
} }
return; return;
@ -239,23 +239,7 @@ App<IAppOption>({
}, },
zdGetTheme() { zdGetTheme() {
return new Promise((resolve) => { return new Promise((resolve) => {
const checkUserType = () => { resolve('PATIENT');
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 }) { zdWaitLogin({ isReg = true, loginPage = false, pub = false } = { isReg: true, loginPage: false, pub: false }) {

9
src/pages/start/index.ts

@ -30,10 +30,15 @@ Page({
return; return;
} }
if (loginType === 2) { if (loginType === 2) {
if (isNewReg === 1) {
wx.reLaunch({
url: '/pages/home/index',
});
return;
}
wx.reLaunch({ wx.reLaunch({
url: '/pages/index/index', url: '/pages/login/index',
}); });
return;
} }
}); });
}, },

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

@ -1,4 +1,4 @@
const app = getApp<IAppOption>() const app = getApp<IAppOption>();
Page({ Page({
data: { data: {
@ -18,38 +18,38 @@ Page({
}, },
videoContext: null as WechatMiniprogram.VideoContext | null, videoContext: null as WechatMiniprogram.VideoContext | null,
async onLoad(options) { async onLoad(options) {
await this.handleScene(options) await this.handleScene(options);
this.videoContext = wx.createVideoContext('video') this.videoContext = wx.createVideoContext('video');
this.setData({ this.setData({
m_d: options.m_d, m_d: options.m_d,
nrdl: options.nrdl, nrdl: options.nrdl,
}) });
app.zdWaitLogin({ isReg: false }).then(() => { app.waitLogin({ type: [0, 1] }).then(() => {
app.zdMpBehavior({ PageName: 'PG_PATIENTASSESSMENTSTART' }) app.zdMpBehavior({ PageName: 'PG_PATIENTASSESSMENTSTART' });
app.getZdUserInfo(this, true) app.getZdUserInfo(this, true);
this.getAdlScore() this.getAdlScore();
if (options.adlPushId) { if (options.adlPushId) {
wx.ajax({ wx.ajax({
method: 'POST', method: 'POST',
url: '?r=zd/push-click/adl-push-click', url: '?r=zd/push-click/adl-push-click',
data: { adlPushId: options.adlPushId }, data: { adlPushId: options.adlPushId },
}) });
} }
if (options.es === '201502') { if (options.es === '201502') {
app.globalData.IsAliQiWei = 1 app.globalData.IsAliQiWei = 1;
app.zdMpBehavior({ PageName: 'JUMP_INSURANCE_ADL_PAGE' }) app.zdMpBehavior({ PageName: 'JUMP_INSURANCE_ADL_PAGE' });
} }
}) });
}, },
// 拦截通过小程序码进入的场景 // 拦截通过小程序码进入的场景
handleScene(options: any) { handleScene(options: any) {
return new Promise((resolve) => { return new Promise((resolve) => {
console.log(options) console.log(options);
const { scene, ...reset } = wx.getLaunchOptionsSync() const { scene, ...reset } = wx.getLaunchOptionsSync();
console.log(scene) console.log(scene);
console.log(reset) console.log(reset);
if ( if (
[1047, 1048, 1049, 1089].includes(scene) && [1047, 1048, 1049, 1089].includes(scene) &&
options.scene?.includes('doctorId') && options.scene?.includes('doctorId') &&
@ -58,12 +58,12 @@ Page({
app.zdPermissionVerification(3, 15, `/patient/pages/index/index`).then(() => { app.zdPermissionVerification(3, 15, `/patient/pages/index/index`).then(() => {
wx.reLaunch({ wx.reLaunch({
url: '/patient/pages/index/index', url: '/patient/pages/index/index',
}) });
}) });
} else { } else {
resolve(true) resolve(true);
} }
}) });
}, },
getAdlScore() { getAdlScore() {
wx.ajax({ wx.ajax({
@ -73,38 +73,38 @@ Page({
}).then((res) => { }).then((res) => {
this.setData({ this.setData({
rewardScore: res.rewardScore, rewardScore: res.rewardScore,
}) });
}) });
}, },
handlePlay() { handlePlay() {
this.videoContext?.play() this.videoContext?.play();
this.videoContext?.requestFullScreen({}) this.videoContext?.requestFullScreen({});
}, },
handleFullScreen(e) { handleFullScreen(e) {
if (!e.detail.fullScreen) { if (!e.detail.fullScreen) {
this.videoContext?.pause() this.videoContext?.pause();
this.videoContext?.seek(0) this.videoContext?.seek(0);
} }
}, },
handleShare() { handleShare() {
app.zdMpBehavior({ PageName: 'BTN_PATIENTASSESSMENTSTARTSHARE' }) app.zdMpBehavior({ PageName: 'BTN_PATIENTASSESSMENTSTARTSHARE' });
wx.navigateTo({ wx.navigateTo({
url: '/patient/pages/adlShare/index', url: '/patient/pages/adlShare/index',
}) });
}, },
handleTest() { handleTest() {
app.zdMpBehavior({ PageName: 'BTN_PATIENTASSESSMENTSTART' }) app.zdMpBehavior({ PageName: 'BTN_PATIENTASSESSMENTSTART' });
wx.navigateTo({ wx.navigateTo({
url: `/patient/pages/adlTest/index?m_d=${this.data.m_d}&nrdl=${this.data.nrdl}`, url: `/patient/pages/adlTest/index?m_d=${this.data.m_d}&nrdl=${this.data.nrdl}`,
}) });
}, },
handleBack() { handleBack() {
wx.navigateBack() wx.navigateBack();
}, },
onShareAppMessage() { onShareAppMessage() {
return { return {
title: 'MG-ADL测评表:评估重症肌无力患者症状对生活质量的影响', title: 'MG-ADL测评表:评估重症肌无力患者症状对生活质量的影响',
path: '/patient/pages/adl/index', path: '/patient/pages/adl/index',
} };
}, },
}) });

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

@ -1,5 +1,5 @@
import dayjs from 'dayjs' import dayjs from 'dayjs';
const app = getApp<IAppOption>() const app = getApp<IAppOption>();
Page({ Page({
data: { data: {
@ -69,19 +69,19 @@ Page({
unreadCount: 0, unreadCount: 0,
}, },
onLoad(options) { onLoad(options) {
console.log(options) console.log(options);
app.zdGetTheme().then((res) => { app.zdGetTheme().then((res) => {
this.setData({ this.setData({
theme: res, theme: res,
}) });
}) });
const SystemInfo = app.globalSystemInfo const SystemInfo = app.globalSystemInfo;
if (SystemInfo) { if (SystemInfo) {
const { bottom } = SystemInfo.capsulePosition const { bottom } = SystemInfo.capsulePosition;
this.setData({ this.setData({
bottom, bottom,
}) });
} }
this.setData({ this.setData({
id: options.id, id: options.id,
@ -90,27 +90,27 @@ Page({
nrdl: options.nrdl, nrdl: options.nrdl,
sendWeiYi: options.wy === '1', sendWeiYi: options.wy === '1',
idafa: options.idafa === '1', idafa: options.idafa === '1',
}) });
app.zdWaitLogin({ loginPage: true }).then(() => { app.waitLogin({ type: [0, 1] }).then(() => {
app.zdMpBehavior({ PageName: 'PG_PATIENTASSESSMENTRESULTS' }) app.zdMpBehavior({ PageName: 'PG_PATIENTASSESSMENTRESULTS' });
app.getZdUserInfo(this, false) app.getZdUserInfo(this, false);
this.getUnreadCount() this.getUnreadCount();
this.getDetail() this.getDetail();
this.getQrCode() this.getQrCode();
if (options.nrdl === '1') { if (options.nrdl === '1') {
this.getOpenPatientList() this.getOpenPatientList();
} }
const pages = getCurrentPages() //获取当前页面js里面的pages里的所有信息。 const pages = getCurrentPages(); //获取当前页面js里面的pages里的所有信息。
const prevPage = pages[pages.length - 2] const prevPage = pages[pages.length - 2];
const adlResultInfo = wx.getStorageSync('adlResultInfo') const adlResultInfo = wx.getStorageSync('adlResultInfo');
console.log(options.idafa === '1') console.log(options.idafa === '1');
if (options.idafa === '1') { if (options.idafa === '1') {
this.setData({ this.setData({
toastShow: true, toastShow: true,
toastType: 'adlLevelUp', toastType: 'adlLevelUp',
toastParams: {}, toastParams: {},
}) });
} else if (adlResultInfo && prevPage.route == 'pages/adl/index' && !Array.isArray(adlResultInfo)) { } else if (adlResultInfo && prevPage.route == 'pages/adl/index' && !Array.isArray(adlResultInfo)) {
this.setData({ this.setData({
toastShow: true, toastShow: true,
@ -119,10 +119,10 @@ Page({
...adlResultInfo, ...adlResultInfo,
Records: adlResultInfo.Records?.reverse(), Records: adlResultInfo.Records?.reverse(),
}, },
}) });
wx.removeStorageSync('adlResultInfo') wx.removeStorageSync('adlResultInfo');
} }
}) });
}, },
getQrCode() { getQrCode() {
wx.ajax({ wx.ajax({
@ -132,8 +132,8 @@ Page({
}).then((res) => { }).then((res) => {
this.setData({ this.setData({
qrcode: res.src, qrcode: res.src,
}) });
}) });
}, },
getUnreadCount() { getUnreadCount() {
wx.ajax({ wx.ajax({
@ -143,11 +143,11 @@ Page({
}).then((res) => { }).then((res) => {
this.setData({ this.setData({
unreadCount: res, unreadCount: res,
}) });
}) });
}, },
getDetail() { getDetail() {
const { id } = this.data const { id } = this.data;
wx.ajax({ wx.ajax({
method: 'GET', method: 'GET',
url: '?r=zd/adl/view', url: '?r=zd/adl/view',
@ -155,21 +155,21 @@ Page({
Id: id, Id: id,
}, },
}).then((res) => { }).then((res) => {
let grade = 1 let grade = 1;
if (res.TotalScore < 5) { if (res.TotalScore < 5) {
grade = 1 grade = 1;
} else if (res.TotalScore >= 5 && res.TotalScore < 15) { } else if (res.TotalScore >= 5 && res.TotalScore < 15) {
grade = 2 grade = 2;
} else { } else {
grade = 3 grade = 3;
} }
this.setData({ this.setData({
detail: res, detail: res,
grade, grade,
LastCreateDate: dayjs(res.LastCreateTime).format('MM月DD日'), LastCreateDate: dayjs(res.LastCreateTime).format('MM月DD日'),
dateDiff: dayjs(res.CreateTime).from(res.LastCreateTime).replace(' ', ''), dateDiff: dayjs(res.CreateTime).from(res.LastCreateTime).replace(' ', ''),
}) });
}) });
}, },
getOpenPatientList() { getOpenPatientList() {
wx.ajax({ wx.ajax({
@ -179,24 +179,24 @@ Page({
}).then((res) => { }).then((res) => {
this.setData({ this.setData({
patientInfo: res, patientInfo: res,
}) });
}) });
}, },
handleDetail() { handleDetail() {
const { scurt, noFinish } = this.data const { scurt, noFinish } = this.data;
if (noFinish) return if (noFinish) return;
this.setData({ this.setData({
scurt: (scurt + 1) % 2, scurt: (scurt + 1) % 2,
noFinish: true, noFinish: true,
}) });
}, },
handleDetailFinish() { handleDetailFinish() {
this.setData({ this.setData({
noFinish: false, noFinish: false,
}) });
}, },
handleReset() { handleReset() {
const id = this.data.id const id = this.data.id;
wx.showModal({ wx.showModal({
title: '确认重新测试?', title: '确认重新测试?',
content: '重新测试后,此次评测结果将自动删除', content: '重新测试后,此次评测结果将自动删除',
@ -212,61 +212,61 @@ Page({
}).then(() => { }).then(() => {
wx.redirectTo({ wx.redirectTo({
url: '/patient/pages/adlTest/index', url: '/patient/pages/adlTest/index',
}) });
}) });
} }
}, },
}) });
}, },
handleSave() { handleSave() {
app.zdPermissionVerification(3, 2, ``).then(() => {}) app.zdPermissionVerification(3, 2, ``).then(() => {});
}, },
handleMyHealth() { handleMyHealth() {
app.zdMpBehavior({ PageName: 'BTN_PATIENTASSESSMENTRESULTGETNOTES' }) app.zdMpBehavior({ PageName: 'BTN_PATIENTASSESSMENTRESULTGETNOTES' });
wx.navigateTo({ wx.navigateTo({
url: '/gift/patient/pages/myHealthRecord/index', url: '/gift/patient/pages/myHealthRecord/index',
}) });
}, },
handleShare() { handleShare() {
wx.navigateTo({ wx.navigateTo({
url: '/patient/pages/adlShare/index', url: '/patient/pages/adlShare/index',
}) });
}, },
handleToastOk() { handleToastOk() {
if (this.data.toastType === 'adlLevelUp') { if (this.data.toastType === 'adlLevelUp') {
wx.navigateTo({ wx.navigateTo({
url: '/patient/pages/webview/index', url: '/patient/pages/webview/index',
}) });
} }
this.handleToastCancel() this.handleToastCancel();
}, },
handleToastCancel() { handleToastCancel() {
this.setData({ this.setData({
toastShow: false, toastShow: false,
}) });
}, },
handleBack() { handleBack() {
wx.navigateBack() wx.navigateBack();
}, },
routerTo(e) { routerTo(e) {
const { url } = e.currentTarget.dataset const { url } = e.currentTarget.dataset;
if (url === '/patient/pages/interactivePatient/index') { if (url === '/patient/pages/interactivePatient/index') {
app.zdMpBehavior({ PageName: 'BTN_PATIENTASSESSMENTRESULTDOCTORCARD' }) app.zdMpBehavior({ PageName: 'BTN_PATIENTASSESSMENTRESULTDOCTORCARD' });
} }
if (url === '/patient/pages/webview/index') { if (url === '/patient/pages/webview/index') {
app.zdMpBehavior({ PageName: 'BTN_PATIENTASSESSMENTRESULTAPPLYINSURANCE' }) app.zdMpBehavior({ PageName: 'BTN_PATIENTASSESSMENTRESULTAPPLYINSURANCE' });
} }
wx.navigateTo({ wx.navigateTo({
url, url,
}) });
}, },
hanldeCodeLong() { hanldeCodeLong() {
app.zdMpBehavior({ PageName: 'BTN_PATIENTASSESSMENTRESULTQRCODELONGPRESS' }) app.zdMpBehavior({ PageName: 'BTN_PATIENTASSESSMENTRESULTQRCODELONGPRESS' });
}, },
onShareAppMessage() { onShareAppMessage() {
return { return {
title: 'MG-ADL测评表:评估重症肌无力患者症状对生活质量的影响', title: 'MG-ADL测评表:评估重症肌无力患者症状对生活质量的影响',
path: '/patient/pages/adl/index', path: '/patient/pages/adl/index',
} };
}, },
}) });

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

@ -1,4 +1,4 @@
const app = getApp<IAppOption>() const app = getApp<IAppOption>();
Page({ Page({
data: { data: {
@ -208,15 +208,15 @@ Page({
icon: '9', icon: '9',
}, },
] as { ] as {
title: string title: string;
key: string key: string;
icon: string icon: string;
type: string type: string;
list: { list: {
id: string id: string;
title: string title: string;
active?: boolean active?: boolean;
}[] }[];
}[], }[],
params: {}, params: {},
@ -226,115 +226,115 @@ Page({
focus: false, focus: false,
}, },
onLoad(options) { onLoad(options) {
const SystemInfo = app.globalSystemInfo const SystemInfo = app.globalSystemInfo;
if (SystemInfo) { if (SystemInfo) {
const { bottom } = SystemInfo.capsulePosition const { bottom } = SystemInfo.capsulePosition;
this.setData({ this.setData({
bottom, bottom,
}) });
} }
this.setData({ this.setData({
m_d: options.m_d, m_d: options.m_d,
nrdl: options.nrdl, nrdl: options.nrdl,
}) });
app.zdWaitLogin({ isReg: false }).then(() => { app.waitLogin({ type: [0, 1] }).then(() => {
this.handleMp(this.data.nav) this.handleMp(this.data.nav);
}) });
}, },
handleSelect(e) { handleSelect(e) {
const { index } = e.currentTarget.dataset const { index } = e.currentTarget.dataset;
const { nav, question } = this.data const { nav, question } = this.data;
const questionItem = question[nav] const questionItem = question[nav];
questionItem.list = questionItem.list.map((item, i) => { questionItem.list = questionItem.list.map((item, i) => {
if (index == i) { if (index == i) {
item.active = true item.active = true;
} else { } else {
item.active = false item.active = false;
} }
return item return item;
}) });
this.setData({ this.setData({
[`question[${nav}]`]: questionItem, [`question[${nav}]`]: questionItem,
}) });
setTimeout(() => { setTimeout(() => {
this.setData({ this.setData({
nav: nav == 8 ? 8 : nav + 1, nav: nav == 8 ? 8 : nav + 1,
showSubmit: nav == 8, showSubmit: nav == 8,
}) });
this.handleMp(this.data.nav) this.handleMp(this.data.nav);
}, 500) }, 500);
}, },
stopTouchMove() { stopTouchMove() {
return false return false;
}, },
bindtransition() { bindtransition() {
this.setData({ this.setData({
nav: this.data.nav, nav: this.data.nav,
}) });
}, },
handlePrev() { handlePrev() {
const { nav } = this.data const { nav } = this.data;
this.setData({ this.setData({
nav: nav - 1, nav: nav - 1,
}) });
}, },
handleSubmit() { handleSubmit() {
app.zdMpBehavior({ PageName: 'BTN_PATIENTASSESSMENTQ9COMPLETE' }) app.zdMpBehavior({ PageName: 'BTN_PATIENTASSESSMENTQ9COMPLETE' });
wx.showLoading({ wx.showLoading({
title: '提交中', title: '提交中',
}) });
const { question } = this.data const { question } = this.data;
const params = {} const params = {};
question.forEach((item) => { question.forEach((item) => {
if (item.type === 'intenseDose') { if (item.type === 'intenseDose') {
params[item.key] = this.data[item.key] params[item.key] = this.data[item.key];
} else { } else {
params[item.key] = item.list.findIndex((subItem) => subItem.active) params[item.key] = item.list.findIndex((subItem) => subItem.active);
} }
}) });
this.setData({ this.setData({
params, params,
}) });
}, },
handleFinish(e) { handleFinish(e) {
const that = this const that = this;
const url = `${app.globalData.upFileUrl}?r=file-service/upload-img` const url = `${app.globalData.upFileUrl}?r=file-service/upload-img`;
wx.uploadFile({ wx.uploadFile({
filePath: e.detail, filePath: e.detail,
name: 'file', name: 'file',
url, url,
success(res) { success(res) {
const data = JSON.parse(res.data) const data = JSON.parse(res.data);
that.submitCreate(data.data.Url) that.submitCreate(data.data.Url);
}, },
}) });
}, },
handleHorSelect(e) { handleHorSelect(e) {
const { id } = e.currentTarget.dataset const { id } = e.currentTarget.dataset;
const { SteroidDailyDose } = this.data const { SteroidDailyDose } = this.data;
if (!id) { if (!id) {
this.setData({ this.setData({
popupHormone: SteroidDailyDose > 0 ? SteroidDailyDose : '', popupHormone: SteroidDailyDose > 0 ? SteroidDailyDose : '',
popupShow: true, popupShow: true,
}) });
setTimeout(() => { setTimeout(() => {
this.setData({ this.setData({
popupFocus: true, popupFocus: true,
}) });
}, 300) }, 300);
return return;
} }
this.setData({ this.setData({
SteroidDailyDose: id * 1, SteroidDailyDose: id * 1,
showSubmit: Boolean(id), showSubmit: Boolean(id),
}) });
}, },
handlePopupCancel() { handlePopupCancel() {
this.setData({ this.setData({
popupShow: false, popupShow: false,
popupFocus: false, popupFocus: false,
}) });
}, },
handlePopupSure() { handlePopupSure() {
// if (!Number(this.data.popupHormone)) { // if (!Number(this.data.popupHormone)) {
@ -347,21 +347,21 @@ Page({
this.setData({ this.setData({
SteroidDailyDose: Number(this.data.popupHormone), SteroidDailyDose: Number(this.data.popupHormone),
showSubmit: true, showSubmit: true,
}) });
this.handlePopupCancel() this.handlePopupCancel();
}, },
submitCreate(Url) { submitCreate(Url) {
const params = this.data.params const params = this.data.params;
wx.ajax({ wx.ajax({
method: 'POST', method: 'POST',
url: '?r=zd/adl/create', url: '?r=zd/adl/create',
data: params, data: params,
}).then((res) => { }).then((res) => {
this.updateAdlImg(res.Id, Url, res) this.updateAdlImg(res.Id, Url, res);
}) });
}, },
updateAdlImg(id, Url, params) { updateAdlImg(id, Url, params) {
const { m_d, nrdl } = this.data const { m_d, nrdl } = this.data;
wx.ajax({ wx.ajax({
method: 'POST', method: 'POST',
url: '?r=zd/adl/update-img', url: '?r=zd/adl/update-img',
@ -370,29 +370,29 @@ Page({
ImgUrl: Url, ImgUrl: Url,
}, },
}).then(() => { }).then(() => {
wx.hideLoading() wx.hideLoading();
wx.setStorageSync('adlResultInfo', params.ScoreInfo) wx.setStorageSync('adlResultInfo', params.ScoreInfo);
wx.redirectTo({ wx.redirectTo({
url: `/patient/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)}`,
}) });
}) });
}, },
handleInput(e) { handleInput(e) {
if (e.detail.value) { if (e.detail.value) {
this.setData({ this.setData({
// eslint-disable-next-line regexp/optimal-quantifier-concatenation // eslint-disable-next-line regexp/optimal-quantifier-concatenation
popupHormone: e.detail.value.replace(/^(-)?(\d{0,3})(\.\d?)?.*$/, '$1$2$3'), popupHormone: e.detail.value.replace(/^(-)?(\d{0,3})(\.\d?)?.*$/, '$1$2$3'),
}) });
} }
}, },
handleBack() { handleBack() {
wx.navigateBack() wx.navigateBack();
}, },
onShareAppMessage() { onShareAppMessage() {
return { return {
title: 'MG-ADL测评表:评估重症肌无力患者症状对生活质量的影响', title: 'MG-ADL测评表:评估重症肌无力患者症状对生活质量的影响',
path: '/patient/pages/adl/index', path: '/patient/pages/adl/index',
} };
}, },
handleMp(index) { handleMp(index) {
@ -406,7 +406,7 @@ Page({
6: 'PG_PATIENTASSESSMENTQ7', 6: 'PG_PATIENTASSESSMENTQ7',
7: 'PG_PATIENTASSESSMENTQ8', 7: 'PG_PATIENTASSESSMENTQ8',
8: 'PG_PATIENTASSESSMENTQ9', 8: 'PG_PATIENTASSESSMENTQ9',
}[index] }[index];
app.zdMpBehavior({ PageName }) app.zdMpBehavior({ PageName });
}, },
}) });

4
src/patient/pages/start/index.json

@ -1,4 +0,0 @@
{
"navigationStyle": "custom",
"usingComponents": {}
}

4
src/patient/pages/start/index.scss

@ -1,4 +0,0 @@
.page{
width: 100vw;
height: 100vh;
}

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

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

1
src/patient/pages/start/index.wxml

@ -1 +0,0 @@
<image class="page" mode="aspectFill" src="{{imageUrl}}za-images/1/start.png?t={{Timestamp}}"></image>

2
typings/index.d.ts vendored

@ -41,6 +41,8 @@ interface IAppOption {
getUserInfo: (type: 0 | 1 | 2) => Promise<never>; getUserInfo: (type: 0 | 1 | 2) => Promise<never>;
mpBehavior: (data: { PositionId: string; OperateType: string; OperateId: string }) => void; mpBehavior: (data: { PositionId: string; OperateType: string; OperateId: string }) => void;
zdMpBehavior: (data: { PageName: string; doctor?: boolean }) => void; zdMpBehavior: (data: { PageName: string; doctor?: boolean }) => void;
zdGetTheme: () => Promise<'PATIENT'>;
zdWaitLogin: (obj?: { isReg?: boolean; loginPage?: boolean; pub?: boolean }) => Promise<any>
[propName: string]: any; [propName: string]: any;
} }

Loading…
Cancel
Save