|
@@ -68,6 +68,9 @@ App({
|
|
|
if (temp.user_address && temp.user_address.indexOf('/') > -1) {
|
|
|
temp.user_address = temp.user_address.split('/')
|
|
|
}
|
|
|
+ if (temp.shop_status === 1) {
|
|
|
+ this.hasPermission()
|
|
|
+ }
|
|
|
this.globalData.userInfo = temp
|
|
|
}
|
|
|
} catch (e) {}
|
|
@@ -76,15 +79,15 @@ App({
|
|
|
this.fetchUserDataCallback()
|
|
|
this.fetchUserDataCallback = null
|
|
|
}
|
|
|
- // this.hasPermission(1)
|
|
|
},
|
|
|
// 根据权限配置tabbar
|
|
|
- hasPermission(role) {
|
|
|
- if (role === 1) {
|
|
|
- this.globalData.tabBarList.splice(2, 0, ...this.globalData.asyncTabBarList)
|
|
|
+ hasPermission() {
|
|
|
+ const tabBarList = this.globalData.tabBarList
|
|
|
+ if (tabBarList.findIndex(item => item.text === '农事天地') === -1) {
|
|
|
+ tabBarList.splice(2, 0, ...this.globalData.asyncTabBarList)
|
|
|
|
|
|
if (this.addTabBarList) {
|
|
|
- this.addTabBarList(this.globalData.tabBarList)
|
|
|
+ this.addTabBarList(tabBarList)
|
|
|
}
|
|
|
}
|
|
|
}
|