From ccbb5008bd2fafbc2a5556daa98db6f0da716b90 Mon Sep 17 00:00:00 2001
From: shirlwang <15254118591@163.com>
Date: Mon, 8 Dec 2025 16:01:34 +0800
Subject: [PATCH 1/4] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E8=B7=B3=E8=BD=AC?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
pages/index/components/index-one.vue | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/pages/index/components/index-one.vue b/pages/index/components/index-one.vue
index 384b462..f34fe3f 100644
--- a/pages/index/components/index-one.vue
+++ b/pages/index/components/index-one.vue
@@ -111,7 +111,7 @@
- 劳动政策指引
+ 政策指引
@@ -861,7 +861,8 @@ function navToService(serviceType) {
'service-guidance': '/pages/service/guidance',
'public-recruitment': '/pages/service/public-recruitment',
'resume-creation': '/pages/resume-guide/resume-guide',
- 'labor-policy': '/pages/service/labor-policy',
+ // 'labor-policy': '/pages/service/labor-policy',
+ 'labor-policy': '/packageRc/pages/policy/policyList',
'skill-training': '/pages/service/skill-training',
// 'skill-evaluation': '/pages/service/skill-evaluation',
'question-bank': '/pages/service/question-bank',
@@ -1067,7 +1068,6 @@ import storeRc from '@/utilsRc/store/index.js';
function goRc(){
if (checkLogin()) {
let userInfo = uni.getStorageSync('userInfo')
- console.log(uni.getStorageSync('userInfo'), "uni.getStorageSync('userInfo')");
storeRc.dispatch('LoginByUserInfo', userInfo).then(res => {
// console.log(res, "'res");
navTo('/packageRc/pages/index/index');
From d89b566ad366aa20bd039123f70decdbb1a399f1 Mon Sep 17 00:00:00 2001
From: shirlwang <15254118591@163.com>
Date: Mon, 8 Dec 2025 16:11:01 +0800
Subject: [PATCH 2/4] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=94=BF=E7=AD=96?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
packageRc/pages/index/index.vue | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/packageRc/pages/index/index.vue b/packageRc/pages/index/index.vue
index d7a1f3d..6d9ff81 100644
--- a/packageRc/pages/index/index.vue
+++ b/packageRc/pages/index/index.vue
@@ -1,7 +1,7 @@
@@ -66,7 +66,7 @@
政策专区
{{'查看更多 >'}}
-
+
推荐
@@ -100,7 +100,7 @@ function getPolicy() {
function toPolicyList() {
navTo(`/packageRc/pages/policy/policyList`)
}
-function toPolicyDetail() {
+function toPolicyDetail(item) {
navTo(`/packageRc/pages/policy/policyDetail?id=${item.id}`)
}
let activeTab = ref(1)
From a74cdcc85004862a844b5a3e8dec600acd52a251 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E4=BD=B3?=
Date: Mon, 8 Dec 2025 20:22:40 +0800
Subject: [PATCH 3/4] Fix career map missing info redirect flow
---
packageA/pages/jobExpect/jobExpect.vue | 15 +++++++--
packageA/pages/personalInfo/personalInfo.vue | 14 ++++++--
pages/service/career-planning.vue | 34 ++++++++++++++++++--
3 files changed, 57 insertions(+), 6 deletions(-)
diff --git a/packageA/pages/jobExpect/jobExpect.vue b/packageA/pages/jobExpect/jobExpect.vue
index 6ec0376..7542a16 100644
--- a/packageA/pages/jobExpect/jobExpect.vue
+++ b/packageA/pages/jobExpect/jobExpect.vue
@@ -81,10 +81,16 @@ const fromValue = reactive({
area: '',
jobTitleId: [],
});
-onLoad(async () => {
+const needSkill = ref(false);
+
+onLoad(async (options) => {
// 初始化字典数据
await getDictData();
initLoad();
+ // 检查是否需要继续跳转到技能页面
+ if (options && options.needSkill === 'true') {
+ needSkill.value = true;
+ }
});
const confirm = () => {
if (!fromValue.jobTitleId) {
@@ -94,7 +100,12 @@ const confirm = () => {
$api.msg('完成');
state.disbleDate = true;
getUserResume().then(() => {
- navBack();
+ // 如果需要继续跳转到技能页面,则跳转到个人信息页面(携带 needSkill 标记,便于返回两级)
+ if (needSkill.value) {
+ navTo('/packageA/pages/personalInfo/personalInfo?needSkill=true');
+ } else {
+ navBack();
+ }
});
});
};
diff --git a/packageA/pages/personalInfo/personalInfo.vue b/packageA/pages/personalInfo/personalInfo.vue
index 10fe842..e67daa0 100644
--- a/packageA/pages/personalInfo/personalInfo.vue
+++ b/packageA/pages/personalInfo/personalInfo.vue
@@ -150,6 +150,8 @@ const openSelectPopup = (config) => {
};
const percent = ref('0%');
+// 当从“先职位后技能”链路进入时,提交后需直接返回职业规划页
+const needGoBackTwoStep = ref(false);
const state = reactive({
educationText: '',
politicalAffiliationText: '',
@@ -168,7 +170,10 @@ const fromValue = reactive({
// 移除重复的onLoad定义,已在上方实现
// 在onLoad中初始化数据,确保页面加载时就能获取技能信息
-onLoad(() => {
+onLoad((options = {}) => {
+ if (options.needSkill === 'true') {
+ needGoBackTwoStep.value = true;
+ }
// 初始化页面数据
initLoad();
});
@@ -369,7 +374,12 @@ const confirm = () => {
$api.createRequest('/app/user/resume', params, 'post').then((resData) => {
$api.msg('完成');
getUserResume().then(() => {
- navBack();
+ // 如果从“缺职位+技能”链路进入,回退两层直接返回职业规划页
+ if (needGoBackTwoStep.value) {
+ navBack({ delta: 2 });
+ } else {
+ navBack();
+ }
});
});
};
diff --git a/pages/service/career-planning.vue b/pages/service/career-planning.vue
index f9bcdb3..c3abf8d 100644
--- a/pages/service/career-planning.vue
+++ b/pages/service/career-planning.vue
@@ -143,6 +143,11 @@ function openRemindPopup() {
// 检查用户是否完善了个人信息(调用接口获取)
let hasCheckedRemindInfo = false;
+// 保存缺失信息的标识
+const missingInfo = ref({
+ hasJobInfo: false,
+ hasSkills: false
+});
async function getRemindInfo() {
if (hasCheckedRemindInfo) {
@@ -186,6 +191,10 @@ async function getRemindInfo() {
return skillName && skillName.trim() !== '';
});
+ // 保存缺失信息标识(只保存职位信息和技能标签,身份证信息跳转到个人信息页面)
+ missingInfo.value.hasJobInfo = hasJobInfo;
+ missingInfo.value.hasSkills = hasSkills;
+
// 判断信息是否完整(idCard、职位信息、技能标签都必须有)
const isComplete = hasIdCard && hasJobInfo && hasSkills;
@@ -250,6 +259,10 @@ async function getRemindInfo() {
return skillName && skillName.trim() !== '';
});
+ // 保存缺失信息标识
+ missingInfo.value.hasJobInfo = hasJobInfo;
+ missingInfo.value.hasSkills = hasSkills;
+
// 判断信息是否完整(idCard、职位信息、技能标签都必须有)
const isComplete = hasIdCard && hasJobInfo && hasSkills;
@@ -299,8 +312,25 @@ function handleCancel() {
async function handleConfirm() {
remindPopup.value?.close();
- // 跳转到完善信息页面
- navTo('/packageA/pages/personalInfo/personalInfo');
+ const { hasJobInfo, hasSkills } = missingInfo.value;
+
+ // 如果同时缺少职位信息和技能标签:先跳转到职位信息页面,并传递参数表示完成后需要继续跳转到技能页面
+ if (!hasJobInfo && !hasSkills) {
+ // 跳转到职位信息页面,传递参数表示完成后需要继续跳转到技能页面
+ navTo('/packageA/pages/jobExpect/jobExpect?needSkill=true');
+ }
+ // 如果只缺少技能标签:直接跳转到技能页面(个人信息页面的技能部分)
+ else if (!hasSkills) {
+ navTo('/packageA/pages/personalInfo/personalInfo');
+ }
+ // 如果只缺少职位信息:直接跳转到职位信息页面
+ else if (!hasJobInfo) {
+ navTo('/packageA/pages/jobExpect/jobExpect');
+ }
+ // 如果只缺少身份证信息:跳转到个人信息页面
+ else {
+ navTo('/packageA/pages/personalInfo/personalInfo');
+ }
}
// 切换tab
From 6006f5cd2845c5cf6021747e18445fe3b7b21fa2 Mon Sep 17 00:00:00 2001
From: hanguangpu01
Date: Mon, 8 Dec 2025 21:17:05 +0800
Subject: [PATCH 4/4] =?UTF-8?q?feat(auth):=20=E5=AE=9E=E7=8E=B0=E7=AC=AC?=
=?UTF-8?q?=E4=B8=89=E6=96=B9=E7=99=BB=E5=BD=95=E9=9B=86=E6=88=90?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
- 在 careerfair.vue 中新增 thirdLogin 方法处理单点登录逻辑
- 修改 goDetail 方法,在跳转前执行第三方登录验证
- 在 packageB/train/index.vue 中增加 onLoad 钩子调用 thirdLogin
- 修改 jumps 方法,确保页面跳转前完成登录验证
- 在 request.js 中注释掉全局错误提示,避免重复提示
- 优化 videoDetail.vue 中的 getHeart 方法,移除冗余跳转逻辑
- 在 videoList.vue 中新增 playVideo 前的登录校验
- 统一多个页面中的 thirdLogin 实现,确保登录态一致性
---
packageB/train/index.vue | 53 +++++++++++++++++++-
packageB/train/video/videoDetail.vue | 28 ++++++-----
packageB/train/video/videoList.vue | 52 +++++++++++++++++--
pages/careerfair/careerfair.vue | 75 +++++++++++++++++++++++-----
utils/request.js | 8 +--
5 files changed, 182 insertions(+), 34 deletions(-)
diff --git a/packageB/train/index.vue b/packageB/train/index.vue
index 4703b17..578970f 100644
--- a/packageB/train/index.vue
+++ b/packageB/train/index.vue
@@ -58,8 +58,57 @@ const { $api, navTo, vacanciesTo, formatTotal, config } = inject('globalFunction
import useUserStore from '@/stores/useUserStore';
import useDictStore from '@/stores/useDictStore';
-function jumps(url){
- navTo(url);
+onLoad(() => {
+ thirdLogin()
+});
+
+async function jumps(url){
+ if(await thirdLogin()){
+ navTo(url);
+ }
+}
+
+
+async function thirdLogin(){
+ let form={}
+ if (uni.getStorageSync('userInfo').isCompanyUser=='1') {
+ form={
+ usertype: '1',
+ idno: uni.getStorageSync('userInfo').idCard,
+ name: uni.getStorageSync('userInfo').name,
+ enterprisecode:"",
+ enterprisename: "",
+ contactperson: "",
+ contactphone: "",
+ }
+ }else if (uni.getStorageSync('userInfo').isCompanyUser=='0') {
+ form={
+ usertype: "2",
+ enterprisecode: uni.getStorageSync('userInfo').idCard,
+ enterprisename: uni.getStorageSync('userInfo').name,
+ contactperson: "",
+ contactphone: "",
+ idno: "",
+ name: ""
+ }
+ }else{
+ uni.showToast({
+ icon: 'none',
+ title: '请先登录'
+ })
+ return false;
+ }
+ var resLogin = await $api.myRequest('/auth/login2/ks',form,'post',10100);
+ if (resLogin.code=='200') {
+ uni.setStorageSync('Padmin-Token', resLogin.data.access_token)
+ return true;
+ }else{
+ uni.showToast({
+ icon: 'none',
+ title: '单点异常'
+ })
+ return false;
+ }
}
diff --git a/packageB/train/video/videoDetail.vue b/packageB/train/video/videoDetail.vue
index fea32f3..d17e85c 100644
--- a/packageB/train/video/videoDetail.vue
+++ b/packageB/train/video/videoDetail.vue
@@ -202,12 +202,10 @@ function getData() {
function getHeart() {
const raw = uni.getStorageSync("Padmin-Token");
const token = typeof raw === "string" ? raw.trim() : "";
- const headers = token ? { Authorization: raw.startsWith("Bearer ") ? raw : `Bearer ${token}` }: {}
+ const headers = token ? { Authorization: raw.startsWith("Bearer ") ? raw : `Bearer ${token}` }: {};
$api.myRequest("/dashboard/auth/heart", {}, "POST", 10100, headers).then((resData) => {
if (resData.code == 200) {
getUserInfo();
- } else {
- navTo('/packageB/login')
}
});
}
@@ -218,6 +216,7 @@ function getUserInfo(){
$api.myRequest('/system/user/login/user/info', {},'get',10100,header).then((resData) => {
userId.value=resData.info.userId
getData()
+ updateVideoInfo()
});
}
function getDictionary(){
@@ -277,15 +276,20 @@ function updateVideoInfo(){
'Authorization':uni.getStorageSync('Padmin-Token'),
'Content-Type': "application/x-www-form-urlencoded"
}
- if(videoInfo.value.isCollect===null && videoInfo.value.process ===null){
- $api.myRequest('/train/public/videoUser/add', paramsData,'post',9100,header).then((resData) => {
- console.log("视频播放时长更新成功")
- });
- }else{
- $api.myRequest('/train/public/videoUser/update', paramsData,'post',9100,header).then((resData) => {
- console.log("视频播放时长更新成功")
- });
- }
+
+ $api.myRequest("/dashboard/auth/heart", {}, "POST", 10100, header).then((resData) => {
+ if (resData.code == 200) {
+ if(videoInfo.value.isCollect===null && videoInfo.value.process ===null){
+ $api.myRequest('/train/public/videoUser/add', paramsData,'post',9100,header).then((resData) => {
+ console.log("视频播放时长更新成功")
+ });
+ }else{
+ $api.myRequest('/train/public/videoUser/update', paramsData,'post',9100,header).then((resData) => {
+ console.log("视频播放时长更新成功")
+ });
+ }
+ }
+ })
}
// 计算并上报停留时长
function reportPageDuration() {
diff --git a/packageB/train/video/videoList.vue b/packageB/train/video/videoList.vue
index 90996a5..5efd2d0 100644
--- a/packageB/train/video/videoList.vue
+++ b/packageB/train/video/videoList.vue
@@ -80,7 +80,8 @@ const getItemBackgroundStyle = (imageName) => ({
});
const trainVideoImgUrl=config.trainVideoImgUrl
-onLoad(() => {
+onLoad(async () => {
+ await thirdLogin()
getDataList('refresh');
});
@@ -135,8 +136,53 @@ function getDataList(type = 'add') {
// 播放视频
-function playVideo(video) {
- navTo(`/packageB/train/video/videoDetail?id=${video.videoId}`);
+async function playVideo(video) {
+ if(await thirdLogin()){
+ navTo(`/packageB/train/video/videoDetail?id=${video.videoId}`);
+ }
+}
+
+
+async function thirdLogin(){
+ let form={}
+ if (uni.getStorageSync('userInfo').isCompanyUser=='1') {
+ form={
+ usertype: '1',
+ idno: uni.getStorageSync('userInfo').idCard,
+ name: uni.getStorageSync('userInfo').name,
+ enterprisecode:"",
+ enterprisename: "",
+ contactperson: "",
+ contactphone: "",
+ }
+ }else if (uni.getStorageSync('userInfo').isCompanyUser=='0') {
+ form={
+ usertype: "2",
+ enterprisecode: uni.getStorageSync('userInfo').idCard,
+ enterprisename: uni.getStorageSync('userInfo').name,
+ contactperson: "",
+ contactphone: "",
+ idno: "",
+ name: ""
+ }
+ }else{
+ uni.showToast({
+ icon: 'none',
+ title: '请先登录'
+ })
+ return false;
+ }
+ var resLogin = await $api.myRequest('/auth/login2/ks',form,'post',10100);
+ if (resLogin.code=='200') {
+ uni.setStorageSync('Padmin-Token', resLogin.data.access_token)
+ return true;
+ }else{
+ uni.showToast({
+ icon: 'none',
+ title: '单点异常'
+ })
+ return false;
+ }
}
diff --git a/pages/careerfair/careerfair.vue b/pages/careerfair/careerfair.vue
index a816058..8b35cf7 100644
--- a/pages/careerfair/careerfair.vue
+++ b/pages/careerfair/careerfair.vue
@@ -143,13 +143,59 @@
// startDate: currentDate,
// });
// weekList.value = result;
- getHeart();
+ if(thirdLogin()){
+ getHeart();
+ }
});
onShow(() => {
// 更新自定义tabbar选中状态
tabbarManager.updateSelected(1);
- });
+ });//
+
+
+
+ async function thirdLogin(){
+ let form={}
+ if (uni.getStorageSync('userInfo').isCompanyUser=='1') {
+ form={
+ usertype: '1',
+ idno: uni.getStorageSync('userInfo').idCard,
+ name: uni.getStorageSync('userInfo').name,
+ enterprisecode:"",
+ enterprisename: "",
+ contactperson: "",
+ contactphone: "",
+ }
+ }else if (uni.getStorageSync('userInfo').isCompanyUser=='0') {
+ form={
+ usertype: "2",
+ enterprisecode: uni.getStorageSync('userInfo').idCard,
+ enterprisename: uni.getStorageSync('userInfo').name,
+ contactperson: "",
+ contactphone: "",
+ idno: "",
+ name: ""
+ }
+ }else{
+ uni.showToast({
+ icon: 'none',
+ title: '请先登录'
+ })
+ return false;
+ }
+ var resLogin = await $api.myRequest('/auth/login2/ks',form,'post',10100);
+ if (resLogin.code=='200') {
+ uni.setStorageSync('Padmin-Token', resLogin.data.access_token)
+ return true;
+ }else{
+ uni.showToast({
+ icon: 'none',
+ title: '单点异常'
+ })
+ return false;
+ }
+ }
onMounted(() => {
// 监听退出登录事件,显示微信登录弹窗
@@ -168,19 +214,22 @@
// 可以在这里添加登录成功后的处理逻辑
};
- function goDetail(jobFairId){
- if(state.current != 3){
- navTo('/packageA/pages/exhibitors/exhibitors?jobFairId=' + jobFairId)
- }else{
- console.log(userInfo.value, 'userInfo');
- if(userInfo.value){
- if(userInfo.value.userType=='ent'){
- navTo('/packageB/jobFair/detailCom?jobFairId=' + jobFairId)
- }else{
- navTo('/packageB/jobFair/detailPerson?jobFairId=' + jobFairId)
+ async function goDetail(jobFairId){
+ if(await thirdLogin()){
+ debugger
+ if(state.current != 3){
+ navTo('/packageA/pages/exhibitors/exhibitors?jobFairId=' + jobFairId)
+ }else{
+ console.log(userInfo.value, 'userInfo');
+ if(userInfo.value){
+ if(userInfo.value.userType=='ent'){
+ navTo('/packageB/jobFair/detailCom?jobFairId=' + jobFairId)
+ }else{
+ navTo('/packageB/jobFair/detailPerson?jobFairId=' + jobFairId)
+ }
}
}
- }
+ }
}
function toSelectDate() {
diff --git a/utils/request.js b/utils/request.js
index 573cce0..85bf0da 100644
--- a/utils/request.js
+++ b/utils/request.js
@@ -246,10 +246,10 @@ export function myRequest(url, data = {}, method = 'GET', port = 9100, headers =
}
// 显示具体的错误信息
const errorMsg = msg || '请求出现异常,请联系工作人员'
- uni.showToast({
- title: errorMsg,
- icon: 'none'
- })
+ // uni.showToast({
+ // title: errorMsg,
+ // icon: 'none'
+ // })
const err = new Error(errorMsg)
err.error = resData
reject(err)