|
@@ -27,7 +27,6 @@ export default {
|
|
|
},
|
|
},
|
|
|
// 页面生命周期才触发
|
|
// 页面生命周期才触发
|
|
|
onLoad: function (option) {
|
|
onLoad: function (option) {
|
|
|
- console.log(11111)
|
|
|
|
|
this.option = option || null
|
|
this.option = option || null
|
|
|
if (option.token) {
|
|
if (option.token) {
|
|
|
uni.setStorageSync('token', option.token)
|
|
uni.setStorageSync('token', option.token)
|
|
@@ -36,7 +35,13 @@ export default {
|
|
|
uni.setStorageSync('account', option.account)
|
|
uni.setStorageSync('account', option.account)
|
|
|
}
|
|
}
|
|
|
uni.setStorageSync('currentQuery', JSON.stringify(option))
|
|
uni.setStorageSync('currentQuery', JSON.stringify(option))
|
|
|
- console.log(uni.getStorageSync('SHOP_ADMIN_STROAGE_SHOW'),'this.shopAdminId', this.getLoginInfo, this.getLoginInfo.openShop)
|
|
|
|
|
|
|
+ },
|
|
|
|
|
+ onShow(){
|
|
|
|
|
+ if (isLogin()&&!this.$util.isEmpty(this.getLoginInfo)) {
|
|
|
|
|
+ if (this.init) {
|
|
|
|
|
+ this.init()
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
if (this.$util.isEmpty(this.getLoginInfo)) {
|
|
if (this.$util.isEmpty(this.getLoginInfo)) {
|
|
|
wxLoginFn(true).then(res => {
|
|
wxLoginFn(true).then(res => {
|
|
|
//客户可以访问的地址
|
|
//客户可以访问的地址
|
|
@@ -63,6 +68,7 @@ export default {
|
|
|
uni.removeStorageSync('SHOP_ADMIN_STROAGE_SHOW')
|
|
uni.removeStorageSync('SHOP_ADMIN_STROAGE_SHOW')
|
|
|
uni.setStorageSync('OPEN_SHOP_ID', res.data.admin.openShop)
|
|
uni.setStorageSync('OPEN_SHOP_ID', res.data.admin.openShop)
|
|
|
} else {
|
|
} else {
|
|
|
|
|
+ this.AUTHORITY_SHOW = false;
|
|
|
uni.showTabBar()
|
|
uni.showTabBar()
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
@@ -74,14 +80,6 @@ export default {
|
|
|
}
|
|
}
|
|
|
})
|
|
})
|
|
|
}
|
|
}
|
|
|
-
|
|
|
|
|
- },
|
|
|
|
|
- onShow(){
|
|
|
|
|
- if (isLogin()&&!this.$util.isEmpty(this.getLoginInfo)) {
|
|
|
|
|
- if (this.init) {
|
|
|
|
|
- this.init()
|
|
|
|
|
- }
|
|
|
|
|
- }
|
|
|
|
|
},
|
|
},
|
|
|
methods: {
|
|
methods: {
|
|
|
...mapActions(['setUserShopAll']),
|
|
...mapActions(['setUserShopAll']),
|