This commit is contained in:
冯辉
2026-05-01 04:02:50 +08:00
parent 57b18c0a65
commit 7ad59aeeab
4 changed files with 31 additions and 20 deletions

View File

@@ -786,6 +786,7 @@ const rangeOptions = ref([
]);
const isLoaded = ref(false);
const isInitialized = ref(false); // 添加初始化标志
const isRecommendLoading = ref(false); // 请求锁,防止重复调用
const { columnCount, columnSpace } = useColumnCount(() => {
pageState.pageSize = 10 * (columnCount.value - 1) + 10;
@@ -1243,10 +1244,12 @@ function handelHostestSearch(val) {
}
function getJobRecommend(type = 'add') {
if (isRecommendLoading.value) return;
if (type === 'refresh') {
list.value = [];
if (waterfallsFlowRef.value) waterfallsFlowRef.value.refresh();
}
isRecommendLoading.value = true;
let params = {
pageSize: pageState.pageSize + 10,
sessionId: useUserStore().seesionId,
@@ -1320,6 +1323,8 @@ function getJobRecommend(type = 'add') {
if (!data.length) {
useUserStore().initSeesionId();
}
}).finally(() => {
isRecommendLoading.value = false;
});
}