shish пре 1 година
родитељ
комит
eef4af3672
1 измењених фајлова са 9 додато и 12 уклоњено
  1. 9 12
      mallApp/src/pages/order/list.vue

+ 9 - 12
mallApp/src/pages/order/list.vue

@@ -1,6 +1,6 @@
 <template>
 <template>
   <view class="order-page">
   <view class="order-page">
-    <app-tabs :tabs="tabs" :isFixed="true" :currentTab="tabIndex" @change="change" itemWidth="20%"/>
+    <app-tabs :tabs="tabs" :isFixed="true" :currentTab="tabIndex" @change="changeTab" itemWidth="20%"/>
 
 
 			<view style="margin-left:60upx;margin-top:110upx;padding-bottom:30upx;position: relative;">
 			<view style="margin-left:60upx;margin-top:110upx;padding-bottom:30upx;position: relative;">
 				<DateSelect @selectDateFn="selectDateFn" defaultShowName='时间' />
 				<DateSelect @selectDateFn="selectDateFn" defaultShowName='时间' />
@@ -55,7 +55,7 @@ export default {
           key: '2'
           key: '2'
         },
         },
         {
         {
-          name: "待收货",
+          name: "配送中",
           value: 0,
           value: 0,
           key: '3'
           key: '3'
         },
         },
@@ -121,19 +121,16 @@ export default {
       this.resetList()
       this.resetList()
       this.getMyBuy()
       this.getMyBuy()
 		},	
 		},	
-    change(e) {
+    changeTab(e) {
       if (this.tabIndex != e.index) {
       if (this.tabIndex != e.index) {
-        uni.pageScrollTo({
-          scrollTop: 0,
-          duration: 0
-        });
+        uni.pageScrollTo({ scrollTop: 0, duration: 0 })
         this.resetList();
         this.resetList();
-        this.list.finished = true;
-        this.tabIndex = e.index;
-        this.status = e.item.key;
+        this.list.finished = true
+        this.tabIndex = e.index
+        this.status = this.tabs[this.tabIndex].key
         this.getMyBuy().then(() => {
         this.getMyBuy().then(() => {
-          this.list.finished = false;
-        });
+          this.list.finished = false
+        })
       }
       }
     },
     },
     init() {
     init() {