wangfukang 1 week ago
parent
commit
2dd538196d
  1. 15
      components/tab-bar/delivery.vue

15
components/tab-bar/delivery.vue

@ -69,7 +69,7 @@
</view> </view>
</view> </view>
<view class="content"> <view class="content">
<scroll-view @scrolltolower="onReachPage" scroll-y style="width:100%;height: 620px;overflow: scroll;"> <scroll-view @scrolltolower="onReachPage" @scroll="handleScroll" :scroll-top="scrollTop" scroll-y style="width:100%;height: 620px;overflow: scroll;">
<view class="box1" v-for="(item,index) in pageData" :key="index"> <view class="box1" v-for="(item,index) in pageData" :key="index">
<view class="maotou" v-if="item.deliveryType == 1"> <view class="maotou" v-if="item.deliveryType == 1">
<text>{{item.numberCode.length>14 ?'多订单':item.numberCode | delPlus}}</text> <text>{{item.numberCode.length>14 ?'多订单':item.numberCode | delPlus}}</text>
@ -370,6 +370,8 @@
zhipaiCheck: false, zhipaiCheck: false,
tab1Checked: 'daiqu', tab1Checked: 'daiqu',
menuButtonInfo: {}, menuButtonInfo: {},
scrollTop: 0,
oldScrollTop: 0,
isArea: false, isArea: false,
latitude: 39.909, // latitude: 39.909, //
longitude: 116.39742, // longitude: 116.39742, //
@ -498,6 +500,15 @@
this.searchForm.pageNum++; this.searchForm.pageNum++;
this.getDelivery(); this.getDelivery();
}, },
handleScroll(e) {
this.oldScrollTop = e.detail.scrollTop
},
scrollToTop() {
this.scrollTop = this.oldScrollTop
this.$nextTick(() => {
this.scrollTop = 0
})
},
chooseType(type) { chooseType(type) {
if (this.tab1Checked1 == type) { if (this.tab1Checked1 == type) {
this.tab1Checked1 = '' this.tab1Checked1 = ''
@ -513,6 +524,7 @@
} }
} }
this.searchForm.pageNum = 1 this.searchForm.pageNum = 1
this.scrollToTop()
this.getDelivery() this.getDelivery()
this.$forceUpdate(); this.$forceUpdate();
}, },
@ -774,6 +786,7 @@
this.searchForm.status = 2 this.searchForm.status = 2
} }
this.searchForm.pageNum = 1 this.searchForm.pageNum = 1
this.scrollToTop()
this.getDelivery() this.getDelivery()
}, },
makeCall(phone) { makeCall(phone) {

Loading…
Cancel
Save