diff --git a/Cunkebao/src/pages/mobile/test/update-notification.tsx b/Cunkebao/src/pages/mobile/test/update-notification.tsx new file mode 100644 index 00000000..dae1b936 --- /dev/null +++ b/Cunkebao/src/pages/mobile/test/update-notification.tsx @@ -0,0 +1,179 @@ +import React from "react"; +import UpdateNotification from "@/components/UpdateNotification"; + +const UpdateNotificationTest: React.FC = () => { + return ( +
+ {/* 更新通知组件 */} + + + {/* 页面内容 */} +
+
+

+ UpdateNotification 组件预览 +

+ +
+

+ 设计特点: +

+
    +
  • 酷黑风格横向条设计
  • +
  • 顶部固定定位,支持安全区域
  • +
  • 渐变背景和半透明边框
  • +
  • 蓝色主题按钮
  • +
  • 从上方滑入动画效果
  • +
  • 红色更新图标脉冲动画
  • +
  • 移动端优化的字体和按钮尺寸
  • +
+
+ +
+

+ 功能说明: +

+
    +
  • 点击“立即更新”会刷新页面
  • +
  • 点击“稍后”会隐藏通知,10分钟后重新检查
  • +
  • 通知固定在顶部,不会影响页面布局
  • +
  • 支持安全区域适配,确保在刘海屏设备上正常显示
  • +
  • 响应式设计,适配不同屏幕尺寸
  • +
+
+ +
+

+ 注意: + 此页面强制显示更新通知组件用于预览效果。在实际使用中,组件会根据更新检测结果自动显示或隐藏。 +

+
+
+ + {/* 模拟页面内容 */} +
+

+ 页面内容区域 +

+

+ 这里是页面的主要内容区域。更新通知栏固定在顶部,不会影响页面内容的正常显示和交互。 +

+

+ 页面内容会自动为顶部通知栏预留空间,确保内容不被遮挡。在有安全区域的设备上, + 通知栏会自动适配安全区域高度。 +

+
+ 模拟内容区域 +
+
+
+
+ ); +}; + +export default UpdateNotificationTest; diff --git a/Cunkebao/src/router/module/test.tsx b/Cunkebao/src/router/module/test.tsx index 1b568fb9..ab416284 100644 --- a/Cunkebao/src/router/module/test.tsx +++ b/Cunkebao/src/router/module/test.tsx @@ -1,6 +1,7 @@ import SelectTest from "@/pages/mobile/test/select"; import TestIndex from "@/pages/mobile/test/index"; import UploadTest from "@/pages/mobile/test/upload"; +import UpdateNotificationTest from "@/pages/mobile/test/update-notification"; import IframeDebugPage from "@/pages/iframe"; import { DEV_FEATURES } from "@/utils/env"; @@ -22,6 +23,11 @@ const componentTestRoutes = DEV_FEATURES.SHOW_TEST_PAGES element: , auth: true, }, + { + path: "/test/update-notification", + element: , + auth: true, + }, { path: "/test/iframe", element: ,