You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

41 lines
915 B

2 months ago
import { parseScene } from '@/utils/util'
const app = getApp<IAppOption>()
Page({
data: {},
onLoad(options) {
if (options.scene) {
const params = parseScene(options.scene)
if (params) {
app.globalData.waitBindDoctorId = (params as any).doctorId
}
}
app.waitLogin().then(() => {
const initLoginInfo = app.globalData.initLoginInfo || {}
if (initLoginInfo.isLogin === 0) {
wx.reLaunch({
url: '/pages/index/index',
})
}
if (initLoginInfo.loginType === 1) {
if (initLoginInfo.isReg === 1) {
wx.reLaunch({
url: '/pages/index/index',
})
return
}
wx.reLaunch({
url: '/pages/index/index',
})
}
if (initLoginInfo.loginType === 2) {
wx.reLaunch({
url: '/pages/index/index',
})
}
})
},
})
export {}