diff --git a/components/tab-bar/delivery.vue b/components/tab-bar/delivery.vue index 854317c..4ae42ab 100644 --- a/components/tab-bar/delivery.vue +++ b/components/tab-bar/delivery.vue @@ -69,7 +69,7 @@ - + {{item.numberCode.length>14 ?'多订单':item.numberCode | delPlus}} @@ -370,6 +370,8 @@ zhipaiCheck: false, tab1Checked: 'daiqu', menuButtonInfo: {}, + scrollTop: 0, + oldScrollTop: 0, isArea: false, latitude: 39.909, // 默认纬度,可以设为用户当前位置或配送员位置 longitude: 116.39742, // 默认经度 @@ -498,6 +500,15 @@ this.searchForm.pageNum++; this.getDelivery(); }, + handleScroll(e) { + this.oldScrollTop = e.detail.scrollTop + }, + scrollToTop() { + this.scrollTop = this.oldScrollTop + this.$nextTick(() => { + this.scrollTop = 0 + }) + }, chooseType(type) { if (this.tab1Checked1 == type) { this.tab1Checked1 = '' @@ -513,6 +524,7 @@ } } this.searchForm.pageNum = 1 + this.scrollToTop() this.getDelivery() this.$forceUpdate(); }, @@ -774,6 +786,7 @@ this.searchForm.status = 2 } this.searchForm.pageNum = 1 + this.scrollToTop() this.getDelivery() }, makeCall(phone) {