<scroll-view scroll-x="true" class="bookshelf-content" :scroll-into-view="stoIndex" @scrolltolower="scollBottom">
<block v-for="(item, index) in assort" :key="index" :id="'move' + index">
<view :data-index="index" :id="'move' + index" :class="payType == item.type ? item.class : ''" :data-type="item.type" class="item" @click="typeChange">{{ item.type }}</view>
</block>
</scroll-view>
onReachBottom() {
if (!this.isLastPage) {
this.page = this.page + 1
this.getPaymentInfo()
}
},
typeChange(e) {
console.log(e)
if (e.currentTarget.dataset.index == 0) {
this.stoIndex = 'move0';
}
this.stoIndex = 'move' + e.currentTarget.dataset.index
this.noOrder = true
this.paymentList = [] // 清空已请求数据
this.page = 1
let chooseType = e.currentTarget.dataset.type
this.payType = chooseType
if (chooseType == '全部') {
this.getPaymentInfo('')
} else if (chooseType == '待支付') {
this.getPaymentInfo('created')
} else if (chooseType == '已支付') {
this.getPaymentInfo('paid')
} else if (chooseType == '已过期') {
this.getPaymentInfo('expired')
} else if (chooseType == '已退款') {
// 暂无退款信息
this.getPaymentInfo('refund')
// this.noOrder = false
}
},
首次进入页面时,触底函数正常执行,切换不同scroll-view(横向)标签后,页面无法触发触底函数,无法进行上拉刷新
0 个回复