Commit 16911201 by 李伟康

commit 修复旧版本没场景值

1 parent 12abfa22
......@@ -11,27 +11,32 @@ export default {
mounted () {
uni.showLoading()
let userInfo = uni.$storage.get('userInfo')
uni.$api.userApi.getListSelectAccount().then(res => {
uni.hideLoading()
setTimeout(() => {
if (res.code == 0 && userInfo) {
let url = {
1: '/pages/boutique/index',
0: '/pages/home/home'
}[userInfo.sceneType]
uni.reLaunch({
url
if (userInfo && userInfo.sceneType != undefined && userInfo.sceneType != null) {
uni.$api.userApi.getListSelectAccount().then(res => {
uni.hideLoading()
setTimeout(() => {
if (res.code == 0) {
let url = {
1: '/pages/boutique/index',
0: '/pages/home/home'
}[userInfo.sceneType]
uni.reLaunch({
url
})
}
else uni.reLaunch({
url: '/pages/common/login'
})
}
else uni.reLaunch({
}, 500)
}).catch(() => [
uni.reLaunch({
url: '/pages/common/login'
})
}, 500)
}).catch(() => [
uni.reLaunch({
url: '/pages/common/login'
})
])
])
} else uni.reLaunch({
url: '/pages/common/login'
})
},
methods: {
}
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!