优化分页统一返回

This commit is contained in:
不做码农
2021-11-28 11:11:34 +08:00
parent 79b3c306f9
commit 8dc832cdbd
37 changed files with 145 additions and 357 deletions

View File

@@ -28,7 +28,7 @@ service.interceptors.request.use(config => {
//将token放到请求头发送给服务器,将tokenkey放在请求头中
config.headers.Token = getToken();
} else {
console.log(config)
// console.log(config)
}
return config;
}, error => {

View File

@@ -204,7 +204,7 @@ export default {
listGendemo(this.addDateRange(this.queryParams, this.timeRange)).then(res => {
if (res.code == 200) {
this.dataList = res.data.result;
this.total = res.data.totalCount;
this.total = res.data.totalNum;
}
})
},

View File

@@ -12,7 +12,7 @@
</el-select>
</el-form-item>
<el-form-item>
<el-button type="cyan" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
</el-form-item>
</el-form>

View File

@@ -291,7 +291,7 @@ export default {
this.loading = true;
queryTasks(this.queryParams).then((response) => {
this.dataTasks = response.data.result;
this.total = response.data.totalCount;
this.total = response.data.totalNum;
this.loading = false;
});
},

View File

@@ -161,7 +161,7 @@ export default {
listJobLog(this.addDateRange(this.queryParams, this.dateRange)).then(
(response) => {
this.jobLogList = response.data.result;
this.total = response.data.totalCount;
this.total = response.data.totalNum;
this.loading = false;
}
);

View File

@@ -100,7 +100,7 @@ export default {
listArticle(this.queryParams).then((res) => {
if (res.code == 200) {
this.dataList = res.data.result;
this.total = res.data.totalCount;
this.total = res.data.totalNum;
}
});
},

View File

@@ -170,7 +170,7 @@ export default {
listConfig(this.addDateRange(this.queryParams, this.dateRange)).then(
(response) => {
this.configList = response.data.result;
this.total = response.data.totalCount;
this.total = response.data.totalNum;
this.loading = false;
}
);

View File

@@ -160,7 +160,7 @@ export default {
this.loading = true;
listPost(this.queryParams).then((response) => {
this.postList = response.data.result;
this.total = response.data.totalCount;
this.total = response.data.totalNum;
this.loading = false;
});
},

View File

@@ -151,7 +151,7 @@ export default {
getGenTable(this.queryParams).then((res) => {
this.tableData = res.data.result;
this.total = res.data.totalCount;
this.total = res.data.totalNum;
this.tableloading = false;
});
},