feat: 🎸 修改了一些内容
This commit is contained in:
@@ -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 = () => {
|
||||
|
||||
@@ -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, // 获取岗位列表
|
||||
|
||||
@@ -7,3 +7,11 @@ export async function getProjectsList(params) {
|
||||
params,
|
||||
});
|
||||
}
|
||||
|
||||
// 获取项目详情
|
||||
export async function getProjectsdetail(id) {
|
||||
return request({
|
||||
url: `/api/projects/${id}`,
|
||||
method: "GET",
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user