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

View File

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

View File

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