flat: 优化
This commit is contained in:
@@ -134,7 +134,7 @@ onLoad((options) => {
|
||||
});
|
||||
|
||||
function getJobFairInfo(id, name) {
|
||||
$api.createRequest(`/app/internal/jobFairThirdPart/${id}`).then((resData) => {
|
||||
$api.createRequest(`/app/internal/jobFairThirdPart/${id}`, {}, 'GET', true).then((resData) => {
|
||||
fairInfo.value = resData.data;
|
||||
hasAppointment();
|
||||
});
|
||||
@@ -152,21 +152,24 @@ function getCompanyList(type = 'add') {
|
||||
current: pageState.current,
|
||||
pageSize: pageState.pageSize,
|
||||
};
|
||||
$api.createRequest(`/app/internal/companyThirdPart/?zphID=${jobFairId}&zphmc=${jobFairName}`, params).then(
|
||||
(resData) => {
|
||||
const { rows, total } = resData;
|
||||
if (type === 'add') {
|
||||
const str = pageState.pageSize * (pageState.current - 1);
|
||||
const end = pageState.list.length;
|
||||
const reslist = rows;
|
||||
pageState.list.splice(str, end, ...reslist);
|
||||
} else {
|
||||
pageState.list = rows;
|
||||
}
|
||||
pageState.total = resData.total;
|
||||
pageState.maxPage = Math.ceil(pageState.total / pageState.pageSize);
|
||||
$api.createRequest(
|
||||
`/app/internal/companyThirdPart/?zphID=${jobFairId}&zphmc=${jobFairName}`,
|
||||
params,
|
||||
'GET',
|
||||
true
|
||||
).then((resData) => {
|
||||
const { rows, total } = resData;
|
||||
if (type === 'add') {
|
||||
const str = pageState.pageSize * (pageState.current - 1);
|
||||
const end = pageState.list.length;
|
||||
const reslist = rows;
|
||||
pageState.list.splice(str, end, ...reslist);
|
||||
} else {
|
||||
pageState.list = rows;
|
||||
}
|
||||
);
|
||||
pageState.total = resData.total;
|
||||
pageState.maxPage = Math.ceil(pageState.total / pageState.pageSize);
|
||||
});
|
||||
}
|
||||
|
||||
const hasAppointment = () => {
|
||||
|
||||
Reference in New Issue
Block a user