fix: opl list

This commit is contained in:
caoqianming 2023-04-04 22:59:38 +08:00
parent 0a78c74c36
commit f185f3336e
1 changed files with 8 additions and 8 deletions

View File

@ -77,8 +77,8 @@
return { return {
params: { params: {
search: '', search: '',
pageSize: 10, page_size: 10,
pageNum: 1, page: 1,
create_by: '' create_by: ''
}, },
totalNum: 0, totalNum: 0,
@ -96,9 +96,9 @@
}, },
// //
onReachBottom() { onReachBottom() {
const totalPage = Math.ceil(this.totalNum / this.params.pageSize); const totalPage = Math.ceil(this.totalNum / this.params.page_size);
if (this.params.pageNum < totalPage) { if (this.params.page < totalPage) {
this.params.pageNum += 1; this.params.page += 1;
} else { } else {
uni.showToast({ uni.showToast({
@ -117,7 +117,7 @@
}, },
// //
onPullDownRefresh() { onPullDownRefresh() {
this.params.pageNum = 1; this.params.page = 1;
this.lists = []; this.lists = [];
this.getLists(); this.getLists();
}, },
@ -173,12 +173,12 @@
}) })
}, },
searchHandle() { searchHandle() {
this.params.pageNum = 1; this.params.page = 1;
this.lists = []; this.lists = [];
this.getLists() this.getLists()
}, },
resetSearch() { resetSearch() {
this.params.pageNum = 1; this.params.page = 1;
this.params.search = ""; this.params.search = "";
this.lists = []; this.lists = [];
this.getLists(); this.getLists();