Align console UI with school-iot-admin and wire login to serverschool

UI / layout
- rebuild left mode: full-width blue header (60px) + white sidebar below + card-style tags view
- introduce design tokens in variables.css (brand #347df9, sidebar 240px, menu item 49px)
  and theme overrides for dark / dark-blue themes
- restyle navigation bar (logo + platform name / top nav / tools + user), logo, sidebar
  (selected state: light blue bg + blue bar + bold), tags view, app main
- global styles: .app-container white card, .head-title, .btn-blue/.btn-white,
  el-table / el-dialog look, brand color injected into --el-color-primary
- add favorites store (localStorage) wired to sidebar star and header top nav
- disable template watermark / footer / promo notifications by default

Login (serverschool)
- port school-iot-admin login page (background art, right side card, keep-login)
- OAuth2 password mode: GET /oauth/token (raw axios) + GET /uc/account/current
- port phone lookup (/wx/getAccoutList) and forget-password flow
  (/sms/sendCode + /sms/verifyCode) as components/login/Forget.vue
- user store exposes accountInfo / accountType / teamId / roleId and strips password

Infra
- move all devServer proxies and env vars from school-iot-admin/vue.config.js
  (default targets point to production)
- fix empty sidebar: guard short-circuit skipped setRoutes when login page already
  fetched user info
This commit is contained in:
2026-10-27 09:13:39 +08:00
parent 80b8218b23
commit 47dd605067
38 changed files with 1719 additions and 464 deletions
+18 -1
View File
@@ -1,7 +1,24 @@
# 所有环境的环境变量(命名必须以 VITE_ 开头)
## 项目标题
VITE_APP_TITLE = V3 Admin Vite
VITE_APP_TITLE = 校园物联网管理平台
## 路由模式 hash 或 html5
VITE_ROUTER_HISTORY = hash
## serverschool 后端接口前缀(登录 / 用户信息等真实接口,与 apifoxmock 的 VITE_BASE_URL 区分)
## 开发环境由 vite.config.ts 的 /hxyd-api 代理转发;生产环境需由 nginx 反代同名路径
VITE_SCHOOL_BASE_URL = /hxyd-api
## kkFileView 文档预览服务(对齐 school-iot-admin 的 VUE_APP_KKFILEVIEW_URL)
VITE_KKFILEVIEW_URL = https://net2.hxzhxy.cn:8012
## 跨系统链接(对齐 school-iot-admin,默认生产地址;开发内网地址见 .env.development 注释)
# 问卷系统
VITE_QUESTION_URL = http://complaints.hxzhxy.cn
# 可视化数据大屏
VITE_DATA_SCREEN = http://139.159.182.121:1689
# 新生填报 H5
VITE_APPLY_URL = http://apply.hxzhxy.cn
# 数据填报表单
VITE_API_FORM = https://form.hxzhxy.cn