feat: 🎸 接口对接调整
This commit is contained in:
@@ -1,4 +1,3 @@
|
||||
import { useState } from "react";
|
||||
import Modal from "@/components/Modal";
|
||||
import PDFICON from "@/assets/images/Common/pdf_icon.png";
|
||||
import "./index.css";
|
||||
|
||||
@@ -3,7 +3,6 @@ import { Input } from "@arco-design/web-react";
|
||||
import InfiniteScroll from "@/components/InfiniteScroll";
|
||||
import ProjectCasesModal from "./components/ProjectCasesModal";
|
||||
import { getProjectsList } from "@/services/projectLibrary";
|
||||
|
||||
import "./index.css";
|
||||
|
||||
const InputSearch = Input.Search;
|
||||
@@ -25,6 +24,7 @@ const ProjectLibrary = () => {
|
||||
};
|
||||
|
||||
const handleProjectClick = (item) => {
|
||||
console.log(item);
|
||||
setModalData(item);
|
||||
setProjectCasesModalVisible(true);
|
||||
};
|
||||
@@ -36,13 +36,11 @@ const ProjectLibrary = () => {
|
||||
|
||||
const fetchProjects = async (searchValue = "", pageNum) => {
|
||||
try {
|
||||
// 这里使用真实API替换模拟数据
|
||||
const res = await getProjectsList({
|
||||
search: searchValue,
|
||||
page: pageNum ?? page,
|
||||
pageSize: PAGE_SIZE,
|
||||
});
|
||||
console.log(res);
|
||||
if (res.success) {
|
||||
setProjectList((prevList) => {
|
||||
const newList = [...prevList, ...res.data];
|
||||
|
||||
Reference in New Issue
Block a user