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