Files
WonderQ-Project/WonderQ-Admin-UI-Vue/README.md
2026-08-25 22:48:10 +08:00

29 lines
805 B
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# WonderQ Admin UI Vue
WonderQ 管理端 Vue3 迁移端,采用 Vue 3、Element Plus、TypeScript、Pinia 和 Vue Router 4。
## 启动
```powershell
yarn install
yarn dev
```
开发地址:http://localhost:5604/admin/
默认通过 Vite `/api` 代理访问 `http://localhost:4000`,可使用 `VITE_API_PROXY_TARGET` 覆盖。生产构建使用 `yarn build`,静态产物由反向代理挂载到 `/admin`。
## 认证约定
- Access Token 只保存在运行时内存,不写入 localStorage。
- Refresh Token 由后端以 HttpOnly Cookie 保存。
- 401 会自动调用 `/api/admin/auth/refresh` 并重试一次;刷新失败后返回登录页。
- 菜单和按钮权限来自 `/api/admin/system/profile`,前端只加载预注册组件。
## 验证
```powershell
yarn test
yarn build
```