111
This commit is contained in:
@@ -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;
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user