投递简历的时候验证登录

This commit is contained in:
francis_fh
2026-01-14 23:07:09 +08:00
parent 637d50c811
commit a299608fca
2 changed files with 6 additions and 12 deletions

View File

@@ -289,7 +289,6 @@ onShow(() => {
} }
// #endif // #endif
}); });
function initLoad(option) { function initLoad(option) {
const jobId = decodeURIComponent(option.jobId); const jobId = decodeURIComponent(option.jobId);
if (jobId !== jobIdRef.value) { if (jobId !== jobIdRef.value) {
@@ -413,6 +412,11 @@ function getCompetivetuveness(jobId) {
// 申请岗位 // 申请岗位
function jobApply() { function jobApply() {
const tokenValue = uni.getStorageSync('token') || '';
if (!tokenValue) {
$api.msg('请您先登录');
return;
}
const jobId = jobInfo.value.jobId; const jobId = jobInfo.value.jobId;
$api.createRequest(`/app/job/apply/${jobId}`, {}, 'GET').then((resData) => { $api.createRequest(`/app/job/apply/${jobId}`, {}, 'GET').then((resData) => {
getDetail(jobId); getDetail(jobId);

View File

@@ -84,7 +84,6 @@
</view> </view>
<!-- #endif --> <!-- #endif -->
<view style="margin-top: 20rpx;padding:0 20px">token:{{myToken}}</view>
<!-- 服务功能网格 --> <!-- 服务功能网格 -->
<!-- #ifndef H5 --> <!-- #ifndef H5 -->
<view class="service-grid" v-if="shouldShowJobSeekerContent"> <view class="service-grid" v-if="shouldShowJobSeekerContent">
@@ -747,7 +746,6 @@ const handleLoginSuccess = () => {
//四级联动单点及权限 //四级联动单点及权限
getIsFourLevelLinkagePurview() getIsFourLevelLinkagePurview()
}; };
const myToken = ref('');
// H5环境下从URL获取token并自动登录 // H5环境下从URL获取token并自动登录
onLoad((options) => { onLoad((options) => {
// #ifdef H5 // #ifdef H5
@@ -890,15 +888,7 @@ function clearfindJob(job) {
} }
function nextDetail(job) { function nextDetail(job) {
// 登录检查 navTo(`/packageA/pages/post/post?jobId=${encodeURIComponent(job.jobId)}`);
if (checkLogin()) {
// 记录岗位类型,用作数据分析
if (job.jobCategory) {
const recordData = recommedIndexDb.JobParameter(job);
recommedIndexDb.addRecord(recordData);
}
navTo(`/packageA/pages/post/post?jobId=${encodeURIComponent(job.jobId)}`);
}
} }
function navToService(serviceType) { function navToService(serviceType) {