import React, { useCallback, useEffect, useState } from "react"; import styles from "./index.module.scss"; import classNames from "classnames"; import { Pagination } from "antd"; import { envUrl } from "@/utils/env"; import { A2_APIgetKnowData } from "@/store/action/A2Main"; import { useDispatch, useSelector } from "react-redux"; import { RootState } from "@/store"; import ImageLazy from "@/components/ImageLazy"; import Tab5Info from "../Tab5Info"; const list = [ { id: 1, name: "全部", type: "" }, { id: 2, name: "历史", type: "历史" }, { id: 3, name: "军事", type: "军事" }, { id: 4, name: "人物", type: "人物" }, // { id: 5, name: "其他", type: "其他" }, ]; function Tab5() { const dispatch = useDispatch(); const [fromData, setFromData] = useState({ tagType: "", pageNum: 1, pageSize: 10, }); const getListFu = useCallback(async () => { dispatch(A2_APIgetKnowData(fromData)); }, [dispatch, fromData]); useEffect(() => { getListFu(); }, [getListFu]); const tab5List = useSelector((state: RootState) => state.A2Main.tab5List); // 打开详情页的id const [infoId, setInfoId] = useState(0); return (
{v.name}