8 Commits
master ... yxl

Author SHA1 Message Date
65dea06316 =【职业图谱】 2026-06-09 21:55:12 +08:00
30b5caf87b =【职业图谱】 2026-06-09 21:54:40 +08:00
d42128be8b Merge branch 'main' into yxl 2026-06-09 21:42:58 +08:00
d15765973a Merge branch 'main' into yxl 2026-06-01 10:06:22 +08:00
2e40eec875 =【职业图谱】 2026-05-22 16:47:12 +08:00
9a09edf54c =【职业图谱】 2026-05-22 16:46:33 +08:00
8578c96931 =【职业图谱】 2026-05-22 16:24:30 +08:00
4faaedcbbd =【职业图谱】 2026-05-22 16:24:09 +08:00
7 changed files with 81 additions and 76 deletions

View File

@@ -3,7 +3,21 @@
* @LastEditors: shirlwang * @LastEditors: shirlwang
* @LastEditTime: 2025-12-16 16:35:06 * @LastEditTime: 2025-12-16 16:35:06
*/ */
import { createRequest } from '../../utils/request'; import request from '@/utilsRc/request'
import { createRequest } from '@/utils/request';
// 获取职业图谱token
export function appToken(token) {
return request({
url: '/loginByToken',
method: 'post',
data: {
token,
loginWay: '2'
},
baseUrlType: 'zytp'
})
}
// 获取用户信息(职业规划推荐用) // 获取用户信息(职业规划推荐用)
export function appUserInfo() { export function appUserInfo() {

View File

@@ -1,7 +1,7 @@
<!--suppress HtmlUnknownTag, NpmUsedModulesInstalled, JSFileReferences --> <!--suppress HtmlUnknownTag, NpmUsedModulesInstalled, JSFileReferences -->
<script setup> <script setup>
import { ref, inject, nextTick, onMounted } from 'vue'; import { inject, nextTick, onMounted, ref } from 'vue';
import { onLoad, onShow } from '@dcloudio/uni-app'; import { onShow } from '@dcloudio/uni-app';
import { appUserInfo } from '@/apiRc/user/user.js'; import { appUserInfo } from '@/apiRc/user/user.js';
import RemindPopup from './components/RemindPopup.vue'; import RemindPopup from './components/RemindPopup.vue';
import PageHeader from './components/PageHeader.vue'; import PageHeader from './components/PageHeader.vue';
@@ -10,6 +10,9 @@ import CareerRecommend from './components/CareerRecommend.vue';
import CareerPath from './components/CareerPath.vue'; import CareerPath from './components/CareerPath.vue';
import SkillDevelopment from './components/SkillDevelopment.vue'; import SkillDevelopment from './components/SkillDevelopment.vue';
import CustomTabBar from '@/components/CustomTabBar/CustomTabBar.vue'; import CustomTabBar from '@/components/CustomTabBar/CustomTabBar.vue';
import { appToken } from '@/apiRc/user/user';
import { setToken } from '@/utilsRc/auth';
const { navBack, navTo } = inject('globalFunction'); const { navBack, navTo } = inject('globalFunction');
@@ -29,7 +32,6 @@ const selectedJobImprovementSkills = ref([]);
const currentJobId = ref(null); const currentJobId = ref(null);
const currentJobName = ref(''); const currentJobName = ref('');
const pathSkillsData = ref({ const pathSkillsData = ref({
pathData: { pathData: {
start: { title: '', skills: [] }, start: { title: '', skills: [] },
@@ -87,6 +89,14 @@ async function getRemindInfo() {
hasCheckedRemindInfo = true; hasCheckedRemindInfo = true;
try {
const t = uni.getStorageSync('token');
const { token } = await appToken(t);
setToken(token);
} catch (e) {
console.warn(e);
}
try { try {
const response = await appUserInfo(); const response = await appUserInfo();
const userInfo = response?.data || {}; const userInfo = response?.data || {};
@@ -325,10 +335,6 @@ function handlePathDataUpdated(data) {
}; };
} }
onLoad(() => {
getRemindInfo();
});
onShow(() => { onShow(() => {
// 返回本页后,如果之前因为信息缺失未展示内容,则重新检查 // 返回本页后,如果之前因为信息缺失未展示内容,则重新检查
if (!showContent.value) { if (!showContent.value) {
@@ -351,39 +357,23 @@ onMounted(() => {
<template> <template>
<div class="career-planning-page"> <div class="career-planning-page">
<!-- 提醒弹窗 --> <!-- 提醒弹窗 -->
<RemindPopup <RemindPopup ref="remindPopup" :remind-list="remindList" @cancel="handleCancel" @confirm="handleConfirm" />
ref="remindPopup"
:remind-list="remindList"
@cancel="handleCancel"
@confirm="handleConfirm"
/>
<!-- 技能详情弹出层 --> <!-- 技能详情弹出层 -->
<SkillDetailPopup <SkillDetailPopup ref="skillDetailPopup" :improvement-skills="selectedJobImprovementSkills" :job-title="selectedJobTitle" :possessed-skills="selectedJobPossessedSkills" />
ref="skillDetailPopup"
:job-title="selectedJobTitle"
:possessed-skills="selectedJobPossessedSkills"
:improvement-skills="selectedJobImprovementSkills"
/>
<!-- 页面内容 --> <!-- 页面内容 -->
<div class="page-content" v-if="showContent"> <div v-if="showContent" class="page-content">
<!-- #ifdef MP-WEIXIN --> <!-- #ifdef MP-WEIXIN -->
<!-- 小程序背景图片 --> <!-- 小程序背景图片 -->
<image class="mp-background" src="/static/icon/background2.png" mode="aspectFill"></image> <image class="mp-background" mode="aspectFill" src="/static/icon/background2.png"></image>
<!-- #endif --> <!-- #endif -->
<!-- 头部区域 --> <!-- 头部区域 -->
<PageHeader <PageHeader :active-tab="activeTab" @tab-change="switchTab" @search-click="handleSearchClick" @menu-click="handleMenuClick" @more-click="handleMoreClick" />
:active-tab="activeTab"
@tab-change="switchTab"
@search-click="handleSearchClick"
@menu-click="handleMenuClick"
@more-click="handleMoreClick"
/>
<!-- 内容区域 --> <!-- 内容区域 -->
<scroll-view scroll-y class="content-scroll"> <scroll-view class="content-scroll" scroll-y>
<CareerRecommend v-if="activeTab === 0" /> <CareerRecommend v-if="activeTab === 0" />
<CareerPath v-else-if="activeTab === 1" /> <CareerPath v-else-if="activeTab === 1" />
<SkillDevelopment v-else /> <SkillDevelopment v-else />
@@ -391,7 +381,7 @@ onMounted(() => {
</div> </div>
<!-- 底部导航栏 --> <!-- 底部导航栏 -->
<div class="tabbar-wrapper" v-if="showContent"> <div v-if="showContent" class="tabbar-wrapper">
<CustomTabBar :currentPage="0" /> <CustomTabBar :currentPage="0" />
</div> </div>
</div> </div>
@@ -484,6 +474,7 @@ onMounted(() => {
height: 728rpx; height: 728rpx;
z-index: 0; z-index: 0;
} }
/* #endif */ /* #endif */
.page-content { .page-content {
@@ -495,7 +486,6 @@ onMounted(() => {
overflow: hidden; overflow: hidden;
} }
.content-scroll { .content-scroll {
flex: 1; flex: 1;
height: 0; height: 0;

View File

@@ -80,7 +80,7 @@ export const useCareerPathStore = defineStore('career-path', () => {
const fetchData = async () => { const fetchData = async () => {
try { try {
const { code, msg, data } = await getCurrentPosition(); const { code, msg, data } = await getCurrentPosition();
if (code !== 0) { if (code !== 200) {
uni.showToast({ uni.showToast({
title: msg, title: msg,
icon: 'none' icon: 'none'
@@ -104,7 +104,7 @@ export const useCareerPathStore = defineStore('career-path', () => {
const fetchDataPath = async () => { const fetchDataPath = async () => {
try { try {
const { code, msg, data } = await getPath(); const { code, msg, data } = await getPath();
if (code !== 0) { if (code !== 200) {
uni.showToast({ uni.showToast({
title: msg, title: msg,
icon: 'none' icon: 'none'
@@ -137,7 +137,7 @@ export const useCareerPathStore = defineStore('career-path', () => {
}; };
try { try {
const { code, msg, data } = await getPathDetail(params); const { code, msg, data } = await getPathDetail(params);
if (code !== 0) { if (code !== 200) {
uni.showToast({ uni.showToast({
title: msg, title: msg,
icon: 'none' icon: 'none'

View File

@@ -78,7 +78,7 @@ export const useCareerRecommendationStore = defineStore('career-recommendation',
const fetchData = async () => { const fetchData = async () => {
try { try {
const { code, msg, data } = await getProfessions(); const { code, msg, data } = await getProfessions();
if (code !== 0) { if (code !== 200) {
uni.showToast({ uni.showToast({
title: msg, title: msg,
icon: 'none' icon: 'none'
@@ -105,7 +105,7 @@ export const useCareerRecommendationStore = defineStore('career-recommendation',
}; };
try { try {
const { code, msg, data } = await getSkillTags(params); const { code, msg, data } = await getSkillTags(params);
if (code !== 0) { if (code !== 200) {
uni.showToast({ uni.showToast({
title: msg, title: msg,
icon: 'none' icon: 'none'
@@ -126,7 +126,7 @@ export const useCareerRecommendationStore = defineStore('career-recommendation',
}; };
try { try {
const { code, msg, data } = await getRecommend(params); const { code, msg, data } = await getRecommend(params);
if (code !== 0) { if (code !== 200) {
uni.showToast({ uni.showToast({
title: msg, title: msg,
icon: 'none' icon: 'none'

View File

@@ -92,7 +92,7 @@ export const useSkillDevelopmentStore = defineStore('skill-development', () => {
const fetchData = async () => { const fetchData = async () => {
try { try {
const { code, msg, data } = await getCurrentPosition(); const { code, msg, data } = await getCurrentPosition();
if (code !== 0) { if (code !== 200) {
uni.showToast({ uni.showToast({
title: msg, title: msg,
icon: 'none' icon: 'none'
@@ -116,7 +116,7 @@ export const useSkillDevelopmentStore = defineStore('skill-development', () => {
const fetchDataPath = async () => { const fetchDataPath = async () => {
try { try {
const { code, msg, data } = await getPath(); const { code, msg, data } = await getPath();
if (code !== 0) { if (code !== 200) {
uni.showToast({ uni.showToast({
title: msg, title: msg,
icon: 'none' icon: 'none'
@@ -149,7 +149,7 @@ export const useSkillDevelopmentStore = defineStore('skill-development', () => {
}; };
try { try {
const { code, msg, data } = await getCareerPath(params); const { code, msg, data } = await getCareerPath(params);
if (code !== 0) { if (code !== 200) {
uni.showToast({ uni.showToast({
title: msg, title: msg,
icon: 'none' icon: 'none'
@@ -195,7 +195,7 @@ export const useSkillDevelopmentStore = defineStore('skill-development', () => {
}; };
try { try {
const { code, msg, data } = await getSkillResult(params); const { code, msg, data } = await getSkillResult(params);
if (code !== 0) { if (code !== 200) {
uni.showToast({ uni.showToast({
title: msg, title: msg,
icon: 'none' icon: 'none'

View File

@@ -29,7 +29,8 @@ let exports = {
// baseUrl: 'http://ks.zhaopinzao8dian.com/api/ks', // 已从根目录config.js引用不再重复配置 // baseUrl: 'http://ks.zhaopinzao8dian.com/api/ks', // 已从根目录config.js引用不再重复配置
// ========== 职业图谱专用baseUrl ========== // ========== 职业图谱专用baseUrl ==========
zytpBaseUrl: 'https://www.xjksly.cn/career-map/api/ks_zytp/admin-api/zytp', zytpBaseUrl: 'https://www.xjksly.cn/career-map/api/ks_zytp/zytp',
// zytpBaseUrl: 'http://ks.zhaopinzao8dian.com/api/ks_zytp/zytp',
// ========== 用户接口专用baseUrl其他用户接口使用 ========== // ========== 用户接口专用baseUrl其他用户接口使用 ==========
userBaseUrl: 'http://ks.zhaopinzao8dian.com/api/ks', // 用户相关接口使用根目录config.js的baseUrl userBaseUrl: 'http://ks.zhaopinzao8dian.com/api/ks', // 用户相关接口使用根目录config.js的baseUrl

View File

@@ -26,7 +26,7 @@ const request = config => {
const isZytpApi = baseType === 'zytp' const isZytpApi = baseType === 'zytp'
// 从存储中获取微信登录的 token // 从存储中获取微信登录的 token
const token = getToken() const token = getToken()
if (token && !isToken && !isZytpApi) { if (token && !isToken) {
// config.header['Authorization'] = 'Bearer ' + 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJsb2dpblR5cGUiOiJsb2dpbiIsImxvZ2luSWQiOiJzeXNfdXNlcjoxIiwicm5TdHIiOiJhb0Y4RmJPQWJ6ZVA3NlpzaENyM0tPSEZTbU85U0ZhViIsInVzZXJJZCI6MX0.kPEDm7D8eVvFlwAiUiE57evWaCX5EcSEOq-LEYGTm9Q' // config.header['Authorization'] = 'Bearer ' + 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJsb2dpblR5cGUiOiJsb2dpbiIsImxvZ2luSWQiOiJzeXNfdXNlcjoxIiwicm5TdHIiOiJhb0Y4RmJPQWJ6ZVA3NlpzaENyM0tPSEZTbU85U0ZhViIsInVzZXJJZCI6MX0.kPEDm7D8eVvFlwAiUiE57evWaCX5EcSEOq-LEYGTm9Q'
config.header['Authorization'] = 'Bearer ' + token config.header['Authorization'] = 'Bearer ' + token
} }