Compare commits
1 Commits
fc345ad26b
...
kslc
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
14dafac147 |
100
components/UserTypeSwitcher/UserTypeSwitcher.vue
Normal file
@@ -0,0 +1,100 @@
|
||||
<template>
|
||||
<view class="user-type-switcher">
|
||||
<view class="switcher-title">用户类型切换(测试用)</view>
|
||||
<view class="switcher-buttons">
|
||||
<button
|
||||
v-for="(type, index) in userTypes"
|
||||
:key="index"
|
||||
:class="['type-btn', { active: currentUserType === type.value }]"
|
||||
@click="switchUserType(type.value)"
|
||||
>
|
||||
{{ type.label }}
|
||||
</button>
|
||||
</view>
|
||||
<view class="current-type">
|
||||
当前用户类型:{{ getCurrentTypeLabel() }} ({{ currentUserType }})
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { ref, computed } from 'vue';
|
||||
import { storeToRefs } from 'pinia';
|
||||
import useUserStore from '@/stores/useUserStore';
|
||||
|
||||
const { userInfo } = storeToRefs(useUserStore());
|
||||
|
||||
const userTypes = [
|
||||
{ value: 0, label: '企业用户' },
|
||||
{ value: 1, label: '求职者' },
|
||||
{ value: 2, label: '网格员' },
|
||||
{ value: 3, label: '政府人员' }
|
||||
];
|
||||
|
||||
const currentUserType = computed(() => userInfo.value?.userType || 0);
|
||||
|
||||
const switchUserType = (userType) => {
|
||||
console.log('切换用户类型:', userType);
|
||||
console.log('切换前 userInfo:', userInfo.value);
|
||||
|
||||
userInfo.value.userType = userType;
|
||||
|
||||
console.log('切换后 userInfo:', userInfo.value);
|
||||
|
||||
// 保存到本地存储
|
||||
uni.setStorageSync('userInfo', userInfo.value);
|
||||
|
||||
uni.showToast({
|
||||
title: `已切换到${getCurrentTypeLabel()}`,
|
||||
icon: 'success'
|
||||
});
|
||||
};
|
||||
|
||||
const getCurrentTypeLabel = () => {
|
||||
const type = userTypes.find(t => t.value === currentUserType.value);
|
||||
return type ? type.label : '未知';
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.user-type-switcher {
|
||||
padding: 20rpx;
|
||||
background: #f5f5f5;
|
||||
border-radius: 10rpx;
|
||||
margin: 20rpx;
|
||||
|
||||
.switcher-title {
|
||||
font-size: 28rpx;
|
||||
font-weight: 600;
|
||||
color: #333;
|
||||
margin-bottom: 20rpx;
|
||||
}
|
||||
|
||||
.switcher-buttons {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
gap: 10rpx;
|
||||
margin-bottom: 20rpx;
|
||||
|
||||
.type-btn {
|
||||
padding: 10rpx 20rpx;
|
||||
border: 2rpx solid #ddd;
|
||||
border-radius: 8rpx;
|
||||
background: #fff;
|
||||
font-size: 24rpx;
|
||||
color: #666;
|
||||
|
||||
&.active {
|
||||
background: #256BFA;
|
||||
color: #fff;
|
||||
border-color: #256BFA;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.current-type {
|
||||
font-size: 24rpx;
|
||||
color: #666;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -72,6 +72,16 @@ import { ref, reactive, nextTick, onBeforeMount } from 'vue';
|
||||
import useDictStore from '@/stores/useDictStore';
|
||||
const { getTransformChildren } = useDictStore();
|
||||
|
||||
// 岗位类型数据
|
||||
const getJobTypeData = () => {
|
||||
return [
|
||||
{ label: '常规岗位', value: 'regular', text: '常规岗位' },
|
||||
{ label: '就业见习岗位', value: 'internship', text: '就业见习岗位' },
|
||||
{ label: '实习实训岗位', value: 'training', text: '实习实训岗位' },
|
||||
{ label: '社区实践岗位', value: 'community', text: '社区实践岗位' }
|
||||
];
|
||||
};
|
||||
|
||||
const area = ref(true);
|
||||
const maskClick = ref(false);
|
||||
const maskClickFn = ref(null);
|
||||
@@ -164,6 +174,12 @@ function getoptions() {
|
||||
if (area.value) {
|
||||
arr.push(getTransformChildren('area', '区域'));
|
||||
}
|
||||
// 添加岗位类型选项
|
||||
arr.push({
|
||||
label: '岗位类型',
|
||||
key: 'jobType',
|
||||
options: getJobTypeData()
|
||||
});
|
||||
filterOptions.value = arr;
|
||||
activeTab.value = 'education';
|
||||
}
|
||||
|
||||
@@ -21,6 +21,9 @@
|
||||
<script setup>
|
||||
import { ref, defineProps, onMounted, computed } from 'vue';
|
||||
import { useReadMsg } from '@/stores/useReadMsg';
|
||||
import { storeToRefs } from 'pinia';
|
||||
import useUserStore from '@/stores/useUserStore';
|
||||
|
||||
const props = defineProps({
|
||||
currentpage: {
|
||||
type: Number,
|
||||
@@ -28,55 +31,81 @@ const props = defineProps({
|
||||
default: 0,
|
||||
},
|
||||
});
|
||||
|
||||
const readMsg = useReadMsg();
|
||||
const { userInfo } = storeToRefs(useUserStore());
|
||||
const currentItem = ref(0);
|
||||
const tabbarList = computed(() => [
|
||||
{
|
||||
id: 0,
|
||||
text: '首页',
|
||||
path: '/pages/index/index',
|
||||
iconPath: '../../static/tabbar/calendar.png',
|
||||
selectedIconPath: '../../static/tabbar/calendared.png',
|
||||
centerItem: false,
|
||||
badge: readMsg.badges[0].count,
|
||||
},
|
||||
{
|
||||
id: 1,
|
||||
text: '招聘会',
|
||||
path: '/pages/careerfair/careerfair',
|
||||
iconPath: '../../static/tabbar/post.png',
|
||||
selectedIconPath: '../../static/tabbar/posted.png',
|
||||
centerItem: false,
|
||||
badge: readMsg.badges[1].count,
|
||||
},
|
||||
{
|
||||
id: 2,
|
||||
text: '',
|
||||
path: '/pages/chat/chat',
|
||||
iconPath: '../../static/tabbar/logo3.png',
|
||||
selectedIconPath: '../../static/tabbar/logo3.png',
|
||||
centerItem: true,
|
||||
badge: readMsg.badges[2].count,
|
||||
},
|
||||
{
|
||||
id: 3,
|
||||
text: '消息',
|
||||
path: '/pages/msglog/msglog',
|
||||
iconPath: '../../static/tabbar/chat4.png',
|
||||
selectedIconPath: '../../static/tabbar/chat4ed.png',
|
||||
centerItem: false,
|
||||
badge: readMsg.badges[3].count,
|
||||
},
|
||||
{
|
||||
id: 4,
|
||||
text: '我的',
|
||||
path: '/pages/mine/mine',
|
||||
iconPath: '../../static/tabbar/mine.png',
|
||||
selectedIconPath: '../../static/tabbar/mined.png',
|
||||
centerItem: false,
|
||||
badge: readMsg.badges[4].count,
|
||||
},
|
||||
]);
|
||||
|
||||
// 根据用户类型生成不同的导航栏配置
|
||||
const tabbarList = computed(() => {
|
||||
const baseItems = [
|
||||
{
|
||||
id: 0,
|
||||
text: '首页',
|
||||
path: '/pages/index/index',
|
||||
iconPath: '../../static/tabbar/calendar.png',
|
||||
selectedIconPath: '../../static/tabbar/calendared.png',
|
||||
centerItem: false,
|
||||
badge: readMsg.badges[0].count,
|
||||
},
|
||||
{
|
||||
id: 2,
|
||||
text: '',
|
||||
path: '/pages/chat/chat',
|
||||
iconPath: '../../static/tabbar/logo3.png',
|
||||
selectedIconPath: '../../static/tabbar/logo3.png',
|
||||
centerItem: true,
|
||||
badge: readMsg.badges[2].count,
|
||||
},
|
||||
{
|
||||
id: 3,
|
||||
text: '消息',
|
||||
path: '/pages/msglog/msglog',
|
||||
iconPath: '../../static/tabbar/chat4.png',
|
||||
selectedIconPath: '../../static/tabbar/chat4ed.png',
|
||||
centerItem: false,
|
||||
badge: readMsg.badges[3].count,
|
||||
},
|
||||
{
|
||||
id: 4,
|
||||
text: '我的',
|
||||
path: '/pages/mine/mine',
|
||||
iconPath: '../../static/tabbar/mine.png',
|
||||
selectedIconPath: '../../static/tabbar/mined.png',
|
||||
centerItem: false,
|
||||
badge: readMsg.badges[4].count,
|
||||
},
|
||||
];
|
||||
|
||||
// 根据用户类型添加不同的导航项
|
||||
const userType = userInfo.value?.userType || 0;
|
||||
|
||||
if (userType === 0) {
|
||||
// 企业用户:显示发布岗位,隐藏招聘会
|
||||
baseItems.splice(1, 0, {
|
||||
id: 1,
|
||||
text: '发布岗位',
|
||||
path: '/pages/job/publishJob',
|
||||
iconPath: '../../static/tabbar/publish-job.svg',
|
||||
selectedIconPath: '../../static/tabbar/publish-job-selected.svg',
|
||||
centerItem: false,
|
||||
badge: 0,
|
||||
});
|
||||
} else {
|
||||
// 普通用户、网格员、政府人员:显示招聘会
|
||||
baseItems.splice(1, 0, {
|
||||
id: 1,
|
||||
text: '招聘会',
|
||||
path: '/pages/careerfair/careerfair',
|
||||
iconPath: '../../static/tabbar/post.png',
|
||||
selectedIconPath: '../../static/tabbar/posted.png',
|
||||
centerItem: false,
|
||||
badge: readMsg.badges[1].count,
|
||||
});
|
||||
}
|
||||
|
||||
return baseItems;
|
||||
});
|
||||
|
||||
onMounted(() => {
|
||||
uni.hideTabBar();
|
||||
@@ -84,9 +113,26 @@ onMounted(() => {
|
||||
});
|
||||
|
||||
const changeItem = (item) => {
|
||||
uni.switchTab({
|
||||
url: item.path,
|
||||
});
|
||||
// 判断是否为 tabBar 页面
|
||||
const tabBarPages = [
|
||||
'/pages/index/index',
|
||||
'/pages/careerfair/careerfair',
|
||||
'/pages/chat/chat',
|
||||
'/pages/msglog/msglog',
|
||||
'/pages/mine/mine'
|
||||
];
|
||||
|
||||
if (tabBarPages.includes(item.path)) {
|
||||
// tabBar 页面使用 switchTab
|
||||
uni.switchTab({
|
||||
url: item.path,
|
||||
});
|
||||
} else {
|
||||
// 非 tabBar 页面使用 navigateTo
|
||||
uni.navigateTo({
|
||||
url: item.path,
|
||||
});
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
|
||||
9
main.js
@@ -1,8 +1,3 @@
|
||||
/*
|
||||
* @Date: 2025-10-23 14:48:48
|
||||
* @LastEditors: shirlwang
|
||||
* @LastEditTime: 2025-10-23 15:02:07
|
||||
*/
|
||||
import App from '@/App'
|
||||
import * as Pinia from 'pinia'
|
||||
import globalFunction from '@/common/globalFunction'
|
||||
@@ -28,8 +23,8 @@ import {
|
||||
createSSRApp,
|
||||
} from 'vue'
|
||||
|
||||
// const foldFeature = window.visualViewport && 'segments' in window.visualViewport
|
||||
// console.log('是否支持多段屏幕:', foldFeature)
|
||||
const foldFeature = window.visualViewport && 'segments' in window.visualViewport
|
||||
console.log('是否支持多段屏幕:', foldFeature)
|
||||
|
||||
// 全局组件
|
||||
export function createApp() {
|
||||
|
||||
@@ -1,395 +0,0 @@
|
||||
<!--
|
||||
* @Date: 2025-10-16 15:15:47
|
||||
* @LastEditors: shirlwang
|
||||
* @LastEditTime: 2025-10-22 14:17:46
|
||||
-->
|
||||
<template>
|
||||
<!-- @scroll="handleScroll" @scrolltolower="scrollBottom" -->
|
||||
<scroll-view :scroll-y="true" class="container" style="background-image: url('../../../packageRc/static/pageBg.png');">
|
||||
<view style="padding: 40rpx 28rpx;">
|
||||
<view class="kinggang">
|
||||
<view>
|
||||
<view class="num-title" style="color: #1A62CE">重点毕业生数</view>
|
||||
<view>1120</view>
|
||||
</view>
|
||||
<text style="color: #B5C1D1;">|</text>
|
||||
<view>
|
||||
<view class="num-title" style="color: #16ACB7">累计需求数</view>
|
||||
<view>1120</view>
|
||||
</view>
|
||||
<text style="color: #B5C1D1;">|</text>
|
||||
<view>
|
||||
<view class="num-title" style="color: #6A57D1">累计服务数</view>
|
||||
<view>1120</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="trace-line">
|
||||
<view class="trace">
|
||||
<view class="title">
|
||||
<image src="../../../packageRc/static/trace.png"/>
|
||||
毕业生追踪
|
||||
</view>
|
||||
<view style="display: flex;justify-content: space-between;">
|
||||
<view>点击查看</view>
|
||||
<uni-icons color="#639AEB" type="arrow-right" size="16"></uni-icons>
|
||||
</view>
|
||||
</view>
|
||||
<view class="sendManager">
|
||||
<view class="title">
|
||||
<image src="../../../packageRc/static/sendManager.png"/>
|
||||
任务下发管理员
|
||||
</view>
|
||||
<view style="display: flex;justify-content: space-between;">
|
||||
<view>点击查看</view>
|
||||
<uni-icons color="#DBAA4E" type="arrow-right" size="16"></uni-icons>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="titles">
|
||||
<view class="title-item active"><view>待办需求预警列表</view></view>
|
||||
<view>共 2 条信息</view>
|
||||
</view>
|
||||
<view v-for="(item, index) in jobList" :key="index" class="job-list">
|
||||
<view class="title">销售顾问</view>
|
||||
<view class="info">
|
||||
待办内容文字示例待办内容文字示例待办内容文字示例待办内容文字示例
|
||||
</view>
|
||||
<view class="bottom-line">
|
||||
<view>发起时间:2025-09-24 15:02</view>
|
||||
<view style="color: #EF7325;">青岛xx公司</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="titles">
|
||||
<view class="title-item active"><view>待服务毕业生列表</view></view>
|
||||
<view>共 22 条信息</view>
|
||||
</view>
|
||||
<view v-for="(item, index) in jobList" :key="index" class="person-list">
|
||||
<view class="top-info">
|
||||
<image v-if="index%2==0" src="../../../packageRc/static/personIcon.png"/>
|
||||
<image v-else src="../../../packageRc/static/personIconFe.png"/>
|
||||
<view class="top-right">
|
||||
<view class="name-line">
|
||||
<view class="name">姓名<view class="tag">硕士</view></view>
|
||||
<view class="service-status">·未服务</view>
|
||||
</view>
|
||||
<view class="info-line" style="display: flex;">
|
||||
<view style="margin-right: 24rpx;"><text>年龄:</text>27岁</view>
|
||||
<view><text>服务次数:</text>1次</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="info-line">
|
||||
<view><text>联系电话:</text>152****5488</view>
|
||||
<view><text>详细地址:</text>山东省济南市历城区港沟街道融创文旅城鹊桥华居8号楼1单元801</view>
|
||||
</view>
|
||||
<view class="services">
|
||||
<view>退回</view>
|
||||
<view>服务</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</scroll-view>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { reactive, inject, watch, ref, onMounted, watchEffect, nextTick } from 'vue';
|
||||
let activeTab = ref(1)
|
||||
let activeTitle = ref(1)
|
||||
let jobList = ref([{},{},{},{},{}])
|
||||
function back() {
|
||||
uni.navigateBack({
|
||||
delta: 1
|
||||
})
|
||||
}
|
||||
function viewMore() {
|
||||
// uni.navigateTo({
|
||||
// url: '/pages/jobList/jobList'
|
||||
// })
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="less" scoped>
|
||||
view{box-sizing: border-box;display: block;}
|
||||
.container{
|
||||
background-color: #F4F4F4;background-position: top center;background-size: 100% auto;
|
||||
height: 100vh;
|
||||
min-width: 100vw;
|
||||
padding-bottom: 0;
|
||||
background-repeat: no-repeat;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
.kinggang{
|
||||
display: flex;
|
||||
justify-content: space-around;
|
||||
align-items: center;
|
||||
padding: 36rpx 32rpx 33rpx 32rpx;
|
||||
background: #FFFFFF;
|
||||
border-radius: 16rpx;
|
||||
border: 3rpx solid #FFFFFF;
|
||||
margin-bottom: 24rpx;background: linear-gradient(180deg, #EDF4FF 0%, #FFFFFF 52%);
|
||||
>view{
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
justify-content: space-around;
|
||||
font-weight: bold;
|
||||
>view{font-size: 50rpx;}
|
||||
.num-title{
|
||||
font-size: 28rpx;
|
||||
margin-top: 16rpx;
|
||||
font-weight: normal;
|
||||
}
|
||||
// text{
|
||||
// font-size: 28rpx;
|
||||
// }
|
||||
}
|
||||
image{
|
||||
width: 78rpx;
|
||||
// margin-bottom: 15rpx;
|
||||
height: 78rpx;
|
||||
}
|
||||
}
|
||||
.trace-line{
|
||||
width: 100%;
|
||||
margin-bottom: 24rpx;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
>view{
|
||||
padding: 37.5rpx 32rpx;
|
||||
width: calc(50% - 12rpx);
|
||||
.title{
|
||||
font-size: 28rpx;
|
||||
font-weight: bold;
|
||||
color: #1D6AD7;
|
||||
margin-bottom: 16rpx;
|
||||
display: flex;
|
||||
image{
|
||||
width: 46rpx;
|
||||
height: 46rpx;
|
||||
margin-right: 11rpx;
|
||||
}
|
||||
}
|
||||
.more{
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
}
|
||||
}
|
||||
.trace{
|
||||
color: #2E77DF;
|
||||
border: 2rpx solid #78ADFF;
|
||||
background: linear-gradient(0deg, #FFFFFF 1%, #D0E1FF 100%);
|
||||
box-shadow: inset 0px 4rpx 10rpx 0px rgba(255, 255, 255, 0.302);
|
||||
.title{
|
||||
color: #1D6AD7;
|
||||
}
|
||||
}
|
||||
.sendManager{
|
||||
border: 2rpx solid #FFC34B;
|
||||
color: #C68412;
|
||||
box-shadow: inset 0px 4px 10px 0px rgba(255, 255, 255, 0.302);
|
||||
background: linear-gradient(0deg, #FFFFFF 0%, #FBF4D1 100%);
|
||||
.title{color: #CE9523;}
|
||||
|
||||
}
|
||||
}
|
||||
.tabs{
|
||||
margin-bottom: 29rpx;
|
||||
|
||||
border-radius: 16rpx;
|
||||
display: flex;
|
||||
background: #fff;
|
||||
color: #878787;
|
||||
text-align: center;
|
||||
width: 100%;
|
||||
.tab{
|
||||
width: 50%;
|
||||
border: 4rpx solid transparent;
|
||||
border-radius: 16rpx;
|
||||
line-height: 64rpx;
|
||||
position: relative;
|
||||
&.active{
|
||||
border: 4rpx solid #fff;
|
||||
color: #fff;
|
||||
background: linear-gradient(180deg, #79AFFF 1%, #A2B3FE 100%);
|
||||
box-shadow: 0px 4rpx 10rpx 0px rgba(40, 102, 194, 0.4);
|
||||
}
|
||||
}
|
||||
}
|
||||
.titles{
|
||||
display: flex;
|
||||
margin-bottom: 44rpx;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
.title-item{
|
||||
font-size: 32rpx;
|
||||
font-weight: bold;
|
||||
color: #282828;
|
||||
margin-right: 32rpx;
|
||||
position: relative;
|
||||
>view{
|
||||
position: relative;
|
||||
z-index: 2;
|
||||
padding: 0 16rpx;
|
||||
}
|
||||
&.active::after{
|
||||
content: '';
|
||||
position: absolute;
|
||||
z-index: 1;
|
||||
bottom: -12rpx;
|
||||
left: 0;
|
||||
width: 120%;
|
||||
height: 24rpx;
|
||||
border-radius: 50px 0px 0px 50px;
|
||||
background: linear-gradient(90deg, #78AEFF 0%, rgba(120, 174, 255, 0.31) 52%, rgba(24, 116, 255, 0) 100%);
|
||||
}
|
||||
}
|
||||
}
|
||||
.job-list{
|
||||
width: 100%;
|
||||
margin: 0 auto;
|
||||
color: #333333;
|
||||
border-radius: 24rpx;
|
||||
background: #FFFFFF;
|
||||
padding: 32rpx;
|
||||
margin-bottom: 24rpx;
|
||||
position: relative;
|
||||
.sign{
|
||||
position: absolute;
|
||||
font-size: 24rpx;
|
||||
right: 0;
|
||||
top: 0;
|
||||
padding: 4rpx 14rpx;
|
||||
border: 1rpx solid #EC4827;
|
||||
background: rgba(227, 79, 49, 0.09);
|
||||
border-top-right-radius: 24rpx;
|
||||
border-bottom-left-radius: 24rpx;
|
||||
color: #EC4827;
|
||||
}
|
||||
.top-line{
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
font-size: 24rpx;
|
||||
color: #A2A2A2;
|
||||
margin-bottom: 16rpx;
|
||||
.salary{
|
||||
font-size: 32rpx;
|
||||
color: #4C6EFB;
|
||||
font-weight: bold;
|
||||
}
|
||||
}
|
||||
.title{
|
||||
font-size: 32rpx;
|
||||
font-weight: bold;
|
||||
color: #282828;
|
||||
margin-bottom: 16rpx;
|
||||
display: flex;
|
||||
image{
|
||||
width: 46rpx;
|
||||
height: 46rpx;
|
||||
margin-right: 11rpx;
|
||||
}
|
||||
}
|
||||
.info{
|
||||
font-size: 24rpx;
|
||||
margin-bottom: 16rpx;
|
||||
white-space: nowrap;
|
||||
text-overflow: ellipsis;
|
||||
overflow: hidden;
|
||||
}
|
||||
.bottom-line{
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
font-size: 24rpx;
|
||||
color: #A2A2A2;
|
||||
margin-top: 12rpx;
|
||||
}
|
||||
}
|
||||
.view-more-btn{
|
||||
padding: 10rpx 56rpx;
|
||||
background: #FFFFFF;
|
||||
color: #4C6EFB;
|
||||
border: 1rpx solid #4C6EFB;
|
||||
text-align: center;
|
||||
border-radius: 40rpx;
|
||||
width: fit-content;
|
||||
margin: 0 auto;
|
||||
margin-bottom: 20rpx;
|
||||
}
|
||||
.person-list{
|
||||
padding-top: 32rpx;
|
||||
margin-bottom: 24rpx;
|
||||
border-radius: 16rpx;
|
||||
background: #FFFFFF;
|
||||
.top-info{
|
||||
padding: 0 32rpx;
|
||||
margin-bottom: 24rpx;
|
||||
display: flex;
|
||||
image{
|
||||
width: 86rpx;
|
||||
height: 86rpx;
|
||||
margin-right: 19rpx;
|
||||
display: block;
|
||||
}
|
||||
.top-right{
|
||||
flex-grow: 1;
|
||||
flex-shrink: 1;
|
||||
.name-line{
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
.name{
|
||||
font-size: 32rpx;
|
||||
display: flex;
|
||||
margin-right: 15rpx;
|
||||
margin-bottom: 3rpx;
|
||||
align-items: center;
|
||||
.tag{
|
||||
font-size: 24rpx;
|
||||
line-height: 32rpx;
|
||||
padding: 0 12rpx;
|
||||
margin-left: 15rpx;
|
||||
border-radius: 4rpx;
|
||||
background: #4D89E3;
|
||||
color: #fff;
|
||||
}
|
||||
}
|
||||
.service-status{
|
||||
color: #E0A61F;
|
||||
font-weight: bold;
|
||||
font-size: 26rpx;
|
||||
}
|
||||
}
|
||||
.info-line{
|
||||
padding: 0;
|
||||
border: 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
.info-line{
|
||||
padding: 0 32rpx 32rpx;
|
||||
color: #3D3D3D;
|
||||
border-bottom: 1px solid #E8E8E8;
|
||||
>view{
|
||||
text{
|
||||
color: #8E8E8E;
|
||||
}
|
||||
font-size: 26rpx;
|
||||
}
|
||||
}
|
||||
.services{
|
||||
line-height: 40rpx;
|
||||
padding: 28rpx 32rpx;
|
||||
display: flex;
|
||||
>view{
|
||||
flex-grow: 1;
|
||||
font-size: 26rpx;
|
||||
color: #1A62CE;
|
||||
text-align: center;
|
||||
&:first-child{
|
||||
color: #E04020;
|
||||
border-right: 1px solid #D8D8D8;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -1,255 +0,0 @@
|
||||
<!--
|
||||
* @Date: 2025-10-16 15:15:47
|
||||
* @LastEditors: shirlwang
|
||||
* @LastEditTime: 2025-10-22 09:54:53
|
||||
-->
|
||||
<template>
|
||||
<!-- @scroll="handleScroll" @scrolltolower="scrollBottom" -->
|
||||
<scroll-view :scroll-y="true" class="container" style="background-image: url('../../../packageRc/static/pageBg.png');">
|
||||
<view style="padding: 40rpx 28rpx;">
|
||||
<view class="kinggang">
|
||||
<view>
|
||||
<image src="../../../packageRc/static/kinggang1.png"/>
|
||||
<view>信息维护</view>
|
||||
</view>
|
||||
<view>
|
||||
<image src="../../../packageRc/static/kinggang5.png"/>
|
||||
<view>投递记录</view>
|
||||
</view>
|
||||
<view>
|
||||
<image src="../../../packageRc/static/kinggang2.png"/>
|
||||
<view>需求上报</view>
|
||||
</view>
|
||||
<view>
|
||||
<image src="../../../packageRc/static/kinggang3.png"/>
|
||||
<view>虚拟面试</view>
|
||||
</view>
|
||||
<view>
|
||||
<image src="../../../packageRc/static/kinggang4.png"/>
|
||||
<view>素质测评</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="tabs">
|
||||
<view class="tab" :class="{active: activeTab == 1}" @click="activeTab = 1">岗位列表</view>
|
||||
<view class="tab" :class="{active: activeTab == 2}" @click="activeTab = 2">实习实训</view>
|
||||
<view class="tab" :class="{active: activeTab == 3}" @click="activeTab = 3">社区实践</view>
|
||||
</view>
|
||||
<view class="titles">
|
||||
<view class="title-item" :class="{active: activeTitle == 1}" @click="activeTitle = 1"><view>推荐岗位</view></view>
|
||||
<view class="title-item" :class="{active: activeTitle == 2}" @click="activeTitle = 2"><view>热门岗位</view></view>
|
||||
</view>
|
||||
<view v-for="(item, index) in jobList" :key="index" class="job-list">
|
||||
<view class="top-line">
|
||||
<view class="salary">4000-8000/月</view>
|
||||
<view class="time"><uni-icons color="#A2A2A2" type="info" size="12"></uni-icons>发布日期:2025-10-20</view>
|
||||
</view>
|
||||
<view class="title">销售顾问</view>
|
||||
<view class="infos">
|
||||
<view>大专</view>
|
||||
<view>1-3年</view>
|
||||
<view>喀什 市南区</view>
|
||||
</view>
|
||||
<view class="bottom-line">
|
||||
<view><uni-icons color="#A2A2A2" type="person" size="12"></uni-icons>6人</view>
|
||||
<view>青岛xx公司</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="view-more-btn" @click="viewMore">查看更多内容</view>
|
||||
<view class="titles" style="justify-content: space-between;">
|
||||
<view class="title-item active"><view>政策专区</view></view>
|
||||
<view>{{'查看更多 >'}}</view>
|
||||
</view>
|
||||
<view v-for="(item, index) in jobList" :key="index" class="job-list">
|
||||
<view class="sign">推荐</view>
|
||||
<view class="title">
|
||||
<image src="../../../packageRc/static/zcLeft.png"/>
|
||||
销售顾问</view>
|
||||
<view class="infos">
|
||||
<view>大专</view>
|
||||
<view>1-3年</view>
|
||||
<view>喀什 市南区</view>
|
||||
</view>
|
||||
<view class="bottom-line">
|
||||
<view><uni-icons color="#A2A2A2" type="info" size="12"></uni-icons>发布日期:2025-10-20</view>
|
||||
<view>浏览数<text style="color: #6AA7E8">99+</text></view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</scroll-view>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { reactive, inject, watch, ref, onMounted, watchEffect, nextTick } from 'vue';
|
||||
let activeTab = ref(1)
|
||||
let activeTitle = ref(1)
|
||||
let jobList = ref([{},{},{},{},{},{}])
|
||||
function back() {
|
||||
uni.navigateBack({
|
||||
delta: 1
|
||||
})
|
||||
}
|
||||
function viewMore() {
|
||||
// uni.navigateTo({
|
||||
// url: '/pages/jobList/jobList'
|
||||
// })
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="less" scoped>
|
||||
view{box-sizing: border-box;display: block;}
|
||||
.container{
|
||||
background-color: #F4F4F4;background-position: top center;background-size: 100% auto;
|
||||
height: 100vh;
|
||||
min-width: 100vw;
|
||||
padding-bottom: 0;
|
||||
background-repeat: no-repeat;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
.kinggang{
|
||||
display: flex;
|
||||
justify-content: space-around;
|
||||
align-items: center;
|
||||
padding: 16rpx 16rpx 32rpx 16rpx;
|
||||
font-size: 24rpx;
|
||||
background: #FFFFFF;
|
||||
border-radius: 16rpx;
|
||||
margin-bottom: 24rpx;
|
||||
>view{
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
justify-content: space-around;
|
||||
}
|
||||
image{
|
||||
width: 78rpx;
|
||||
// margin-bottom: 15rpx;
|
||||
height: 78rpx;
|
||||
}
|
||||
}
|
||||
.tabs{
|
||||
margin-bottom: 29rpx;
|
||||
|
||||
border-radius: 16rpx;
|
||||
display: flex;
|
||||
background: #fff;
|
||||
color: #878787;
|
||||
text-align: center;
|
||||
width: 100%;
|
||||
.tab{
|
||||
width: 50%;
|
||||
border: 4rpx solid transparent;
|
||||
border-radius: 16rpx;
|
||||
line-height: 64rpx;
|
||||
position: relative;
|
||||
&.active{
|
||||
border: 4rpx solid #fff;
|
||||
color: #fff;
|
||||
background: linear-gradient(180deg, #79AFFF 1%, #A2B3FE 100%);
|
||||
box-shadow: 0px 4rpx 10rpx 0px rgba(40, 102, 194, 0.4);
|
||||
}
|
||||
}
|
||||
}
|
||||
.titles{
|
||||
display: flex;
|
||||
margin-bottom: 44rpx;
|
||||
.title-item{
|
||||
font-size: 32rpx;
|
||||
font-weight: bold;
|
||||
color: #282828;
|
||||
margin-right: 32rpx;
|
||||
position: relative;
|
||||
>view{
|
||||
position: relative;
|
||||
z-index: 2;
|
||||
padding: 0 16rpx;
|
||||
}
|
||||
&.active::after{
|
||||
content: '';
|
||||
position: absolute;
|
||||
z-index: 1;
|
||||
bottom: -12rpx;
|
||||
left: 0;
|
||||
width: 120%;
|
||||
height: 24rpx;
|
||||
border-radius: 50px 0px 0px 50px;
|
||||
background: linear-gradient(90deg, #78AEFF 0%, rgba(120, 174, 255, 0.31) 52%, rgba(24, 116, 255, 0) 100%);
|
||||
}
|
||||
}
|
||||
}
|
||||
.job-list{
|
||||
width: 100%;
|
||||
margin: 0 auto;
|
||||
color: #333333;
|
||||
border-radius: 24rpx;
|
||||
background: #FFFFFF;
|
||||
padding: 32rpx;
|
||||
margin-bottom: 24rpx;
|
||||
position: relative;
|
||||
.sign{
|
||||
position: absolute;
|
||||
font-size: 24rpx;
|
||||
right: 0;
|
||||
top: 0;
|
||||
padding: 4rpx 14rpx;
|
||||
border: 1rpx solid #EC4827;
|
||||
background: rgba(227, 79, 49, 0.09);
|
||||
border-top-right-radius: 24rpx;
|
||||
border-bottom-left-radius: 24rpx;
|
||||
color: #EC4827;
|
||||
}
|
||||
.top-line{
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
font-size: 24rpx;
|
||||
color: #A2A2A2;
|
||||
margin-bottom: 16rpx;
|
||||
.salary{
|
||||
font-size: 32rpx;
|
||||
color: #4C6EFB;
|
||||
font-weight: bold;
|
||||
}
|
||||
}
|
||||
.title{
|
||||
font-size: 32rpx;
|
||||
font-weight: bold;
|
||||
color: #282828;
|
||||
margin-bottom: 16rpx;
|
||||
display: flex;
|
||||
image{
|
||||
width: 46rpx;
|
||||
height: 46rpx;
|
||||
margin-right: 11rpx;
|
||||
}
|
||||
}
|
||||
.infos{
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
font-size: 24rpx;
|
||||
margin-bottom: 16rpx;
|
||||
line-height: 42rpx;
|
||||
view{
|
||||
padding: 0 16rpx;
|
||||
margin-right: 10rpx;
|
||||
background: #F2F2F2;
|
||||
}
|
||||
}
|
||||
.bottom-line{
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
font-size: 24rpx;
|
||||
color: #A2A2A2;
|
||||
margin-top: 12rpx;
|
||||
}
|
||||
}
|
||||
.view-more-btn{
|
||||
padding: 10rpx 56rpx;
|
||||
background: #FFFFFF;
|
||||
color: #4C6EFB;
|
||||
border: 1rpx solid #4C6EFB;
|
||||
text-align: center;
|
||||
border-radius: 40rpx;
|
||||
width: fit-content;
|
||||
margin: 0 auto;
|
||||
margin-bottom: 20rpx;
|
||||
}
|
||||
</style>
|
||||
|
Before Width: | Height: | Size: 13 KiB |
|
Before Width: | Height: | Size: 13 KiB |
|
Before Width: | Height: | Size: 12 KiB |
|
Before Width: | Height: | Size: 13 KiB |
|
Before Width: | Height: | Size: 13 KiB |
|
Before Width: | Height: | Size: 155 KiB |
|
Before Width: | Height: | Size: 4.9 KiB |
|
Before Width: | Height: | Size: 5.3 KiB |
|
Before Width: | Height: | Size: 1.1 KiB |
|
Before Width: | Height: | Size: 989 B |
|
Before Width: | Height: | Size: 1.9 KiB |
51
pages.json
@@ -47,6 +47,20 @@
|
||||
"navigationStyle": "custom"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/test/userTypeTest",
|
||||
"style": {
|
||||
"navigationBarTitleText": "用户类型测试",
|
||||
"navigationStyle": "custom"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/job/publishJob",
|
||||
"style": {
|
||||
"navigationBarTitleText": "发布岗位",
|
||||
"navigationStyle": "custom"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/chat/chat",
|
||||
"style": {
|
||||
@@ -65,21 +79,20 @@
|
||||
"navigationBarTitleText": "",
|
||||
"navigationStyle": "custom"
|
||||
}
|
||||
// },
|
||||
// {
|
||||
// "path" : "packageA/pages/addWorkExperience/addWorkExperience",
|
||||
// "style" :
|
||||
// {
|
||||
// "navigationBarTitleText" : "添加工作经历",
|
||||
// "navigationStyle": "custom"
|
||||
// }
|
||||
},
|
||||
{
|
||||
"path" : "packageA/pages/addWorkExperience/addWorkExperience",
|
||||
"style" :
|
||||
{
|
||||
"navigationBarTitleText" : "添加工作经历",
|
||||
"navigationStyle": "custom"
|
||||
}
|
||||
}
|
||||
|
||||
],
|
||||
"subpackages": [{
|
||||
"root": "packageA",
|
||||
"pages": [
|
||||
{
|
||||
"pages": [{
|
||||
"path": "pages/choiceness/choiceness",
|
||||
"style": {
|
||||
"navigationBarTitleText": "精选",
|
||||
@@ -226,24 +239,6 @@
|
||||
}
|
||||
}
|
||||
]
|
||||
},{
|
||||
"root": "packageRc",
|
||||
"pages": [
|
||||
{
|
||||
"path" : "pages/index/index",
|
||||
"style" :
|
||||
{
|
||||
"navigationBarTitleText" : "高校毕业生智慧就业"
|
||||
}
|
||||
},{
|
||||
"path": "pages/daiban/daiban",
|
||||
"style": {
|
||||
"navigationBarTitleText": "待办任务",
|
||||
"navigationBarBackgroundColor": "#4778EC",
|
||||
"navigationBarTextStyle": "white"
|
||||
}
|
||||
}
|
||||
]
|
||||
}],
|
||||
"tabBar": {
|
||||
"custom": true,
|
||||
|
||||
@@ -8,18 +8,99 @@
|
||||
</view>
|
||||
<!-- <view class="chart button-click">职业图谱</view> -->
|
||||
</view>
|
||||
<view class="cards" v-if="userInfo.isCompanyUser">
|
||||
<view class="cards" v-if="userInfo.userType !== 0">
|
||||
<view class="card press-button" @click="navTo('/pages/nearby/nearby')">
|
||||
<view class="card-title">附近工作</view>
|
||||
<view class="card-text">好岗职等你来</view>
|
||||
</view>
|
||||
<view class="card press-button" @click="navTo('/packageA/pages/choiceness/choiceness')">
|
||||
<!-- <view class="card press-button" @click="navTo('/packageA/pages/choiceness/choiceness')">
|
||||
<view class="card-title">精选企业</view>
|
||||
<view class="card-text">优选职得信赖</view>
|
||||
</view> -->
|
||||
</view>
|
||||
|
||||
<!-- 用户类型切换器(测试用) -->
|
||||
<UserTypeSwitcher v-if="showUserTypeSwitcher" />
|
||||
|
||||
<!-- 服务功能网格 -->
|
||||
<view class="service-grid" v-if="userInfo.userType !== 0">
|
||||
<view class="service-item press-button" @click="navToService('service-guidance')">
|
||||
<view class="service-icon service-icon-1">
|
||||
<uni-icons type="auth-filled" size="32" color="#FFFFFF"></uni-icons>
|
||||
</view>
|
||||
<view class="service-title">服务指导</view>
|
||||
</view>
|
||||
<view class="service-item press-button" @click="navToService('public-recruitment')">
|
||||
<view class="service-icon service-icon-2">
|
||||
<svg t="1760592459382" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="4717" width="32" height="32">
|
||||
<path d="M652.4 934.1H91.9V110.2c0-26.7 21.7-48.3 48.3-48.3H604c26.7 0 48.3 21.7 48.3 48.3v823.9z m-513-47.4H605V110.2c0-0.5-0.4-0.9-0.9-0.9H140.3c-0.5 0-0.9 0.4-0.9 0.9v776.5z" fill="#FFFFFF" p-id="4718"></path>
|
||||
<path d="M929.9 934.5l-325.7-4.8V412.3c0-26.7 21.7-48.3 48.3-48.3h229.1c26.7 0 48.3 21.7 48.3 48.3v522.2z m-278.3-51.6l230.8 3.4v-474c0-0.5-0.4-0.9-0.9-0.9h-229c-0.5 0-0.9 0.4-0.9 0.9v470.6zM340.9 319.9c0 1.3-1.1 2.4-2.4 2.4H236.8c-1.3 0-2.4-1.1-2.5-2.4V218.2c0-1.3 1.1-2.4 2.5-2.4h101.7c1.3 0 2.4 1.1 2.4 2.4v101.7zM510 319.9c0 1.3-1.1 2.4-2.4 2.4H405.9c-1.3 0-2.4-1.1-2.4-2.4V218.2c0-1.3 1.1-2.4 2.4-2.4h101.7c1.3 0 2.4 1.1 2.4 2.4v101.7zM340.9 475.1c0 1.3-1.1 2.4-2.4 2.4H236.8c-1.3 0-2.4-1.1-2.5-2.4V373.4c0-1.4 1.1-2.4 2.5-2.5h101.7c1.3 0 2.4 1.1 2.4 2.5v101.7zM510 475.1c0 1.3-1.1 2.4-2.4 2.4H405.9c-1.3 0-2.4-1.1-2.4-2.4V373.4c0-1.4 1.1-2.4 2.4-2.5h101.7c1.3 0 2.4 1.1 2.4 2.5v101.7zM340.9 630.3c0 1.3-1.1 2.4-2.4 2.4H236.8c-1.3 0-2.4-1.1-2.5-2.4V528.6c0-1.4 1.1-2.4 2.5-2.4h101.7c1.3 0 2.4 1.1 2.4 2.4v101.7zM510 630.3c0 1.3-1.1 2.4-2.4 2.4H405.9c-1.3 0-2.4-1.1-2.4-2.4V528.6c0-1.4 1.1-2.4 2.4-2.4h101.7c1.3 0 2.4 1.1 2.4 2.4v101.7zM340.9 785.5c0 1.4-1.1 2.4-2.4 2.5H236.8c-1.3 0-2.4-1.1-2.5-2.5V683.9c0-1.4 1.1-2.4 2.5-2.5h101.7c1.3 0 2.4 1.1 2.4 2.5v101.6zM510 785.5c0 1.4-1.1 2.4-2.4 2.5H405.9c-1.3 0-2.4-1.1-2.4-2.5V683.9c0-1.4 1.1-2.4 2.4-2.5h101.7c1.3 0 2.4 1.1 2.4 2.5v101.6z" fill="#FFFFFF" p-id="4719"></path>
|
||||
<path d="M820.3 598.8c0 1.3-1.1 2.4-2.4 2.4H716.2c-1.4 0-2.4-1.1-2.4-2.4V497.1c0-1.3 1.1-2.4 2.4-2.4h101.7c1.3 0 2.4 1.1 2.4 2.4v101.7z m0 0M820.3 754c0 1.3-1.1 2.4-2.4 2.5H716.2c-1.4 0-2.4-1.1-2.4-2.5V652.3c0-1.3 1.1-2.4 2.4-2.4h101.7c1.3 0 2.4 1.1 2.4 2.4V754z m0 0M998.1 934.1H23.7C10.6 934.1 0 923.5 0 910.4s10.6-23.7 23.7-23.7h974.4c13.1 0 23.7 10.6 23.7 23.7s-10.6 23.7-23.7 23.7z" fill="#FFFFFF" p-id="4720"></path>
|
||||
</svg>
|
||||
</view>
|
||||
<view class="service-title">事业单位招录</view>
|
||||
</view>
|
||||
<view class="service-item press-button" @click="navToService('resume-creation')">
|
||||
<view class="service-icon service-icon-3">
|
||||
<svg t="1760592325364" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="2765" width="32" height="32">
|
||||
<path d="M294.56 128.48a8 8 0 0 1 8 8v96a8 8 0 0 0 8 8h403.23a8 8 0 0 0 8-8v-96a8 8 0 0 1 8-8h99.71c17.673 0 32 14.327 32 32v744.65c0 17.673-14.327 32-32 32h-635c-17.673 0-32-14.327-32-32V160.48c0-17.673 14.327-32 32-32h100.06zM366.5 351c-28.443 0-51.5 23.057-51.5 51.5 0 18.94 10.224 35.491 25.453 44.435C313.845 457.44 295 483.562 295 514.125c0 39.833 143 39.833 143 0 0-30.563-18.845-56.686-45.454-67.188C407.776 437.991 418 421.44 418 402.5c0-28.443-23.057-51.5-51.5-51.5zM721 479H520a8 8 0 0 0-8 8v48a8 8 0 0 0 8 8h201a8 8 0 0 0 8-8v-48a8 8 0 0 0-8-8z m0-128H520a8 8 0 0 0-8 8v48a8 8 0 0 0 8 8h201a8 8 0 0 0 8-8v-48a8 8 0 0 0-8-8zM677.36 65.87c4.418 0 8 2.583 8 5.77V186.1c0 1.53-0.843 2.998-2.343 4.08-1.5 1.082-3.535 1.69-5.657 1.69H351.65c-4.418 0-8-2.583-8-5.77V71.64c0-3.187 3.582-5.77 8-5.77h325.71z" fill="#FFFFFF" p-id="2766"></path>
|
||||
</svg>
|
||||
</view>
|
||||
<view class="service-title">简历制作</view>
|
||||
</view>
|
||||
<view class="service-item press-button" @click="navToService('labor-policy')">
|
||||
<view class="service-icon service-icon-4">
|
||||
<svg t="1760592549133" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="6704" width="32" height="32">
|
||||
<path d="M907.295876 1023.702H192.2831A107.635966 107.635966 0 0 1 76.960136 908.378036v-184.519942a38.441988 38.441988 0 0 1 38.440988-38.440988 38.441988 38.441988 0 0 1 38.441988 38.441988v184.518942c0 23.064993 0 38.440988 38.440988 38.440988h715.012776a38.441988 38.441988 0 0 1 0 76.882976z" fill="#FFFFFF" p-id="6705"></path>
|
||||
<path d="M822.723903 893.001041H115.400124A38.441988 38.441988 0 0 1 76.960136 854.560053V116.482284A115.324964 115.324964 0 0 1 192.2831 1.15832h630.440803a107.635966 107.635966 0 0 1 123.012961 115.323964v661.194793A123.012962 123.012962 0 0 1 822.723903 893.000041z m-668.881791-76.882976h668.881791c15.376995 0 46.129986-7.687998 46.129985-38.440988V116.482284c0-30.75299-15.376995-38.440988-46.129985-38.440988h-630.439803a38.441988 38.441988 0 0 0-38.441988 38.440988z" fill="#FFFFFF" p-id="6706"></path>
|
||||
<path d="M392.180037 708.482099h-30.75399a69.194978 69.194978 0 0 1-30.75299-61.505981l23.064992-107.636967-76.882976-76.882976a61.505981 61.505981 0 0 1-15.376995-61.50598 61.505981 61.505981 0 0 1 53.817983-38.441988l99.947969-15.375995 46.129986-99.947969a61.505981 61.505981 0 0 1 107.635966 0l46.129986 92.259971 99.947969 15.375995a61.505981 61.505981 0 0 1 38.440988 38.440988 61.505981 61.505981 0 0 1-7.687998 61.506981l-76.882976 76.882976 15.376995 107.635966a61.505981 61.505981 0 0 1-23.064993 61.506981 61.505981 61.505981 0 0 1-61.50698 0l-92.259972-46.129986-84.569973 46.129986z m123.011962-61.505981z m-130.700959-15.376995z m123.012961-53.817984h23.064993l76.882976 38.440988-15.376995-76.882976a61.505981 61.505981 0 0 1 15.376995-53.817983l61.505981-61.505981h-84.570974c-7.688998-7.688998-30.75299-15.376995-38.441988-38.441987l-30.75299-76.882976-38.441988 69.194978c-15.375995 23.064993-30.75299 38.440988-46.129986 38.440988h-76.881976l53.817984 61.506981a53.817983 53.817983 0 0 1 23.064992 46.129985l-15.376995 92.259971 69.194979-30.75399z m-146.077954-30.75299zM615.139968 347.132212z m-192.20794-7.688998z m76.882976-61.505981z m30.75399 0z" fill="#FFFFFF" p-id="6707"></path>
|
||||
</svg>
|
||||
</view>
|
||||
<view class="service-title">劳动政策指引</view>
|
||||
</view>
|
||||
<view class="service-item press-button" @click="navToService('skill-training')">
|
||||
<view class="service-icon service-icon-5">
|
||||
<svg t="1760592652548" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="9602" width="32" height="32">
|
||||
<path d="M938.1888 34.2016H87.8592C50.3808 34.2016 20.48 64.7168 20.48 101.5808v522.4448c0 37.4784 30.5152 67.1744 67.1744 67.1744h97.0752v-167.3216c0-72.2944 58.9824-131.2768 131.2768-131.2768h65.9456c44.2368 0 85.6064 22.9376 109.568 59.5968l159.744-158.5152c12.6976-14.1312 23.9616-15.7696 30.5152-9.4208 6.3488 6.3488 6.3488 17.8176-5.5296 31.744L514.048 522.0352v169.1648h424.3456c37.4784 0 67.1744-30.5152 67.1744-67.1744V101.5808c-0.2048-36.864-30.1056-67.3792-67.3792-67.3792z m-589.824 346.9312c-50.7904 0-91.3408-41.3696-91.3408-91.3408 0-50.7904 41.3696-91.3408 91.3408-91.3408 50.7904 0 91.3408 41.3696 91.3408 91.3408v0.6144c0 49.9712-40.7552 90.7264-91.3408 90.7264zM129.6384 761.0368h54.4768c60.416 0 109.568 48.9472 109.568 109.568V989.184H19.8656v-119.1936c0.6144-60.0064 49.5616-108.9536 109.7728-108.9536z m711.2704 0h54.4768c60.416 0 109.568 48.9472 109.568 109.568V989.184H731.3408v-119.1936c0.6144-60.0064 49.5616-108.9536 109.568-108.9536z m-356.352 0h54.4768c60.416 0 109.568 48.9472 109.568 109.568V989.184H375.6032v-119.1936c0-60.0064 48.9472-108.9536 108.9536-108.9536z" fill="#FFFFFF" p-id="9603"></path>
|
||||
</svg>
|
||||
</view>
|
||||
<view class="service-title">技能培训信息</view>
|
||||
</view>
|
||||
<view class="service-item press-button" @click="navToService('skill-evaluation')">
|
||||
<view class="service-icon service-icon-6">
|
||||
<svg t="1760592781996" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="11602" width="32" height="32">
|
||||
<path d="M857.414449 459.839013c-11.227716 0-19.427468 8.609075-19.427468 20.708648l0 366.92895c0 40.951691-32.461319 74.631768-71.780837 74.631768L189.751157 922.108379c-19.48682 0-41.531905-8.202822-57.936527-21.98778-18.148335-14.71719-28.503171-34.088376-28.503171-53.108568L103.311459 269.045619c0-19.428491 10.354835-40.137139 28.503171-56.94699 17.276479-16.403598 38.915311-26.350135 58.34278-26.350135l310.738184 0c11.634991 0 20.708648-8.201799 20.708648-19.428491 0-11.168364-9.073656-18.962887-20.708648-18.962887L190.157409 147.357116c-69.976748 0-124.888382 53.514821-124.888382 121.689527l0 577.965387c0 32.80822 12.505825 61.774949 36.297694 82.426291 22.453385 20.300348 53.980425 31.119765 88.590688 31.119765l576.918545 0c33.739429 0 61.8343-10.819416 81.261769-30.655184 19.429515-20.300348 29.375028-48.802496 29.375028-82.890872l-0.871857-366.463346C876.841917 468.913693 868.639095 459.839013 857.414449 459.839013zM935.650301 182.722578l-94.234221-94.52484c-12.970406-13.3214-32.397874-21.1149-53.166897-21.1149-19.834744 0-39.320541 7.794523-53.106522 20.707624l-76.550467 90.627067L250.245949 569.08002l-26.409486 228.720192 7.388271 6.515391 222.961024-30.248931 390.255215-408.752498 91.208305-73.816193C964.151425 262.588557 964.561771 211.224726 935.650301 182.722578zM273.97949 754.638179l8.260128-134.660956 124.422777 124.308167L273.97949 754.638179zM812.041052 344.199273 439.062316 719.679993l-134.370337-134.661979 376.410905-374.666168 132.217301 132.101667L812.041052 344.199273zM907.089825 260.029268l-59.622936 59.506279-143.03774-143.270031 59.214636-59.564607c6.459109-6.458085 15.124466-9.946536 24.605398-9.946536 9.540284 0 18.150382 3.489474 24.665773 9.946536l94.174869 94.116541C920.526859 224.197178 920.526859 246.64954 907.089825 260.029268z" fill="#FFFFFF" p-id="11603"></path>
|
||||
</svg>
|
||||
</view>
|
||||
<view class="service-title">技能评价指引</view>
|
||||
</view>
|
||||
<view class="service-item press-button" @click="navToService('question-bank')">
|
||||
<view class="service-icon service-icon-7">
|
||||
<svg t="1760592856482" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="12615" width="32" height="32">
|
||||
<path d="M847.644444 1024H150.755556c-48.355556-5.688889-88.177778-42.666667-93.866667-93.866667V93.866667C62.577778 45.511111 102.4 5.688889 150.755556 0h466.488888l327.111112 327.111111v605.866667c-8.533333 48.355556-48.355556 85.333333-96.711112 91.022222z m0-389.688889V327.111111h-184.888888c-25.6-2.844444-45.511111-22.755556-45.511112-45.511111V93.866667H196.266667c-25.6-2.844444-45.511111 17.066667-45.511111 42.666666v748.088889c5.688889 22.755556 22.755556 42.666667 45.511111 45.511111h605.866666c25.6-2.844444 45.511111-22.755556 45.511111-45.511111v-250.311111zM554.666667 824.888889c-17.066667 17.066667-48.355556 17.066667-65.422223 0-17.066667-17.066667-17.066667-48.355556 0-65.422222l233.244445-233.244445c17.066667-17.066667 48.355556-17.066667 65.422222 0 17.066667 17.066667 17.066667 48.355556 0 65.422222L554.666667 824.888889z m76.8-312.888889h-341.333334c-25.6 0-45.511111-19.911111-45.511111-45.511111 0-25.6 19.911111-45.511111 45.511111-45.511111h418.133334c8.533333 0 17.066667 2.844444 22.755555 8.533333-17.066667 5.688889-31.288889 14.222222-42.666666 28.444445l-56.888889 54.044444z m-341.333334 45.511111h292.977778l-93.866667 93.866667h-201.955555c-25.6 0-45.511111-19.911111-45.511111-45.511111 0-25.6 22.755556-48.355556 48.355555-48.355556z m0 139.377778h153.6l-25.6 25.6c-17.066667 17.066667-28.444444 39.822222-34.133333 65.422222h-93.866667c-25.6 0-45.511111-19.911111-45.511111-45.511111-2.844444-22.755556 19.911111-45.511111 45.511111-45.511111z m463.644445 48.355555c0 25.6-19.911111 45.511111-45.511111 45.511112h-17.066667l62.577778-62.577778v17.066666z" fill="#FFFFFF" p-id="12616"></path>
|
||||
</svg>
|
||||
</view>
|
||||
<view class="service-title">题库和考试</view>
|
||||
</view>
|
||||
<view class="service-item press-button" @click="navToService('quality-assessment')">
|
||||
<view class="service-icon service-icon-8">
|
||||
<svg t="1760594375550" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="14087" width="32" height="32">
|
||||
<path d="M815.542857 73.142857c58.514286 0 106.057143 47.542857 106.057143 106.057143v636.342857c0 58.514286-47.542857 106.057143-106.057143 106.057143h-636.342857c-58.514286 0-106.057143-47.542857-106.057143-106.057143v-636.342857C73.142857 120.685714 120.685714 73.142857 179.2 73.142857z m0 79.506286h-636.342857c-14.628571 0-26.550857 11.922286-26.550857 26.550857v636.342857c0 14.628571 11.922286 26.477714 26.550857 26.477714h636.342857c14.628571 0 26.477714-11.849143 26.477714-26.477714v-636.342857c0-14.628571-11.849143-26.550857-26.477714-26.550857zM362.788571 497.371429a120.173714 120.173714 0 1 1 0 240.420571 120.173714 120.173714 0 0 1 0-240.420571z m373.248 95.451428c20.48 0 37.083429 16.603429 37.083429 37.156572a42.422857 42.422857 0 0 1-37.156571 42.422857H594.651429a42.422857 42.422857 0 0 1-37.083429-42.422857c0-20.48 16.603429-37.156571 37.083429-37.156572z m-373.321142-19.017143a43.739429 43.739429 0 1 0 0 87.478857 43.739429 43.739429 0 0 0 0-87.405714z m64.365714-291.693714a37.083429 37.083429 0 0 1 48.493714 3.437714 37.302857 37.302857 0 0 1 2.486857 49.664L366.592 446.610286a37.156571 37.156571 0 0 1-52.004571-0.073143l-75.264-75.337143a37.083429 37.083429 0 0 1 3.510857-48.566857 37.376 37.376 0 0 1 49.956571-2.121143l45.494857 50.102857z m308.882286 45.568a37.156571 37.156571 0 0 1 0 74.24H594.651429a37.083429 37.083429 0 0 1 0-74.24z" fill="#FFFFFF" p-id="14088"></path>
|
||||
</svg>
|
||||
</view>
|
||||
<view class="service-title">素质测评</view>
|
||||
</view>
|
||||
<view class="service-item press-button" @click="navToService('ai-interview')">
|
||||
<view class="service-icon service-icon-9">
|
||||
<svg t="1760594523105" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="18134" width="32" height="32">
|
||||
<path d="M826.368 325.632c0-7.168 2.048-10.24 10.24-10.24h123.904c7.168 0 10.24 2.048 10.24 10.24v621.568c0 7.168-2.048 10.24-10.24 10.24h-122.88c-8.192 0-10.24-4.096-10.24-10.24l-1.024-621.568z m-8.192-178.176c0-50.176 35.84-79.872 79.872-79.872 48.128 0 79.872 32.768 79.872 79.872 0 52.224-33.792 79.872-81.92 79.872-46.08 1.024-77.824-27.648-77.824-79.872zM462.848 584.704C441.344 497.664 389.12 307.2 368.64 215.04h-2.048c-16.384 92.16-58.368 247.808-92.16 369.664h188.416zM243.712 712.704l-62.464 236.544c-2.048 7.168-4.096 8.192-12.288 8.192H54.272c-8.192 0-10.24-2.048-8.192-12.288l224.256-783.36c4.096-13.312 7.168-26.624 8.192-65.536 0-6.144 2.048-8.192 7.168-8.192H450.56c6.144 0 8.192 2.048 10.24 8.192l250.88 849.92c2.048 7.168 0 10.24-7.168 10.24H573.44c-7.168 0-10.24-2.048-12.288-7.168l-65.536-236.544c1.024 1.024-251.904 0-251.904 0z" fill="#FFFFFF" p-id="18135"></path>
|
||||
</svg>
|
||||
</view>
|
||||
<view class="service-title">AI智能面试</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="nav-filter" v-if="userInfo.isCompanyUser">
|
||||
<view class="nav-filter" v-if="userInfo.userType !== 0">
|
||||
<view class="filter-top" @touchmove.stop.prevent>
|
||||
<scroll-view :scroll-x="true" :show-scrollbar="false" class="tab-scroll">
|
||||
<view class="jobs-left">
|
||||
@@ -176,6 +257,7 @@ import selectFilter from '@/components/selectFilter/selectFilter.vue';
|
||||
import { useRecommedIndexedDBStore, jobRecommender } from '@/stores/useRecommedIndexedDBStore.js';
|
||||
import { useScrollDirection } from '@/hook/useScrollDirection';
|
||||
import { useColumnCount } from '@/hook/useColumnCount';
|
||||
import UserTypeSwitcher from '@/components/UserTypeSwitcher/UserTypeSwitcher.vue';
|
||||
const { isScrollingDown, handleScroll } = useScrollDirection();
|
||||
const recommedIndexDb = useRecommedIndexedDBStore();
|
||||
const emits = defineEmits(['onShowTabbar']);
|
||||
@@ -209,6 +291,8 @@ const rangeOptions = ref([
|
||||
{ value: 3, text: '疆外' },
|
||||
]);
|
||||
const isLoaded = ref(false);
|
||||
// 控制用户类型切换器显示(测试用)
|
||||
const showUserTypeSwitcher = ref(true);
|
||||
|
||||
const { columnCount, columnSpace } = useColumnCount(() => {
|
||||
pageState.pageSize = 10 * (columnCount.value - 1);
|
||||
@@ -297,6 +381,35 @@ function nextDetail(job) {
|
||||
navTo(`/packageA/pages/post/post?jobId=${btoa(job.jobId)}`);
|
||||
}
|
||||
|
||||
function navToService(serviceType) {
|
||||
// 根据服务类型跳转到不同页面
|
||||
const serviceRoutes = {
|
||||
'service-guidance': '/pages/service/guidance',
|
||||
'public-recruitment': '/pages/service/public-recruitment',
|
||||
'resume-creation': '/packageA/pages/myResume/myResume',
|
||||
'labor-policy': '/pages/service/labor-policy',
|
||||
'skill-training': '/pages/service/skill-training',
|
||||
'skill-evaluation': '/pages/service/skill-evaluation',
|
||||
'question-bank': '/pages/service/question-bank',
|
||||
'quality-assessment': '/pages/service/quality-assessment',
|
||||
'ai-interview': '/pages/chat/chat',
|
||||
'job-search': '/pages/search/search',
|
||||
'career-planning': '/pages/service/career-planning',
|
||||
'salary-query': '/pages/service/salary-query',
|
||||
'company-info': '/pages/service/company-info',
|
||||
'interview-tips': '/pages/service/interview-tips',
|
||||
'employment-news': '/pages/service/employment-news',
|
||||
'more-services': '/pages/service/more-services'
|
||||
};
|
||||
|
||||
const route = serviceRoutes[serviceType];
|
||||
if (route) {
|
||||
navTo(route);
|
||||
} else {
|
||||
$api.msg('功能开发中,敬请期待');
|
||||
}
|
||||
}
|
||||
|
||||
function openFilter() {
|
||||
showFilter.value = true;
|
||||
emits('onShowTabbar', false);
|
||||
@@ -304,6 +417,7 @@ function openFilter() {
|
||||
title: '筛选',
|
||||
maskClick: true,
|
||||
success: (values) => {
|
||||
console.log('---', values);
|
||||
pageState.search = {
|
||||
...pageState.search,
|
||||
};
|
||||
@@ -596,7 +710,7 @@ defineExpose({ loadData });
|
||||
padding: 10rpx 28rpx
|
||||
display: grid
|
||||
grid-gap: 38rpx;
|
||||
grid-template-columns: 1fr 1fr;
|
||||
grid-template-columns: 1fr;
|
||||
.card
|
||||
height: calc(158rpx - 40rpx);
|
||||
padding: 22rpx 26rpx
|
||||
@@ -624,6 +738,163 @@ defineExpose({ loadData });
|
||||
background-size: cover;
|
||||
background-position: center;
|
||||
|
||||
// 服务功能网格样式
|
||||
.service-grid
|
||||
padding: 20rpx 28rpx
|
||||
display: grid
|
||||
grid-template-columns: 1fr 1fr 1fr 1fr
|
||||
grid-gap: 20rpx
|
||||
.service-item
|
||||
display: flex
|
||||
flex-direction: column
|
||||
align-items: center
|
||||
justify-content: center
|
||||
height: 120rpx
|
||||
background: transparent
|
||||
padding: 10px 0px
|
||||
.service-icon
|
||||
width: 88rpx
|
||||
height: 88rpx
|
||||
border-radius: 12rpx
|
||||
margin-bottom: 8rpx
|
||||
flex-shrink: 0
|
||||
.service-icon-1
|
||||
background: linear-gradient(180deg, #FF8E8E 0%, #E53E3E 100%)
|
||||
position: relative
|
||||
display: flex
|
||||
align-items: center
|
||||
justify-content: center
|
||||
.service-icon-2
|
||||
background: linear-gradient(180deg, #6ED5CE 0%, #38B2AC 100%)
|
||||
position: relative
|
||||
display: flex
|
||||
align-items: center
|
||||
justify-content: center
|
||||
.service-icon-3
|
||||
background: linear-gradient(180deg, #6BC5D8 0%, #3182CE 100%)
|
||||
position: relative
|
||||
display: flex
|
||||
align-items: center
|
||||
justify-content: center
|
||||
.service-icon-4
|
||||
background: linear-gradient(180deg, #FFB74D 0%, #ED8936 100%)
|
||||
position: relative
|
||||
display: flex
|
||||
align-items: center
|
||||
justify-content: center
|
||||
.service-icon-5
|
||||
background: linear-gradient(180deg, #F06292 0%, #C2185B 100%)
|
||||
position: relative
|
||||
display: flex
|
||||
align-items: center
|
||||
justify-content: center
|
||||
.service-icon-6
|
||||
background: linear-gradient(180deg, #FFB74D 0%, #ED8936 100%)
|
||||
position: relative
|
||||
display: flex
|
||||
align-items: center
|
||||
justify-content: center
|
||||
.service-icon-7
|
||||
background: linear-gradient(180deg, #6BC5D8 0%, #3182CE 100%)
|
||||
position: relative
|
||||
display: flex
|
||||
align-items: center
|
||||
justify-content: center
|
||||
.service-icon-8
|
||||
background: linear-gradient(180deg, #81C784 0%, #4CAF50 100%)
|
||||
position: relative
|
||||
display: flex
|
||||
align-items: center
|
||||
justify-content: center
|
||||
.service-icon-9
|
||||
background: linear-gradient(180deg, #6BC5D8 0%, #3182CE 100%)
|
||||
position: relative
|
||||
display: flex
|
||||
align-items: center
|
||||
justify-content: center
|
||||
.service-icon-10
|
||||
background: linear-gradient(135deg, #9C27B0 0%, #BA68C8 100%)
|
||||
position: relative
|
||||
&::before
|
||||
content: '🔍'
|
||||
position: absolute
|
||||
top: 50%
|
||||
left: 50%
|
||||
transform: translate(-50%, -50%)
|
||||
font-size: 32rpx
|
||||
.service-icon-11
|
||||
background: linear-gradient(135deg, #FF9800 0%, #FFB74D 100%)
|
||||
position: relative
|
||||
&::before
|
||||
content: '📈'
|
||||
position: absolute
|
||||
top: 50%
|
||||
left: 50%
|
||||
transform: translate(-50%, -50%)
|
||||
font-size: 32rpx
|
||||
.service-icon-12
|
||||
background: linear-gradient(135deg, #4CAF50 0%, #81C784 100%)
|
||||
position: relative
|
||||
&::before
|
||||
content: '💰'
|
||||
position: absolute
|
||||
top: 50%
|
||||
left: 50%
|
||||
transform: translate(-50%, -50%)
|
||||
font-size: 32rpx
|
||||
.service-icon-13
|
||||
background: linear-gradient(135deg, #607D8B 0%, #90A4AE 100%)
|
||||
position: relative
|
||||
&::before
|
||||
content: '🏢'
|
||||
position: absolute
|
||||
top: 50%
|
||||
left: 50%
|
||||
transform: translate(-50%, -50%)
|
||||
font-size: 32rpx
|
||||
.service-icon-14
|
||||
background: linear-gradient(135deg, #E91E63 0%, #F06292 100%)
|
||||
position: relative
|
||||
&::before
|
||||
content: '💡'
|
||||
position: absolute
|
||||
top: 50%
|
||||
left: 50%
|
||||
transform: translate(-50%, -50%)
|
||||
font-size: 32rpx
|
||||
.service-icon-15
|
||||
background: linear-gradient(135deg, #795548 0%, #A1887F 100%)
|
||||
position: relative
|
||||
&::before
|
||||
content: '📰'
|
||||
position: absolute
|
||||
top: 50%
|
||||
left: 50%
|
||||
transform: translate(-50%, -50%)
|
||||
font-size: 32rpx
|
||||
.service-icon-16
|
||||
background: linear-gradient(135deg, #424242 0%, #757575 100%)
|
||||
position: relative
|
||||
&::before
|
||||
content: '⚙️'
|
||||
position: absolute
|
||||
top: 50%
|
||||
left: 50%
|
||||
transform: translate(-50%, -50%)
|
||||
font-size: 32rpx
|
||||
.service-title
|
||||
font-family: 'PingFangSC-Medium', 'PingFang SC', 'Helvetica Neue', Helvetica, Arial, 'Microsoft YaHei', sans-serif
|
||||
font-weight: 500
|
||||
font-size: 24rpx
|
||||
color: #333333
|
||||
text-align: center
|
||||
line-height: 1.2
|
||||
white-space: nowrap
|
||||
overflow: hidden
|
||||
text-overflow: ellipsis
|
||||
width: 100%
|
||||
max-width: 100%
|
||||
|
||||
.nav-filter
|
||||
padding: 16rpx 28rpx 0 28rpx
|
||||
font-family: 'PingFangSC-Medium', 'PingFang SC', 'Helvetica Neue', Helvetica, Arial, 'Microsoft YaHei', sans-serif;
|
||||
|
||||
454
pages/job/publishJob.vue
Normal file
@@ -0,0 +1,454 @@
|
||||
<template>
|
||||
<view class="publish-job-page">
|
||||
<!-- 头部导航 -->
|
||||
<view class="header">
|
||||
<view class="header-left" @click="goBack">
|
||||
<image src="@/static/icon/back.png" class="back-icon"></image>
|
||||
</view>
|
||||
<view class="header-title">发布岗位</view>
|
||||
<view class="header-right"></view>
|
||||
</view>
|
||||
|
||||
<!-- 主要内容 -->
|
||||
<view class="content">
|
||||
<!-- 岗位基本信息 -->
|
||||
<view class="section">
|
||||
<view class="section-title">岗位基本信息</view>
|
||||
<view class="form-group">
|
||||
<view class="label">岗位名称 *</view>
|
||||
<input
|
||||
class="input"
|
||||
placeholder="请输入岗位名称"
|
||||
v-model="formData.jobTitle"
|
||||
/>
|
||||
</view>
|
||||
<view class="form-group">
|
||||
<view class="label">岗位类型 *</view>
|
||||
<picker
|
||||
mode="selector"
|
||||
:range="jobTypes"
|
||||
@change="onJobTypeChange"
|
||||
class="picker"
|
||||
>
|
||||
<view class="picker-text">{{ selectedJobType || '请选择岗位类型' }}</view>
|
||||
</picker>
|
||||
</view>
|
||||
<view class="form-group">
|
||||
<view class="label">工作地点 *</view>
|
||||
<input
|
||||
class="input"
|
||||
placeholder="请输入工作地点"
|
||||
v-model="formData.workLocation"
|
||||
/>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 薪资待遇 -->
|
||||
<view class="section">
|
||||
<view class="section-title">薪资待遇</view>
|
||||
<view class="salary-row">
|
||||
<view class="form-group">
|
||||
<view class="label">最低薪资</view>
|
||||
<input
|
||||
class="input salary-input"
|
||||
placeholder="0"
|
||||
type="number"
|
||||
v-model="formData.minSalary"
|
||||
/>
|
||||
</view>
|
||||
<view class="salary-separator">-</view>
|
||||
<view class="form-group">
|
||||
<view class="label">最高薪资</view>
|
||||
<input
|
||||
class="input salary-input"
|
||||
placeholder="0"
|
||||
type="number"
|
||||
v-model="formData.maxSalary"
|
||||
/>
|
||||
</view>
|
||||
</view>
|
||||
<view class="form-group">
|
||||
<view class="label">薪资单位</view>
|
||||
<picker
|
||||
mode="selector"
|
||||
:range="salaryUnits"
|
||||
@change="onSalaryUnitChange"
|
||||
class="picker"
|
||||
>
|
||||
<view class="picker-text">{{ selectedSalaryUnit || '请选择薪资单位' }}</view>
|
||||
</picker>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 任职要求 -->
|
||||
<view class="section">
|
||||
<view class="section-title">任职要求</view>
|
||||
<view class="form-group">
|
||||
<view class="label">学历要求</view>
|
||||
<picker
|
||||
mode="selector"
|
||||
:range="educationLevels"
|
||||
@change="onEducationChange"
|
||||
class="picker"
|
||||
>
|
||||
<view class="picker-text">{{ selectedEducation || '请选择学历要求' }}</view>
|
||||
</picker>
|
||||
</view>
|
||||
<view class="form-group">
|
||||
<view class="label">工作经验</view>
|
||||
<picker
|
||||
mode="selector"
|
||||
:range="experienceLevels"
|
||||
@change="onExperienceChange"
|
||||
class="picker"
|
||||
>
|
||||
<view class="picker-text">{{ selectedExperience || '请选择工作经验' }}</view>
|
||||
</picker>
|
||||
</view>
|
||||
<view class="form-group">
|
||||
<view class="label">招聘人数</view>
|
||||
<input
|
||||
class="input"
|
||||
placeholder="请输入招聘人数"
|
||||
type="number"
|
||||
v-model="formData.recruitCount"
|
||||
/>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 岗位描述 -->
|
||||
<view class="section">
|
||||
<view class="section-title">岗位描述</view>
|
||||
<view class="form-group">
|
||||
<view class="label">岗位职责</view>
|
||||
<textarea
|
||||
class="textarea"
|
||||
placeholder="请详细描述岗位职责和工作内容"
|
||||
v-model="formData.jobDescription"
|
||||
></textarea>
|
||||
</view>
|
||||
<view class="form-group">
|
||||
<view class="label">任职要求</view>
|
||||
<textarea
|
||||
class="textarea"
|
||||
placeholder="请描述对候选人的具体要求"
|
||||
v-model="formData.jobRequirements"
|
||||
></textarea>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 联系方式 -->
|
||||
<view class="section">
|
||||
<view class="section-title">联系方式</view>
|
||||
<view class="form-group">
|
||||
<view class="label">联系人</view>
|
||||
<input
|
||||
class="input"
|
||||
placeholder="请输入联系人姓名"
|
||||
v-model="formData.contactPerson"
|
||||
/>
|
||||
</view>
|
||||
<view class="form-group">
|
||||
<view class="label">联系电话</view>
|
||||
<input
|
||||
class="input"
|
||||
placeholder="请输入联系电话"
|
||||
v-model="formData.contactPhone"
|
||||
/>
|
||||
</view>
|
||||
<view class="form-group">
|
||||
<view class="label">联系邮箱</view>
|
||||
<input
|
||||
class="input"
|
||||
placeholder="请输入联系邮箱"
|
||||
v-model="formData.contactEmail"
|
||||
/>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 底部操作按钮 -->
|
||||
<view class="footer">
|
||||
<view class="btn-group">
|
||||
<button class="btn btn-cancel" @click="goBack">取消</button>
|
||||
<button class="btn btn-publish" @click="publishJob">发布岗位</button>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { ref, reactive } from 'vue';
|
||||
|
||||
// 表单数据
|
||||
const formData = reactive({
|
||||
jobTitle: '',
|
||||
workLocation: '',
|
||||
minSalary: '',
|
||||
maxSalary: '',
|
||||
recruitCount: '',
|
||||
jobDescription: '',
|
||||
jobRequirements: '',
|
||||
contactPerson: '',
|
||||
contactPhone: '',
|
||||
contactEmail: ''
|
||||
});
|
||||
|
||||
// 选择器数据
|
||||
const jobTypes = ['技术类', '销售类', '管理类', '服务类', '其他'];
|
||||
const salaryUnits = ['元/月', '元/年', '元/小时'];
|
||||
const educationLevels = ['不限', '高中', '大专', '本科', '硕士', '博士'];
|
||||
const experienceLevels = ['不限', '应届毕业生', '1-3年', '3-5年', '5-10年', '10年以上'];
|
||||
|
||||
// 选中的值
|
||||
const selectedJobType = ref('');
|
||||
const selectedSalaryUnit = ref('');
|
||||
const selectedEducation = ref('');
|
||||
const selectedExperience = ref('');
|
||||
|
||||
// 选择器事件处理
|
||||
const onJobTypeChange = (e) => {
|
||||
selectedJobType.value = jobTypes[e.detail.value];
|
||||
};
|
||||
|
||||
const onSalaryUnitChange = (e) => {
|
||||
selectedSalaryUnit.value = salaryUnits[e.detail.value];
|
||||
};
|
||||
|
||||
const onEducationChange = (e) => {
|
||||
selectedEducation.value = educationLevels[e.detail.value];
|
||||
};
|
||||
|
||||
const onExperienceChange = (e) => {
|
||||
selectedExperience.value = experienceLevels[e.detail.value];
|
||||
};
|
||||
|
||||
// 返回上一页
|
||||
const goBack = () => {
|
||||
uni.navigateBack();
|
||||
};
|
||||
|
||||
// 发布岗位
|
||||
const publishJob = () => {
|
||||
// 简单验证
|
||||
if (!formData.jobTitle) {
|
||||
uni.showToast({
|
||||
title: '请输入岗位名称',
|
||||
icon: 'none'
|
||||
});
|
||||
return;
|
||||
}
|
||||
|
||||
if (!formData.workLocation) {
|
||||
uni.showToast({
|
||||
title: '请输入工作地点',
|
||||
icon: 'none'
|
||||
});
|
||||
return;
|
||||
}
|
||||
|
||||
// 模拟发布成功
|
||||
uni.showLoading({
|
||||
title: '发布中...'
|
||||
});
|
||||
|
||||
setTimeout(() => {
|
||||
uni.hideLoading();
|
||||
uni.showToast({
|
||||
title: '发布成功',
|
||||
icon: 'success'
|
||||
});
|
||||
|
||||
// 延迟返回
|
||||
setTimeout(() => {
|
||||
goBack();
|
||||
}, 1500);
|
||||
}, 2000);
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.publish-job-page {
|
||||
min-height: 100vh;
|
||||
background-color: #f5f5f5;
|
||||
padding-bottom: 120rpx;
|
||||
}
|
||||
|
||||
.header {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
padding: 20rpx 30rpx;
|
||||
background: #fff;
|
||||
border-bottom: 1rpx solid #eee;
|
||||
|
||||
.header-left {
|
||||
width: 60rpx;
|
||||
height: 60rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
|
||||
.back-icon {
|
||||
width: 40rpx;
|
||||
height: 40rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.header-title {
|
||||
font-size: 36rpx;
|
||||
font-weight: 600;
|
||||
color: #333;
|
||||
}
|
||||
|
||||
.header-right {
|
||||
width: 60rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.content {
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.section {
|
||||
background: #fff;
|
||||
border-radius: 0;
|
||||
padding: 30rpx;
|
||||
margin-bottom: 20rpx;
|
||||
width: 100%;
|
||||
|
||||
&:last-child {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
.section-title {
|
||||
font-size: 32rpx;
|
||||
font-weight: 600;
|
||||
color: #333;
|
||||
margin-bottom: 30rpx;
|
||||
padding-bottom: 20rpx;
|
||||
border-bottom: 2rpx solid #f0f0f0;
|
||||
}
|
||||
}
|
||||
|
||||
.form-group {
|
||||
margin-bottom: 30rpx;
|
||||
|
||||
&:last-child {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
.label {
|
||||
font-size: 28rpx;
|
||||
color: #333;
|
||||
margin-bottom: 15rpx;
|
||||
font-weight: 500;
|
||||
}
|
||||
|
||||
.input {
|
||||
width: 100%;
|
||||
height: 80rpx;
|
||||
background: #fff;
|
||||
border: none;
|
||||
border-bottom: 2rpx solid #e0e0e0;
|
||||
border-radius: 0;
|
||||
padding: 0 0 10rpx 0;
|
||||
font-size: 28rpx;
|
||||
color: #333;
|
||||
|
||||
&:focus {
|
||||
border-bottom-color: #256BFA;
|
||||
background: #fff;
|
||||
}
|
||||
}
|
||||
|
||||
.textarea {
|
||||
width: 100%;
|
||||
min-height: 120rpx;
|
||||
background: #fff;
|
||||
border: none;
|
||||
border-bottom: 2rpx solid #e0e0e0;
|
||||
border-radius: 0;
|
||||
padding: 20rpx 0 10rpx 0;
|
||||
font-size: 28rpx;
|
||||
color: #333;
|
||||
|
||||
&:focus {
|
||||
border-bottom-color: #256BFA;
|
||||
background: #fff;
|
||||
}
|
||||
}
|
||||
|
||||
.picker {
|
||||
width: 100%;
|
||||
height: 80rpx;
|
||||
background: #fff;
|
||||
border: none;
|
||||
border-bottom: 2rpx solid #e0e0e0;
|
||||
border-radius: 0;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
padding: 0 0 10rpx 0;
|
||||
|
||||
.picker-text {
|
||||
font-size: 28rpx;
|
||||
color: #333;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.salary-row {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 20rpx;
|
||||
|
||||
.form-group {
|
||||
flex: 1;
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
.salary-separator {
|
||||
font-size: 32rpx;
|
||||
color: #666;
|
||||
margin-top: 40rpx;
|
||||
}
|
||||
|
||||
.salary-input {
|
||||
text-align: center;
|
||||
}
|
||||
}
|
||||
|
||||
.footer {
|
||||
position: fixed;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
background: #fff;
|
||||
padding: 20rpx 30rpx;
|
||||
border-top: 1rpx solid #eee;
|
||||
|
||||
.btn-group {
|
||||
display: flex;
|
||||
gap: 20rpx;
|
||||
|
||||
.btn {
|
||||
flex: 1;
|
||||
height: 80rpx;
|
||||
border-radius: 12rpx;
|
||||
font-size: 32rpx;
|
||||
font-weight: 500;
|
||||
border: none;
|
||||
|
||||
&.btn-cancel {
|
||||
background: #f5f5f5;
|
||||
color: #666;
|
||||
}
|
||||
|
||||
&.btn-publish {
|
||||
background: #256BFA;
|
||||
color: #fff;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
218
pages/test/userTypeTest.vue
Normal file
@@ -0,0 +1,218 @@
|
||||
<template>
|
||||
<view class="test-page">
|
||||
<view class="header">
|
||||
<text class="title">用户类型测试页面</text>
|
||||
</view>
|
||||
|
||||
<view class="content">
|
||||
<view class="current-info">
|
||||
<text class="label">当前用户类型:</text>
|
||||
<text class="value">{{ getCurrentTypeLabel() }}</text>
|
||||
</view>
|
||||
|
||||
<view class="type-switcher">
|
||||
<text class="section-title">切换用户类型:</text>
|
||||
<view class="buttons">
|
||||
<button
|
||||
v-for="(type, index) in userTypes"
|
||||
:key="index"
|
||||
:class="['btn', { active: currentUserType === type.value }]"
|
||||
@click="switchUserType(type.value)"
|
||||
>
|
||||
{{ type.label }}
|
||||
</button>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="navigation-info">
|
||||
<text class="section-title">底部导航栏配置:</text>
|
||||
<view class="nav-items">
|
||||
<view
|
||||
v-for="(item, index) in tabbarConfig"
|
||||
:key="index"
|
||||
class="nav-item"
|
||||
>
|
||||
<text class="nav-text">{{ item.text || 'AI助手' }}</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="description">
|
||||
<text class="desc-title">说明:</text>
|
||||
<text class="desc-text">• 企业用户(userType=0):显示"发布岗位"导航,隐藏"招聘会"</text>
|
||||
<text class="desc-text">• 其他用户(userType=1,2,3):显示"招聘会"导航</text>
|
||||
<text class="desc-text">• 切换用户类型后,底部导航栏会自动更新</text>
|
||||
<text class="desc-text">• 企业用户模式下,"招聘会"导航项完全隐藏</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { ref, computed } from 'vue';
|
||||
import { storeToRefs } from 'pinia';
|
||||
import useUserStore from '@/stores/useUserStore';
|
||||
|
||||
const { userInfo } = storeToRefs(useUserStore());
|
||||
|
||||
const userTypes = [
|
||||
{ value: 0, label: '企业用户' },
|
||||
{ value: 1, label: '求职者' },
|
||||
{ value: 2, label: '网格员' },
|
||||
{ value: 3, label: '政府人员' }
|
||||
];
|
||||
|
||||
const currentUserType = computed(() => userInfo.value?.userType || 0);
|
||||
|
||||
const switchUserType = (userType) => {
|
||||
userInfo.value.userType = userType;
|
||||
uni.setStorageSync('userInfo', userInfo.value);
|
||||
uni.showToast({
|
||||
title: `已切换到${getCurrentTypeLabel()}`,
|
||||
icon: 'success'
|
||||
});
|
||||
};
|
||||
|
||||
const getCurrentTypeLabel = () => {
|
||||
const type = userTypes.find(t => t.value === currentUserType.value);
|
||||
return type ? type.label : '未知';
|
||||
};
|
||||
|
||||
const tabbarConfig = computed(() => {
|
||||
const baseItems = [
|
||||
{ text: '首页' },
|
||||
{ text: currentUserType.value === 0 ? '发布岗位' : '招聘会' },
|
||||
{ text: '' }, // AI助手
|
||||
{ text: '消息' },
|
||||
{ text: '我的' }
|
||||
];
|
||||
return baseItems;
|
||||
});
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.test-page {
|
||||
padding: 40rpx;
|
||||
background: #f5f5f5;
|
||||
min-height: 100vh;
|
||||
}
|
||||
|
||||
.header {
|
||||
text-align: center;
|
||||
margin-bottom: 40rpx;
|
||||
|
||||
.title {
|
||||
font-size: 36rpx;
|
||||
font-weight: 600;
|
||||
color: #333;
|
||||
}
|
||||
}
|
||||
|
||||
.content {
|
||||
.current-info {
|
||||
background: #fff;
|
||||
padding: 30rpx;
|
||||
border-radius: 10rpx;
|
||||
margin-bottom: 30rpx;
|
||||
|
||||
.label {
|
||||
font-size: 28rpx;
|
||||
color: #666;
|
||||
}
|
||||
|
||||
.value {
|
||||
font-size: 28rpx;
|
||||
font-weight: 600;
|
||||
color: #256BFA;
|
||||
margin-left: 10rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.type-switcher {
|
||||
background: #fff;
|
||||
padding: 30rpx;
|
||||
border-radius: 10rpx;
|
||||
margin-bottom: 30rpx;
|
||||
|
||||
.section-title {
|
||||
font-size: 28rpx;
|
||||
font-weight: 600;
|
||||
color: #333;
|
||||
margin-bottom: 20rpx;
|
||||
display: block;
|
||||
}
|
||||
|
||||
.buttons {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
gap: 15rpx;
|
||||
|
||||
.btn {
|
||||
padding: 15rpx 30rpx;
|
||||
border: 2rpx solid #ddd;
|
||||
border-radius: 8rpx;
|
||||
background: #fff;
|
||||
font-size: 24rpx;
|
||||
color: #666;
|
||||
|
||||
&.active {
|
||||
background: #256BFA;
|
||||
color: #fff;
|
||||
border-color: #256BFA;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.navigation-info {
|
||||
background: #fff;
|
||||
padding: 30rpx;
|
||||
border-radius: 10rpx;
|
||||
margin-bottom: 30rpx;
|
||||
|
||||
.section-title {
|
||||
font-size: 28rpx;
|
||||
font-weight: 600;
|
||||
color: #333;
|
||||
margin-bottom: 20rpx;
|
||||
display: block;
|
||||
}
|
||||
|
||||
.nav-items {
|
||||
display: flex;
|
||||
justify-content: space-around;
|
||||
|
||||
.nav-item {
|
||||
text-align: center;
|
||||
|
||||
.nav-text {
|
||||
font-size: 24rpx;
|
||||
color: #666;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.description {
|
||||
background: #fff;
|
||||
padding: 30rpx;
|
||||
border-radius: 10rpx;
|
||||
|
||||
.desc-title {
|
||||
font-size: 28rpx;
|
||||
font-weight: 600;
|
||||
color: #333;
|
||||
margin-bottom: 15rpx;
|
||||
display: block;
|
||||
}
|
||||
|
||||
.desc-text {
|
||||
font-size: 24rpx;
|
||||
color: #666;
|
||||
line-height: 1.6;
|
||||
display: block;
|
||||
margin-bottom: 10rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
3
static/tabbar/publish-job-selected.svg
Normal file
@@ -0,0 +1,3 @@
|
||||
<svg t="1760603654562" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="19476" width="200" height="200">
|
||||
<path d="M599.4 850.3c-16.6 0-32.2-8.1-41.9-21.7l-3.4-5.8-0.2 0.1-108.3-179.3-222.6-17-5.7-0.4c-21.1-3-38.4-18.9-43.3-39.9-5-21.1 3.3-42.5 21.7-55.8l529.5-348.3c8.8-6.1 19-9.3 29.5-9.3 6.1 0 12.2 1.1 18 3.3 24.4 9.4 37.5 34.8 32 62L650 808.4l-0.1 0.3c-4.3 20.3-19.8 35.9-40.5 40.6-3.6 0.7-6.8 1-10 1z m-5.6-90.9l135.6-499.3-460.6 302.8 195.1 14.9c8.7 1.6 13.5 2.5 16.1 3.4 1.7 0.6 2.5 1.2 5.7 3.6 1.8 1.6 3 2.6 3.4 3l5.3 6.9 99.4 164.7z" fill="#256BFA" p-id="19477"></path>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 633 B |
3
static/tabbar/publish-job.svg
Normal file
@@ -0,0 +1,3 @@
|
||||
<svg t="1760603654562" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="19476" width="200" height="200">
|
||||
<path d="M599.4 850.3c-16.6 0-32.2-8.1-41.9-21.7l-3.4-5.8-0.2 0.1-108.3-179.3-222.6-17-5.7-0.4c-21.1-3-38.4-18.9-43.3-39.9-5-21.1 3.3-42.5 21.7-55.8l529.5-348.3c8.8-6.1 19-9.3 29.5-9.3 6.1 0 12.2 1.1 18 3.3 24.4 9.4 37.5 34.8 32 62L650 808.4l-0.1 0.3c-4.3 20.3-19.8 35.9-40.5 40.6-3.6 0.7-6.8 1-10 1z m-5.6-90.9l135.6-499.3-460.6 302.8 195.1 14.9c8.7 1.6 13.5 2.5 16.1 3.4 1.7 0.6 2.5 1.2 5.7 3.6 1.8 1.6 3 2.6 3.4 3l5.3 6.9 99.4 164.7z" fill="#666666" p-id="19477"></path>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 633 B |
@@ -1,8 +1,3 @@
|
||||
/*
|
||||
* @Date: 2025-10-23 14:48:48
|
||||
* @LastEditors: shirlwang
|
||||
* @LastEditTime: 2025-10-23 15:02:32
|
||||
*/
|
||||
// BaseStore.js - 基础Store类
|
||||
import IndexedDBHelper from '@/common/IndexedDBHelper.js'
|
||||
// import UniStorageHelper from '../common/UniStorageHelper'
|
||||
@@ -41,27 +36,27 @@ class BaseStore {
|
||||
// // #ifndef H5
|
||||
// this.db = new UniStorageHelper(this.dbName, config.DBversion);
|
||||
// // #endif
|
||||
// this.db.openDB([{
|
||||
// name: 'record',
|
||||
// keyPath: "id",
|
||||
// autoIncrement: true,
|
||||
// }, {
|
||||
// name: 'messageGroup',
|
||||
// keyPath: "id",
|
||||
// autoIncrement: true,
|
||||
// }, {
|
||||
// name: 'messages',
|
||||
// keyPath: "id",
|
||||
// autoIncrement: true,
|
||||
// indexes: [{
|
||||
// name: 'parentGroupId',
|
||||
// key: 'parentGroupId',
|
||||
// unique: false
|
||||
// }]
|
||||
// }]).then(async () => {
|
||||
// useChatGroupDBStore().init()
|
||||
// this.isDBReady = true
|
||||
// });
|
||||
this.db.openDB([{
|
||||
name: 'record',
|
||||
keyPath: "id",
|
||||
autoIncrement: true,
|
||||
}, {
|
||||
name: 'messageGroup',
|
||||
keyPath: "id",
|
||||
autoIncrement: true,
|
||||
}, {
|
||||
name: 'messages',
|
||||
keyPath: "id",
|
||||
autoIncrement: true,
|
||||
indexes: [{
|
||||
name: 'parentGroupId',
|
||||
key: 'parentGroupId',
|
||||
unique: false
|
||||
}]
|
||||
}]).then(async () => {
|
||||
useChatGroupDBStore().init()
|
||||
this.isDBReady = true
|
||||
});
|
||||
}
|
||||
async clearDB() {
|
||||
return new Promise((resolve, rejetc) => {
|
||||
|
||||
@@ -135,6 +135,7 @@ const useDictStore = defineStore("dict", () => {
|
||||
return null
|
||||
}
|
||||
|
||||
|
||||
async function getDictSelectOption(dictType, isDigital) {
|
||||
const resp = await createRequest(`/app/common/dict/${dictType}`);
|
||||
if (resp.code === 200 && resp.data) {
|
||||
|
||||
@@ -111,6 +111,12 @@ const useUserStore = defineStore("user", () => {
|
||||
resume.value = values.data; // 将用户信息同时存储到resume中
|
||||
// role.value = values.role;
|
||||
hasLogin.value = true;
|
||||
|
||||
// 模拟添加用户类型字段,实际项目中应该从接口获取
|
||||
if (!userInfo.value.userType) {
|
||||
userInfo.value.userType = 0; // 默认设置为企业用户
|
||||
}
|
||||
|
||||
// 持久化存储用户信息到本地缓存
|
||||
uni.setStorageSync('userInfo', values.data);
|
||||
}
|
||||
|
||||
95
用户类型导航功能说明.md
Normal file
@@ -0,0 +1,95 @@
|
||||
# 用户类型导航功能实现说明
|
||||
|
||||
## 功能概述
|
||||
|
||||
根据用户类型动态显示不同的底部导航栏:
|
||||
- **企业用户(userType=0)**:显示"发布岗位"导航,隐藏"招聘会"导航
|
||||
- **其他用户(userType=1,2,3)**:显示"招聘会"导航
|
||||
|
||||
## 实现内容
|
||||
|
||||
### 1. 用户信息扩展
|
||||
- 在 `stores/useUserStore.js` 中添加了模拟的 `userType` 字段
|
||||
- 默认设置为企业用户(userType=0)
|
||||
|
||||
### 2. 导航栏组件修改
|
||||
- 修改了 `components/tabbar/midell-box.vue`
|
||||
- 根据 `userInfo.userType` 动态生成不同的导航配置
|
||||
- 企业用户显示"发布岗位",其他用户显示"招聘会"
|
||||
- 修复了跳转逻辑:tabBar页面使用 `switchTab`,普通页面使用 `navigateTo`
|
||||
- 更新了发布岗位图标:使用自定义SVG图标
|
||||
- 未选中状态:深灰色 (#666666) - 新图标设计
|
||||
- 选中状态:蓝色 (#256BFA) - 新图标设计
|
||||
|
||||
### 3. 发布岗位页面
|
||||
- 创建了 `pages/job/publishJob.vue` 发布岗位页面
|
||||
- 包含完整的岗位信息表单
|
||||
- 支持岗位基本信息、薪资待遇、任职要求、岗位描述、联系方式等
|
||||
|
||||
### 4. 测试组件
|
||||
- 创建了 `components/UserTypeSwitcher/UserTypeSwitcher.vue` 用于测试
|
||||
- 创建了 `pages/test/userTypeTest.vue` 测试页面
|
||||
- 在首页添加了用户类型切换器(可控制显示/隐藏)
|
||||
|
||||
## 用户类型定义
|
||||
|
||||
```javascript
|
||||
const userTypes = [
|
||||
{ value: 0, label: '企业用户' },
|
||||
{ value: 1, label: '求职者' },
|
||||
{ value: 2, label: '网格员' },
|
||||
{ value: 3, label: '政府人员' }
|
||||
];
|
||||
```
|
||||
|
||||
## 导航栏配置
|
||||
|
||||
### 企业用户(userType=0)
|
||||
- 首页
|
||||
- 发布岗位(招聘会导航完全隐藏)
|
||||
- AI助手
|
||||
- 消息
|
||||
- 我的
|
||||
|
||||
### 其他用户(userType=1,2,3)
|
||||
- 首页
|
||||
- 招聘会
|
||||
- AI助手
|
||||
- 消息
|
||||
- 我的
|
||||
|
||||
## 使用方法
|
||||
|
||||
### 1. 切换用户类型
|
||||
```javascript
|
||||
// 在组件中切换用户类型
|
||||
userInfo.value.userType = 0; // 切换到企业用户
|
||||
uni.setStorageSync('userInfo', userInfo.value);
|
||||
```
|
||||
|
||||
### 2. 测试功能
|
||||
- 访问 `/pages/test/userTypeTest` 页面进行测试
|
||||
- 在首页可以看到用户类型切换器(测试用)
|
||||
|
||||
### 3. 生产环境
|
||||
- 移除测试相关的组件和代码
|
||||
- 从后端接口获取真实的用户类型信息
|
||||
|
||||
## 注意事项
|
||||
|
||||
1. 当前是模拟实现,实际项目中需要从后端接口获取用户类型
|
||||
2. 发布岗位页面已存在:`/packageA/pages/addPosition/addPosition`
|
||||
3. 招聘会页面已存在:`/pages/careerfair/careerfair`
|
||||
4. 测试完成后可以隐藏用户类型切换器
|
||||
|
||||
## 文件修改清单
|
||||
|
||||
- `stores/useUserStore.js` - 添加 userType 字段
|
||||
- `components/tabbar/midell-box.vue` - 动态导航配置
|
||||
- `pages/job/publishJob.vue` - 发布岗位页面
|
||||
- `static/tabbar/publish-job.svg` - 发布岗位图标(普通状态)
|
||||
- `static/tabbar/publish-job-selected.svg` - 发布岗位图标(选中状态)
|
||||
- `components/UserTypeSwitcher/UserTypeSwitcher.vue` - 测试组件
|
||||
- `pages/test/userTypeTest.vue` - 测试页面
|
||||
- `pages/index/components/index-one.vue` - 添加测试组件
|
||||
- `pages.json` - 添加页面配置
|
||||