xuqiang 5 lat temu
rodzic
commit
2d5046d2cf

+ 14 - 8
src/components/AllorderInfo.vue

@@ -185,15 +185,20 @@ export default {
         again() {
             this.navigateTo('/pages/details?id=' + this.caseId);
         },
-        userIds() {
-            this.$http.get('/store/get/' + this.storeId).then(res => {
-                // console.log(res);
-                this.userId = res.userId;
-            });
-        },
+        // userIds() {
+        //     this.$http.get('/store/get/' + this.storeId).then(res => {
+        //         // console.log(res);
+        //         this.userId = res.userId;
+        //     });
+        // },
         sales() {
-            console.log(this.storeId);
-            this.navigateTo('/pages/chat?toUserId=' + this.userId + '&toName=' + this.storeName);
+            // let userId = this.$store.state.userInfo.id;
+            // if (userId !== this.$store.state.userInfo.id) {
+            //     this.navigateTo('/pages/chat?toUserId=' + this.userId + '&toName=' + this.storeName);
+            // } else {
+            //     this.toast('此商品是你店铺所有');
+            // }
+            // console.log(this.storeId);
         },
         logisticCopy() {
             wx.setClipboardData({
@@ -398,6 +403,7 @@ export default {
         }
     },
     created() {
+        console.log(this.all);
         this.rufundApply();
         // this.userIds();
     }

+ 6 - 1
src/components/AllselloutInfo.vue

@@ -233,7 +233,12 @@ export default {
             });
         },
         Buyers() {
-            this.navigateTo('/pages/chat?toUserId=' + this.all.userId + '&toName=' + this.userNickName);
+            let userId = this.$store.state.userInfo.id;
+            if (userId !== this.$store.state.userInfo.id) {
+                this.navigateTo('/pages/chat?toUserId=' + this.all.userId + '&toName=' + this.userNickName);
+            } else {
+                this.toast('此商品是你店铺所有');
+            }
         },
         cancel() {
             wx.showModal({

+ 14 - 1
src/pages/Home.vue

@@ -96,7 +96,8 @@ export default {
             seriesId: 0,
             seriesName: '',
             isSeries: true,
-            columns: []
+            columns: [],
+            banners: []
         };
     },
     computed: {
@@ -157,6 +158,7 @@ export default {
                 .then(res => {
                     this.hideLoading();
                     this.list = res;
+                    this.banners = res.list.image;
                     if (res.length === 0) {
                         this.empty = true;
                     }
@@ -233,7 +235,18 @@ export default {
         }
     },
     onShow() {
+        console.log(this.seriesName);
+        if (!this.seriesId) {
+            return;
+        }
         this.getData();
+    },
+    onShareAppMessage() {
+        return {
+            title: '卓卡——' + this.seriesName,
+            path: '/pages/Home?id=' + this.list.cardCaseId,
+            imageUrl: this.banners.length > 0 ? this.banners[0] : ''
+        };
     }
 };
 </script>

+ 16 - 19
src/pages/allselldetails.vue

@@ -396,6 +396,22 @@ export default {
                         this.status.label = '已发货';
                         this.status.name = '等待买家签收';
                     }
+                    if (this.status.orderStatus == 'COMPETED' || this.status.orderStatus == 'SEND') {
+                        this.$http.get('/orderInfo/checkLogistic', { orderInfoId: this.$mp.query.id }).then(res => {
+                            this.hideLoading();
+                            this.logisTics = res.logistic.result;
+                            let steps = [];
+                            res.logistic.result.list.forEach(item => {
+                                let newStep = {
+                                    desc: item.status,
+                                    text: item.time
+                                };
+                                steps.push(newStep);
+                            });
+                            this.stepsList = steps;
+                            this.stepsShow = res.logistic.result.list[0];
+                        });
+                    }
                 })
                 .catch(e => {
                     this.hideLoading();
@@ -404,25 +420,6 @@ export default {
                         title: '请返回首页操作'
                     });
                 });
-            // setTimeout(() => {
-            //     if (this.status.orderStatus == 'COMPETED' || this.status.orderStatus == 'SEND') {
-            // console.log(this.status.orderStatus);
-            this.$http.get('/orderInfo/checkLogistic', { orderInfoId: this.$mp.query.id }).then(res => {
-                this.hideLoading();
-                this.logisTics = res.logistic.result;
-                let steps = [];
-                res.logistic.result.list.forEach(item => {
-                    let newStep = {
-                        desc: item.status,
-                        text: item.time
-                    };
-                    steps.push(newStep);
-                });
-                this.stepsList = steps;
-                this.stepsShow = res.logistic.result.list[0];
-            });
-            //     }
-            // }, 1000);
         },
         Buyers() {
             this.navigateTo('/pages/chat?toUserId=' + this.status.userId + '&toName=' + this.user.nickname);

+ 2 - 3
src/pages/mine.vue

@@ -182,15 +182,14 @@ export default {
         },
         publish() {
             if (this.userStoreInfo == null) {
-                this.navigateTo('/pages/store/apply');
+                this.goAuth();
             } else {
                 this.navigateTo('/pages/minePublish');
             }
         },
         allsell() {
-            console.log(this.userStoreInfo);
             if (this.userStoreInfo == null) {
-                this.navigateTo('/pages/store/apply');
+                this.goAuth();
             } else {
                 this.navigateTo('/pages/allsellout');
             }

+ 23 - 20
src/pages/orderdetails.vue

@@ -302,7 +302,7 @@ export default {
             this.$http
                 .get('/orderInfo/get/' + this.$mp.query.id)
                 .then(res => {
-                    // console.log(res);
+                    console.log(res);
                     this.hideLoading();
                     this.caseId = res.caseId;
                     this.status = res;
@@ -337,6 +337,23 @@ export default {
                         this.status.name = '宝贝正在飞奔到你的怀中!';
                         this.showTimeTab = true;
                     }
+                    if (this.status.orderStatus == 'COMPETED' || this.status.orderStatus == 'SEND') {
+                        // console.log(this.status.orderStatus);
+                        this.$http.get('/orderInfo/checkLogistic', { orderInfoId: this.$mp.query.id }).then(res => {
+                            this.hideLoading();
+                            this.logisTics = res.logistic.result;
+                            let steps = [];
+                            res.logistic.result.list.forEach(item => {
+                                let newStep = {
+                                    desc: item.status,
+                                    text: item.time
+                                };
+                                steps.push(newStep);
+                            });
+                            this.stepsList = steps;
+                            this.stepsShow = res.logistic.result.list[0];
+                        });
+                    }
                 })
                 .catch(e => {
                     this.hideLoading();
@@ -345,25 +362,6 @@ export default {
                         title: '请返回首页操作'
                     });
                 });
-            // setTimeout(() => {
-            // if (this.status.orderStatus == 'COMPETED' || this.status.orderStatus == 'SEND') {
-            // console.log(this.status.orderStatus);
-            this.$http.get('/orderInfo/checkLogistic', { orderInfoId: this.$mp.query.id }).then(res => {
-                this.hideLoading();
-                this.logisTics = res.logistic.result;
-                let steps = [];
-                res.logistic.result.list.forEach(item => {
-                    let newStep = {
-                        desc: item.status,
-                        text: item.time
-                    };
-                    steps.push(newStep);
-                });
-                this.stepsList = steps;
-                this.stepsShow = res.logistic.result.list[0];
-            });
-            // }
-            // }, 1000);
         },
         again() {
             this.navigateTo('/pages/details?id=' + this.caseId);
@@ -418,6 +416,11 @@ export default {
             });
         },
         sales() {
+            let userId = this.$store.state.userInfo.id;
+            if (userId == this.store.userId) {
+                this.toast('此商品是你店铺所有');
+                return;
+            }
             this.navigateTo('/pages/chat?toUserId=' + this.store.userId + '&toName=' + this.store.storeName);
         },
         Apply() {