scroll-view适合局部下拉刷新场景
<!-- 滚动视图区域 --><scroll-view class="content" :scroll-y="true" refresher-enabled="true" @refresherrefresh="pulldown" lower-threshold="150"@scrolltolower="finishPullUp" ref="scroll" :refresher-triggered="triggered"></scroll-view>
param: { // 请求参数page: 1,new_status: ''},list: [], // 订单列表total_page: 1, // 总页数pulldown() { // 下拉刷新if (!this.triggered) {this.triggered = true;this.param.page = 1this.getList(true)setTimeout(() => {this.triggered = false;}, 1000)}},getList(isRefresh = false) { // 获取用户列表exchangeResource.buyList(this.param).then((response) => {if (response.errcode === ERR_OK) {if (response.data) {if (isRefresh) {this.list = response.dataconsole.log(this.list)} else {this.list = [...this.list, ...response.data]}this.total_page = response.page.total_page}}})}