Commit 16911201 by 李伟康

commit 修复旧版本没场景值

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