Fix career map missing info redirect flow

This commit is contained in:
2025-12-08 20:22:40 +08:00
parent bc48d7fff0
commit a74cdcc850
3 changed files with 57 additions and 6 deletions

View File

@@ -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();
}
});
});
};

View File

@@ -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();
}
});
});
};