修改bug

This commit is contained in:
2025-11-19 18:10:28 +08:00
parent fba4723dda
commit 44831b6f6f
8 changed files with 83 additions and 1091 deletions

View File

@@ -1,345 +0,0 @@
<template>
<view class="custom-tabbar">
<view
class="tabbar-item"
v-for="(item, index) in tabbarList"
:key="index"
@click.stop="switchTab(item, index)"
@tap.stop="switchTab(item, index)"
>
<view class="tabbar-icon">
<image
:src="currentItem === item.id ? item.selectedIconPath : item.iconPath"
mode="aspectFit"
/>
</view>
<view class="badge" v-if="item.badge && item.badge > 0">{{ item.badge }}</view>
<view class="tabbar-text" :class="{ 'active': currentItem === item.id }">
{{ item.text }}
</view>
</view>
</view>
</template>
<script setup>
import { ref, computed, watch, onMounted } from 'vue';
import { storeToRefs } from 'pinia';
import useUserStore from '@/stores/useUserStore';
import { useReadMsg } from '@/stores/useReadMsg';
import { checkLoginAndNavigate } from '@/utils/loginHelper';
const props = defineProps({
currentPage: {
type: Number,
default: 0
}
});
const userStore = useUserStore();
const { userInfo } = storeToRefs(userStore);
const readMsg = useReadMsg();
const currentItem = ref(props.currentPage);
// 监听props变化
watch(() => props.currentPage, (newPage) => {
currentItem.value = newPage;
});
// 生成tabbar配置的函数
const generateTabbarList = () => {
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 || 0,
},
{
id: 2,
text: 'AI+',
path: '/pages/chat/chat',
iconPath: '/static/tabbar/logo3.png',
selectedIconPath: '/static/tabbar/logo3.png',
centerItem: true,
badge: readMsg.badges[2]?.count || 0,
},
{
id: 3,
text: '消息',
path: '/pages/msglog/msglog',
iconPath: '/static/tabbar/chat4.png',
selectedIconPath: '/static/tabbar/chat4ed.png',
centerItem: false,
badge: readMsg.badges[3]?.count || 0,
},
{
id: 4,
text: '我的',
path: '/pages/mine/mine',
iconPath: '/static/tabbar/mine.png',
selectedIconPath: '/static/tabbar/mined.png',
centerItem: false,
badge: readMsg.badges[4]?.count || 0,
},
];
// 获取用户类型统一使用isCompanyUser字段0=企业用户1=求职者, 3=网格员)
// 优先从store获取如果为空则直接从缓存获取
const cachedUserInfo = uni.getStorageSync('userInfo') || {};
// 获取isCompanyUser字段
const storeIsCompanyUser = userInfo.value?.isCompanyUser;
const cachedIsCompanyUser = cachedUserInfo.isCompanyUser;
// 获取用户类型的逻辑:
// 1. 优先使用store中的isCompanyUser
// 2. 如果store中没有使用缓存中的isCompanyUser
// 3. 最后默认为1求职者
const userType = Number(storeIsCompanyUser !== undefined ? storeIsCompanyUser : (cachedIsCompanyUser !== undefined ? cachedIsCompanyUser : 1));
if (userType === 0 || userType === 2) {
// 企业用户:显示发布岗位
baseItems.splice(1, 0, {
id: 1,
text: '发布岗位',
path: '/pages/job/publishJob',
iconPath: '/static/tabbar/post.png',
selectedIconPath: '/static/tabbar/posted.png',
centerItem: false,
badge: 0,
});
} else {
// 求职者用户(包括未登录状态):显示招聘会
// H5端隐藏招聘会
// #ifndef H5
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 || 0,
});
// #endif
}
return baseItems;
};
// 根据用户类型生成不同的导航栏配置
const tabbarList = computed(() => {
return generateTabbarList();
});
// 强制刷新tabbar的方法
const forceRefresh = () => {
// 触发响应式更新
const cachedUserInfo = uni.getStorageSync('userInfo') || {};
const currentUserType = userInfo.value?.isCompanyUser !== undefined ? userInfo.value.isCompanyUser : (cachedUserInfo.isCompanyUser !== undefined ? cachedUserInfo.isCompanyUser : 1);
};
// 监听用户类型变化只监听isCompanyUser字段
watch(() => userInfo.value?.isCompanyUser, (newIsCompanyUser, oldIsCompanyUser) => {
if (newIsCompanyUser !== oldIsCompanyUser) {
// 强制触发computed重新计算
forceRefresh();
}
}, { immediate: true });
// 监听用户信息变化(包括登录状态)
watch(() => userInfo.value, (newUserInfo, oldUserInfo) => {
if (newUserInfo !== oldUserInfo) {
// 强制触发computed重新计算
forceRefresh();
}
}, { immediate: true, deep: true });
// 切换tab
const switchTab = (item, index) => {
console.log('switchTab called', item, index);
// 检查是否为需要登录的页面
const loginRequiredPages = [
'/pages/job/publishJob',
'/pages/mine/mine',
'/pages/mine/company-mine'
];
if (loginRequiredPages.includes(item.path)) {
// 检查用户是否已登录
const token = uni.getStorageSync('token') || '';
const hasLogin = userStore.hasLogin;
if (!token || !hasLogin) {
// 未登录,根据平台类型跳转到对应的登录页面
checkLoginAndNavigate();
return; // 不进行页面跳转
}
// 已登录,处理特定页面的逻辑
if (item.path === '/pages/job/publishJob') {
// 检查企业信息是否完整
const cachedUserInfo = uni.getStorageSync('userInfo') || {};
const storeUserInfo = userInfo.value || {};
const currentUserInfo = storeUserInfo.id ? storeUserInfo : cachedUserInfo;
// 判断企业信息字段company是否为null或undefined
if (!currentUserInfo.company || currentUserInfo.company === null) {
// 企业信息为空,跳转到企业信息补全页面
uni.navigateTo({
url: '/pages/complete-info/company-info',
});
} else {
// 企业信息完整,跳转到发布岗位页面
uni.navigateTo({
url: '/pages/job/publishJob',
});
}
currentItem.value = item.id;
return;
}
if (item.path === '/pages/mine/mine') {
// 根据用户类型跳转到不同的"我的"页面
const cachedUserInfo = uni.getStorageSync('userInfo') || {};
const storeIsCompanyUser = userInfo.value?.isCompanyUser;
const cachedIsCompanyUser = cachedUserInfo.isCompanyUser;
// 获取用户类型
const userType = Number(storeIsCompanyUser !== undefined ? storeIsCompanyUser : (cachedIsCompanyUser !== undefined ? cachedIsCompanyUser : 1));
let targetPath = '/pages/mine/mine'; // 默认求职者页面
if (userType === 0) {
// 企业用户,跳转到企业我的页面
targetPath = '/pages/mine/company-mine';
} else {
// 求职者或其他用户类型,跳转到普通我的页面
targetPath = '/pages/mine/mine';
}
// 跳转到对应的页面
uni.navigateTo({
url: targetPath,
});
currentItem.value = item.id;
return;
}
}
// 判断是否为 tabBar 页面
const tabBarPages = [
'/pages/index/index',
'/pages/careerfair/careerfair',
'/pages/chat/chat',
'/pages/msglog/msglog',
'/pages/mine/mine'
];
if (tabBarPages.includes(item.path)) {
// TabBar 页面使用 redirectTo 避免页面栈溢出
uni.redirectTo({
url: item.path,
});
} else {
// 非 TabBar 页面使用 navigateTo
uni.navigateTo({
url: item.path,
});
}
currentItem.value = item.id;
};
onMounted(() => {
currentItem.value = props.currentPage;
// 调试信息显示当前用户状态和tabbar配置
forceRefresh();
});
</script>
<style lang="scss" scoped>
.custom-tabbar {
position: fixed;
bottom: 0;
left: 0;
right: 0;
height: 88rpx;
background-color: #ffffff;
border-top: 1rpx solid #e5e5e5;
display: flex;
align-items: center;
padding-bottom: env(safe-area-inset-bottom);
z-index: 9999;
box-shadow: 0 -2rpx 10rpx rgba(0, 0, 0, 0.1);
pointer-events: auto;
}
.tabbar-item {
flex: 1;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
height: 100%;
color: #5E5F60;
font-size: 22rpx;
position: relative;
cursor: pointer;
pointer-events: auto;
-webkit-tap-highlight-color: transparent;
}
.tabbar-icon {
width: 44rpx;
height: 44rpx;
margin-bottom: 4rpx;
position: relative;
}
.tabbar-icon image {
width: 100%;
height: 100%;
}
.tabbar-text {
font-size: 20rpx;
line-height: 1;
transition: color 0.3s ease;
}
.tabbar-text.active {
color: #256BFA;
font-weight: 500;
}
.badge {
position: absolute;
top: 4rpx;
right: 20rpx;
min-width: 30rpx;
height: 30rpx;
background-color: #ff4444;
color: #fff;
font-size: 18rpx;
border-radius: 15rpx;
text-align: center;
line-height: 30rpx;
padding: 0 10rpx;
transform: scale(0.8);
}
/* 中间按钮特殊样式 */
.tabbar-item:has(.center-item) {
.tabbar-icon {
width: 60rpx;
height: 60rpx;
margin-bottom: 0;
}
}
</style>

