merge: 合并 main 分支最新代码到 careermap
This commit is contained in:
4
.gitignore
vendored
4
.gitignore
vendored
@@ -1,3 +1,5 @@
|
||||
/unpackage/
|
||||
/node_modules/
|
||||
/docs/
|
||||
/docs/
|
||||
/.qoder/
|
||||
/.idea/
|
||||
@@ -18,9 +18,6 @@
|
||||
</view>
|
||||
<view class="companyinfo-right">
|
||||
<view class="row1">{{ companyInfo?.name || '未知公司' }}</view>
|
||||
<view class="row2">
|
||||
互联网
|
||||
</view>
|
||||
<view class="row2">
|
||||
{{ getScaleLabel(companyInfo?.scale) }}
|
||||
</view>
|
||||
@@ -41,41 +38,41 @@
|
||||
</view>
|
||||
<scroll-view scroll-y class="Detailscroll-view">
|
||||
<view class="views">
|
||||
<view class="Detail-title"><text class="title">在招职位</text></view>
|
||||
<template v-if="companyInfo.jobInfoList.length != 0">
|
||||
<view v-for="job in companyInfo.jobInfoList" :key="job.id">
|
||||
<!-- @click="navTo(`/packageA/pages/post/post?jobId=${JSON.stringify(job)}`)" -->
|
||||
<!-- :style="getItemBackgroundStyle('bj2.png')" -->
|
||||
<view class="cards">
|
||||
<view class="card-company">
|
||||
<text class="company">{{ job.jobTitle }}</text>
|
||||
<view class="salary"> ¥{{ job.salaryRange }}/月 </view>
|
||||
<view class="Detail-title"><text class="title">在招职位</text></view>
|
||||
<template v-if="companyInfo.jobList && companyInfo.jobList.length != 0">
|
||||
<view v-for="job in companyInfo.jobList" :key="job.jobId">
|
||||
<view class="cards" @click="navToJobDetail(job.jobId)">
|
||||
<view class="card-company">
|
||||
<text class="company">{{ job.jobTitle }}</text>
|
||||
<view class="salary"> ¥{{ job.minSalary }}-{{ job.maxSalary }}/月 </view>
|
||||
</view>
|
||||
<view class="card-tags">
|
||||
<view class="tag jy">
|
||||
<image :src="`${baseUrl}/jobfair/jy.png`" mode=""></image>
|
||||
{{ getExperienceLabel(job.experience) }}
|
||||
</view>
|
||||
<view class="card-tags">
|
||||
<view class="tag jy">
|
||||
<image :src="`${baseUrl}/jobfair/jy.png`" mode=""></image>
|
||||
{{ job.experienceRequirement }}
|
||||
</view>
|
||||
<view class="tag xl">
|
||||
<image :src="`${baseUrl}/jobfair/xx.png`" mode=""></image>
|
||||
{{ job.educationRequirement }}
|
||||
</view>
|
||||
<view class="tag yd" v-if="job.jobRequirement">
|
||||
<image :src="`${baseUrl}/jobfair/lx-1.png`" mode=""></image>
|
||||
{{ job.jobRequirement }}
|
||||
</view>
|
||||
<view class="tag xl">
|
||||
<image :src="`${baseUrl}/jobfair/xx.png`" mode=""></image>
|
||||
{{ getEducationLabel(job.education) }}
|
||||
</view>
|
||||
<view class="card-companyName">
|
||||
{{ job.jobDescription }}
|
||||
<view class="tag yd" v-if="job.vacancies">
|
||||
<image :src="`${baseUrl}/jobfair/lx-1.png`" mode=""></image>
|
||||
招聘{{ job.vacancies }}人
|
||||
</view>
|
||||
<view class="deliver-box">
|
||||
<view class="deliver-btn" @click="deliverResume(job)">
|
||||
简历投递
|
||||
</view>
|
||||
</view>
|
||||
<view class="card-info">
|
||||
<view class="company-address" v-if="job.jobLocation">
|
||||
<image class="point3" src="/static/icon/point3.png"></image>
|
||||
{{ job.jobLocation }}
|
||||
</view>
|
||||
<view class="push-time" v-if="job.postingDate">
|
||||
<image class="point3" src="/static/icon/point3.png"></image>
|
||||
{{ job.postingDate.split(' ')[0] }}
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
</view>
|
||||
</template>
|
||||
<empty v-else pdTop="200"></empty>
|
||||
</view>
|
||||
</scroll-view>
|
||||
@@ -121,7 +118,7 @@
|
||||
pageSize: 10,
|
||||
});
|
||||
const companyInfo = ref({
|
||||
jobInfoList: [],
|
||||
jobList: [],
|
||||
});
|
||||
const baseUrl = config.imgBaseUrl;
|
||||
const getItemBackgroundStyle = (imageName) => ({
|
||||
@@ -146,7 +143,7 @@
|
||||
scale: resData.data.scale || '未知规模',
|
||||
description: resData.data.description || '暂无公司介绍',
|
||||
isCollection: resData.data.isCollection || 0,
|
||||
jobInfoList: [] // 新数据格式中没有岗位列表,初始化为空数组
|
||||
jobList: resData.data.jobList || [] // 使用正确的jobList字段
|
||||
};
|
||||
console.log('Company details loaded successfully');
|
||||
} else {
|
||||
@@ -157,7 +154,7 @@
|
||||
scale: '-',
|
||||
description: '无法获取公司信息,请稍后重试',
|
||||
isCollection: 0,
|
||||
jobInfoList: []
|
||||
jobList: []
|
||||
};
|
||||
}
|
||||
}).catch((error) => {
|
||||
@@ -168,7 +165,7 @@
|
||||
scale: '-',
|
||||
description: '网络请求失败,请检查网络连接',
|
||||
isCollection: 0,
|
||||
jobInfoList: []
|
||||
jobList: []
|
||||
};
|
||||
});
|
||||
}
|
||||
@@ -213,7 +210,7 @@
|
||||
// 获取企业规模字典数据
|
||||
onLoad(async (options) => {
|
||||
// 初始化companyInfo
|
||||
companyInfo.value = { jobInfoList: [] };
|
||||
companyInfo.value = { jobList: [] };
|
||||
// 加载字典数据
|
||||
await dictStore.getDictData();
|
||||
|
||||
@@ -222,7 +219,7 @@
|
||||
companyInfo.value = JSON.parse(options.job);
|
||||
} catch (error) {
|
||||
console.error('Error parsing job data:', error);
|
||||
companyInfo.value = { jobInfoList: [] };
|
||||
companyInfo.value = { jobList: [] };
|
||||
}
|
||||
// 处理companyId参数
|
||||
} else if (options.companyId) {
|
||||
@@ -237,7 +234,7 @@
|
||||
getCompanyDetailsById(options.bussinessId);
|
||||
} else {
|
||||
console.warn('No valid parameters provided');
|
||||
companyInfo.value = { jobInfoList: [] };
|
||||
companyInfo.value = { jobList: [] };
|
||||
}
|
||||
});
|
||||
|
||||
@@ -273,6 +270,91 @@
|
||||
return '-';
|
||||
}
|
||||
}
|
||||
|
||||
// 根据experience值获取对应的文本
|
||||
function getExperienceLabel(experience) {
|
||||
if (experience === undefined || experience === null || experience === '') return '经验不限';
|
||||
|
||||
try {
|
||||
const experienceStr = String(experience);
|
||||
const label = dictStore.dictLabel('experience', experienceStr);
|
||||
if (!label) {
|
||||
const defaultExperienceMap = {
|
||||
'0': '经验不限',
|
||||
'1': '1年以内',
|
||||
'2': '1-3年',
|
||||
'3': '3-5年',
|
||||
'4': '5-10年',
|
||||
'5': '10年以上'
|
||||
};
|
||||
return defaultExperienceMap[experienceStr] || '经验不限';
|
||||
}
|
||||
return label;
|
||||
} catch (error) {
|
||||
console.error('获取经验标签失败:', error);
|
||||
return '经验不限';
|
||||
}
|
||||
}
|
||||
|
||||
// 根据education值获取对应的文本
|
||||
function getEducationLabel(education) {
|
||||
if (education === undefined || education === null || education === '') return '学历不限';
|
||||
|
||||
try {
|
||||
const educationStr = String(education);
|
||||
const label = dictStore.dictLabel('education', educationStr);
|
||||
if (!label) {
|
||||
const defaultEducationMap = {
|
||||
'-1': '学历不限',
|
||||
'1': '初中及以下',
|
||||
'2': '高中',
|
||||
'3': '中专',
|
||||
'4': '大专',
|
||||
'5': '本科',
|
||||
'6': '硕士',
|
||||
'7': '博士'
|
||||
};
|
||||
return defaultEducationMap[educationStr] || '学历不限';
|
||||
}
|
||||
return label;
|
||||
} catch (error) {
|
||||
console.error('获取学历标签失败:', error);
|
||||
return '学历不限';
|
||||
}
|
||||
}
|
||||
|
||||
// 格式化发布时间
|
||||
function formatPublishTime(publishTime) {
|
||||
if (!publishTime) return '';
|
||||
|
||||
try {
|
||||
const date = new Date(publishTime);
|
||||
const now = new Date();
|
||||
const diffTime = Math.abs(now - date);
|
||||
const diffDays = Math.ceil(diffTime / (1000 * 60 * 60 * 24));
|
||||
|
||||
if (diffDays === 1) {
|
||||
return '今天发布';
|
||||
} else if (diffDays <= 7) {
|
||||
return `${diffDays}天前发布`;
|
||||
} else {
|
||||
const year = date.getFullYear();
|
||||
const month = String(date.getMonth() + 1).padStart(2, '0');
|
||||
const day = String(date.getDate()).padStart(2, '0');
|
||||
return `${year}-${month}-${day}发布`;
|
||||
}
|
||||
} catch (error) {
|
||||
console.error('格式化发布时间失败:', error);
|
||||
return '';
|
||||
}
|
||||
}
|
||||
|
||||
// 跳转到职位详情页面
|
||||
function navToJobDetail(jobId) {
|
||||
if (jobId) {
|
||||
navTo(`/packageA/pages/post/post?jobId=${encodeURIComponent(jobId)}`);
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="stylus" scoped>
|
||||
@@ -420,24 +502,23 @@
|
||||
border-radius: 20rpx 20rpx 20rpx 20rpx;
|
||||
margin-top: 22rpx;
|
||||
padding-bottom: 18rpx;
|
||||
background: #f2f8fc;
|
||||
background: #FFFFFF;
|
||||
|
||||
.card-company {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: flex-start;
|
||||
border-bottom: 1rpx solid #c2d7ea;
|
||||
|
||||
.company {
|
||||
font-weight: 600;
|
||||
font-weight: 400;
|
||||
font-size: 32rpx;
|
||||
color: #207AC7;
|
||||
color: #333333;
|
||||
}
|
||||
|
||||
.salary {
|
||||
font-weight: 600;
|
||||
// font-weight: 600;
|
||||
font-size: 28rpx;
|
||||
color: #F83A3C;
|
||||
color: #1677FF;
|
||||
white-space: nowrap;
|
||||
line-height: 48rpx;
|
||||
}
|
||||
@@ -475,7 +556,7 @@
|
||||
.card-tags {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
margin: 25rpx 0 35rpx;
|
||||
margin: 25rpx 0 20rpx;
|
||||
|
||||
image {
|
||||
width: 24rpx;
|
||||
@@ -484,18 +565,18 @@
|
||||
}
|
||||
|
||||
.jy {
|
||||
background: #D9EDFF;
|
||||
color: #0086FF;
|
||||
background: #F5F5F5;
|
||||
color: #333333;
|
||||
}
|
||||
|
||||
.xl {
|
||||
background: #FFF1D5;
|
||||
color: #FF7F01;
|
||||
background: #F5F5F5;
|
||||
color: #333333;
|
||||
}
|
||||
|
||||
.yd {
|
||||
background: #FFD8D8;
|
||||
color: #F83A3C;
|
||||
background: #F5F5F5;
|
||||
color: #333333;
|
||||
}
|
||||
|
||||
.tag {
|
||||
@@ -514,6 +595,62 @@
|
||||
}
|
||||
}
|
||||
|
||||
.card-info {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
margin-bottom: 20rpx;
|
||||
flex-wrap: wrap;
|
||||
|
||||
.point3 {
|
||||
width: 12rpx;
|
||||
height: 12rpx;
|
||||
}
|
||||
|
||||
.company-address {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
font-weight: 400;
|
||||
font-size: 24rpx;
|
||||
color: #6C7282;
|
||||
line-height: 34rpx;
|
||||
flex: 1;
|
||||
min-width: 0;
|
||||
margin-right: 20rpx;
|
||||
|
||||
image {
|
||||
width: 24rpx;
|
||||
height: 24rpx;
|
||||
margin-right: 8rpx;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
text {
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
}
|
||||
}
|
||||
|
||||
.push-time {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
font-weight: 400;
|
||||
font-size: 24rpx;
|
||||
color: #6C7282;
|
||||
line-height: 34rpx;
|
||||
flex-shrink: 0;
|
||||
white-space: nowrap;
|
||||
|
||||
image {
|
||||
width: 24rpx;
|
||||
height: 24rpx;
|
||||
margin-right: 8rpx;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.card-bottom {
|
||||
margin-top: 32rpx;
|
||||
display: flex;
|
||||
|
||||
48
pages.json
48
pages.json
@@ -465,8 +465,7 @@
|
||||
{
|
||||
"path": "search/search",
|
||||
"style": {
|
||||
"navigationBarTitleText": "生涯规划",
|
||||
"navigationStyle": "custom"
|
||||
"navigationBarTitleText": "生涯规划"
|
||||
}
|
||||
},
|
||||
{
|
||||
@@ -502,36 +501,31 @@
|
||||
{
|
||||
"path": "userCenter/professionPath",
|
||||
"style": {
|
||||
"navigationBarTitleText": "职业路径",
|
||||
"navigationStyle": "custom"
|
||||
"navigationBarTitleText": "职业路径"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "userCenter/personDocument",
|
||||
"style": {
|
||||
"navigationBarTitleText": "生涯档案",
|
||||
"navigationStyle": "custom"
|
||||
"navigationBarTitleText": "生涯档案"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "userCenter/careerCompass",
|
||||
"style": {
|
||||
"navigationBarTitleText": "生涯罗盘",
|
||||
"navigationStyle": "custom"
|
||||
"navigationBarTitleText": "生涯罗盘"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "userCenter/learningPlan",
|
||||
"style": {
|
||||
"navigationBarTitleText": "学业规划",
|
||||
"navigationStyle": "custom"
|
||||
"navigationBarTitleText": "学业规划"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "userCenter/smartTarget",
|
||||
"style": {
|
||||
"navigationBarTitleText": "学业规划",
|
||||
"navigationStyle": "custom"
|
||||
"navigationBarTitleText": "学业规划"
|
||||
}
|
||||
},
|
||||
{
|
||||
@@ -543,71 +537,61 @@
|
||||
{
|
||||
"path": "pagesTest/testList",
|
||||
"style": {
|
||||
"navigationBarTitleText": "生涯测评",
|
||||
"navigationStyle": "custom"
|
||||
"navigationBarTitleText": "生涯测评"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pagesTest/customTestTitle",
|
||||
"style": {
|
||||
"navigationBarTitleText": "自定义测评",
|
||||
"navigationStyle": "custom"
|
||||
"navigationBarTitleText": "自定义测评"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pagesTest/interestTestTitle",
|
||||
"style": {
|
||||
"navigationBarTitleText": "职业兴趣测评",
|
||||
"navigationStyle": "custom"
|
||||
"navigationBarTitleText": "职业兴趣测评"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pagesTest/workValuesTestTitle",
|
||||
"style": {
|
||||
"navigationBarTitleText": "工作价值观测评",
|
||||
"navigationStyle": "custom"
|
||||
"navigationBarTitleText": "工作价值观测评"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pagesTest/personalTestTitle",
|
||||
"style": {
|
||||
"navigationBarTitleText": "人格测评",
|
||||
"navigationStyle": "custom"
|
||||
"navigationBarTitleText": "人格测评"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "testReport/workValuesTestReport",
|
||||
"style": {
|
||||
"navigationBarTitleText": "工作价值观测评报告",
|
||||
"navigationStyle": "custom"
|
||||
"navigationBarTitleText": "工作价值观测评报告"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "testReport/multipleAbilityTestReport",
|
||||
"style": {
|
||||
"navigationBarTitleText": "多元能力测评报告",
|
||||
"navigationStyle": "custom"
|
||||
"navigationBarTitleText": "多元能力测评报告"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "testReport/generalCareerTestReport",
|
||||
"style": {
|
||||
"navigationBarTitleText": "通用职业能力测评报告",
|
||||
"navigationStyle": "custom"
|
||||
"navigationBarTitleText": "通用职业能力测评报告"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "testReport/personalTestReport",
|
||||
"style": {
|
||||
"navigationBarTitleText": "人格测评报告",
|
||||
"navigationStyle": "custom"
|
||||
"navigationBarTitleText": "人格测评报告"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "testReport/interestTestReport",
|
||||
"style": {
|
||||
"navigationBarTitleText": "职业兴趣测评报告",
|
||||
"navigationStyle": "custom"
|
||||
"navigationBarTitleText": "职业兴趣测评报告"
|
||||
}
|
||||
}
|
||||
]
|
||||
|
||||
@@ -709,7 +709,31 @@ const handleServiceClick = (serviceType) => {
|
||||
|
||||
// 处理直播按钮点击
|
||||
const handleLiveClick = () => {
|
||||
$api.msg('该功能正在开发中');
|
||||
// #ifdef MP-WEIXIN
|
||||
const feedId = "sphKH1AEeLfTJJE";
|
||||
|
||||
// 使用微信原生 API 打开视频号主页
|
||||
if (typeof wx !== "undefined" && wx.openChannelsUserProfile) {
|
||||
wx.openChannelsUserProfile({
|
||||
finderUserName: feedId,
|
||||
success: (res) => {
|
||||
console.log("打开视频号成功", res);
|
||||
},
|
||||
fail: (err) => {
|
||||
console.error("打开视频号失败", err);
|
||||
$api.msg(err.errMsg || "无法打开直播,请稍后重试");
|
||||
},
|
||||
});
|
||||
} else {
|
||||
// 如果 API 不存在,提示用户更新微信版本
|
||||
$api.msg("请更新微信版本以使用该功能");
|
||||
}
|
||||
// #endif
|
||||
|
||||
// #ifndef MP-WEIXIN
|
||||
// 非微信小程序环境提示
|
||||
$api.msg("该功能仅在微信小程序中可用");
|
||||
// #endif
|
||||
};
|
||||
|
||||
// 跳转到测试页面
|
||||
|
||||
Reference in New Issue
Block a user