feat: 🎸 修改了一些内容

This commit is contained in:
2025-08-26 11:08:51 +08:00
parent 428b880970
commit f4aac0e51e
3 changed files with 25 additions and 7 deletions

View File

@@ -1,8 +1,9 @@
import { useState } from "react"; import { useState } from "react";
import { Input } from "@arco-design/web-react"; import { Input } from "@arco-design/web-react";
import toast from "@/components/Toast";
import InfiniteScroll from "@/components/InfiniteScroll"; import InfiniteScroll from "@/components/InfiniteScroll";
import ProjectCasesModal from "./components/ProjectCasesModal"; import ProjectCasesModal from "./components/ProjectCasesModal";
import { getProjectsList } from "@/services/projectLibrary"; import { getProjectsList, getProjectsdetail } from "@/services/projectLibrary";
import "./index.css"; import "./index.css";
const InputSearch = Input.Search; const InputSearch = Input.Search;
@@ -23,10 +24,19 @@ const ProjectLibrary = () => {
fetchProjects(value, 1); fetchProjects(value, 1);
}; };
const handleProjectClick = (item) => { const handleProjectClick = async (item) => {
console.log(item); if (item?.id) {
setModalData(item); const res = await getProjectsdetail(item.id);
setProjectCasesModalVisible(true); if (res.success) {
// todo
// setProjectList();
// setProjectCasesModalVisible(true);
} else {
toast.error(res.message);
}
} else {
toast.error("加载数据失败,请刷新重试");
}
}; };
const handleCloseModal = () => { const handleCloseModal = () => {

View File

@@ -4,7 +4,7 @@ import {
getMyTasks, getMyTasks,
getClassRanking, getClassRanking,
} from "./dashboard"; } from "./dashboard";
import { getProjectsList } from "./projectLibrary"; import { getProjectsList, getProjectsdetail } from "./projectLibrary";
import { import {
getCompanyJobsPageData, getCompanyJobsPageData,
getJobsList, getJobsList,
@@ -41,7 +41,7 @@ export {
// 项目和作品相关 // 项目和作品相关
getProjectsList, // 获取项目列表 getProjectsList, // 获取项目列表
getProjectsdetail, // 获取项目详情
// 求职相关 // 求职相关
getCompanyJobsPageData, // 获取企业内推岗位页面聚合数据 getCompanyJobsPageData, // 获取企业内推岗位页面聚合数据
getJobsList, // 获取岗位列表 getJobsList, // 获取岗位列表

View File

@@ -7,3 +7,11 @@ export async function getProjectsList(params) {
params, params,
}); });
} }
// 获取项目详情
export async function getProjectsdetail(id) {
return request({
url: `/api/projects/${id}`,
method: "GET",
});
}