View File

@@ -1,234 +0,0 @@
<template>
<view class="tabbar_container">
<view class="tabbar_item" v-for="(item, index) in tabbarList" :key="index" @click="changeItem(item)">
<view
class="item-top"
:class="[
item.centerItem ? 'center-item-img ' : '',
item.centerItem && currentItem === item.id ? 'rubberBand animated' : '',
]"
>
<image :src="currentItem == item.id ? item.selectedIconPath : item.iconPath"></image>
</view>
<view class="badge" v-if="item.badge && item.badge > 0">{{ item.badge }}</view>
<view class="item-bottom" :class="[currentItem == item.id ? 'item-active' : '']">
<text>{{ item.text }}</text>
</view>
</view>
</view>
</template>
<script setup>
import { ref, onMounted, computed, watch, nextTick } from 'vue';
import { useReadMsg } from '@/stores/useReadMsg';
import { storeToRefs } from 'pinia';
import useUserStore from '@/stores/useUserStore';
const props = defineProps({
currentpage: {
type: Number,
required: true,
default: 0,
},
});
const readMsg = useReadMsg();
const { userInfo } = storeToRefs(useUserStore());
const currentItem = ref(0);
// 监听用户类型变化重新生成tabbar配置
watch(() => userInfo.value?.isCompanyUser, (newIsCompanyUser, oldIsCompanyUser) => {
console.log('midell-box用户类型变化监听:', { newIsCompanyUser, oldIsCompanyUser, userInfo: userInfo.value });
if (newIsCompanyUser !== oldIsCompanyUser) {
console.log('用户类型发生变化重新生成tabbar:', newIsCompanyUser);
// tabbarList是computed会自动重新计算
// 强制触发响应式更新
nextTick(() => {
console.log('tabbar配置已更新:', tabbarList.value);
});
}
}, { immediate: true });
// 监听用户信息变化(包括登录状态)
watch(() => userInfo.value, (newUserInfo, oldUserInfo) => {
console.log('midell-box用户信息变化监听:', { newUserInfo, oldUserInfo });
if (newUserInfo !== oldUserInfo) {
console.log('用户信息发生变化重新生成tabbar');
// 强制触发响应式更新
nextTick(() => {
console.log('tabbar配置已更新:', tabbarList.value);
});
}
}, { immediate: true, deep: true });
// 生成tabbar配置的函数
const generateTabbarList = () => {
const baseItems = [
{
id: 0,
text: '职位2',
path: '/pages/index/index',
iconPath: '../../static/tabbar/calendar.png',
selectedIconPath: '../../static/tabbar/calendared.png',
centerItem: false,
badge: readMsg.badges[0]?.count || 0,
},
{
id: 2,
text: 'AI+',
path: '/pages/chat/chat',
iconPath: '../../static/tabbar/logo3.png',
selectedIconPath: '../../static/tabbar/logo3.png',
centerItem: true,
badge: readMsg.badges[2]?.count || 0,
},
{
id: 3,
text: '消息2',
path: '/pages/msglog/msglog',
iconPath: '../../static/tabbar/chat4.png',
selectedIconPath: '../../static/tabbar/chat4ed.png',
centerItem: false,
badge: readMsg.badges[3]?.count || 0,
},
{
id: 4,
text: '我的',
path: '/pages/mine/mine',
iconPath: '../../static/tabbar/mine.png',
selectedIconPath: '../../static/tabbar/mined.png',
centerItem: false,
badge: readMsg.badges[4]?.count || 0,
},
];
// 根据用户类型添加不同的导航项,未登录时默认为求职者
const userType = userInfo.value?.isCompanyUser !== undefined ? userInfo.value.isCompanyUser : 1;
if (userType === 0) {
// 企业用户:显示发布岗位,隐藏招聘会
baseItems.splice(1, 0, {
id: 1,
text: '发布岗位',
path: '/pages/job/publishJob',
iconPath: '../../static/tabbar/post.png',
selectedIconPath: '../../static/tabbar/posted.png',
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 || 0,
});
}
return baseItems;
};
// 根据用户类型生成不同的导航栏配置
const tabbarList = computed(() => {
return generateTabbarList();
});
onMounted(() => {
// 自定义TabBar不需要调用hideTabBar因为已经在pages.json中设置了custom: true
// uni.hideTabBar(); // 移除这行避免在自定义TabBar模式下调用
currentItem.value = props.currentpage;
});
const changeItem = (item) => {
// 判断是否为 TabBar 页面
const tabBarPages = [
'/pages/index/index',
'/pages/careerfair/careerfair',
'/pages/chat/chat',
'/pages/msglog/msglog',
'/pages/mine/mine'
];
if (tabBarPages.includes(item.path)) {
// TabBar 页面使用 redirectTo 避免页面栈溢出
uni.redirectTo({
url: item.path,
});
} else {
// 非 TabBar 页面使用 navigateTo
uni.navigateTo({
url: item.path,
});
}
};
</script>
<style lang="scss" scoped>
.badge {
position: absolute;
top: 4rpx;
right: 20rpx;
min-width: 30rpx;
height: 30rpx;
background-color: red;
color: #fff;
font-size: 18rpx;
border-radius: 15rpx;
text-align: center;
line-height: 30rpx;
padding: 0 10rpx;
}
.tabbar_container {
background-color: #ffffff;
width: 100%;
height: 88rpx;
display: flex;
align-items: center;
padding: 5rpx 0;
overflow: hidden;
// position: fixed;
// bottom: 0rpx;
// left: 0rpx;
// box-shadow: 0 0 5px #999;
// padding-bottom: env(safe-area-inset-bottom);
// z-index: 998;
.tabbar_item {
width: 33.33%;
height: 100rpx;
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
text-align: center;
position: relative;
color: #5e5f60;
.item-top {
width: 44.44rpx;
height: 44.44rpx;
image {
width: 100%;
height: 100%;
}
}
.item-bottom {
font-weight: 500;
font-size: 22rpx;
}
}
}
.center-item-img {
// position: absolute;
// top: 0rpx;
// left: 50%;
// transform: translate(-50%, 0);
width: 108rpx !important;
height: 98rpx !important;
}
.item-active {
color: #256bfa;
}
</style>

