|
|
@@ -19,7 +19,7 @@ export default {
|
|
|
// ...mapGetters({ userInfo: 'getUser' })
|
|
|
// },
|
|
|
// 页面生命周期才触发
|
|
|
- onLoad: function (option) {
|
|
|
+ onLoad: function (option) {
|
|
|
this.option = option || null
|
|
|
if (option.token) {
|
|
|
uni.setStorageSync('token', option.token)
|
|
|
@@ -28,21 +28,34 @@ export default {
|
|
|
uni.setStorageSync('account', option.account)
|
|
|
}
|
|
|
|
|
|
+
|
|
|
uni.setStorageSync('currentQuery', JSON.stringify(option))
|
|
|
if (isLogin() == false) {
|
|
|
wxLoginFn()
|
|
|
.then(res => {
|
|
|
- if(+res.data.shopId > 0) {
|
|
|
- this.$util.pageTo({
|
|
|
- url: "/admin/home/workbench",
|
|
|
- type: 3
|
|
|
+
|
|
|
+ // @傅威 明天要发版,我做了个临时解决方案,这块请优化
|
|
|
+ //现在我们分 官网 和 后台 的页面。其中官网页面不会很多
|
|
|
+ //shopId=0 (即非管理员) 时不能让访问后台的页面
|
|
|
+ //不管shopId值是多少(是否管理员),有些页面都应允许访问
|
|
|
+ if (res.redirectPage != 'admin/adminShop/bind') {
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ if (+res.data.shopId > 0) {
|
|
|
+ this.$util.pageTo({
|
|
|
+ url: "/admin/home/workbench",
|
|
|
+ type: 3
|
|
|
});
|
|
|
- }else{
|
|
|
- this.$util.pageTo({
|
|
|
- url: "/admin/official/index",
|
|
|
- type: 2
|
|
|
+ } else {
|
|
|
+ this.$util.pageTo({
|
|
|
+ url: "/admin/official/index",
|
|
|
+ type: 2
|
|
|
});
|
|
|
+ }
|
|
|
+
|
|
|
}
|
|
|
+
|
|
|
getUser()
|
|
|
})
|
|
|
}
|