Commit 1d959e0d by cen

fix: 下拉刷新没重置

1 parent 198a62ad
......@@ -46,7 +46,7 @@
</view>
</view>
<scroll-view class="order_no_box" scroll-y enable-back-to-top refresher-enabled="true" v-show="activeIndex === 0" @scrolltolower="pageonReachBottom">
<scroll-view class="order_no_box" scroll-y enable-back-to-top refresher-enabled="true" :refresher-triggered="triggered" @refresherrefresh="onRefresh" v-show="activeIndex === 0" @scrolltolower="pageonReachBottom">
<view v-if="normalOrderNoList.length > 0" class="order-gap">
<view v-for="(item, index) in normalOrderNoList" :key="index" class="order_no_item" :class="{ checkActive: checkListObj[item.tradeNo] }" @click="activeClick(item)">
<view class="message">
......@@ -78,7 +78,7 @@
</view>
</scroll-view>
<scroll-view class="order_no_box" scroll-y enable-back-to-top refresher-enabled="true" v-show="activeIndex === 1" @scrolltolower="pageonReachBottom">
<scroll-view class="order_no_box" scroll-y enable-back-to-top refresher-enabled="true" :refresher-triggered="triggered1" @refresherrefresh="onRefresh1" v-show="activeIndex === 1" @scrolltolower="pageonReachBottom">
<view v-if="abnormalOrderNoList.length > 0" class="order-gap">
<view v-for="(item, index) in abnormalOrderNoList" :key="index" class="order_no_item" :class="{ checkActive: checkListObj[item.tradeNo] }" @click="activeClick(item)">
<view class="message">
......@@ -207,6 +207,8 @@ export default {
keyword: '',
searchObj: {},
dataList: [],
triggered: false,
triggered1: false,
waitInputCount: 0, // 添加待补录计数
waitOrderTimer: null, // 定时器引用
tipsProps: {
......@@ -288,10 +290,10 @@ export default {
},
tabChange(index) {
this.activeIndex = index
if (!this.normalOrderNoList.length) {
if (this.activeIndex === 0 && !this.normalOrderNoList.length) {
this.getTransactionSerialNumber()
}
if (!this.abnormalOrderNoList.length) {
if (this.activeIndex === 1 && !this.abnormalOrderNoList.length) {
this.getTransactionSerialNumber()
}
},
......@@ -325,7 +327,18 @@ export default {
if (this.abnormalPages == this.abnormalCurrentPage) return uni.showToast({ title: '列表已到底', icon: 'none' })
this.abnormalCurrentPage += 1
}
this.getTransactionSerialNumber()
},
onRefresh() {
this.triggered = true
this.normalCurrentPage = 1
this.normalOrderNoList = []
this.getTransactionSerialNumber()
},
onRefresh1() {
this.triggered1 = true
this.abnormalCurrentPage = 1
this.abnormalOrderNoList = []
this.getTransactionSerialNumber()
},
getTransactionSerialNumber() {
......@@ -335,9 +348,13 @@ export default {
if (this.activeIndex == 0) {
this.normalOrderNoList = [...this.normalOrderNoList, ...result.list]
this.normalPages = result.pages
this.triggered = false
this.triggered1 = false
} else {
this.abnormalOrderNoList = [...this.abnormalOrderNoList, ...result.list]
this.abnormalPages = result.pages
this.triggered = false
this.triggered1 = false
}
})
.catch(err => {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!