import * as React from 'react'; import { useNavigate } from "react-router-dom"; import { Dropdown, Spin } from 'antd'; import { Chat } from './DeepSeekChat'; import whiteLogo from "../icons/whiteLogo.png"; import jkxz from "../icons/jkxz.png"; import { useChatStore } from "../store"; import { useMobileScreen } from '../utils'; import api from "@/app/api/api"; import './deepSeekHome.scss'; const DeekSeek: React.FC = () => { const chatStore = useChatStore(); const isMobileScreen = useMobileScreen(); const navigate = useNavigate(); const [listLoading, setListLoading] = React.useState(false); type List = { title: string, children: { title: string, showMenu: string, chatMode: string, appId: string, }[], }[]; const [list, setList] = React.useState([]); const init = async () => { setListLoading(true); try { const res = await api.get('/deepseek/api/appType'); setList(res.data); } catch (error) { console.error(error); } finally { setListLoading(false); } } React.useEffect(() => { chatStore.clearSessions(); init() }, []); return (
{/*
*/} {/*
*/} {/* */} {/*
*/} {/* 上海建科*/} {/*
*/} {/*
*/} {/* {*/} {/* list.map((item, index) => {*/} {/* return {*/} {/* return {*/} {/* key: i,*/} {/* label: child.title,*/} {/* onClick: () => {*/} {/* const search = `?showMenu=${child.showMenu}&chatMode=${child.chatMode}&appId=${child.appId}`;*/} {/* navigate({*/} {/* pathname: '/knowledgeChat',*/} {/* search: search,*/} {/* })*/} {/* },*/} {/* };*/} {/* })*/} {/* }}*/} {/* key={index}*/} {/* >*/} {/*
*/} {/* {item.title}*/} {/*
*/} {/* */} {/* })*/} {/* }*/} {/*
{*/} {/* navigate({*/} {/* pathname: '/deepseekChat',*/} {/* })*/} {/* }}>*/} {/* DeepSeek问答*/} {/*
*/} {/*
*/}
智能问答助手
); }; export default DeekSeek;