下拉刷新更新

This commit is contained in:
GaoHao
2025-01-08 16:18:20 +08:00
parent c8dbc0f550
commit 7cbadc5638
9 changed files with 167 additions and 166 deletions

View File

@@ -94,7 +94,7 @@
<script setup>
import { reactive, nextTick, ref } from 'vue';
import { onReady,onLoad,onShow } from '@dcloudio/uni-app'
import { onReady,onLoad,onShow,onPullDownRefresh, onReachBottom } from '@dcloudio/uni-app'
import { selectUserMoney, selectPayDetails, canCash, state, withdraw } from '@/api/me/withdraw.js';
import { commonType } from '@/api/init.js';
@@ -144,18 +144,18 @@
})
getCanCash()
})
onReachBottom(() => {
if (data.page * data.limit < data.totalCount) {
data.page = data.page + 1;
data.getMoneyDetail();
}
})
onPullDownRefresh(() => {
data.page = 1;
data.list = []
data.getMoneyDetail();
})
// onReachBottom: function() {
// if (this.page * this.limit < this.totalCount) {
// this.page = this.page + 1;
// this.getMoneyDetail();
// }
// },
// onPullDownRefresh: function() {
// this.page = 1;
// // that.list = []
// this.getMoneyDetail();
// },
/**
* 获取看广告状态
*/
@@ -252,6 +252,9 @@
if (res.list.length > 0) {
data.list = [...data.list, ...res.list];
}
setTimeout(() => {
uni.stopPullDownRefresh();
}, 500);
})
}