panhui 5 vuotta sitten
vanhempi
commit
f8e6a6e030
5 muutettua tiedostoa jossa 20 lisäystä ja 4 poistoa
  1. 2 1
      src/pages/Home.vue
  2. 4 1
      src/pages/mine.vue
  3. 1 0
      src/pages/receiving.vue
  4. 10 2
      src/pages/store/homePage.vue
  5. 3 0
      src/store/index.js

+ 2 - 1
src/pages/Home.vue

@@ -242,7 +242,8 @@ export default {
     onShareAppMessage() {
     onShareAppMessage() {
         return {
         return {
             title: '卓卡',
             title: '卓卡',
-            path: '/pages/Home'
+            path: '/pages/Home',
+            imageUrl: 'https://ticket-exchange.oss-cn-hangzhou.aliyuncs.com/image/2021-05-31-17-21-37rTYVxnbV.jpg'
         };
         };
     }
     }
 };
 };

+ 4 - 1
src/pages/mine.vue

@@ -157,7 +157,10 @@ export default {
                 });
                 });
         },
         },
         goAuth() {
         goAuth() {
-            this.checkAuthen()
+            this.checkLogin()
+                .then(() => {
+                    return this.checkAuthen();
+                })
                 .then(res => {
                 .then(res => {
                     // this.$http.get('/storeAuthentication/pass/' + res.id);
                     // this.$http.get('/storeAuthentication/pass/' + res.id);
                     this.navigateTo('/pages/store/review');
                     this.navigateTo('/pages/store/review');

+ 1 - 0
src/pages/receiving.vue

@@ -36,6 +36,7 @@
                 placeholder="请填写您的详细地址"
                 placeholder="请填写您的详细地址"
                 label="详细地址"
                 label="详细地址"
                 type="textarea"
                 type="textarea"
+                autosize
             />
             />
         </van-cell-group>
         </van-cell-group>
         <div class="box-but">
         <div class="box-but">

+ 10 - 2
src/pages/store/homePage.vue

@@ -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');

+ 3 - 0
src/store/index.js

@@ -40,6 +40,9 @@ export default new Vuex.Store({
             });
             });
         },
         },
         getUserStore(context) {
         getUserStore(context) {
+            if (!context.state.userInfo) {
+                return Promise.reject();
+            }
             return http.http
             return http.http
                 .postJson('/store/all', {
                 .postJson('/store/all', {
                     query: {
                     query: {