7 changed files with 73 additions and 40 deletions
|
Before Width: | Height: | Size: 682 KiB After Width: | Height: | Size: 696 KiB |
@ -1,47 +1,54 @@
@@ -1,47 +1,54 @@
|
||||
const app = getApp<IAppOption>(); |
||||
const app = getApp<IAppOption>() |
||||
|
||||
Page({ |
||||
data: {}, |
||||
onLoad() { |
||||
app.waitLogin().then(() => { |
||||
const { isLogin, isNewReg, loginType } = app.globalData; |
||||
const { isLogin, isNewReg, loginType, scene } = app.globalData |
||||
if (isLogin === 0) { |
||||
// 未登录用户,扫医生邀请码,重定向到患者登录页
|
||||
if (scene?.doctorId) { |
||||
wx.reLaunch({ |
||||
url: '/patient/pages/login/index', |
||||
}) |
||||
return |
||||
} |
||||
wx.reLaunch({ |
||||
url: '/patient/pages/index/index', |
||||
}); |
||||
return; |
||||
}) |
||||
return |
||||
} |
||||
if (loginType === 0) { |
||||
wx.reLaunch({ |
||||
url: '/patient/pages/index/index', |
||||
}); |
||||
return; |
||||
}) |
||||
return |
||||
} |
||||
if (loginType === 1) { |
||||
if (isNewReg === 1) { |
||||
wx.reLaunch({ |
||||
url: '/patient/pages/index/index', |
||||
}); |
||||
return; |
||||
}) |
||||
return |
||||
} |
||||
wx.reLaunch({ |
||||
url: '/patient/pages/enterInfo/index', |
||||
}); |
||||
return; |
||||
}) |
||||
return |
||||
} |
||||
if (loginType === 2) { |
||||
if (isNewReg === 1) { |
||||
wx.reLaunch({ |
||||
url: '/pages/home/index', |
||||
}); |
||||
return; |
||||
}) |
||||
return |
||||
} |
||||
wx.reLaunch({ |
||||
url: '/pages/login/index', |
||||
}); |
||||
}) |
||||
} |
||||
}); |
||||
}) |
||||
}, |
||||
}); |
||||
}) |
||||
|
||||
export {}; |
||||
export {} |
||||
|
||||
Loading…
Reference in new issue