下拉刷新更新
This commit is contained in:
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user