= 职业规划推荐

This commit is contained in:
2026-01-22 16:46:45 +08:00
parent 4dce6d3e39
commit e0efa9c1cf
3 changed files with 54 additions and 27 deletions

View File

@@ -71,7 +71,10 @@ export const useCareerPathStore = defineStore('career-path', () => {
try {
const { code, msg, data } = await getCurrentPosition();
if (code !== 0) {
$emitter.emit('error-message', msg);
uni.showToast({
title: msg,
icon: 'none'
});
return;
}
if (!data) {
@@ -92,7 +95,10 @@ export const useCareerPathStore = defineStore('career-path', () => {
try {
const { code, msg, data } = await getPath();
if (code !== 0) {
$emitter.emit('error-message', msg);
uni.showToast({
title: msg,
icon: 'none'
});
return;
}
if (!data) {
@@ -122,7 +128,10 @@ export const useCareerPathStore = defineStore('career-path', () => {
try {
const { code, msg, data } = await getPathDetail(params);
if (code !== 0) {
$emitter.emit('error-message', msg);
uni.showToast({
title: msg,
icon: 'none'
});
return;
}
if (!data) {
@@ -143,23 +152,23 @@ export const useCareerPathStore = defineStore('career-path', () => {
const eventSearch = () => {
if (pathsRef.value.length === 0) {
ElMessage.warning({
message: '当前职业暂无发展路径,敬请期待!',
duration: 5000
uni.showToast({
title: '当前职业暂无发展路径,敬请期待!',
icon: 'none'
});
return;
}
if (!profession.value) {
ElMessage.warning({
message: '请选择当前职位!',
duration: 5000
uni.showToast({
title: '请选择当前职位!',
icon: 'none'
});
return;
}
if (!targetCareer.value) {
ElMessage.warning({
message: '请选择目标职业!',
duration: 5000
uni.showToast({
title: '请选择目标职业!',
icon: 'none'
});
return;
}