This commit is contained in:
2025-12-23 17:47:24 +08:00
4 changed files with 33 additions and 20 deletions

View File

@@ -274,7 +274,21 @@
$api.myRequest("/jobfair/public/job-info/list", data, "GET", 9100, { $api.myRequest("/jobfair/public/job-info/list", data, "GET", 9100, {
Authorization: `Bearer ${uni.getStorageSync("Padmin-Token")}` Authorization: `Bearer ${uni.getStorageSync("Padmin-Token")}`
}).then((resData) => { }).then((resData) => {
jobList.value = resData.data.list || []; if(resData.code == 200){
let isPublishJobList = resData.data.list || [];
jobList.value = isPublishJobList.filter(job => job.isPublish === "1");
if (isPublishJobList.length > 0 && jobList.value.length === 0) {
uni.showToast({
title: '请等待岗位审核通过后,再进行报名',
icon: 'none'
});
}
}else{
uni.showToast({
title: '请前往基本信息中完善企业信息和岗位信息',
icon: 'none'
});
}
}); });
}); });
}; };

View File

@@ -294,11 +294,11 @@
} }
} else { } else {
$api.msg('请先登录'); $api.msg('请先登录');
setTimeout(() => { // setTimeout(() => {
uni.redirectTo({ // uni.redirectTo({
url: '/packageB/login' // url: '/packageB/login'
}) // })
}, 1000) // }, 1000)
} }
}); });
} }

View File

@@ -187,6 +187,7 @@
var resLogin = await $api.myRequest('/auth/login2/ks',form,'post',10100); var resLogin = await $api.myRequest('/auth/login2/ks',form,'post',10100);
if (resLogin.code=='200') { if (resLogin.code=='200') {
uni.setStorageSync('Padmin-Token', resLogin.data.access_token) uni.setStorageSync('Padmin-Token', resLogin.data.access_token)
isLogin.value = true;
return true; return true;
}else{ }else{
uni.showToast({ uni.showToast({
@@ -215,11 +216,11 @@
}; };
async function goDetail(jobFairId){ async function goDetail(jobFairId){
if(await thirdLogin('1')){ if(state.current != 3 ){
if(state.current != 3){ await thirdLogin()
navTo('/packageA/pages/exhibitors/exhibitors?jobFairId=' + jobFairId) navTo('/packageA/pages/exhibitors/exhibitors?jobFairId=' + jobFairId)
}else{ }else{
console.log(userInfo.value, 'userInfo'); if(await thirdLogin('1')){
if(userInfo.value){ if(userInfo.value){
if(userInfo.value.userType=='ent'){ if(userInfo.value.userType=='ent'){
navTo('/packageB/jobFair/detailCom?jobFairId=' + jobFairId) navTo('/packageB/jobFair/detailCom?jobFairId=' + jobFairId)
@@ -259,17 +260,16 @@
} }
async function seemsg(index) { async function seemsg(index) {
state.current = index;
if (index != 3) { if (index != 3) {
state.current = index;
getFair("refresh"); getFair("refresh");
} else { } else {
if(await thirdLogin('1')){ if(await thirdLogin('1')){
if (!isLogin.value) { if (!isLogin.value) {
getHeart(); getHeart();
return; return;
} }
state.current = index;
// 确保获取到用户信息后再请求“我参与的”列表 // 确保获取到用户信息后再请求“我参与的”列表
if (!userInfo.value?.info?.userId) { if (!userInfo.value?.info?.userId) {
getUser().then(() => { getUser().then(() => {
@@ -279,7 +279,6 @@
getMyFair("refresh"); getMyFair("refresh");
} }
} }
} }
} }

View File

@@ -72,7 +72,7 @@ const useUserStore = defineStore("user", () => {
role.value = {} role.value = {}
uni.removeStorageSync('userInfo') uni.removeStorageSync('userInfo')
uni.removeStorageSync('token') uni.removeStorageSync('token')
uni.removeStorageSync('Padmin-Token')
// 如果需要显示登录弹窗,则通过事件通知页面显示微信登录弹窗 // 如果需要显示登录弹窗,则通过事件通知页面显示微信登录弹窗
if (showLoginModal) { if (showLoginModal) {
// 通过 uni.$emit 发送全局事件,通知页面显示登录弹窗 // 通过 uni.$emit 发送全局事件,通知页面显示登录弹窗