fix: bug修复
This commit is contained in:
parent
11b277d295
commit
a2a4370327
|
|
@ -548,9 +548,9 @@ export default {
|
|||
})
|
||||
return res[1].data;
|
||||
},
|
||||
async getWorkerList(params = {}) {
|
||||
async getWorkerList(params = {}, pageNum, pageSize) {
|
||||
let res = await uni.request({
|
||||
url: '/worker/app/list',
|
||||
url: `/worker/app/list?pageNum=${pageNum}&pageSize=${pageSize}`,
|
||||
method: 'POST',
|
||||
data: params
|
||||
})
|
||||
|
|
|
|||
|
|
@ -213,9 +213,9 @@
|
|||
otherCityWorkers: [],
|
||||
loadMoreStatus: '',
|
||||
hasMoreData: false,
|
||||
pageNum: 0,
|
||||
otherCityWorkersPageNum: 0,
|
||||
pageSize: 0,
|
||||
pageNum: 1,
|
||||
otherCityWorkersPageNum: 1,
|
||||
pageSize: 10,
|
||||
stickyTop: this.CustomBar,
|
||||
searchInfo: {},
|
||||
curPositionDistrictId: -1,
|
||||
|
|
@ -232,8 +232,8 @@
|
|||
},
|
||||
methods: {
|
||||
async loadData() {
|
||||
this.pageNum = this.$globalData.initPageNum;
|
||||
this.pageSize = this.$globalData.initPageSize;
|
||||
// this.pageNum = this.$globalData.initPageNum;
|
||||
// this.pageSize = this.$globalData.initPageSize;
|
||||
// 获取当前定位
|
||||
await this.getCurAreaArr();
|
||||
await this.loadRegionList();
|
||||
|
|
@ -285,11 +285,10 @@
|
|||
}
|
||||
this.workerInfos = this.workerInfos.concat(res.rows);
|
||||
this.pageNum++;
|
||||
if (rowsLength === this.pageSize) {
|
||||
this.$refs.loadStatusBar1.showLoadMore();
|
||||
}
|
||||
this.$refs.loadStatusBar1.showLoadMore();
|
||||
} else {
|
||||
this.$refs.loadStatusBar1.showLoadOver();
|
||||
}
|
||||
this.$refs.loadStatusBar1.showLoadOver();
|
||||
} catch (e) {
|
||||
console.error(e)
|
||||
this.$refs.loadStatusBar1.showLoadErr();
|
||||
|
|
@ -301,16 +300,15 @@
|
|||
params.exceptParentAreaId = this.searchInfo.area && this.searchInfo.area.length ? this.searchInfo.area[1].areaId : null;
|
||||
this.$refs.loadStatusBar2.showLoading();
|
||||
try {
|
||||
let res = await this.$request.getWorkerList(params);
|
||||
let res = await this.$request.getWorkerList(params, params.pageNum, params.pageSize);
|
||||
let rowsLength = res.rows.length;
|
||||
if (rowsLength > 0) {
|
||||
this.otherCityWorkers = this.otherCityWorkers.concat(res.rows);
|
||||
this.otherCityWorkersPageNum++;
|
||||
if (rowsLength === this.pageSize) {
|
||||
this.$refs.loadStatusBar2.showLoadMore();
|
||||
}
|
||||
this.$refs.loadStatusBar2.showLoadMore();
|
||||
} else {
|
||||
this.$refs.loadStatusBar2.showLoadOver();
|
||||
}
|
||||
this.$refs.loadStatusBar2.showLoadOver();
|
||||
} catch (e) {
|
||||
console.error(e)
|
||||
this.$refs.loadStatusBar2.showLoadErr();
|
||||
|
|
|
|||
Loading…
Reference in New Issue