一体机的登录修复
This commit is contained in:
@@ -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) => {
|
||||
|
||||
Reference in New Issue
Block a user