登录对接
This commit is contained in:
@@ -27,14 +27,14 @@ export default {
|
||||
'Content-Type': 'application/json;charset=UTF-8',
|
||||
},
|
||||
params: {
|
||||
currentPage: 1,
|
||||
pageNum: 1,
|
||||
pageSize: 20,
|
||||
},
|
||||
reload() {
|
||||
this.data = [];
|
||||
this.status = 'loading';
|
||||
this.empty = false;
|
||||
this.params.currentPage = 1;
|
||||
this.params.pageNum = 1;
|
||||
this.next();
|
||||
},
|
||||
callBack: null,
|
||||
@@ -50,7 +50,7 @@ export default {
|
||||
console.warn(res);
|
||||
let resultData =
|
||||
res.data?.list || res.data?.records || [];
|
||||
if (this.params.currentPage == 1) {
|
||||
if (this.params.pageNum == 1) {
|
||||
this.data = resultData;
|
||||
if (resultData.length == 0 || resultData == 0) {
|
||||
this.empty = true;
|
||||
@@ -68,11 +68,11 @@ export default {
|
||||
}
|
||||
}
|
||||
|
||||
if (this.params.currentPage == 1) {
|
||||
if (this.params.pageNum == 1) {
|
||||
this.firstCallBack && this.firstCallBack();
|
||||
}
|
||||
this.loadedCallback && this.loadedCallback();
|
||||
this.params.currentPage++;
|
||||
this.params.pageNum++;
|
||||
this.total = res.total;
|
||||
this.loading = false;
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user