welcome.tsx 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114
  1. // 第三方库导入
  2. import React, {
  3. useState,
  4. useRef,
  5. useEffect,
  6. useMemo,
  7. useCallback,
  8. Fragment,
  9. RefObject,
  10. } from "react";
  11. import {
  12. useGlobalStore,
  13. } from "../../store";
  14. import jing from "../../icons/jing.png";
  15. import { Button } from "antd";
  16. export function Chat() {
  17. const globalStore = useGlobalStore();
  18. useEffect(() => {
  19. globalStore.setShowMenu(true);
  20. }, []);
  21. const styles = {
  22. page: {
  23. minHeight: 'calc(100vh - 80px)',
  24. display: 'flex',
  25. alignItems: 'center',
  26. justifyContent: 'center',
  27. padding: '32px',
  28. background: 'linear-gradient(180deg, #f7fbff 0%, #ffffff 100%)',
  29. } as React.CSSProperties,
  30. card: {
  31. background: '#fff',
  32. padding: '28px',
  33. borderRadius: 12,
  34. boxShadow: '0 8px 30px rgba(20,30,60,0.06)',
  35. maxWidth: 720,
  36. width: '100%',
  37. textAlign: 'center' as const,
  38. },
  39. avatar: {
  40. width: 96,
  41. height: 96,
  42. borderRadius: '50%',
  43. objectFit: 'cover' as const,
  44. margin: '0 auto 12px',
  45. boxShadow: '0 6px 18px rgba(37,70,150,0.08)'
  46. },
  47. title: {
  48. margin: '8px 0 6px',
  49. fontSize: 20,
  50. fontWeight: 700,
  51. color: '#0f1724'
  52. },
  53. desc: {
  54. margin: 0,
  55. color: '#475569',
  56. lineHeight: 1.6
  57. },
  58. actions: {
  59. marginTop: 18,
  60. display: 'flex',
  61. justifyContent: 'center',
  62. gap: 12
  63. } as React.CSSProperties,
  64. primaryBtn: {
  65. background: '#2563eb',
  66. color: '#fff',
  67. border: 'none',
  68. padding: '10px 16px',
  69. borderRadius: 8,
  70. cursor: 'pointer'
  71. },
  72. ghostBtn: {
  73. background: 'transparent',
  74. color: '#2563eb',
  75. border: '1px solid rgba(37,99,235,0.15)',
  76. padding: '10px 16px',
  77. borderRadius: 8,
  78. cursor: 'pointer'
  79. }
  80. };
  81. return (
  82. <div style={styles.page}>
  83. <div style={styles.card}>
  84. <img src={jing.src} alt="avatar" style={styles.avatar} />
  85. {/* <p> 链接无效 </p>
  86. <p style={styles.desc}>
  87. 我可以帮助你快速查询作业指导书、规范条文、公司信息等内容。请从点击下方按钮选择应用
  88. </p>
  89. <p className="mt-2">
  90. <Button type="primary"> 选择应用 </Button>
  91. </p> */}
  92. {/* <p>
  93. 无效的链接地址:http://10.1.14.17:3900/
  94. 请前往【应用广场】选择可用应用,或联系管理员处理。
  95. </p> */}
  96. <p>
  97. 无效的链接地址:{window.location.href}<br/>
  98. 请前往 <span className='text-primary' style={{color:'#1890ff'}} onClick={()=>{
  99. window.location.replace('http://10.1.14.17:3200/appCenter')
  100. }}>【应用广场】</span>选择可用应用,或联系管理员处理。
  101. </p>
  102. <div style={styles.actions}>
  103. {/* <button style={styles.primaryBtn} onClick={() => globalStore.setShowMenu(true)}>打开导航</button> */}
  104. {/* <button style={styles.ghostBtn} onClick={() => window.scrollTo({ top: 0, behavior: 'smooth' })}>返回顶部</button> */}
  105. </div>
  106. </div>
  107. </div>
  108. );
  109. }