flat: 暂存
This commit is contained in:
@@ -551,12 +551,20 @@ function getJobRecommendWithNewSearch(index) {
|
||||
...pageState.search,
|
||||
...conditionSearch.value,
|
||||
};
|
||||
|
||||
|
||||
$api.createRequest('/app/job/recommend', params).then((resData) => {
|
||||
const currentHeight = waterfallsFlowRef.value.$el.offsetHeight; // 获取当前高度
|
||||
waterfallsFlowRef.value.$el.style.minHeight = `${currentHeight}px`;
|
||||
const { data } = resData;
|
||||
const newData = dataToImg(data);
|
||||
//替换点击项以后的数据
|
||||
list.value.splice(index, list.value.length - index, ...newData)
|
||||
const sliceIndex = index + 1;
|
||||
list.value.splice(sliceIndex, list.value.length - sliceIndex, ...newData);
|
||||
nextTick(() => {
|
||||
waterfallsFlowRef.value.refresh();
|
||||
setTimeout(() => {
|
||||
waterfallsFlowRef.value.$el.style.minHeight = '';
|
||||
}, 500);
|
||||
});
|
||||
// 更新加载状态
|
||||
updateLoadmoreStatus(newData);
|
||||
});
|
||||
@@ -567,20 +575,20 @@ function getJobListWithNewSearch(index) {
|
||||
// 重置分页参数
|
||||
pageState.page = 1;
|
||||
pageState.maxPage = 2;
|
||||
|
||||
|
||||
const params = {
|
||||
current: pageState.page,
|
||||
pageSize: pageState.pageSize,
|
||||
...pageState.search,
|
||||
...conditionSearch.value,
|
||||
};
|
||||
|
||||
|
||||
$api.createRequest('/app/job/list', params).then((resData) => {
|
||||
const { rows, total } = resData;
|
||||
// 将新数据转换为图片格式
|
||||
const newData = dataToImg(rows);
|
||||
//替换点击项以后的数据
|
||||
list.value.splice(index, list.value.length - index, ...newData)
|
||||
list.value.splice(index, list.value.length - index, ...newData);
|
||||
// 更新分页和加载状态
|
||||
pageState.total = total;
|
||||
pageState.maxPage = Math.ceil(total / pageState.pageSize);
|
||||
|
||||
Reference in New Issue
Block a user