在招职位列表显示

This commit is contained in:
francis_fh
2026-01-15 19:59:55 +08:00
parent a299608fca
commit a663010b61
6 changed files with 37 additions and 28 deletions

View File

@@ -140,6 +140,8 @@
isCollection: resData.data.isCollection || 0,
jobList: resData.data.jobList || [] // 使用正确的jobList字段
};
// 将职位列表数据赋值给jobInfoList用于页面渲染
jobInfoList.value = resData.data.jobList || [];
console.log('Company details loaded successfully');
} else {
console.error('Failed to load company details:', resData?.msg || 'Unknown error');
@@ -151,6 +153,7 @@
isCollection: 0,
jobList: []
};
jobInfoList.value = [];
}
}).catch((error) => {
console.error('API error when fetching company details:', error);
@@ -162,6 +165,7 @@
isCollection: 0,
jobList: []
};
jobInfoList.value = [];
});
}

View File

@@ -67,9 +67,9 @@ const { dictLabel, oneDictData, getDictData } = useDictStore();
const selectJobsModel = ref();
const selectPopupRef = ref();
const percent = ref('0%');
const salay = [2, 5, 10, 15, 20, 25, 30, 50, 80, 100];
const salay = [2000, 5000, 10000, 15000, 20000, 25000, 30000, 50000, 80000, 100000];
const state = reactive({
lfsalay: [2, 5, 10, 15, 20, 25, 30, 50],
lfsalay: [2000, 5000, 10000, 15000, 20000, 25000, 30000, 50000],
risalay: JSON.parse(JSON.stringify(salay)),
salayText: '',
areaText: '',
@@ -137,10 +137,10 @@ const changeSalary = () => {
title: '薪资',
maskClick: true,
data: [state.lfsalay, state.risalay],
unit: 'k',
unit: '',
success: (_, [min, max]) => {
fromValue.salaryMin = min.value * 1000;
fromValue.salaryMax = max.value * 1000;
fromValue.salaryMin = min.value;
fromValue.salaryMax = max.value;
state.salayText = `${fromValue.salaryMin}-${fromValue.salaryMax}`;
},
change(e) {

View File

@@ -51,7 +51,7 @@
</view>
<view class="mys-text">
<text>期望薪资</text>
<text>{{ userInfo.salaryMin / 1000 }}k-{{ userInfo.salaryMax / 1000 }}k</text>
<text>{{ userInfo.salaryMin }}-{{ userInfo.salaryMax }}</text>
</view>
<view class="mys-text">
<text>期望工作地</text>

View File

@@ -107,7 +107,7 @@
<text class="title">公司信息</text>
<text
class="btntext button-click"
@click="navTo(`/packageA/pages/UnitDetails/UnitDetails?companyId=${jobInfo.company.companyId}`)"
@click="handleCompanyDetailClick"
>
单位详情
</text>
@@ -340,9 +340,14 @@ function getDetail(jobId) {
}
function getCompanyIsAJobs(companyId) {
$api.createRequest(`/app/company/count/${companyId}`).then((resData) => {
companyCount.value = resData.data;
});
if (companyId) {
$api.createRequest(`/app/company/count/${companyId}`).then((resData) => {
companyCount.value = resData.data;
});
}
// $api.createRequest(`/app/company/count/${companyId}`).then((resData) => {
// companyCount.value = resData.data;
// });
}
function getTextWidth(text, size = 12) {
@@ -508,6 +513,17 @@ function previewImage(url, index) {
function viewResume(userId) {
navTo(`/packageA/pages/resumeDetail/resumeDetail?userId=${userId}`);
}
// 处理查看单位详情
function handleCompanyDetailClick() {
// console.log('----企业ID--', jobInfo.value.company?.companyId)
// console.log('----企业data--', jobInfo.value)
if (jobInfo.value.company?.companyId) {
navTo(`/packageA/pages/UnitDetails/UnitDetails?companyId=${jobInfo.value.company.companyId}`);
} else {
$api.msg('没有企业信息');
}
}
</script>
<style lang="stylus" scoped>

View File

@@ -268,11 +268,11 @@ const openSelectPopup = (config) => {
// #endif
};
const tabCurrent = ref(1);
const salay = [2, 5, 10, 15, 20, 25, 30, 50, 80, 100];
const salay = [2000, 5000, 10000, 15000, 20000, 25000, 30000, 50000, 80000, 100000];
const state = reactive({
station: [],
stationCateLog: 1,
lfsalay: [2, 5, 10, 15, 20, 25, 30, 50],
lfsalay: [2000, 5000, 10000, 15000, 20000, 25000, 30000, 50000],
risalay: JSON.parse(JSON.stringify(salay)),
areaText: '',
educationText: '',
@@ -614,10 +614,10 @@ function changeSalay() {
title: '薪资',
maskClick: true,
data: [state.lfsalay, state.risalay],
unit: 'k',
unit: '',
success: (_, [min, max]) => {
fromValue.salaryMin = min.value * 1000;
fromValue.salaryMax = max.value * 1000;
fromValue.salaryMin = min.value;
fromValue.salaryMax = max.value;
state.salayText = `${fromValue.salaryMin}-${fromValue.salaryMax}`;
},
change(e) {

View File

@@ -148,12 +148,12 @@
</view>
<view class="service-title">职业规划推荐</view>
</view>
<view class="service-item press-button" @click="handleSalaryInfoClick">
<!-- <view class="service-item press-button" @click="handleSalaryInfoClick">
<view class="service-icon service-icon-12">
<span style="display:block;width:40rpx;height:40rpx;border-radius:100%;border:4rpx #ffffff solid;line-height:40rpx;text-align:center;"></span>
</view>
<view class="service-title">薪酬信息</view>
</view>
</view> -->
<view class="service-item press-button" @click="handleJobFairClick">
<view class="service-icon service-icon-1">
<uni-icons type="shop" size="32" color="#FFFFFF"></uni-icons>
@@ -804,17 +804,6 @@ const handleLiveClick = () => {
const handleSalaryInfoClick = () => {
navTo('/pages/service/salary-info');
};
const handleJobFairClick = () => {
navTo('/pages/careerfair/careerfair');
};
const handleH5SalaryClick = () => {
const salaryUrl = "https://www.mohrss.gov.cn/SYrlzyhshbzb/laodongguanxi_/fwyd/202506/t20250627_544623.html";
window.location.assign(salaryUrl);
};
// 处理帮扶
const helpClick = () => {
navTo('/packageB/priority/helpFilter');
};
async function loadData() {
try {
if (isLoaded.value) return;