|
|
@@ -52,6 +52,18 @@ onShow(() => {
|
|
|
uni.reLaunch({ url: '/pages/patient/index/index' })
|
|
|
return
|
|
|
}
|
|
|
+ // 为角色2(医生)添加跳转逻辑
|
|
|
+ else if (r === 2) {
|
|
|
+ console.log('[index] redirecting to doctor index, role=', r)
|
|
|
+ uni.reLaunch({ url: '/pages/doctor/index/index' })
|
|
|
+ return
|
|
|
+ }
|
|
|
+ // 为角色4(患者家属)添加跳转逻辑
|
|
|
+ else if (r === 4) {
|
|
|
+ console.log('[index] redirecting to patient family index, role=', r)
|
|
|
+ uni.reLaunch({ url: '/pages/patient-family/index/index' })
|
|
|
+ return
|
|
|
+ }
|
|
|
} catch (err) {
|
|
|
console.error('检查登录态时出错:', err)
|
|
|
}
|