View File

@@ -1,7 +1,7 @@
<!--
* @Date: 2025-10-16 15:15:47
* @LastEditors: shirlwang
* @LastEditTime: 2025-11-19 17:53:01
* @LastEditTime: 2025-11-19 18:10:18
-->
<template>
<!-- @scroll="handleScroll" @scrolltolower="scrollBottom" -->

View File

@@ -12,88 +12,12 @@
"navigationBarTitleText": "我的"
}
},
{
"path": "pages/msglog/msglog",
"style": {
"navigationBarTitleText": "消息"
}
},
{
"path": "pages/careerfair/careerfair",
"style": {
"navigationBarTitleText": "招聘会"
}
},
{
"path": "pages/complete-info/complete-info",
"style": {
"navigationBarTitleText": "补全信息"
}
},
{
"path": "pages/complete-info/company-info",
"style": {
"navigationBarTitleText": "企业信息"
}
},
{
"path": "pages/complete-info/components/map-location-picker",
"style": {
"navigationBarTitleText": "选择地址"
}
},
{
"path": "pages/complete-info/skill-search",
"style": {
"navigationBarTitleText": "技能查询"
}
},
{
"path": "pages/nearby/nearby",
"style": {
"navigationBarTitleText": "附近",
"navigationBarBackgroundColor": "#4778EC",
"navigationBarTextStyle": "white"
}
},
{
"path": "pages/job/publishJob",
"style": {
"navigationBarTitleText": "发布岗位"
}
},
{
"path": "pages/job/companySearch",
"style": {
"navigationBarTitleText": "选择企业",
"disableScroll": false,
"enablePullDownRefresh": false,
"backgroundColor": "#f5f5f5"
}
},
{
"path": "pages/chat/chat",
"style": {
"navigationBarTitleText": "AI+",
"navigationBarBackgroundColor": "#4778EC",
"navigationBarTextStyle": "white",
"enablePullDownRefresh": false
}
},
{
"path": "pages/search/search",
"style": {
"navigationBarTitleText": ""
}
},
{
"path": "pages/service/career-planning",
"style": {
"navigationBarTitleText": "职业规划推荐",
"navigationBarTitleTextSize": "30rpx",
"navigationStyle": "custom"
}
},
{
"path": "pages/mine/company-mine",
"style": {
@@ -131,20 +55,6 @@
{
"root": "packageA",
"pages": [
{
"path": "pages/addWorkExperience/addWorkExperience",
"style": {
"navigationBarTitleText": "添加工作经历"
}
},
{
"path": "pages/choiceness/choiceness",
"style": {
"navigationBarTitleText": "精选",
"navigationBarBackgroundColor": "#4778EC",
"navigationBarTextStyle": "white"
}
},
{
"path": "pages/post/post",
"style": {
@@ -159,225 +69,15 @@
"navigationBarTitleText": "单位详情"
}
},
{
"path": "pages/exhibitors/exhibitors",
"style": {
"navigationBarTitleText": "参展单位",
"navigationBarBackgroundColor": "#FFFFFF",
"navigationBarTextStyle": "black"
}
},
{
"path": "pages/myResume/myResume",
"style": {
"navigationBarTitleText": "我的简历",
"navigationBarBackgroundColor": "#FFFFFF"
}
},
{
"path": "pages/Intendedposition/Intendedposition",
"style": {
"navigationBarTitleText": "投递记录",
"navigationBarBackgroundColor": "#FFFFFF"
}
},
{
"path": "pages/collection/collection",
"style": {
"navigationBarTitleText": "我的收藏",
"navigationBarBackgroundColor": "#FFFFFF"
}
},
{
"path": "pages/browseJob/browseJob",
"style": {
"navigationBarTitleText": "我的浏览",
"navigationBarBackgroundColor": "#FFFFFF"
}
},
{
"path": "pages/addPosition/addPosition",
"style": {
"navigationBarTitleText": "添加岗位"
}
},
{
"path": "pages/selectDate/selectDate",
"style": {
"navigationBarTitleText": ""
}
},
{
"path": "pages/personalInfo/personalInfo",
"style": {
"navigationBarTitleText": "个人信息"
}
},
{
"path": "pages/jobExpect/jobExpect",
"style": {
"navigationBarTitleText": "求职期望"
}
},
{
"path": "pages/selectDate/reservation/reservation",
"style": {
"navigationBarTitleText": "我的预约",
"navigationBarBackgroundColor": "#FFFFFF"
}
},
{
"path": "pages/choicenessList/choicenessList",
"style": {
"navigationBarTitleText": "精选企业",
"navigationBarBackgroundColor": "#FFFFFF"
}
},
{
"path": "pages/newJobPosition/newJobPosition",
"style": {
"navigationBarTitleText": "新职位推荐",
"navigationBarBackgroundColor": "#FFFFFF"
}
},
{
"path": "pages/systemNotification/systemNotification",
"style": {
"navigationBarTitleText": "系统通知",
"navigationBarBackgroundColor": "#FFFFFF"
}
},
{
"path": "pages/tiktok/tiktok",
"style": {
"navigationBarTitleText": "",
"navigationBarBackgroundColor": "#FFFFFF"
}
},
{
"path": "pages/moreJobs/moreJobs",
"style": {
"navigationBarTitleText": "更多岗位",
"navigationBarBackgroundColor": "#FFFFFF"
}
},
{
"path": "pages/collection/compare",
"style": {
"navigationBarTitleText": " 岗位对比",
"navigationBarBackgroundColor": "#FFFFFF"
}
},
{
"path": "pages/myResume/corporateInformation",
"style": {
"navigationBarTitleText": " 企业详情",
"navigationBarBackgroundColor": "#FFFFFF"
"navigationBarTitleText": "添加岗位",
"navigationBarTitleTextSize": "30rpx"
}
}
]
},
{
"root": "packageB",
"pages": [
{
"path": "jobFair/detailCom",
"style": {
"navigationBarTitleText": "招聘会详情"
}
},
{
"path": "jobFair/detailPerson",
"style": {
"navigationBarTitleText": "招聘会详情"
}
},
{
"path": "login",
"style": {
"navigationBarTitleText": "登录"
}
},
{
"path": "train/index",
"style": {
"navigationBarTitleText": "技能评价"
}
},
{
"path": "train/practice/startPracticing",
"style": {
"navigationBarTitleText": "专项训练"
}
},
{
"path": "train/video/videoList",
"style": {
"navigationBarTitleText": "视频学习"
}
},
{
"path": "train/video/videoDetail",
"style": {
"navigationBarTitleText": "视频详情"
}
},
{
"path": "train/mockExam/examList",
"style": {
"navigationBarTitleText": "考试列表"
}
},
{
"path": "train/mockExam/startExam",
"style": {
"navigationBarTitleText": "模拟考试"
}
},
{
"path": "train/mockExam/viewGrades",
"style": {
"navigationBarTitleText": "查看成绩"
}
},
{
"path": "train/mockExam/paperDetails",
"style": {
"navigationBarTitleText": "考试详情"
}
},
{
"path": "priority/helpFilter",
"style": {
"navigationBarTitleText": "筛选和帮扶"
}
},
{
"path": "priority/helpFollow",
"style": {
"navigationBarTitleText": "跟进"
}
},
{
"path": "train/wrongAnswer/mistakeNotebook",
"style": {
"navigationBarTitleText": "错题本"
}
},
{
"path": "train/wrongAnswer/questionPractice",
"style": {
"navigationBarTitleText": "错题练习"
}
},
{
"path": "train/wrongAnswer/wrongDetail",
"style": {
"navigationBarTitleText": "错题详情"
}
}
]
},
{
"root": "packageRc",
"pages": [
@@ -387,78 +87,12 @@
"navigationBarTitleText": "高校毕业生智慧就业"
}
},
{
"path": "pages/personalList/personalList",
"style": {
"navigationBarTitleText": "毕业生追踪"
}
},
{
"path": "pages/jobList/jobList",
"style": {
"navigationBarTitleText": "岗位列表"
}
},
{
"path": "pages/daiban/daiban",
"style": {
"navigationBarTitleText": "待办任务"
}
},
{
"path": "pages/daiban/daibandetail",
"style": {
"navigationBarTitleText": "待办详情"
}
},
{
"path": "pages/demand/demandail",
"style": {
"navigationBarTitleText": "新增需求"
}
},
{
"path": "pages/daiban/addbangfu",
"style": {
"navigationBarTitleText": "添加帮扶"
}
},
{
"path": "pages/service/serviceDetail",
"style": {
"navigationBarTitleText": "服务"
}
},
{
"path": "pages/service/serviceTraceability",
"style": {
"navigationBarTitleText": "服务追溯"
}
},
{
"path": "pages/needs/needDetail",
"style": {
"navigationBarTitleText": "需求信息"
}
},
{
"path": "pages/daiban/bangfuList",
"style": {
"navigationBarTitleText": "服务记录"
}
},
{
"path": "pages/needs/personNeeds",
"style": {
"navigationBarTitleText": "需求上报"
}
},
{
"path": "pages/needs/needsList",
"style": {
"navigationBarTitleText": "需求"
}
},
{
"path": "pages/policy/policyList",
"style": {
@@ -472,143 +106,6 @@
}
}
]
},
{
"root": "packageCa",
"pages": [
{
"path": "search/search",
"style": {
"navigationBarTitleText": "生涯规划"
}
},
{
"path": "search/AIAudition",
"style": {
"navigationBarTitleText": "AI智能面试"
}
},
{
"path": "job/index",
"style": {
"navigationBarTitleText": "职业库"
}
},
{
"path": "job/midList",
"style": {
"navigationBarTitleText": "职业库-中类"
}
},
{
"path": "job/smallList",
"style": {
"navigationBarTitleText": "职业库-小类"
}
},
{
"path": "job/details",
"style": {
"navigationBarTitleText": "职业详情"
}
},
{
"path": "userCenter/professionPath",
"style": {
"navigationBarTitleText": "职业路径"
}
},
{
"path": "userCenter/personDocument",
"style": {
"navigationBarTitleText": "生涯档案"
}
},
{
"path": "userCenter/careerCompass",
"style": {
"navigationBarTitleText": "生涯罗盘"
}
},
{
"path": "userCenter/learningPlan",
"style": {
"navigationBarTitleText": "学业规划"
}
},
{
"path": "userCenter/smartTarget",
"style": {
"navigationBarTitleText": "学业规划"
}
},
{
"path": "userCenter/fillInInformation",
"style": {
"navigationBarTitleText": "完善个人信息"
}
},
{
"path": "pagesTest/testList",
"style": {
"navigationBarTitleText": "生涯测评"
}
},
{
"path": "pagesTest/customTestTitle",
"style": {
"navigationBarTitleText": "自定义测评"
}
},
{
"path": "pagesTest/interestTestTitle",
"style": {
"navigationBarTitleText": "职业兴趣测评"
}
},
{
"path": "pagesTest/workValuesTestTitle",
"style": {
"navigationBarTitleText": "工作价值观测评"
}
},
{
"path": "pagesTest/personalTestTitle",
"style": {
"navigationBarTitleText": "人格测评"
}
},
{
"path": "testReport/workValuesTestReport",
"style": {
"navigationBarTitleText": "工作价值观测评报告"
}
},
{
"path": "testReport/multipleAbilityTestReport",
"style": {
"navigationBarTitleText": "多元能力测评报告"
}
},
{
"path": "testReport/generalCareerTestReport",
"style": {
"navigationBarTitleText": "通用职业能力测评报告"
}
},
{
"path": "testReport/personalTestReport",
"style": {
"navigationBarTitleText": "人格测评报告"
}
},
{
"path": "testReport/interestTestReport",
"style": {
"navigationBarTitleText": "职业兴趣测评报告"
}
}
]
}
],
"globalStyle": {

View File

@@ -1,7 +1,7 @@
<!--
* @Date: 2025-10-16 15:15:47
* @LastEditors: shirlwang
* @LastEditTime: 2025-11-19 17:51:42
* @LastEditTime: 2025-11-19 18:09:59
-->
<template>
<!-- @scroll="handleScroll" @scrolltolower="scrollBottom" -->
@@ -45,7 +45,7 @@
<view v-for="(item, index) in policyList" :key="index" class="job-list" @click="toPolicyDetail">
<view class="sign">推荐</view>
<view class="title">
<image src="../../../packageRc/static/zcLeft.png"/>
<image src="/static/zcLeft.png"/>
{{item.zcmc}}</view>
<view class="infos">
<view v-if="item.zclx">{{item.zclx}}</view>

BIN
static/zcLeft.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

78
stores/BaseDBStore.js Normal file
View File

@@ -0,0 +1,78 @@
/*
* @Date: 2025-11-03 10:52:09
* @LastEditors: shirlwang
* @LastEditTime: 2025-11-19 18:08:07
*/
// BaseStore.js - 基础Store类
import IndexedDBHelper from '@/common/IndexedDBHelper.js'
import UniStorageHelper from '../common/UniStorageHelper'
// import useChatGroupDBStore from './userChatGroupStore'
import config from '@/config'
class BaseStore {
db = null
isDBReady = false
dbName = 'BrowsingHistory'
constructor() {
this.checkAndInitDB()
}
checkAndInitDB() {
// 获取本地数据库版本
if (config.OnlyUseCachedDB) {
return this.initDB()
}
const localVersion = uni.getStorageSync('indexedDBVersion') || 1
console.log('DBVersion: ', localVersion, config.DBversion)
if (localVersion === config.DBversion) {
this.initDB()
} else {
console.log('清空本地数据库')
this.clearDB().then(() => {
uni.setStorageSync('indexedDBVersion', config.DBversion);
this.initDB();
});
}
}
initDB() {
// // #ifdef H5
this.db = new IndexedDBHelper(this.dbName, config.DBversion);
// // #endif
// // #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
});
}
async clearDB() {
return new Promise((resolve, rejetc) => {
new IndexedDBHelper().deleteDB(this.dbName).then(() => {
resolve()
})
})
}
}
const baseDB = new BaseStore()
export default baseDB

View File

@@ -11,10 +11,6 @@ import similarityJobs from '@/utils/similarity_Job.js';
import {
UUID
} from "@/lib/uuid-min.js";
import {
useReadMsg
} from '@/stores/useReadMsg';
// 简历完成度计算
function getResumeCompletionPercentage(resume) {
const requiredFields = [