This commit is contained in:
francis_fh
2025-12-18 20:41:29 +08:00
parent 94d6caee7f
commit 8d150c7b88
4 changed files with 23 additions and 8541 deletions

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -50,7 +50,7 @@ const { $api, navTo, navBack } = inject('globalFunction');
const weekMap = ['日', '一', '二', '三', '四', '五', '六'];
const calendarData = ref([]);
const current = ref({});
import { Solar, Lunar } from '@/packageA/lib/lunar.js';
import { Solar, Lunar } from '@/packageA/lib/lunar-javascript@1.7.2.js';
const isRecord = ref(false);
const recordNum = ref(4);

View File

@@ -796,13 +796,15 @@ async function loadData() {
throw err;
}
}
const pageNull = ref(1);
function scrollBottom() {
console.log('scrollBottom------')
if (loadmoreRef.value && typeof loadmoreRef.value.change === 'function') {
loadmoreRef.value.change('loading');
}
if (state.tabIndex === 'all') {
getJobRecommend();
pageNull.value++;
} else {
getJobList();
}
@@ -983,6 +985,16 @@ function getJobRecommend(type = 'add') {
...conditionSearch.value,
isPublish: 1,
};
// 优先从store获取如果为空则从缓存获取
const storeIsCompanyUser = userInfo.value?.isCompanyUser;
const cachedUserInfo = uni.getStorageSync('userInfo') || {};
const cachedIsCompanyUser = cachedUserInfo.isCompanyUser;
const userType = storeIsCompanyUser !== undefined ? Number(storeIsCompanyUser) : Number(cachedIsCompanyUser);
console.log('---------userType-----', userType)
// 只有企业用户(isCompanyUser=0)才添加current字段
if (userType === 0) {
params.current = pageNull.value;
}
let comd = { recommend: true, jobCategory: '', tip: '确认你的兴趣,为您推荐更多合适的岗位' };
$api.createRequest('/app/job/recommend', params).then((resData) => {
const { data, total } = resData;
@@ -1040,8 +1052,8 @@ function getJobList(type = 'add') {
// waterfallsFlowRef.value.refresh();
if (waterfallsFlowRef.value) waterfallsFlowRef.value.refresh();
}
let params = {
current: pageState.page,
pageSize: pageState.pageSize,
...pageState.search,
// ...conditionSearch.value,