|
@@ -170,7 +170,8 @@ export default {
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
onShow() {
|
|
onShow() {
|
|
|
- if (this.isLogin) {
|
|
|
|
|
|
|
+ const app = getApp();
|
|
|
|
|
+ if (app.globalData.initialize) {
|
|
|
this.loginMethods();
|
|
this.loginMethods();
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
@@ -210,7 +211,14 @@ export default {
|
|
|
},
|
|
},
|
|
|
getStore() {
|
|
getStore() {
|
|
|
// console.log(this.userStoreInfo);
|
|
// console.log(this.userStoreInfo);
|
|
|
- if (this.userStoreInfo) {
|
|
|
|
|
|
|
+ if (!this.isLogin) {
|
|
|
|
|
+ if (!this.$mp.options.id) {
|
|
|
|
|
+ return Promise.reject();
|
|
|
|
|
+ } else {
|
|
|
|
|
+ this.isMineShop = false;
|
|
|
|
|
+ return this.getStoreById(this.$mp.options.id);
|
|
|
|
|
+ }
|
|
|
|
|
+ } else if (this.userStoreInfo) {
|
|
|
if (this.userStoreInfo.id.toString() === this.$mp.options.id || !this.$mp.options.id) {
|
|
if (this.userStoreInfo.id.toString() === this.$mp.options.id || !this.$mp.options.id) {
|
|
|
this.isMineShop = true;
|
|
this.isMineShop = true;
|
|
|
return this.$store.dispatch('getUserStore');
|
|
return this.$store.dispatch('getUserStore');
|