登录对接

This commit is contained in:
仲么了
2023-07-03 09:16:54 +08:00
parent e9b1e9a417
commit 5f67499e57
19 changed files with 358 additions and 181 deletions

View File

@@ -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;
});