xuqiang 4 سال پیش
والد
کامیت
073ec73863
2فایلهای تغییر یافته به همراه23 افزوده شده و 11 حذف شده
  1. 10 6
      src/pages/Home.vue
  2. 13 5
      src/pages/orderdetails.vue

+ 10 - 6
src/pages/Home.vue

@@ -117,7 +117,7 @@ export default {
     },
     onReachBottom() {
         this.page++;
-        this.getData();
+        this.getData2();
     },
     methods: {
         // touchmove(e) {
@@ -161,6 +161,10 @@ export default {
             this.getData();
         },
         getData() {
+            this.list = '';
+            this.getData2();
+        },
+        getData2() {
             this.showLoading();
             this.empty = false;
             let data = {
@@ -226,13 +230,13 @@ export default {
             this.collectionId = 0;
             this.searchVal = e.detail;
             this.search = e.detail;
-            this.getData();
+            this.getData2();
         },
         change(e) {
             this.collectionId = 0;
             this.searchVal = e.detail;
             this.search = e.detail;
-            this.getData();
+            this.getData2();
         },
         showSeries(type = 'series') {
             if (type === 'series') {
@@ -256,11 +260,11 @@ export default {
                 this.searchVal = this.selectName;
             }
 
-            this.getData();
+            this.getData2();
         },
         loginMethods() {
             this.getSeries().then(() => {
-                this.getData();
+                this.getData2();
             });
         }
     },
@@ -268,7 +272,7 @@ export default {
         if (!this.seriesId) {
             return;
         }
-        this.getData();
+        this.getData2();
     },
     onShareAppMessage() {
         return {

+ 13 - 5
src/pages/orderdetails.vue

@@ -10,8 +10,9 @@
         <div class="box-top">
             <p>{{ status.label }}</p>
             <h3 v-if="status.orderStatus == 'CREATED'">
-                请尽快支付,<span v-if="minters < 10">0</span>{{ minters }}分<span v-if="seconds < 10">0</span
-                >{{ seconds }} 后未支付将自动取消订单
+                <!-- 请尽快支付,<span v-if="minters < 10">0</span>{{ minters }}分<span v-if="seconds < 10">0</span
+                >{{ seconds }} 后未支付将自动取消订单 -->
+                请尽快支付,五分钟后未支付将自动取消订单
             </h3>
             <h3 v-else>{{ status.name }}</h3>
         </div>
@@ -228,11 +229,11 @@
 import store from '../mixins/store';
 export default {
     mixins: [store],
-    newShow: false,
     name: '',
     data() {
         return {
             show: false,
+            newShow: false,
             Boxes: [],
             cardCaseInfo: {},
             total: '',
@@ -278,16 +279,20 @@ export default {
             this.show = false;
         },
         initTime(dingdanId, initTime) {
+            console.log(dingdanId, initTime);
             let oldTime = new Date(initTime).valueOf();
             let newTime = new Date().valueOf();
+            console.log(oldTime);
+            console.log(newTime);
             let matchedTime = undefined;
             let matchedTime1 = undefined;
             if (oldTime) {
                 matchedTime = newTime - oldTime;
                 matchedTime1 = this.allTime - parseInt(matchedTime / 1000);
                 if (matchedTime1 > 0) {
-                    this.timeout(matchedTime1);
+                    // this.timeout(matchedTime1);
                 } else {
+                    console.log('暂停了');
                     // this.getFn();
                 }
             } else {
@@ -297,6 +302,7 @@ export default {
             }
         },
         timeout(time) {
+            console.log(time);
             let _this = this;
             _this.minters = parseInt(time / 60) > 0 ? parseInt(time / 60) : 0;
             _this.seconds = parseInt(time - _this.minters * 60);
@@ -363,7 +369,7 @@ export default {
                     }
                     if (this.status.orderStatus === 'CREATED') {
                         this.status.label = '待支付';
-                        this.initTime(this.orderInfoId, this.status.createdAt);
+                        // this.initTime(this.orderInfoId, this.status.createdAt);
                     }
                     if (this.status.orderStatus === 'CANCELED') {
                         this.status.label = '已取消';
@@ -402,6 +408,8 @@ export default {
                     }
                 })
                 .catch(e => {
+                    console.log(e);
+                    console.log('报错了');
                     this.hideLoading();
                     wx.showToast({
                         icon: 'none',