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

This commit is contained in:
francis-fh
2026-06-16 19:11:36 +08:00
parent f2da3d6929
commit bcb5c6af19
7 changed files with 91 additions and 11 deletions

16
.codegraph/.gitignore vendored Normal file
View File

@@ -0,0 +1,16 @@
# CodeGraph data files
# These are local to each machine and should not be committed
# Database
*.db
*.db-wal
*.db-shm
# Cache
cache/
# Logs
*.log
# Hook markers
.dirty

6
.codegraph/daemon.pid Normal file
View File

@@ -0,0 +1,6 @@
{
"pid": 8432,
"version": "0.9.9",
"socketPath": "\\\\.\\pipe\\codegraph-ae68fa88b3ffb91a",
"startedAt": 1781608072582
}

View File

@@ -5,19 +5,19 @@ import {getYear} from '@/utils/tools'
const Footer: React.FC = () => { const Footer: React.FC = () => {
return ( return (
<DefaultFooter <DefaultFooter
copyright={` ${getYear()} 青岛智慧就业服务系统`} copyright={` ${getYear()} 石河子智慧就业服务系统`}
style={{ style={{
background: 'none', background: 'none',
}} }}
links={[ links={[
{ {
key: '青岛政务网', key: '石河子政务网',
title: '青岛政务网', title: '石河子政务网',
href: 'http://www.qingdao.gov.cn/', href: 'http://www.qingdao.gov.cn/',
blankTarget: true, blankTarget: true,
},{ },{
key: '青岛市人力资源和社会保障局', key: '石河子人社局',
title: '青岛市人力资源和社会保障局', title: '石河子人社局',
href: 'https://hrss.qingdao.gov.cn/', href: 'https://hrss.qingdao.gov.cn/',
blankTarget: true, blankTarget: true,
}, },

View File

@@ -32,7 +32,7 @@ import {
getEmptyCompetitivenessRadar, getEmptyCompetitivenessRadar,
} from '@/services/jobportal/competitiveness'; } from '@/services/jobportal/competitiveness';
import { isJobPortalLoggedIn } from '@/utils/jobPortalAuth'; 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 { ensureJobPortalLogin, requireJobPortalUserId } from '@/utils/jobPortalAuth';
import { getDictLabel, resolveIndustryLabel } from '@/utils/jobPortalDict'; import { getDictLabel, resolveIndustryLabel } from '@/utils/jobPortalDict';
import { getDictValueEnum } from '@/services/system/dict'; import { getDictValueEnum } from '@/services/system/dict';
@@ -265,6 +265,23 @@ const JobDetailPage: React.FC = () => {
} }
}, [originalJobData?.jobId, originalJobData?.id, id]); }, [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) => { const fetchCompetitiveness = async (jobIdNum: number) => {
if (!isJobPortalLoggedIn()) { if (!isJobPortalLoggedIn()) {
setOverallScore(0); setOverallScore(0);
@@ -385,6 +402,9 @@ const JobDetailPage: React.FC = () => {
}); });
if (response?.code === 200) { if (response?.code === 200) {
message.success('申请成功'); message.success('申请成功');
if (originalJobData) {
setOriginalJobData({ ...originalJobData, isApply: 1 });
}
} else { } else {
message.error(response?.msg || '申请失败'); message.error(response?.msg || '申请失败');
} }
@@ -456,9 +476,10 @@ const JobDetailPage: React.FC = () => {
type="primary" type="primary"
size="large" size="large"
block block
disabled={originalJobData?.isApply === 1}
onClick={handleApply} onClick={handleApply}
> >
{originalJobData?.isApply === 1 ? '已投递' : '立即申请'}
</Button> </Button>
</div> </div>
</Col> </Col>

View File

@@ -26,7 +26,7 @@ import {
import { history, useLocation } from '@umijs/max'; import { history, useLocation } from '@umijs/max';
import { getJobList } from '@/services/common/jobTitle'; import { getJobList } from '@/services/common/jobTitle';
import JobPortalHeader from '@/components/JobPortalHeader'; 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 { ensureJobPortalLogin, requireJobPortalUserId } from '@/utils/jobPortalAuth';
import { getDictValueEnum } from '@/services/system/dict'; import { getDictValueEnum } from '@/services/system/dict';
import { getDictLabel, findTreeLabelById, resolveIndustryLabel } from '@/utils/jobPortalDict'; import { getDictLabel, findTreeLabelById, resolveIndustryLabel } from '@/utils/jobPortalDict';
@@ -321,6 +321,20 @@ const JobListPage: React.FC = () => {
} }
}, [selectedJob]); }, [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) => { const fetchCompetitiveness = async (jobIdNum: number) => {
if (!isJobPortalLoggedIn()) { if (!isJobPortalLoggedIn()) {
setOverallScore(0); setOverallScore(0);
@@ -491,6 +505,15 @@ const JobListPage: React.FC = () => {
}); });
if (response?.code === 200) { if (response?.code === 200) {
message.success('申请成功'); 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 { } else {
message.error(response?.msg || '申请失败'); message.error(response?.msg || '申请失败');
} }
@@ -795,8 +818,13 @@ const JobListPage: React.FC = () => {
> >
{favorited ? '已收藏' : '收藏'} {favorited ? '已收藏' : '收藏'}
</Button> </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> </Button>
</Space> </Space>
<Space className="action-icons" size={16}> <Space className="action-icons" size={16}>

View File

@@ -112,7 +112,7 @@ export default function ThirdPartyRedirect() {
console.log('userType value:', userInfo?.userType, 'type:', typeof userInfo?.userType); console.log('userType value:', userInfo?.userType, 'type:', typeof userInfo?.userType);
if (menus && menus.length > 0 && userInfo?.userType !== 'common') { if (menus && menus.length > 0 && userInfo?.userType !== 'common') {
setRemoteMenu(menus); 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')
} }
} }

View File

@@ -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 */ /** 获取消息列表 GET /api/cms/appUser/getMessages */
export async function getMessages(params?: { pageNum?: number; pageSize?: number; noticeType?: number; isRead?: number }, options?: Record<string, any>) { 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', { return request<API.MessageListResult>('/api/cms/notice/appNoticList', {