Files
jiaowu-test/src/pages/CompanyJobsListPage/index.jsx
KQL 4e0e96e6b8 UI优化更新:面试模拟、简历面试、项目库、求职策略等多个页面改进
主要更新:
- 面试模拟页:移除上滑查看评价,添加渐进式评分(72→81→89)
- 简历面试页:添加岗位头像、标签背景、面试题加粗等视觉优化
- 项目库页:添加"我完成的项目库"板块,增加hover效果
- 求职策略详情页:优化圆柱体和矩形对齐,添加CSV岗位数据,调整批次文字位置
- 企业岗位列表页:添加返回按钮功能
- 全局:统一岗位级别术语(普通岗/技术骨干岗/储备干部岗)

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-05 20:46:03 +08:00

65 lines
1.8 KiB
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

import { useState, useCallback } from "react";
import { useNavigate } from "react-router-dom";
import JobList from "@/pages/CompanyJobsPage/components/JobList";
import InfiniteScroll from "@/components/InfiniteScroll";
import { getJobsList } from "@/services";
import "./index.css";
const PAGE_SIZE = 20;
const CompanyJobsListPage = () => {
const navigate = useNavigate();
const [jobs, setJobs] = useState([]);
const [listPage, setListPage] = useState(1);
const [listHasMore, setListHasMore] = useState(true);
// 返回到企业内推岗位页面
const handleBack = () => {
navigate("/company-jobs");
};
const fetchJobs = useCallback(async () => {
const res = await getJobsList({
page: listPage,
pageSize: PAGE_SIZE,
isActive: true,
});
if (res.success) {
// Mock数据已经是前端格式不需要映射
setJobs((prevList) => {
const newList = [...prevList, ...res.data];
if (res.total === newList?.length) {
setListHasMore(false);
} else {
setListPage((prevPage) => prevPage + 1);
}
return newList;
});
}
}, [listPage]);
return (
<div className="company-jobs-list-page">
{/* 返回按钮 */}
<div className="back-button-wrapper">
<button className="back-button" onClick={handleBack}>
<span className="back-icon"></span>
<span className="back-text">返回</span>
</button>
</div>
<InfiniteScroll
loadMore={fetchJobs}
hasMore={listHasMore}
empty={jobs.length === 0}
className="company-jobs-list-page-wrapper"
>
<JobList data={jobs} className="jobs-list-margin" />
</InfiniteScroll>
</div>
);
};
export default CompanyJobsListPage;