xuqiang-97 4 năm trước cách đây
mục cha
commit
ae7d4d6111

+ 22 - 33
src/components/AllorderInfo.vue

@@ -121,20 +121,29 @@ export default {
         logistics() {
         logistics() {
             this.showLoading();
             this.showLoading();
             // 查看物流
             // 查看物流
-            this.$http.get('/orderInfo/checkLogistic', { orderInfoId: this.id }).then(res => {
-                wx.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.$http
+                .get('/orderInfo/checkLogistic', { orderInfoId: this.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.show = true;
+                })
+                .catch(e => {
+                    this.hideLoading();
+                    wx.showToast({
+                        title: '暂无物流信息',
+                        icon: 'none'
+                    });
                 });
                 });
-                this.stepsList = steps;
-            });
-            this.show = true;
         },
         },
         refreash() {
         refreash() {
             this.$emit('refreash');
             this.$emit('refreash');
@@ -172,7 +181,6 @@ export default {
                 success: res => {
                 success: res => {
                     if (res.confirm) {
                     if (res.confirm) {
                         this.$http.post('/orderInfo/finish', { orderInfoId: this.id }).then(res => {
                         this.$http.post('/orderInfo/finish', { orderInfoId: this.id }).then(res => {
-                            wx.hideLoading();
                             wx.showToast({
                             wx.showToast({
                                 icon: 'none',
                                 icon: 'none',
                                 title: '收货成功'
                                 title: '收货成功'
@@ -229,7 +237,6 @@ export default {
                 success: res => {
                 success: res => {
                     if (res.confirm) {
                     if (res.confirm) {
                         this.$http.post('/orderInfo/cancel', { orderInfoId: this.id }).then(res => {
                         this.$http.post('/orderInfo/cancel', { orderInfoId: this.id }).then(res => {
-                            wx.hideLoading();
                             wx.showToast({
                             wx.showToast({
                                 icon: 'none',
                                 icon: 'none',
                                 title: '订单已取消'
                                 title: '订单已取消'
@@ -249,7 +256,6 @@ export default {
                 success: res => {
                 success: res => {
                     if (res.confirm) {
                     if (res.confirm) {
                         this.$http.post('orderInfo/delete', { orderInfoId: this.id }).then(res => {
                         this.$http.post('orderInfo/delete', { orderInfoId: this.id }).then(res => {
-                            wx.hideLoading();
                             wx.showToast({
                             wx.showToast({
                                 icon: 'none',
                                 icon: 'none',
                                 title: '订单已删除'
                                 title: '订单已删除'
@@ -267,26 +273,9 @@ export default {
                 title: '敬请开放',
                 title: '敬请开放',
                 icon: 'none'
                 icon: 'none'
             });
             });
-            // wx.showModal({
-            //     title: '提示',
-            //     content: '敬请开放',
-            //     success: res => {
-            //         if (res.confirm) {
-            // this.$http.post('orderInfo/refund', { orderInfoId: this.id, remark: '' }).then(res => {
-            //     wx.hideLoading();
-            //     wx.showToast({
-            //         icon: 'none',
-            //         title: '退款成功'
-            //     });
-            //     this.refreash();
-            // });
-            //         }
-            //     }
-            // });
         },
         },
         remind() {
         remind() {
             this.$http.post('orderInfo/remindMy', { orderInfoId: this.id, remark: '' }).then(res => {
             this.$http.post('orderInfo/remindMy', { orderInfoId: this.id, remark: '' }).then(res => {
-                wx.hideLoading();
                 wx.showToast({
                 wx.showToast({
                     icon: 'none',
                     icon: 'none',
                     title: '提醒商家成功'
                     title: '提醒商家成功'

+ 2 - 2
src/components/CardCase.vue

@@ -5,7 +5,7 @@
                 <div class="text1" v-if="chooseIds.length > 0">
                 <div class="text1" v-if="chooseIds.length > 0">
                     已选<span>{{ chooseIds.length }}</span
                     已选<span>{{ chooseIds.length }}</span
                     >包,共<span>{{ money }}</span
                     >包,共<span>{{ money }}</span
-                    >元,邮费0元
+                    >元,邮费10元
                 </div>
                 </div>
                 <div v-else>请选择卡包</div>
                 <div v-else>请选择卡包</div>
             </div>
             </div>
@@ -45,7 +45,7 @@
                 </div>
                 </div>
 
 
                 <div class="bottom">
                 <div class="bottom">
-                    <span class="text">已选{{ nowChoose.length }}包,共{{ money }}元,邮费0元</span>
+                    <span class="text">已选{{ nowChoose.length }}包,共{{ money }}元,邮费10元</span>
                     <van-button size="medium" @click="submit" class="submit" :radius="0" type="primary"
                     <van-button size="medium" @click="submit" class="submit" :radius="0" type="primary"
                         >确认购买</van-button
                         >确认购买</van-button
                     >
                     >

+ 7 - 0
src/pages/Home.vue

@@ -181,7 +181,14 @@ export default {
                     }
                     }
                 )
                 )
                 .then(res => {
                 .then(res => {
+                    this.hideLoading();
                     this.columns = res.content;
                     this.columns = res.content;
+                })
+                .catch(e => {
+                    this.hideLoading();
+                    if (e.error) {
+                        this.toast(e.rror);
+                    }
                 });
                 });
         },
         },
         searchData(e) {
         searchData(e) {

+ 12 - 6
src/pages/confirmorder.vue

@@ -62,7 +62,7 @@
         <div class="box-buttom">
         <div class="box-buttom">
             <div class="box-buttom-con">
             <div class="box-buttom-con">
                 <p>邮费</p>
                 <p>邮费</p>
-                <p class="box-buttom-p">¥0</p>
+                <p class="box-buttom-p">¥10</p>
             </div>
             </div>
         </div>
         </div>
         <div class="box-buttom">
         <div class="box-buttom">
@@ -137,12 +137,12 @@ export default {
                     userAddressId: this.userAddressId
                     userAddressId: this.userAddressId
                 })
                 })
                 .then(res => {
                 .then(res => {
-                    wx.hideLoading();
+                    this.hideLoading();
                     this.id = res.id;
                     this.id = res.id;
                     this.navigateTo('/pages/orderdetails?id=' + this.id);
                     this.navigateTo('/pages/orderdetails?id=' + this.id);
                 })
                 })
                 .catch(e => {
                 .catch(e => {
-                    wx.hideLoading();
+                    this.hideLoading();
                     wx.showToast({
                     wx.showToast({
                         icon: 'none',
                         icon: 'none',
                         title: e.error
                         title: e.error
@@ -150,7 +150,6 @@ export default {
                 });
                 });
         },
         },
         getFn() {
         getFn() {
-            console.log(this.$mp.query.boxIds);
             this.showLoading();
             this.showLoading();
             let caseId = this.$mp.query.caseId;
             let caseId = this.$mp.query.caseId;
             let boxIds = this.$mp.query.boxIds.replace(/%2C/g, ',');
             let boxIds = this.$mp.query.boxIds.replace(/%2C/g, ',');
@@ -160,13 +159,13 @@ export default {
                     boxIds
                     boxIds
                 })
                 })
                 .then(res => {
                 .then(res => {
-                    wx.hideLoading();
+                    this.hideLoading();
                     this.total = res.total;
                     this.total = res.total;
                     this.Boxes = res.selectedBoxes;
                     this.Boxes = res.selectedBoxes;
                     this.cardCaseInfo = res.selectedCase.collection;
                     this.cardCaseInfo = res.selectedCase.collection;
                 })
                 })
                 .catch(e => {
                 .catch(e => {
-                    wx.hideLoading();
+                    this.hideLoading();
                     wx.showToast({
                     wx.showToast({
                         icon: 'none',
                         icon: 'none',
                         title: e.error
                         title: e.error
@@ -188,6 +187,13 @@ export default {
                         this.userAddressId = res.content[0].id;
                         this.userAddressId = res.content[0].id;
                         this.addressList = res.content[0];
                         this.addressList = res.content[0];
                     }
                     }
+                })
+                .catch(e => {
+                    this.hideLoading();
+                    wx.showToast({
+                        icon: 'none',
+                        title: e.error
+                    });
                 });
                 });
         }
         }
     },
     },

+ 1 - 2
src/pages/details.vue

@@ -123,14 +123,13 @@ export default {
             this.$http
             this.$http
                 .get('/cardCase/showInfoMA?caseId=' + this.$mp.options.id)
                 .get('/cardCase/showInfoMA?caseId=' + this.$mp.options.id)
                 .then(res => {
                 .then(res => {
-                    console.log(res);
                     this.hideLoading();
                     this.hideLoading();
                     this.detailsList = res.groupBoxMap;
                     this.detailsList = res.groupBoxMap;
                     this.cardCaseInfo = res.cardCaseInfo || {};
                     this.cardCaseInfo = res.cardCaseInfo || {};
                     this.banners = res.cardCaseInfo.image.split(',');
                     this.banners = res.cardCaseInfo.image.split(',');
                 })
                 })
                 .catch(e => {
                 .catch(e => {
-                    wx.hideLoading();
+                    this.hideLoading();
                     wx.showToast({
                     wx.showToast({
                         icon: 'none',
                         icon: 'none',
                         title: e.error
                         title: e.error

+ 63 - 47
src/pages/orderdetails.vue

@@ -80,7 +80,7 @@
         <div class="box-buttom">
         <div class="box-buttom">
             <div class="box-buttom-con">
             <div class="box-buttom-con">
                 <p>邮费</p>
                 <p>邮费</p>
-                <p class="box-buttom-p">¥0</p>
+                <p class="box-buttom-p">¥10</p>
             </div>
             </div>
         </div>
         </div>
         <div class="box-buttom">
         <div class="box-buttom">
@@ -242,7 +242,7 @@ export default {
             this.$http
             this.$http
                 .get('/orderInfo/get/' + this.$mp.query.id)
                 .get('/orderInfo/get/' + this.$mp.query.id)
                 .then(res => {
                 .then(res => {
-                    wx.hideLoading();
+                    this.hideLoading();
                     this.caseId = res.caseId;
                     this.caseId = res.caseId;
                     this.status = res;
                     this.status = res;
                     this.addressList = res.address;
                     this.addressList = res.address;
@@ -275,7 +275,7 @@ export default {
                     }
                     }
                 })
                 })
                 .catch(e => {
                 .catch(e => {
-                    wx.hideLoading();
+                    this.hideLoading();
                     wx.showToast({
                     wx.showToast({
                         icon: 'none',
                         icon: 'none',
                         title: '请返回首页操作'
                         title: '请返回首页操作'
@@ -285,7 +285,7 @@ export default {
             // if (this.status.orderStatus == 'COMPETED' || this.status.orderStatus == 'SEND') {
             // if (this.status.orderStatus == 'COMPETED' || this.status.orderStatus == 'SEND') {
             // console.log(this.status.orderStatus);
             // console.log(this.status.orderStatus);
             this.$http.get('/orderInfo/checkLogistic', { orderInfoId: this.$mp.query.id }).then(res => {
             this.$http.get('/orderInfo/checkLogistic', { orderInfoId: this.$mp.query.id }).then(res => {
-                wx.hideLoading();
+                this.hideLoading();
                 this.logisTics = res.logistic.result;
                 this.logisTics = res.logistic.result;
                 let steps = [];
                 let steps = [];
                 res.logistic.result.list.forEach(item => {
                 res.logistic.result.list.forEach(item => {
@@ -298,6 +298,7 @@ export default {
                 this.stepsList = steps;
                 this.stepsList = steps;
                 this.stepsShow = res.logistic.result.list[0];
                 this.stepsShow = res.logistic.result.list[0];
             });
             });
+
             // }
             // }
             // }, 1000);
             // }, 1000);
         },
         },
@@ -307,20 +308,29 @@ export default {
         logistics() {
         logistics() {
             this.showLoading();
             this.showLoading();
             // 查看物流
             // 查看物流
-            this.$http.get('/orderInfo/checkLogistic', { orderInfoId: this.$mp.query.id }).then(res => {
-                wx.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.$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.show = true;
+                })
+                .catch(e => {
+                    this.hideLoading();
+                    wx.showToast({
+                        title: '暂无物流信息',
+                        icon: 'none'
+                    });
                 });
                 });
-                this.stepsList = steps;
-            });
-            this.show = true;
         },
         },
         comfrim() {
         comfrim() {
             wx.showModal({
             wx.showModal({
@@ -328,16 +338,18 @@ export default {
                 content: '确定收货?',
                 content: '确定收货?',
                 success: res => {
                 success: res => {
                     if (res.confirm) {
                     if (res.confirm) {
-                        this.$http.post('/orderInfo/finish', { orderInfoId: this.$mp.query.id }).then(res => {
-                            wx.hideLoading();
-                            wx.showToast({
-                                icon: 'none',
-                                title: '收货成功'
-                            });
-                            setTimeout(() => {
-                                this.getFn();
-                            }, 1000);
-                        });
+                        this.$http
+                            .post('/orderInfo/finish', { orderInfoId: this.$mp.query.id })
+                            .then(res => {
+                                wx.showToast({
+                                    icon: 'none',
+                                    title: '收货成功'
+                                });
+                                setTimeout(() => {
+                                    this.getFn();
+                                }, 1000);
+                            })
+                            .catch(() => {});
                     }
                     }
                 }
                 }
             });
             });
@@ -403,16 +415,18 @@ export default {
                 content: '确定取消订单?',
                 content: '确定取消订单?',
                 success: res => {
                 success: res => {
                     if (res.confirm) {
                     if (res.confirm) {
-                        this.$http.post('/orderInfo/cancel', { orderInfoId: this.$mp.query.id }).then(res => {
-                            wx.hideLoading();
-                            wx.showToast({
-                                icon: 'none',
-                                title: '订单已取消'
-                            });
-                            setTimeout(() => {
-                                this.getFn();
-                            }, 1000);
-                        });
+                        this.$http
+                            .post('/orderInfo/cancel', { orderInfoId: this.$mp.query.id })
+                            .then(res => {
+                                wx.showToast({
+                                    icon: 'none',
+                                    title: '订单已取消'
+                                });
+                                setTimeout(() => {
+                                    this.getFn();
+                                }, 1000);
+                            })
+                            .catch(() => {});
                     }
                     }
                 }
                 }
             });
             });
@@ -423,16 +437,18 @@ export default {
                 content: '确定删除订单?',
                 content: '确定删除订单?',
                 success: res => {
                 success: res => {
                     if (res.confirm) {
                     if (res.confirm) {
-                        this.$http.post('orderInfo/delete', { orderInfoId: this.$mp.query.id }).then(res => {
-                            wx.hideLoading();
-                            wx.showToast({
-                                icon: 'none',
-                                title: '订单已删除'
-                            });
-                            setTimeout(() => {
-                                this.navigateTo('/pages/allorder');
-                            }, 1000);
-                        });
+                        this.$http
+                            .post('orderInfo/delete', { orderInfoId: this.$mp.query.id })
+                            .then(res => {
+                                wx.showToast({
+                                    icon: 'none',
+                                    title: '订单已删除'
+                                });
+                                setTimeout(() => {
+                                    this.navigateTo('/pages/allorder');
+                                }, 1000);
+                            })
+                            .catch(() => {});
                     }
                     }
                 }
                 }
             });
             });