From e90da20e82b15c886bb57488776b6cfb3cb411a1 Mon Sep 17 00:00:00 2001 From: 12451 <12451@example.com> Date: Fri, 3 Jul 2026 04:10:46 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20H5=20=E7=94=A8=E6=88=B7=E7=AB=AF=20uni-?= =?UTF-8?q?app=20=E9=87=8D=E5=86=99=EF=BC=88=E6=9B=BF=E6=8D=A2=20Taro?= =?UTF-8?q?=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 使用 uni-app + Vue 3 + Composition API 重写 H5 用户端 - 6 个页面:登录、首页、设备列表、设备详情、仓体详情、个人中心 - Pinia 状态管理 + API 层封装 - TabBar 导航(首页/设备/我的) - 已构建并部署到服务器 /data/pms/h5/ - 登录页渲染正常,布局完整 --- software/h5-taro/config/index.js | 1 + software/h5-taro/src/app.config.ts | 4 +- software/h5-taro/src/index.html | 8 +- .../src/pages/compartment-detail/index.tsx | 5 + .../h5-taro/src/pages/device-detail/index.tsx | 5 + software/h5-taro/src/pages/home/index.tsx | 8 + software/h5-taro/src/pages/login/index.tsx | 7 +- software/h5-uniapp/index.html | 23 ++ software/h5-uniapp/package.json | 27 ++ software/h5-uniapp/src/App.vue | 16 + software/h5-uniapp/src/api/index.ts | 164 ++++++++++ software/h5-uniapp/src/env.d.ts | 7 + software/h5-uniapp/src/main.ts | 10 + software/h5-uniapp/src/manifest.json | 24 ++ software/h5-uniapp/src/pages.json | 27 ++ .../src/pages/compartment-detail/index.vue | 308 ++++++++++++++++++ .../src/pages/device-detail/index.vue | 195 +++++++++++ .../h5-uniapp/src/pages/devices/index.vue | 105 ++++++ software/h5-uniapp/src/pages/home/index.vue | 212 ++++++++++++ software/h5-uniapp/src/pages/login/index.vue | 150 +++++++++ software/h5-uniapp/src/pages/me/index.vue | 126 +++++++ .../src/static/tabbar/device-active.png | Bin 0 -> 69 bytes .../h5-uniapp/src/static/tabbar/device.png | Bin 0 -> 69 bytes .../src/static/tabbar/home-active.png | Bin 0 -> 69 bytes software/h5-uniapp/src/static/tabbar/home.png | Bin 0 -> 69 bytes .../h5-uniapp/src/static/tabbar/me-active.png | Bin 0 -> 69 bytes software/h5-uniapp/src/static/tabbar/me.png | Bin 0 -> 69 bytes software/h5-uniapp/src/store/auth.ts | 43 +++ software/h5-uniapp/tsconfig.json | 18 + software/h5-uniapp/vite.config.ts | 11 + 30 files changed, 1497 insertions(+), 7 deletions(-) create mode 100644 software/h5-uniapp/index.html create mode 100644 software/h5-uniapp/package.json create mode 100644 software/h5-uniapp/src/App.vue create mode 100644 software/h5-uniapp/src/api/index.ts create mode 100644 software/h5-uniapp/src/env.d.ts create mode 100644 software/h5-uniapp/src/main.ts create mode 100644 software/h5-uniapp/src/manifest.json create mode 100644 software/h5-uniapp/src/pages.json create mode 100644 software/h5-uniapp/src/pages/compartment-detail/index.vue create mode 100644 software/h5-uniapp/src/pages/device-detail/index.vue create mode 100644 software/h5-uniapp/src/pages/devices/index.vue create mode 100644 software/h5-uniapp/src/pages/home/index.vue create mode 100644 software/h5-uniapp/src/pages/login/index.vue create mode 100644 software/h5-uniapp/src/pages/me/index.vue create mode 100644 software/h5-uniapp/src/static/tabbar/device-active.png create mode 100644 software/h5-uniapp/src/static/tabbar/device.png create mode 100644 software/h5-uniapp/src/static/tabbar/home-active.png create mode 100644 software/h5-uniapp/src/static/tabbar/home.png create mode 100644 software/h5-uniapp/src/static/tabbar/me-active.png create mode 100644 software/h5-uniapp/src/static/tabbar/me.png create mode 100644 software/h5-uniapp/src/store/auth.ts create mode 100644 software/h5-uniapp/tsconfig.json create mode 100644 software/h5-uniapp/vite.config.ts diff --git a/software/h5-taro/config/index.js b/software/h5-taro/config/index.js index e6ab532..19a301e 100644 --- a/software/h5-taro/config/index.js +++ b/software/h5-taro/config/index.js @@ -38,6 +38,7 @@ const config = { staticDirectory: 'static', router: { mode: 'browser', + basename: '/h5/', }, postcss: { autoprefixer: { enable: true, config: {} }, diff --git a/software/h5-taro/src/app.config.ts b/software/h5-taro/src/app.config.ts index a3c644b..bfeda26 100644 --- a/software/h5-taro/src/app.config.ts +++ b/software/h5-taro/src/app.config.ts @@ -1,11 +1,11 @@ export default { pages: [ - 'pages/login/index', 'pages/home/index', 'pages/devices/index', + 'pages/me/index', + 'pages/login/index', 'pages/device-detail/index', 'pages/compartment-detail/index', - 'pages/me/index', ], window: { backgroundTextStyle: 'light', diff --git a/software/h5-taro/src/index.html b/software/h5-taro/src/index.html index 337785d..02751dd 100644 --- a/software/h5-taro/src/index.html +++ b/software/h5-taro/src/index.html @@ -5,17 +5,17 @@