panhui %!s(int64=5) %!d(string=hai) anos
pai
achega
f8e6a6e030
Modificáronse 5 ficheiros con 20 adicións e 4 borrados
  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() {
         return {
             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() {
-            this.checkAuthen()
+            this.checkLogin()
+                .then(() => {
+                    return this.checkAuthen();
+                })
                 .then(res => {
                     // this.$http.get('/storeAuthentication/pass/' + res.id);
                     this.navigateTo('/pages/store/review');

+ 1 - 0
src/pages/receiving.vue

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

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

@@ -170,7 +170,8 @@ export default {
         }
     },
     onShow() {
-        if (this.isLogin) {
+        const app = getApp();
+        if (app.globalData.initialize) {
             this.loginMethods();
         }
     },
@@ -210,7 +211,14 @@ export default {
         },
         getStore() {
             // 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) {
                     this.isMineShop = true;
                     return this.$store.dispatch('getUserStore');

+ 3 - 0
src/store/index.js

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