DeekSeek.tsx 2.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. import * as React from 'react';
  2. import { Chat } from './DeepSeekChat';
  3. import whiteLogo from "../icons/whiteLogo.png";
  4. import jkxz from "../icons/jkxz.png";
  5. import { useChatStore } from "../store";
  6. import { useMobileScreen } from '../utils';
  7. import './deepSeek.scss';
  8. const DeekSeek: React.FC = () => {
  9. const chatStore = useChatStore();
  10. const isMobileScreen = useMobileScreen();
  11. const [list, setList] = React.useState<{ title: string, onClick?: () => void }[]>([]);
  12. React.useEffect(() => {
  13. chatStore.clearSessions();
  14. setList([
  15. {
  16. title: '知识库问答',
  17. onClick: () => {
  18. window.open('http://xia0miduo.gicp.net:3002/', '_blank');
  19. }
  20. },
  21. {
  22. title: '员工小百科',
  23. },
  24. {
  25. title: '报批报建助手',
  26. },
  27. {
  28. title: '施工方案审查',
  29. },
  30. {
  31. title: '更多',
  32. }
  33. ])
  34. }, []);
  35. return (
  36. <div className='deekSeek'>
  37. <div className='deekSeek-header' style={{ justifyContent: isMobileScreen ? 'flex-start' : 'center' }}>
  38. <div style={{ display: 'flex', alignItems: 'center', margin: '0 20px' }}>
  39. <img src={whiteLogo.src} style={{ width: 20, marginRight: 10 }} />
  40. <div style={{ whiteSpace: 'nowrap' }}>
  41. 上海建科
  42. </div>
  43. </div>
  44. {
  45. list.map((item, index) => {
  46. return <div style={{ whiteSpace: 'nowrap', marginRight: 20, color: '#98b4fa', cursor: 'pointer' }} onClick={item.onClick} key={index}>
  47. {item.title}
  48. </div>
  49. })
  50. }
  51. </div>
  52. <div className='deekSeek-content'>
  53. <div className='deekSeek-content-title'>
  54. <img src={jkxz.src} />
  55. </div>
  56. <div className='deekSeek-content-title2' style={{ marginBottom: isMobileScreen ? 10 : 35 }}>
  57. 智能问答助手
  58. </div>
  59. <div className={isMobileScreen ? 'deekSeek-content-mobile' : 'deekSeek-content-pc'}>
  60. <Chat />
  61. </div>
  62. </div>
  63. </div>
  64. );
  65. };
  66. export default DeekSeek;