not-found.tsx 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  1. 'use client';
  2. import jing from "./icons/jing.png";
  3. export default function NotFound() {
  4. const styles = {
  5. page: {
  6. width:'100%',
  7. minHeight: 'calc(100vh)',
  8. display: 'flex',
  9. alignItems: 'center',
  10. justifyContent: 'center',
  11. padding: '32px',
  12. background: 'linear-gradient(180deg, #f7fbff 0%, #ffffff 100%)',
  13. } as React.CSSProperties,
  14. card: {
  15. background: '#fff',
  16. padding: '28px',
  17. borderRadius: 12,
  18. boxShadow: '0 8px 30px rgba(20,30,60,0.06)',
  19. maxWidth: 720,
  20. width: '100%',
  21. textAlign: 'center' as const,
  22. },
  23. avatar: {
  24. width: 96,
  25. height: 96,
  26. borderRadius: '50%',
  27. objectFit: 'cover' as const,
  28. margin: '0 auto 12px',
  29. boxShadow: '0 6px 18px rgba(37,70,150,0.08)'
  30. },
  31. title: {
  32. margin: '8px 0 6px',
  33. fontSize: 20,
  34. fontWeight: 700,
  35. color: '#0f1724'
  36. },
  37. desc: {
  38. margin: 0,
  39. color: '#475569',
  40. lineHeight: 1.6
  41. },
  42. actions: {
  43. marginTop: 18,
  44. display: 'flex',
  45. justifyContent: 'center',
  46. gap: 12
  47. } as React.CSSProperties,
  48. primaryBtn: {
  49. background: '#2563eb',
  50. color: '#fff',
  51. border: 'none',
  52. padding: '10px 16px',
  53. borderRadius: 8,
  54. cursor: 'pointer'
  55. },
  56. ghostBtn: {
  57. background: 'transparent',
  58. color: '#2563eb',
  59. border: '1px solid rgba(37,99,235,0.15)',
  60. padding: '10px 16px',
  61. borderRadius: 8,
  62. cursor: 'pointer'
  63. }
  64. };
  65. const url = typeof window !== 'undefined' ? window.location.href : '';
  66. return (
  67. <div style={styles.page}>
  68. <div style={styles.card}>
  69. <img src={jing.src} alt="avatar" style={styles.avatar} />
  70. <p>
  71. 无效的链接地址:{url}<br/>
  72. 请前往 <span className='text-primary' style={{color:'#1890ff'}} onClick={()=>{
  73. if(typeof window !== 'undefined'){
  74. window.location.replace('http://10.1.14.17:3200/appCenter')
  75. }
  76. }}>【应用广场】</span>选择可用应用,或联系管理员处理。
  77. </p>
  78. </div>
  79. </div>
  80. );
  81. }