Compare commits
10 Commits
1de0bacebf
...
yxl
| Author | SHA1 | Date | |
|---|---|---|---|
| a8a9d792a3 | |||
|
|
7634a24c3a | ||
|
|
a128926c21 | ||
|
|
3387ea8dbc | ||
|
|
05105488bd | ||
|
|
910862cb5f | ||
|
|
fb88fdbb89 | ||
| c3d26cdd54 | |||
| b030d45d49 | |||
| a45b247496 |
@@ -7,9 +7,19 @@
|
|||||||
import request from '@/utilsRc/request'
|
import request from '@/utilsRc/request'
|
||||||
|
|
||||||
// 获取技能信息
|
// 获取技能信息
|
||||||
export function getSkill(query) {
|
export function getCareerPath(query) {
|
||||||
return request({
|
return request({
|
||||||
url: '/jobSkillDet/getJobSkillWeight',
|
url: '/jobPath/getJobPathJobList',
|
||||||
|
method: 'get',
|
||||||
|
params: query,
|
||||||
|
baseUrlType: 'zytp'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 获取技能信息
|
||||||
|
export function getSkillResult(query) {
|
||||||
|
return request({
|
||||||
|
url: '/jobDimScore/getJobDimScoreList',
|
||||||
method: 'get',
|
method: 'get',
|
||||||
params: query,
|
params: query,
|
||||||
baseUrlType: 'zytp'
|
baseUrlType: 'zytp'
|
||||||
|
|||||||
@@ -59,7 +59,7 @@ const generateTabbarList = () => {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
id: 2,
|
id: 2,
|
||||||
text: 'AI+',
|
text: '智能客服',
|
||||||
path: '/pages/chat/chat',
|
path: '/pages/chat/chat',
|
||||||
iconPath: '/static/tabbar/logo3.png',
|
iconPath: '/static/tabbar/logo3.png',
|
||||||
selectedIconPath: '/static/tabbar/logo3.png',
|
selectedIconPath: '/static/tabbar/logo3.png',
|
||||||
@@ -175,7 +175,8 @@ const switchTab = (item, index) => {
|
|||||||
const loginRequiredPages = [
|
const loginRequiredPages = [
|
||||||
'/packageA/pages/job/publishJob',
|
'/packageA/pages/job/publishJob',
|
||||||
'/pages/mine/mine',
|
'/pages/mine/mine',
|
||||||
'/pages/mine/company-mine'
|
'/pages/mine/company-mine',
|
||||||
|
'/pages/msglog/msglog'
|
||||||
];
|
];
|
||||||
|
|
||||||
if (loginRequiredPages.includes(item.path)) {
|
if (loginRequiredPages.includes(item.path)) {
|
||||||
@@ -279,7 +280,7 @@ onMounted(() => {
|
|||||||
bottom: 0;
|
bottom: 0;
|
||||||
left: 0;
|
left: 0;
|
||||||
right: 0;
|
right: 0;
|
||||||
height: 88rpx;
|
height: 100rpx;
|
||||||
background-color: #ffffff;
|
background-color: #ffffff;
|
||||||
border-top: 1rpx solid #e5e5e5;
|
border-top: 1rpx solid #e5e5e5;
|
||||||
display: flex;
|
display: flex;
|
||||||
@@ -306,8 +307,8 @@ onMounted(() => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.tabbar-icon {
|
.tabbar-icon {
|
||||||
width: 44rpx;
|
width: 50rpx;
|
||||||
height: 44rpx;
|
height: 50rpx;
|
||||||
margin-bottom: 4rpx;
|
margin-bottom: 4rpx;
|
||||||
position: relative;
|
position: relative;
|
||||||
}
|
}
|
||||||
@@ -318,7 +319,7 @@ onMounted(() => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.tabbar-text {
|
.tabbar-text {
|
||||||
font-size: 20rpx;
|
font-size: 22rpx;
|
||||||
line-height: 1;
|
line-height: 1;
|
||||||
transition: color 0.3s ease;
|
transition: color 0.3s ease;
|
||||||
}
|
}
|
||||||
@@ -332,14 +333,14 @@ onMounted(() => {
|
|||||||
position: absolute;
|
position: absolute;
|
||||||
top: 4rpx;
|
top: 4rpx;
|
||||||
right: 20rpx;
|
right: 20rpx;
|
||||||
min-width: 30rpx;
|
min-width: 32rpx;
|
||||||
height: 30rpx;
|
height: 32rpx;
|
||||||
background-color: #ff4444;
|
background-color: #ff4444;
|
||||||
color: #fff;
|
color: #fff;
|
||||||
font-size: 18rpx;
|
font-size: 19rpx;
|
||||||
border-radius: 15rpx;
|
border-radius: 16rpx;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
line-height: 30rpx;
|
line-height: 32rpx;
|
||||||
padding: 0 10rpx;
|
padding: 0 10rpx;
|
||||||
transform: scale(0.8);
|
transform: scale(0.8);
|
||||||
}
|
}
|
||||||
@@ -347,8 +348,8 @@ onMounted(() => {
|
|||||||
/* 中间按钮特殊样式 */
|
/* 中间按钮特殊样式 */
|
||||||
.tabbar-item:has(.center-item) {
|
.tabbar-item:has(.center-item) {
|
||||||
.tabbar-icon {
|
.tabbar-icon {
|
||||||
width: 60rpx;
|
width: 68rpx;
|
||||||
height: 60rpx;
|
height: 68rpx;
|
||||||
margin-bottom: 0;
|
margin-bottom: 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -775,7 +775,8 @@ ol {
|
|||||||
|
|
||||||
/* 为v-html生成的a.custom-card标签添加基础样式 */
|
/* 为v-html生成的a.custom-card标签添加基础样式 */
|
||||||
a.custom-card {
|
a.custom-card {
|
||||||
display: block !important;
|
display: flex !important;
|
||||||
|
flex-direction: column !important;
|
||||||
margin-bottom: 22rpx !important;
|
margin-bottom: 22rpx !important;
|
||||||
background: #FFFFFF !important;
|
background: #FFFFFF !important;
|
||||||
box-shadow: 0rpx 0rpx 8rpx 0rpx rgba(0,0,0,0.04) !important;
|
box-shadow: 0rpx 0rpx 8rpx 0rpx rgba(0,0,0,0.04) !important;
|
||||||
@@ -787,7 +788,8 @@ ol {
|
|||||||
text-decoration: none !important;
|
text-decoration: none !important;
|
||||||
overflow: hidden !important;
|
overflow: hidden !important;
|
||||||
box-sizing: border-box !important;
|
box-sizing: border-box !important;
|
||||||
width: 100% !important;
|
width: calc(100% - 0rpx) !important;
|
||||||
|
max-width: 100% !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* 卡片标题样式 */
|
/* 卡片标题样式 */
|
||||||
|
|||||||
@@ -6,8 +6,8 @@
|
|||||||
*/
|
*/
|
||||||
export default {
|
export default {
|
||||||
// baseUrl: 'http://39.98.44.136:8080', // 测试
|
// baseUrl: 'http://39.98.44.136:8080', // 测试
|
||||||
// baseUrl: 'https://www.xjksly.cn/api/ks', // 正式环境
|
baseUrl: 'https://www.xjksly.cn/api/ks', // 正式环境
|
||||||
baseUrl: 'http://ks.zhaopinzao8dian.com/api/ks', // 测试
|
// baseUrl: 'http://ks.zhaopinzao8dian.com/api/ks', // 测试
|
||||||
|
|
||||||
// LCBaseUrl:'http://10.110.145.145:9100',//内网端口
|
// LCBaseUrl:'http://10.110.145.145:9100',//内网端口
|
||||||
// LCBaseUrlInner:'http://10.110.145.145:10100',//招聘、培训、帮扶
|
// LCBaseUrlInner:'http://10.110.145.145:10100',//招聘、培训、帮扶
|
||||||
|
|||||||
4
main.js
4
main.js
@@ -9,6 +9,7 @@ import globalFunction from '@/common/globalFunction'
|
|||||||
import '@/lib/string-similarity.min.js'
|
import '@/lib/string-similarity.min.js'
|
||||||
import similarityJobs from '@/utils/similarity_Job.js';
|
import similarityJobs from '@/utils/similarity_Job.js';
|
||||||
import config from '@/config.js';
|
import config from '@/config.js';
|
||||||
|
import shareMixin from './mixins/share.js';
|
||||||
// 组件
|
// 组件
|
||||||
import AppLayout from './components/AppLayout/AppLayout.vue';
|
import AppLayout from './components/AppLayout/AppLayout.vue';
|
||||||
import Empty from './components/empty/empty.vue';
|
import Empty from './components/empty/empty.vue';
|
||||||
@@ -36,6 +37,9 @@ import { getDict } from '@/apiRc/system/dict.js';
|
|||||||
export function createApp() {
|
export function createApp() {
|
||||||
const app = createSSRApp(App)
|
const app = createSSRApp(App)
|
||||||
|
|
||||||
|
// 注册全局分享混入
|
||||||
|
app.mixin(shareMixin)
|
||||||
|
|
||||||
app.component('AppLayout', AppLayout)
|
app.component('AppLayout', AppLayout)
|
||||||
app.component('Empty', Empty)
|
app.component('Empty', Empty)
|
||||||
app.component('NoBouncePage', NoBouncePage)
|
app.component('NoBouncePage', NoBouncePage)
|
||||||
|
|||||||
16
mixins/share.js
Normal file
16
mixins/share.js
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
export default {
|
||||||
|
onShareAppMessage() {
|
||||||
|
return {
|
||||||
|
title: '喀什智慧就业平台',
|
||||||
|
path: '/pages/index/index',
|
||||||
|
imageUrl: ''
|
||||||
|
};
|
||||||
|
},
|
||||||
|
onShareTimeline() {
|
||||||
|
return {
|
||||||
|
title: '喀什智慧就业平台',
|
||||||
|
path: '/pages/index/index',
|
||||||
|
imageUrl: ''
|
||||||
|
};
|
||||||
|
}
|
||||||
|
};
|
||||||
@@ -32,9 +32,9 @@
|
|||||||
|
|
||||||
<!-- 控制栏 -->
|
<!-- 控制栏 -->
|
||||||
<view class="controls">
|
<view class="controls">
|
||||||
<!-- <text @click="togglePlay">{{ isPlaying ? '暂停' : '播放' }}</text>
|
<!-- <view class="control-text" @click="togglePlay">{{ isPlaying ? '暂停' : '播放' }}</view>
|
||||||
<text @click="toggleFullScreen">{{ isFullScreen ? '退出全屏' : '全屏' }}</text> -->
|
<view class="control-text" @click="toggleFullScreen">{{ isFullScreen ? '退出全屏' : '全屏' }}</view> -->
|
||||||
<text @click="close">关闭</text>
|
<view class="control-text" @click="close">关闭</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
@@ -180,7 +180,7 @@ defineExpose({ open });
|
|||||||
justify-content: space-around;
|
justify-content: space-around;
|
||||||
}
|
}
|
||||||
|
|
||||||
.controls text {
|
.controls .control-text {
|
||||||
color: #fff;
|
color: #fff;
|
||||||
font-size: 24rpx;
|
font-size: 24rpx;
|
||||||
padding: 8rpx 16rpx;
|
padding: 8rpx 16rpx;
|
||||||
|
|||||||
@@ -241,7 +241,7 @@
|
|||||||
import point from '@/static/icon/point.png';
|
import point from '@/static/icon/point.png';
|
||||||
import VideoPlayer from './component/videoPlayer.vue';
|
import VideoPlayer from './component/videoPlayer.vue';
|
||||||
import { reactive, inject, watch, ref, onMounted, computed } from 'vue';
|
import { reactive, inject, watch, ref, onMounted, computed } from 'vue';
|
||||||
import { onLoad, onShow, onHide } from '@dcloudio/uni-app';
|
import { onLoad, onShow, onHide, onShareAppMessage, onShareTimeline } from '@dcloudio/uni-app';
|
||||||
import dictLabel from '@/components/dict-Label/dict-Label.vue';
|
import dictLabel from '@/components/dict-Label/dict-Label.vue';
|
||||||
import RadarMap from './component/radarMap.vue';
|
import RadarMap from './component/radarMap.vue';
|
||||||
import { storeToRefs } from 'pinia';
|
import { storeToRefs } from 'pinia';
|
||||||
@@ -364,10 +364,10 @@ function getCompanyIsAJobs(companyId) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function getTextWidth(text, size = 12) {
|
function getTextWidth(text, size = 12) {
|
||||||
const canvas = document.createElement('canvas');
|
// 在小程序环境中,document 对象不存在,使用估算方法
|
||||||
const context = canvas.getContext('2d');
|
// 简单估算:每个字符大约占 8px 宽度
|
||||||
context.font = `${12}px Arial`;
|
const estimatedWidth = text.length * 8;
|
||||||
return -(context.measureText(text).width / 2) - 20; // 计算文字中心点
|
return -(estimatedWidth / 2) - 20; // 计算文字中心点
|
||||||
}
|
}
|
||||||
|
|
||||||
function getCompetivetuveness(jobId) {
|
function getCompetivetuveness(jobId) {
|
||||||
|
|||||||
@@ -39,7 +39,7 @@
|
|||||||
{
|
{
|
||||||
"path": "pages/chat/chat",
|
"path": "pages/chat/chat",
|
||||||
"style": {
|
"style": {
|
||||||
"navigationBarTitleText": "AI+",
|
"navigationBarTitleText": "智能客服",
|
||||||
"navigationBarBackgroundColor": "#4778EC",
|
"navigationBarBackgroundColor": "#4778EC",
|
||||||
"navigationBarTextStyle": "white",
|
"navigationBarTextStyle": "white",
|
||||||
"enablePullDownRefresh": false
|
"enablePullDownRefresh": false
|
||||||
|
|||||||
@@ -61,6 +61,7 @@
|
|||||||
<view class="main-header">
|
<view class="main-header">
|
||||||
<image src="/static/icon/Hamburger-button.png" @click="toggleDrawer"></image>
|
<image src="/static/icon/Hamburger-button.png" @click="toggleDrawer"></image>
|
||||||
<view class="title">{{ config.appInfo.areaName }}岗位推荐</view>
|
<view class="title">{{ config.appInfo.areaName }}岗位推荐</view>
|
||||||
|
<!-- <view class="title">智能客服</view> -->
|
||||||
<image src="/static/icon/Comment-one.png" @click="addNewDialogue"></image>
|
<image src="/static/icon/Comment-one.png" @click="addNewDialogue"></image>
|
||||||
</view>
|
</view>
|
||||||
</header>
|
</header>
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<view class="app-container">
|
<view class="app-container" @touchstart="handleTouchStart" @touchmove="handleTouchMove">
|
||||||
<!-- #ifdef MP-WEIXIN -->
|
<!-- #ifdef MP-WEIXIN -->
|
||||||
<!-- 小程序背景图片 -->
|
<!-- 小程序背景图片 -->
|
||||||
<image class="mp-background" src="/static/icon/background2.png" mode="aspectFill"></image>
|
<image class="mp-background" src="/static/icon/background2.png" mode="aspectFill"></image>
|
||||||
@@ -136,12 +136,7 @@
|
|||||||
</view>
|
</view>
|
||||||
<view class="service-title">虚拟面试</view>
|
<view class="service-title">虚拟面试</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="service-item press-button" style="justify-content:normal" @click="goRc()">
|
|
||||||
<view class="service-icon service-icon-9">
|
|
||||||
<IconfontIcon name="Graduation-simple-" :size="32" color="#FFFFFF" />
|
|
||||||
</view>
|
|
||||||
<view class="service-title" style="overflow:unset">高校毕业生<br/>智慧就业服务</view>
|
|
||||||
</view>
|
|
||||||
<view class="service-item press-button" @click="handleServiceClick('career-planning')">
|
<view class="service-item press-button" @click="handleServiceClick('career-planning')">
|
||||||
<view class="service-icon service-icon-11">
|
<view class="service-icon service-icon-11">
|
||||||
<image class="service-icon-img" src="/static/icon/antOutline.png" mode="aspectFit"></image>
|
<image class="service-icon-img" src="/static/icon/antOutline.png" mode="aspectFit"></image>
|
||||||
@@ -185,6 +180,12 @@
|
|||||||
</view>
|
</view>
|
||||||
<view class="service-title">评价机构信息</view>
|
<view class="service-title">评价机构信息</view>
|
||||||
</view>
|
</view>
|
||||||
|
<view class="service-item press-button" style="justify-content:normal" @click="goRc()">
|
||||||
|
<view class="service-icon service-icon-9">
|
||||||
|
<IconfontIcon name="Graduation-simple-" :size="32" color="#FFFFFF" />
|
||||||
|
</view>
|
||||||
|
<view class="service-title" style="overflow:unset">高校毕业生<br/>智慧就业服务</view>
|
||||||
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<!-- #endif -->
|
<!-- #endif -->
|
||||||
</view>
|
</view>
|
||||||
@@ -229,7 +230,7 @@
|
|||||||
|
|
||||||
|
|
||||||
<view class="nav-filter" :class="{ 'sticky-filter': shouldStickyFilter }" v-if="shouldShowJobSeekerContent">
|
<view class="nav-filter" :class="{ 'sticky-filter': shouldStickyFilter }" v-if="shouldShowJobSeekerContent">
|
||||||
<view class="filter-top" @touchmove.stop.prevent>
|
<view class="filter-top">
|
||||||
<scroll-view :scroll-x="true" :show-scrollbar="false" class="tab-scroll">
|
<scroll-view :scroll-x="true" :show-scrollbar="false" class="tab-scroll">
|
||||||
<view class="jobs-left">
|
<view class="jobs-left">
|
||||||
<view
|
<view
|
||||||
@@ -286,7 +287,6 @@
|
|||||||
@scrolltolower="scrollBottom"
|
@scrolltolower="scrollBottom"
|
||||||
:enable-back-to-top="false"
|
:enable-back-to-top="false"
|
||||||
:scroll-with-animation="false"
|
:scroll-with-animation="false"
|
||||||
@touchmove.stop.prevent
|
|
||||||
>
|
>
|
||||||
<view class="falls" v-if="list.length">
|
<view class="falls" v-if="list.length">
|
||||||
<!-- #ifdef MP-WEIXIN -->
|
<!-- #ifdef MP-WEIXIN -->
|
||||||
@@ -567,10 +567,48 @@ const lastScrollTop = ref(0);
|
|||||||
const scrollTop = ref(0);
|
const scrollTop = ref(0);
|
||||||
// 当用户与筛选/导航交互时,临时锁定头部显示状态,避免因数据刷新导致回弹显示
|
// 当用户与筛选/导航交互时,临时锁定头部显示状态,避免因数据刷新导致回弹显示
|
||||||
const isInteractingWithFilter = ref(false);
|
const isInteractingWithFilter = ref(false);
|
||||||
|
// 触摸事件状态
|
||||||
|
const touchStartY = ref(0);
|
||||||
|
const touchMoveY = ref(0);
|
||||||
// 滚动阈值配置
|
// 滚动阈值配置
|
||||||
const HIDE_THRESHOLD = 50; // 隐藏顶部区域的滚动阈值(降低阈值,更容易触发)
|
const HIDE_THRESHOLD = 50; // 隐藏顶部区域的滚动阈值(降低阈值,更容易触发)
|
||||||
const SHOW_THRESHOLD = 5; // 显示顶部区域的滚动阈值(接近顶部)
|
const SHOW_THRESHOLD = 5; // 显示顶部区域的滚动阈值(接近顶部)
|
||||||
const STICKY_THRESHOLD = 80; // 筛选区域吸顶的滚动阈值
|
const STICKY_THRESHOLD = 80; // 筛选区域吸顶的滚动阈值
|
||||||
|
const TOUCH_MOVE_THRESHOLD = 30; // 触摸滑动阈值,用于判断是否为有效滑动
|
||||||
|
|
||||||
|
// 处理触摸开始事件
|
||||||
|
function handleTouchStart(e) {
|
||||||
|
// 记录触摸起始位置
|
||||||
|
touchStartY.value = e.touches[0].clientY;
|
||||||
|
}
|
||||||
|
|
||||||
|
// 处理触摸移动事件
|
||||||
|
function handleTouchMove(e) {
|
||||||
|
// 记录触摸移动位置
|
||||||
|
touchMoveY.value = e.touches[0].clientY;
|
||||||
|
|
||||||
|
// 计算滑动距离
|
||||||
|
const diffY = touchStartY.value - touchMoveY.value;
|
||||||
|
|
||||||
|
// 当向上滑动超过阈值时,隐藏顶部区域
|
||||||
|
if (diffY > TOUCH_MOVE_THRESHOLD) {
|
||||||
|
if (!shouldHideTop.value) {
|
||||||
|
shouldHideTop.value = true;
|
||||||
|
}
|
||||||
|
if (!shouldStickyFilter.value) {
|
||||||
|
shouldStickyFilter.value = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// 当向下滑动超过阈值且在顶部附近时,显示顶部区域
|
||||||
|
else if (diffY < -TOUCH_MOVE_THRESHOLD && scrollTop.value <= SHOW_THRESHOLD) {
|
||||||
|
if (shouldHideTop.value && !isInteractingWithFilter.value) {
|
||||||
|
shouldHideTop.value = false;
|
||||||
|
}
|
||||||
|
if (shouldStickyFilter.value) {
|
||||||
|
shouldStickyFilter.value = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// 简化的滚动处理函数
|
// 简化的滚动处理函数
|
||||||
function handleScroll(e) {
|
function handleScroll(e) {
|
||||||
@@ -1511,10 +1549,10 @@ defineExpose({ loadData });
|
|||||||
color: #256BFA
|
color: #256BFA
|
||||||
// 服务功能网格样式
|
// 服务功能网格样式
|
||||||
.service-grid
|
.service-grid
|
||||||
padding: 20rpx 28rpx
|
padding: 10rpx 28rpx
|
||||||
display: grid
|
display: grid
|
||||||
grid-template-columns: 1fr 1fr 1fr 1fr
|
grid-template-columns: 1fr 1fr 1fr 1fr
|
||||||
grid-gap: 20rpx
|
grid-gap: 10rpx
|
||||||
.service-item
|
.service-item
|
||||||
display: flex
|
display: flex
|
||||||
flex-direction: column
|
flex-direction: column
|
||||||
@@ -1522,12 +1560,12 @@ defineExpose({ loadData });
|
|||||||
justify-content: center
|
justify-content: center
|
||||||
height: 120rpx
|
height: 120rpx
|
||||||
background: transparent
|
background: transparent
|
||||||
padding: 10px 0px
|
padding: 2rpx 0px
|
||||||
.service-icon
|
.service-icon
|
||||||
width: 88rpx
|
width: 62rpx
|
||||||
height: 88rpx
|
height: 62rpx
|
||||||
border-radius: 12rpx
|
border-radius: 10rpx
|
||||||
margin-bottom: 8rpx
|
margin-bottom: 14rpx
|
||||||
flex-shrink: 0
|
flex-shrink: 0
|
||||||
.service-icon-1
|
.service-icon-1
|
||||||
background: linear-gradient(180deg, #FF8E8E 0%, #E53E3E 100%)
|
background: linear-gradient(180deg, #FF8E8E 0%, #E53E3E 100%)
|
||||||
|
|||||||
@@ -43,30 +43,47 @@ const store = useSkillDevelopmentStore();
|
|||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<div v-if="store.careerPaths.length" class="content-section career-section">
|
||||||
<div class="content-section">
|
<div class="section-title">
|
||||||
|
<span class="title-text">职业路径</span>
|
||||||
|
</div>
|
||||||
|
<div class="">
|
||||||
|
<scroll-view scroll-x>
|
||||||
|
<div class="career-paths">
|
||||||
|
<template v-for="(item, index) in store.careerPaths" :key="item.label">
|
||||||
|
<div
|
||||||
|
:class="{ 'career-active': store.currentCareer && store.currentCareer.value === item.value }"
|
||||||
|
class="career-path-item"
|
||||||
|
@click="store.eventResult(index)"
|
||||||
|
>
|
||||||
|
<div
|
||||||
|
class="career-index"
|
||||||
|
>
|
||||||
|
<span class="index">{{ item.index }}</span>
|
||||||
|
</div>
|
||||||
|
<div class="career-label">{{ item.label }}</div>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
</div>
|
||||||
|
</scroll-view>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div v-if="store.careerPaths.length" class="content-section">
|
||||||
<div class="section-title">
|
<div class="section-title">
|
||||||
<uni-icons color="#000000" size="18" type="person-filled"></uni-icons>
|
<uni-icons color="#000000" size="18" type="person-filled"></uni-icons>
|
||||||
<span class="title-text">技能发展路径</span>
|
<span class="title-text">{{ store.currentCareerLabel }}技能</span>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="intro-text">
|
|
||||||
基于您的当前职业和目标职业,以下是您需要重点发展的技能:
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="skill-list">
|
<div class="skill-list">
|
||||||
<div v-if="store.result.length === 0" class="empty-text">暂无数据</div>
|
<div v-if="store.result.length === 0" class="empty-text">暂无数据</div>
|
||||||
<div v-for="(skill, index) in store.result" v-else :key="index" class="skill-item">
|
<div v-for="(item, index) in store.result" :key="index" class="skill-card">
|
||||||
<div class="skill-header">
|
<div class="skill-label">{{ item.label }}</div>
|
||||||
<span class="skill-name">{{ skill.name }}</span>
|
<div class="skill-detail">
|
||||||
<div class="skill-info">
|
<div v-for="d in item.children" :key="d.label" class="skill-detail-item">
|
||||||
<span class="skill-score">技能分数: {{ skill.score }}</span>
|
<div class="skill-detail-item-label">{{ d.label }}</div>
|
||||||
<span class="skill-weight">权重: {{ skill.weight }}</span>
|
<div class="skill-detail-item-value">
|
||||||
</div>
|
<div class="value-item">技能得分:{{ d.value }}</div>
|
||||||
</div>
|
<div class="value-item">权重:{{ d.weight }}</div>
|
||||||
<div v-if="skill.tags && skill.tags.length > 0" class="skill-tags">
|
</div>
|
||||||
<div v-for="(tag, tagIndex) in skill.tags" :key="tagIndex" class="skill-tag">
|
|
||||||
{{ tag }}
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -98,6 +115,7 @@ const store = useSkillDevelopmentStore();
|
|||||||
background-color: #FFFFFF;
|
background-color: #FFFFFF;
|
||||||
border-radius: 16rpx;
|
border-radius: 16rpx;
|
||||||
padding: 28rpx;
|
padding: 28rpx;
|
||||||
|
margin-bottom: 20rpx;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
overflow: visible;
|
overflow: visible;
|
||||||
box-shadow: 0 4rpx 12rpx rgba(0, 0, 0, 0.08);
|
box-shadow: 0 4rpx 12rpx rgba(0, 0, 0, 0.08);
|
||||||
@@ -135,6 +153,7 @@ const store = useSkillDevelopmentStore();
|
|||||||
button::after {
|
button::after {
|
||||||
border: none;
|
border: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
.section-title {
|
.section-title {
|
||||||
font-size: 32rpx;
|
font-size: 32rpx;
|
||||||
color: #000000;
|
color: #000000;
|
||||||
@@ -148,115 +167,189 @@ button::after {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.career-paths {
|
||||||
|
display: grid;
|
||||||
|
grid-auto-flow: column;
|
||||||
|
gap: 20px;
|
||||||
|
padding-bottom: 10px;
|
||||||
|
|
||||||
|
.career-path-item {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
align-items: center;
|
||||||
|
width: 80px;
|
||||||
|
padding: 5px;
|
||||||
|
font-weight: 700;
|
||||||
|
cursor: pointer;
|
||||||
|
|
||||||
|
.career-index {
|
||||||
|
position: relative;
|
||||||
|
display: flex;
|
||||||
|
justify-content: center;
|
||||||
|
align-items: center;
|
||||||
|
width: 48px;
|
||||||
|
height: 48px;
|
||||||
|
font-size: 20px;
|
||||||
|
color: #fff;
|
||||||
|
border-radius: 50%;
|
||||||
|
|
||||||
|
.index {
|
||||||
|
position: relative;
|
||||||
|
z-index: 10;
|
||||||
|
}
|
||||||
|
|
||||||
|
&:before,
|
||||||
|
&:after {
|
||||||
|
content: '';
|
||||||
|
position: absolute;
|
||||||
|
}
|
||||||
|
|
||||||
|
&:before {
|
||||||
|
inset: 0;
|
||||||
|
z-index: 1;
|
||||||
|
background: #6c64e7;
|
||||||
|
border: 3px solid #fff;
|
||||||
|
border-radius: 50%;
|
||||||
|
box-shadow: 0 1px 5px rgba(0, 0, 0, 0.3);
|
||||||
|
}
|
||||||
|
|
||||||
|
&:after {
|
||||||
|
content: '';
|
||||||
|
position: absolute;
|
||||||
|
top: 50%;
|
||||||
|
right: 50%;
|
||||||
|
z-index: 0;
|
||||||
|
width: 100px;
|
||||||
|
border-bottom: 4px solid #ccc;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.career-label {
|
||||||
|
margin-top: 10px;
|
||||||
|
font-size: 16px;
|
||||||
|
text-align: center;
|
||||||
|
color: #6c64e7;
|
||||||
|
}
|
||||||
|
|
||||||
|
&.career-active {
|
||||||
|
.career-index {
|
||||||
|
&:before {
|
||||||
|
background: #22c55e;
|
||||||
|
}
|
||||||
|
&:after {
|
||||||
|
border-color: #22c55e;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.career-label {
|
||||||
|
color: #000;
|
||||||
|
}
|
||||||
|
|
||||||
|
& + .career-path-item {
|
||||||
|
.career-index {
|
||||||
|
&:after {
|
||||||
|
border-color: #22c55e;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
&:first-child {
|
||||||
|
.career-index {
|
||||||
|
font-size: 16px;
|
||||||
|
|
||||||
|
&:after {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
&:last-child {
|
||||||
|
.career-index {
|
||||||
|
font-size: 16px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
</style>
|
||||||
|
|
||||||
|
<style lang="scss" scoped>
|
||||||
.title-text {
|
.title-text {
|
||||||
font-size: 32rpx;
|
font-size: 32rpx;
|
||||||
font-weight: 600;
|
font-weight: 600;
|
||||||
color: #167CF1;
|
color: #167CF1;
|
||||||
}
|
}
|
||||||
|
|
||||||
.intro-text {
|
.skill-card {
|
||||||
font-size: 24rpx;
|
margin-bottom: 14px;
|
||||||
line-height: 34rpx;
|
|
||||||
color: rgba(154, 154, 154, 1);
|
|
||||||
text-align: left;
|
|
||||||
font-family: 'PingFangSC-Bold', 'PingFang SC', 'Helvetica Neue', Helvetica, Arial, 'Microsoft YaHei', sans-serif;
|
|
||||||
font-weight: 600;
|
|
||||||
margin-bottom: 90rpx;
|
|
||||||
width: 672rpx;
|
|
||||||
}
|
|
||||||
|
|
||||||
.skill-list {
|
|
||||||
display: flex;
|
|
||||||
flex-direction: column;
|
|
||||||
gap: 20rpx;
|
|
||||||
}
|
|
||||||
|
|
||||||
.skill-item {
|
|
||||||
width: 100%;
|
|
||||||
max-width: 796rpx;
|
|
||||||
min-height: 162rpx;
|
|
||||||
line-height: 40rpx;
|
|
||||||
border-radius: 20rpx;
|
|
||||||
background-color: rgba(239, 239, 239, 1);
|
|
||||||
color: rgba(16, 16, 16, 1);
|
|
||||||
font-size: 28rpx;
|
|
||||||
text-align: center;
|
|
||||||
padding: 24rpx;
|
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
display: flex;
|
font-weight: 700;
|
||||||
flex-direction: column;
|
|
||||||
justify-content: center;
|
.skill-list {
|
||||||
overflow: visible;
|
display: flex;
|
||||||
position: relative;
|
flex-direction: column;
|
||||||
|
gap: 20rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.skill-item {
|
||||||
|
width: 100%;
|
||||||
|
max-width: 796rpx;
|
||||||
|
min-height: 162rpx;
|
||||||
|
line-height: 40rpx;
|
||||||
|
border-radius: 20rpx;
|
||||||
|
background-color: rgba(239, 239, 239, 1);
|
||||||
|
color: rgba(16, 16, 16, 1);
|
||||||
|
font-size: 28rpx;
|
||||||
|
text-align: center;
|
||||||
|
padding: 24rpx;
|
||||||
|
box-sizing: border-box;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
justify-content: center;
|
||||||
|
overflow: visible;
|
||||||
|
position: relative;
|
||||||
|
}
|
||||||
|
|
||||||
|
.skill-label {
|
||||||
|
margin-bottom: 10px;
|
||||||
|
font-size: 16px;
|
||||||
|
color: #94a3b8;
|
||||||
|
}
|
||||||
|
|
||||||
|
.skill-detail {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
gap: 8px;
|
||||||
|
|
||||||
|
.skill-detail-item {
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-between;
|
||||||
|
align-items: center;
|
||||||
|
padding: 8px;
|
||||||
|
border-radius: 3px;
|
||||||
|
background: #c1d2ea;
|
||||||
|
}
|
||||||
|
|
||||||
|
.skill-detail-item-label {
|
||||||
|
width: 55%;
|
||||||
|
word-wrap: break-word;
|
||||||
|
white-space: pre-wrap;
|
||||||
|
word-break: break-all;
|
||||||
|
color: #334155;
|
||||||
|
}
|
||||||
|
|
||||||
|
.skill-detail-item-value {
|
||||||
|
width: 45%;
|
||||||
|
padding-left: 6px;
|
||||||
|
color: #4f46e5;
|
||||||
|
box-sizing: border-box;
|
||||||
|
|
||||||
|
.value-item {
|
||||||
|
text-wrap: nowrap;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.skill-header {
|
|
||||||
display: flex;
|
|
||||||
justify-content: space-between;
|
|
||||||
align-items: center;
|
|
||||||
margin-bottom: 16rpx;
|
|
||||||
width: 100%;
|
|
||||||
box-sizing: border-box;
|
|
||||||
}
|
|
||||||
|
|
||||||
.skill-name {
|
|
||||||
font-size: 32rpx;
|
|
||||||
line-height: 46rpx;
|
|
||||||
color: rgb(16, 16, 16);
|
|
||||||
text-align: left;
|
|
||||||
font-family: 'PingFangSC-Bold', 'PingFang SC', 'Helvetica Neue', Helvetica, Arial, 'Microsoft YaHei', sans-serif;
|
|
||||||
font-weight: 600;
|
|
||||||
flex: 1;
|
|
||||||
min-width: 0;
|
|
||||||
overflow: hidden;
|
|
||||||
text-overflow: ellipsis;
|
|
||||||
white-space: nowrap;
|
|
||||||
}
|
|
||||||
|
|
||||||
.skill-info {
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
gap: 12rpx;
|
|
||||||
flex-shrink: 0;
|
|
||||||
margin-left: 16rpx;
|
|
||||||
}
|
|
||||||
|
|
||||||
.skill-score {
|
|
||||||
font-size: 24rpx;
|
|
||||||
line-height: 34rpx;
|
|
||||||
border-radius: 10rpx;
|
|
||||||
background-color: rgba(49, 100, 239, 0.1);
|
|
||||||
color: rgba(44, 101, 247, 1);
|
|
||||||
text-align: center;
|
|
||||||
padding: 6rpx 12rpx;
|
|
||||||
white-space: nowrap;
|
|
||||||
}
|
|
||||||
|
|
||||||
.skill-weight {
|
|
||||||
font-size: 24rpx;
|
|
||||||
line-height: 34rpx;
|
|
||||||
border-radius: 10rpx;
|
|
||||||
background-color: rgba(49, 100, 239, 0.1);
|
|
||||||
color: rgba(44, 101, 247, 1);
|
|
||||||
text-align: center;
|
|
||||||
padding: 6rpx 12rpx;
|
|
||||||
white-space: nowrap;
|
|
||||||
}
|
|
||||||
|
|
||||||
.skill-tags {
|
|
||||||
display: flex;
|
|
||||||
flex-wrap: wrap;
|
|
||||||
gap: 12rpx;
|
|
||||||
}
|
|
||||||
|
|
||||||
.skill-tag {
|
|
||||||
background-color: rgba(49, 100, 239, 0.1);
|
|
||||||
color: rgba(44, 101, 247, 1);
|
|
||||||
padding: 6rpx 12rpx;
|
|
||||||
border-radius: 8rpx;
|
|
||||||
font-size: 24rpx;
|
|
||||||
line-height: 34rpx;
|
|
||||||
text-align: center;
|
|
||||||
white-space: nowrap;
|
|
||||||
}
|
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -81,7 +81,7 @@ export const useCareerRecommendationStore = defineStore('career-recommendation',
|
|||||||
professions.value = data.map((d) => {
|
professions.value = data.map((d) => {
|
||||||
return {
|
return {
|
||||||
label: d.name,
|
label: d.name,
|
||||||
value: `${ d.jobId }`
|
value: d.name
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
import { computed, ref, watch } from 'vue';
|
import { computed, ref, watch } from 'vue';
|
||||||
import { defineStore } from 'pinia';
|
import { defineStore } from 'pinia';
|
||||||
import { getCurrentPosition, getPath } from '@/apiRc/service/careerPath';
|
import { getCurrentPosition, getPath } from '@/apiRc/service/careerPath';
|
||||||
import { getSkill } from '@/apiRc/service/skillDevelopment';
|
import { getCareerPath, getSkillResult } from '@/apiRc/service/skillDevelopment';
|
||||||
|
|
||||||
|
|
||||||
export const useSkillDevelopmentStore = defineStore('skill-development', () => {
|
export const useSkillDevelopmentStore = defineStore('skill-development', () => {
|
||||||
@@ -62,10 +62,21 @@ export const useSkillDevelopmentStore = defineStore('skill-development', () => {
|
|||||||
const paths = ref([]);
|
const paths = ref([]);
|
||||||
const pathsRef = computed(() => {
|
const pathsRef = computed(() => {
|
||||||
return paths.value.filter((d) => {
|
return paths.value.filter((d) => {
|
||||||
return `${ d.startJobId }` === profession.value;
|
const [startJobId] = d.value.split('-');
|
||||||
|
return startJobId === profession.value;
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
const careerPaths = ref([]);
|
||||||
|
const currentCareer = ref(null);
|
||||||
|
const currentCareerIndex = ref(0);
|
||||||
|
const currentCareerLabel = computed(() => {
|
||||||
|
if (!currentCareer.value) {
|
||||||
|
return '';
|
||||||
|
}
|
||||||
|
return currentCareer.value.label;
|
||||||
|
});
|
||||||
|
|
||||||
const result = ref([]);
|
const result = ref([]);
|
||||||
|
|
||||||
const fetchData = async () => {
|
const fetchData = async () => {
|
||||||
@@ -108,8 +119,8 @@ export const useSkillDevelopmentStore = defineStore('skill-development', () => {
|
|||||||
paths.value = data.map((d) => {
|
paths.value = data.map((d) => {
|
||||||
return {
|
return {
|
||||||
label: d.endJob,
|
label: d.endJob,
|
||||||
value: d.endJob,
|
value: `${d.startJobId}-${d.endJobId}`
|
||||||
startJobId: d.startJobId
|
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
@@ -117,21 +128,17 @@ export const useSkillDevelopmentStore = defineStore('skill-development', () => {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
const fetchResult = async () => {
|
const fetchCareerPaths = async () => {
|
||||||
if (!targetCareer.value) {
|
if (!targetCareer.value) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
const current = professionsRef.value.find((d) => d.value === profession.value);
|
const [startJobId, endJobId] = targetCareer.value.split('-');
|
||||||
const target = pathsRef.value.find((d) => d.value === targetCareer.value);
|
|
||||||
if (!current || !target) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
const params = {
|
const params = {
|
||||||
currentJobName: current.label,
|
startJobId,
|
||||||
targetJobName: target.label
|
endJobId
|
||||||
};
|
};
|
||||||
try {
|
try {
|
||||||
const { code, msg, data } = await getSkill(params);
|
const { code, msg, data } = await getCareerPath(params);
|
||||||
if (code !== 0) {
|
if (code !== 0) {
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
title: msg,
|
title: msg,
|
||||||
@@ -139,20 +146,68 @@ export const useSkillDevelopmentStore = defineStore('skill-development', () => {
|
|||||||
});
|
});
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (typeof data !== 'undefined' && Array.isArray(data) && data.length > 0 && data[ 0 ]) {
|
if (!data) {
|
||||||
const excludes = data[ 0 ].currentSkillDetList.map((d) => d.skillId);
|
return;
|
||||||
result.value = data[ 0 ].targetSkillDetList
|
|
||||||
.filter((d) => !excludes.includes(d.skillId))
|
|
||||||
.map((d) => {
|
|
||||||
return {
|
|
||||||
type: d.skillType,
|
|
||||||
title: d.skillName,
|
|
||||||
name: d.skillName,
|
|
||||||
weight: d.skillWeight,
|
|
||||||
score: d.skillScore
|
|
||||||
};
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
careerPaths.value = data.map((d, i) => {
|
||||||
|
let index = `${i}`;
|
||||||
|
let fontSize = 26;
|
||||||
|
if (i === 0) {
|
||||||
|
index = '起点';
|
||||||
|
fontSize = 18;
|
||||||
|
}
|
||||||
|
if (i === data.length - 1) {
|
||||||
|
index = '终点';
|
||||||
|
fontSize = 18;
|
||||||
|
}
|
||||||
|
return {
|
||||||
|
index,
|
||||||
|
label: d.name,
|
||||||
|
value: d.jobId,
|
||||||
|
fontSize
|
||||||
|
};
|
||||||
|
});
|
||||||
|
if (careerPaths.value[0]) {
|
||||||
|
void eventResult(0);
|
||||||
|
}
|
||||||
|
} catch (e) {
|
||||||
|
console.warn(e);
|
||||||
|
careerPaths.value = [];
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
const eventResult = async (index) => {
|
||||||
|
currentCareerIndex.value = index;
|
||||||
|
currentCareer.value = careerPaths.value[index] ?? null;
|
||||||
|
|
||||||
|
const params = {
|
||||||
|
jobId: currentCareer.value?.value
|
||||||
|
};
|
||||||
|
try {
|
||||||
|
const { code, msg, data } = await getSkillResult(params);
|
||||||
|
if (code !== 0) {
|
||||||
|
uni.showToast({
|
||||||
|
title: msg,
|
||||||
|
icon: 'none'
|
||||||
|
});
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (!data) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
result.value = data.map((d) => {
|
||||||
|
return {
|
||||||
|
label: d.secDimName,
|
||||||
|
value: d.secDimId,
|
||||||
|
children: d.skillDetList.map((d) => {
|
||||||
|
return {
|
||||||
|
label: d.skillName,
|
||||||
|
value: d.skillScore,
|
||||||
|
weight: d.skillWeight
|
||||||
|
};
|
||||||
|
})
|
||||||
|
};
|
||||||
|
});
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
console.warn(e);
|
console.warn(e);
|
||||||
}
|
}
|
||||||
@@ -180,7 +235,7 @@ export const useSkillDevelopmentStore = defineStore('skill-development', () => {
|
|||||||
});
|
});
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
void fetchResult();
|
void fetchCareerPaths();
|
||||||
};
|
};
|
||||||
|
|
||||||
const eventProfession = (e) => {
|
const eventProfession = (e) => {
|
||||||
@@ -190,6 +245,7 @@ export const useSkillDevelopmentStore = defineStore('skill-development', () => {
|
|||||||
professionLabel.value = item.label;
|
professionLabel.value = item.label;
|
||||||
targetCareer.value = '';
|
targetCareer.value = '';
|
||||||
targetCareerLabel.value = '';
|
targetCareerLabel.value = '';
|
||||||
|
careerPaths.value = [];
|
||||||
result.value = [];
|
result.value = [];
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -198,6 +254,7 @@ export const useSkillDevelopmentStore = defineStore('skill-development', () => {
|
|||||||
const item = pathsRef.value[ e.detail.value ];
|
const item = pathsRef.value[ e.detail.value ];
|
||||||
targetCareer.value = item.value;
|
targetCareer.value = item.value;
|
||||||
targetCareerLabel.value = item.label;
|
targetCareerLabel.value = item.label;
|
||||||
|
careerPaths.value = [];
|
||||||
result.value = [];
|
result.value = [];
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -223,9 +280,14 @@ export const useSkillDevelopmentStore = defineStore('skill-development', () => {
|
|||||||
targetCareer,
|
targetCareer,
|
||||||
targetCareerLabel,
|
targetCareerLabel,
|
||||||
pathsRef,
|
pathsRef,
|
||||||
|
careerPaths,
|
||||||
|
currentCareer,
|
||||||
|
currentCareerLabel,
|
||||||
|
currentCareerIndex,
|
||||||
result,
|
result,
|
||||||
eventProfession,
|
eventProfession,
|
||||||
eventTargetCareer,
|
eventTargetCareer,
|
||||||
eventSearch
|
eventSearch,
|
||||||
|
eventResult
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -49,14 +49,12 @@ export function navigateToLoginPage(options = {}) {
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
case 'h5':
|
case 'h5':
|
||||||
if (loginType === 'idCard') {
|
uni.showToast({
|
||||||
// H5端身份证号码登录
|
title: '请先登录',
|
||||||
loginPage = '/pages/login/id-card-login';
|
icon: 'none',
|
||||||
} else {
|
duration: 2000
|
||||||
// H5端账号密码登录
|
});
|
||||||
loginPage = '/pages/login/h5-login';
|
return;
|
||||||
}
|
|
||||||
break;
|
|
||||||
|
|
||||||
case 'app':
|
case 'app':
|
||||||
// App端使用微信授权登录
|
// App端使用微信授权登录
|
||||||
|
|||||||
@@ -55,10 +55,11 @@ const md = new MarkdownIt({
|
|||||||
// 使用普通的href属性,微信小程序rich-text会将其转换为可点击链接
|
// 使用普通的href属性,微信小程序rich-text会将其转换为可点击链接
|
||||||
// 添加data-job-id属性,方便获取jobId
|
// 添加data-job-id属性,方便获取jobId
|
||||||
// 为所有平台添加onclick事件,微信小程序可能会忽略,但H5端会生效
|
// 为所有平台添加onclick事件,微信小程序可能会忽略,但H5端会生效
|
||||||
let domContext = `<a class="custom-card" href="/packageA/pages/post/post?jobId=${jobId}" data-job-id="${jobId}" data-jobid="${jobId}" onclick="if(typeof uni !== 'undefined'){uni.navigateTo({url: '/packageA/pages/post/post?jobId=${jobId}'});return false;}"><div class="card-title"><span class="title-text">${result.jobTitle}</span><div class="card-salary">${result.salary}</div></div><div class="card-company">${result.location}·${result.companyName}</div><div class="card-info"><div class="info-item"><div class="card-tag">${result.education}</div><div class="card-tag">${result.experience}</div></div><div class="info-item">查看详情<div class="position-nav"></div></div></div></a>`
|
// 内联基础样式确保在所有平台上正确显示(使用px单位以确保H5兼容性)
|
||||||
|
let domContext = `<a class="custom-card" href="/packageA/pages/post/post?jobId=${jobId}" data-job-id="${jobId}" data-jobid="${jobId}" onclick="if(typeof uni !== 'undefined'){uni.navigateTo({url: '/packageA/pages/post/post?jobId=${jobId}'});return false;}" style="display: flex; flex-direction: column; margin-bottom: 11px; background: #FFFFFF; box-shadow: 0 0 4px rgba(0,0,0,0.04); border-radius: 10px; padding: 14px 12px; font-weight: 400; font-size: 14px; color: #333333; text-decoration: none; overflow: hidden; box-sizing: border-box; width: 100%; max-width: 100%;"><div class="card-title" style="font-weight: 600; display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px;"><span class="title-text" style="font-family: 'PingFangSC-Medium', 'PingFang SC', 'Helvetica Neue', Helvetica, Arial, 'Microsoft YaHei', sans-serif; font-size: 16px; line-height: 1.4; color: #333333; max-width: calc(100% - 80px); overflow: hidden; text-overflow: ellipsis; white-space: nowrap;">${result.jobTitle}</span><div class="card-salary" style="font-family: DIN-Medium; font-size: 16px; color: #4C6EFB; line-height: 1.4; font-weight: 500;">${result.salary}</div></div><div class="card-company" style="margin-bottom: 9px; font-size: 14px; color: #6C7282; line-height: 1.4; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;">${result.location}·${result.companyName}</div><div class="card-info" style="display: flex; align-items: center; justify-content: space-between; padding-right: 20px;"><div class="info-item" style="display: flex; position: relative; align-items: center;"><div class="card-tag" style="font-weight: 400; font-size: 12px; color: #6C7282; width: fit-content; background: #F4F4F4; border-radius: 2px; padding: 3px 10px; margin-right: 10px; display: inline-flex; align-items: center; justify-content: center; height: 15px; line-height: 15px;">${result.education}</div><div class="card-tag" style="font-weight: 400; font-size: 12px; color: #6C7282; width: fit-content; background: #F4F4F4; border-radius: 2px; padding: 3px 10px; margin-right: 10px; display: inline-flex; align-items: center; justify-content: center; height: 15px; line-height: 15px;">${result.experience}</div></div><div class="info-item" style="color: #256BFA; font-size: 14px; padding-right: 5px; position: relative;">查看详情<div class="position-nav" style="position: absolute; right: -5px; top: 50%; transform: translateY(-50%);"></div></div></div></a>`
|
||||||
if (result.data) {
|
if (result.data) {
|
||||||
jobMoreMap.set(jobId, result.data)
|
jobMoreMap.set(jobId, result.data)
|
||||||
domContext += `<a class="custom-more" href="/packageA/pages/moreJobs/moreJobs?jobId=${jobId}" data-job-id="${jobId}" data-jobid="${jobId}" onclick="if(typeof uni !== 'undefined'){uni.navigateTo({url: '/packageA/pages/moreJobs/moreJobs?jobId=${jobId}'});return false;}">查看更多岗位<div class="more-icon"></div></a>`
|
domContext += `<a class="custom-more" href="/packageA/pages/moreJobs/moreJobs?jobId=${jobId}" data-job-id="${jobId}" data-jobid="${jobId}" onclick="if(typeof uni !== 'undefined'){uni.navigateTo({url: '/packageA/pages/moreJobs/moreJobs?jobId=${jobId}'});return false;}" style="display: flex; justify-content: center; align-items: center; color: #FFFFFF; background: linear-gradient(135deg, #256BFA 0%, #9E74FD 100%); border-radius: 25px; padding: 10px 16px; margin: 10px 0; font-size: 14px; font-weight: 600; box-shadow: 0 4px 12px rgba(37, 107, 250, 0.3); text-decoration: none; box-sizing: border-box; width: 100%;">查看更多岗位<div class="more-icon" style="width: 16px; height: 16px; background: url('@/static/svg/seemore.svg') center center no-repeat; background-size: 100% 100%; margin-left: 6px;"></div></a>`
|
||||||
}
|
}
|
||||||
return domContext
|
return domContext
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user