11
Some checks failed
Node CI / build (14.x, macOS-latest) (push) Has been cancelled
Node CI / build (14.x, ubuntu-latest) (push) Has been cancelled
Node CI / build (14.x, windows-latest) (push) Has been cancelled
Node CI / build (16.x, macOS-latest) (push) Has been cancelled
Node CI / build (16.x, ubuntu-latest) (push) Has been cancelled
Node CI / build (16.x, windows-latest) (push) Has been cancelled
CodeQL / Analyze (javascript) (push) Has been cancelled
coverage CI / build (push) Has been cancelled
Node pnpm CI / build (16.x, macOS-latest) (push) Has been cancelled
Node pnpm CI / build (16.x, ubuntu-latest) (push) Has been cancelled
Node pnpm CI / build (16.x, windows-latest) (push) Has been cancelled
Some checks failed
Node CI / build (14.x, macOS-latest) (push) Has been cancelled
Node CI / build (14.x, ubuntu-latest) (push) Has been cancelled
Node CI / build (14.x, windows-latest) (push) Has been cancelled
Node CI / build (16.x, macOS-latest) (push) Has been cancelled
Node CI / build (16.x, ubuntu-latest) (push) Has been cancelled
Node CI / build (16.x, windows-latest) (push) Has been cancelled
CodeQL / Analyze (javascript) (push) Has been cancelled
coverage CI / build (push) Has been cancelled
Node pnpm CI / build (16.x, macOS-latest) (push) Has been cancelled
Node pnpm CI / build (16.x, ubuntu-latest) (push) Has been cancelled
Node pnpm CI / build (16.x, windows-latest) (push) Has been cancelled
This commit is contained in:
@@ -5,19 +5,19 @@ import {getYear} from '@/utils/tools'
|
||||
const Footer: React.FC = () => {
|
||||
return (
|
||||
<DefaultFooter
|
||||
copyright={` ${getYear()} 青岛智慧就业服务系统`}
|
||||
copyright={` ${getYear()} 石河子智慧就业服务系统`}
|
||||
style={{
|
||||
background: 'none',
|
||||
}}
|
||||
links={[
|
||||
{
|
||||
key: '青岛政务网',
|
||||
title: '青岛政务网',
|
||||
key: '石河子政务网',
|
||||
title: '石河子政务网',
|
||||
href: 'http://www.qingdao.gov.cn/',
|
||||
blankTarget: true,
|
||||
},{
|
||||
key: '青岛市人力资源和社会保障局',
|
||||
title: '青岛市人力资源和社会保障局',
|
||||
key: '石河子人社局',
|
||||
title: '石河子人社局',
|
||||
href: 'https://hrss.qingdao.gov.cn/',
|
||||
blankTarget: true,
|
||||
},
|
||||
|
||||
@@ -32,7 +32,7 @@ import {
|
||||
getEmptyCompetitivenessRadar,
|
||||
} from '@/services/jobportal/competitiveness';
|
||||
import { isJobPortalLoggedIn } from '@/utils/jobPortalAuth';
|
||||
import { favoriteJob, unfavoriteJob, applyJob } from '@/services/jobportal/user';
|
||||
import { favoriteJob, unfavoriteJob, applyJob, browseJob } from '@/services/jobportal/user';
|
||||
import { ensureJobPortalLogin, requireJobPortalUserId } from '@/utils/jobPortalAuth';
|
||||
import { getDictLabel, resolveIndustryLabel } from '@/utils/jobPortalDict';
|
||||
import { getDictValueEnum } from '@/services/system/dict';
|
||||
@@ -265,6 +265,23 @@ const JobDetailPage: React.FC = () => {
|
||||
}
|
||||
}, [originalJobData?.jobId, originalJobData?.id, id]);
|
||||
|
||||
// 仅登录且有真实岗位 id 时上报浏览记录
|
||||
useEffect(() => {
|
||||
if (!isJobPortalLoggedIn()) {
|
||||
return;
|
||||
}
|
||||
const jobIdRaw =
|
||||
originalJobData?.jobId
|
||||
?? originalJobData?.id
|
||||
?? id;
|
||||
const jobIdNum = Number(jobIdRaw);
|
||||
if (!Number.isNaN(jobIdNum) && jobIdNum > 0) {
|
||||
browseJob({ jobId: jobIdNum }).catch(() => {
|
||||
// 浏览上报失败不阻塞页面
|
||||
});
|
||||
}
|
||||
}, [originalJobData?.jobId, originalJobData?.id, id]);
|
||||
|
||||
const fetchCompetitiveness = async (jobIdNum: number) => {
|
||||
if (!isJobPortalLoggedIn()) {
|
||||
setOverallScore(0);
|
||||
@@ -385,6 +402,9 @@ const JobDetailPage: React.FC = () => {
|
||||
});
|
||||
if (response?.code === 200) {
|
||||
message.success('申请成功');
|
||||
if (originalJobData) {
|
||||
setOriginalJobData({ ...originalJobData, isApply: 1 });
|
||||
}
|
||||
} else {
|
||||
message.error(response?.msg || '申请失败');
|
||||
}
|
||||
@@ -456,9 +476,10 @@ const JobDetailPage: React.FC = () => {
|
||||
type="primary"
|
||||
size="large"
|
||||
block
|
||||
disabled={originalJobData?.isApply === 1}
|
||||
onClick={handleApply}
|
||||
>
|
||||
立即申请
|
||||
{originalJobData?.isApply === 1 ? '已投递' : '立即申请'}
|
||||
</Button>
|
||||
</div>
|
||||
</Col>
|
||||
|
||||
@@ -26,7 +26,7 @@ import {
|
||||
import { history, useLocation } from '@umijs/max';
|
||||
import { getJobList } from '@/services/common/jobTitle';
|
||||
import JobPortalHeader from '@/components/JobPortalHeader';
|
||||
import { favoriteJob, unfavoriteJob, applyJob } from '@/services/jobportal/user';
|
||||
import { favoriteJob, unfavoriteJob, applyJob, browseJob } from '@/services/jobportal/user';
|
||||
import { ensureJobPortalLogin, requireJobPortalUserId } from '@/utils/jobPortalAuth';
|
||||
import { getDictValueEnum } from '@/services/system/dict';
|
||||
import { getDictLabel, findTreeLabelById, resolveIndustryLabel } from '@/utils/jobPortalDict';
|
||||
@@ -321,6 +321,20 @@ const JobListPage: React.FC = () => {
|
||||
}
|
||||
}, [selectedJob]);
|
||||
|
||||
// 当 selectedJob 变化时,上报浏览记录(仅登录)
|
||||
useEffect(() => {
|
||||
if (!selectedJob) return;
|
||||
if (!isJobPortalLoggedIn()) {
|
||||
return;
|
||||
}
|
||||
const jobIdNum = Number(selectedJob?.jobId || selectedJob?.id);
|
||||
if (!Number.isNaN(jobIdNum) && jobIdNum > 0) {
|
||||
browseJob({ jobId: jobIdNum }).catch(() => {
|
||||
// 浏览上报失败不阻塞页面
|
||||
});
|
||||
}
|
||||
}, [selectedJob]);
|
||||
|
||||
const fetchCompetitiveness = async (jobIdNum: number) => {
|
||||
if (!isJobPortalLoggedIn()) {
|
||||
setOverallScore(0);
|
||||
@@ -491,6 +505,15 @@ const JobListPage: React.FC = () => {
|
||||
});
|
||||
if (response?.code === 200) {
|
||||
message.success('申请成功');
|
||||
if (selectedJob) {
|
||||
setSelectedJob({ ...selectedJob, isApply: 1 });
|
||||
setJobList(jobList.map(job =>
|
||||
(job.jobId === jobId || job.id === jobId) ? { ...job, isApply: 1 } : job
|
||||
));
|
||||
setFilteredJobList(filteredJobList.map(job =>
|
||||
(job.jobId === jobId || job.id === jobId) ? { ...job, isApply: 1 } : job
|
||||
));
|
||||
}
|
||||
} else {
|
||||
message.error(response?.msg || '申请失败');
|
||||
}
|
||||
@@ -795,8 +818,13 @@ const JobListPage: React.FC = () => {
|
||||
>
|
||||
{favorited ? '已收藏' : '收藏'}
|
||||
</Button>
|
||||
<Button type="primary" className="btn-apply" onClick={handleApply}>
|
||||
立即申请
|
||||
<Button
|
||||
type="primary"
|
||||
className="btn-apply"
|
||||
disabled={selectedJob?.isApply === 1}
|
||||
onClick={handleApply}
|
||||
>
|
||||
{selectedJob?.isApply === 1 ? '已投递' : '立即申请'}
|
||||
</Button>
|
||||
</Space>
|
||||
<Space className="action-icons" size={16}>
|
||||
|
||||
@@ -112,7 +112,7 @@ export default function ThirdPartyRedirect() {
|
||||
console.log('userType value:', userInfo?.userType, 'type:', typeof userInfo?.userType);
|
||||
if (menus && menus.length > 0 && userInfo?.userType !== 'common') {
|
||||
setRemoteMenu(menus);
|
||||
window.location.replace('http://39.98.44.136:6024/shihezi/management/management/list/index')
|
||||
window.location.replace('http://39.98.44.136:6024/shihezi/management/management/list/index?type=1')
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -70,6 +70,15 @@ export async function applyJob(params: { jobId: string; userId: string }, option
|
||||
});
|
||||
}
|
||||
|
||||
/** 浏览岗位 POST /api/cms/job/browse */
|
||||
export async function browseJob(params: { jobId: number }, options?: Record<string, any>) {
|
||||
return request<API.Result>('/api/cms/job/browse', {
|
||||
method: 'POST',
|
||||
data: params,
|
||||
...(options || {}),
|
||||
});
|
||||
}
|
||||
|
||||
/** 获取消息列表 GET /api/cms/appUser/getMessages */
|
||||
export async function getMessages(params?: { pageNum?: number; pageSize?: number; noticeType?: number; isRead?: number }, options?: Record<string, any>) {
|
||||
return request<API.MessageListResult>('/api/cms/notice/appNoticList', {
|
||||
|
||||
Reference in New Issue
Block a user