This commit is contained in:
仲么了
2023-08-31 09:29:40 +08:00
parent 05b28a17e7
commit a105006e0f
4 changed files with 41 additions and 15 deletions

View File

@@ -92,12 +92,12 @@ export default {
url: '/pages/home/selectEngineering',
})
} else {
if(this.userInfo.authorities === 'tourist'){
if (this.userInfo.authorities === 'tourist') {
return uni.showToast({
title: '此功能仅对VIP用户开放',
icon: 'none',
})
}else if(this.userInfo.authorities === 'market_user'){
} else if (this.userInfo.authorities === 'market_user') {
return uni.showToast({
title: '请联系管理员配置工程',
icon: 'none',
@@ -171,17 +171,25 @@ export default {
},
onShow() {
this.userInfo = uni.getStorageSync(this.$cacheKey.userInfo)
if (
this.userInfo.authorities === 'app_vip_user' ||
this.userInfo.authorities == 5 ||
this.userInfo.authorities === 'tourist'
) {
// uni.setTabBarBadge({
// index: 1,
// text: '6',
// })
let access_token = uni.getStorageSync(this.$cacheKey.access_token)
if (!access_token) {
uni.reLaunch({
url: `/pages/user/login`
})
} else {
if (
this.userInfo.authorities === 'app_vip_user' ||
this.userInfo.authorities == 5 ||
this.userInfo.authorities === 'tourist'
) {
// uni.setTabBarBadge({
// index: 1,
// text: '6',
// })
}
this.init()
}
this.init()
},
}
</script>