下拉刷新更新

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

@@ -23,7 +23,7 @@
<script setup>
import { reactive } from 'vue';
import { onLoad } from '@dcloudio/uni-app'
import { onLoad,onPullDownRefresh, onReachBottom } from '@dcloudio/uni-app'
import { queryUserMoneyDetails } from '@/api/me/withdraw.js';
let data = reactive({
@@ -59,19 +59,23 @@
if ( res.records.length > 0) {
data.list = [...data.list,...res.records];
}
setTimeout(() => {
uni.stopPullDownRefresh();
}, 500);
})
}
// onReachBottom: function() {
// if (this.page*this.limit < this.totalCount) {
// this.page = this.page + 1;
// this.getMoney();
// }
// }
// onPullDownRefresh: function() {
// this.page = 1;
// // that.list = []
// this.getMoney();
// }
onReachBottom(() => {
if (data.page*data.limit < data.totalCount) {
data.page = data.page + 1;
getMoney();
}
})
onPullDownRefresh(() => {
data.page = 1;
data.list = []
data.getMoney();
})
</script>
<style lang='scss' scoped>