一体机的登录修复

This commit is contained in:
francis-fh
2026-06-04 14:45:22 +08:00
parent bdd42bd790
commit 087c686d81
3 changed files with 65 additions and 32 deletions

View File

@@ -256,6 +256,7 @@ import dictLabel from '@/components/dict-Label/dict-Label.vue';
import RadarMap from './component/radarMap.vue';
import { storeToRefs } from 'pinia';
import useUserStore from '@/stores/useUserStore';
import { checkLoginAndNavigate } from '@/utils/loginHelper';
const { userInfo } = storeToRefs(useUserStore());
// 与首页一致的用户类型获取优先store兜底缓存
const currentUserType = computed(() => {
@@ -445,9 +446,7 @@ function getCompetivetuveness(encryptJobId) {
// 申请岗位
function jobApply() {
const tokenValue = uni.getStorageSync('token') || '';
if (!tokenValue) {
$api.msg('请您先登录');
if (!checkLoginAndNavigate({ content: '投递简历请先登录' })) {
return;
}
// 显示确认弹窗
@@ -502,6 +501,9 @@ function cancelApply() {
// 取消/收藏岗位
function jobCollection() {
if (!checkLoginAndNavigate({ content: '收藏请先登录' })) {
return;
}
const encryptJobId = jobIdRef.value;
if (jobInfo.value.isCollection) {
$api.createRequest(`/app/job/collection/${encryptJobId}`, {}, 'DELETE').then((resData) => {