panhui 4 years ago
parent
commit
e4c9ba8d98
2 changed files with 9 additions and 3 deletions
  1. 4 2
      src/components/ProductInfo.vue
  2. 5 1
      src/pages/details.vue

+ 4 - 2
src/components/ProductInfo.vue

@@ -21,7 +21,9 @@
             </div>
             </div>
 
 
             <div class="button" v-if="showBtn">
             <div class="button" v-if="showBtn">
-                <van-button @click.stop="cancelFollow" type="info" plain size="small" v-if="showType === 'collect'">取消关注</van-button>
+                <van-button @click.stop="cancelFollow" type="info" plain size="small" v-if="showType === 'collect'"
+                    >取消关注</van-button
+                >
                 <van-button type="primary" size="small" v-else>立即拼箱</van-button>
                 <van-button type="primary" size="small" v-else>立即拼箱</van-button>
             </div>
             </div>
         </div>
         </div>
@@ -79,7 +81,7 @@ export default {
         detail() {
         detail() {
             this.navigateTo('/pages/details?id=' + this.info.cardCaseId, false);
             this.navigateTo('/pages/details?id=' + this.info.cardCaseId, false);
         },
         },
-        cancelFollow(){
+        cancelFollow() {
             // wx.
             // wx.
         }
         }
     }
     }

+ 5 - 1
src/pages/details.vue

@@ -130,7 +130,7 @@ export default {
     },
     },
     methods: {
     methods: {
         details() {
         details() {
-            this.$http.get('/cardCase/showInfoMA?id=' + this.$mp.query.id).then(res => {
+            this.$http.get('/cardCase/showInfoMA?caseId=' + this.$mp.query.id).then(res => {
                 console.log(res);
                 console.log(res);
                 this.detailsList = res.groupBoxMap;
                 this.detailsList = res.groupBoxMap;
                 this.cardCaseInfo = res.cardCaseInfo || {};
                 this.cardCaseInfo = res.cardCaseInfo || {};
@@ -146,6 +146,10 @@ export default {
                 return;
                 return;
             }
             }
             this.navigateTo('/pages/address?caseId=' + this.cardCaseInfo.cardCaseId + '&boxIds=' + this.chooseIds);
             this.navigateTo('/pages/address?caseId=' + this.cardCaseInfo.cardCaseId + '&boxIds=' + this.chooseIds);
+        },
+        loginMethods() {
+            this.caseId = this.$mp.options.id;
+            this.checkCollect();
         }
         }
     },
     },
     created() {
     created() {