feat: R1 重构对称迁移 + 升级依赖 + 配置文件分离

- 命名重构:tenant → customer(对齐后端 R1 重构)
  - Tenant → Customer / tenant_id → customerId
  - tenantStore → customerStore / getTenant/setTenant → getCustomer/setCustomer
  - cookie key tenant → customer, HTTP header tenantId → customerId
- 后端契约更新:AuthResponse 加 sub 字段
- 接口 URL 修复:/auth/oidc/callback → /api/v1/auth/oidc/callback
- 依赖升级:vue 3.5 / element-plus 2.8 / vite 5 / typescript 5.6 / sass 1.79
- 删 node-sass / scss / sass-loader / moment / mock/index.ts
- 配置文件拆分:.env.development / .env.production / .env.example
- 删除冗余 view/auth/auth/callback.vue 副本
- .gitignore 增加 dist / .opencode / tmp
- 新增 AGENT.md 与后端风格对齐
This commit is contained in:
simple321vip
2026-06-22 08:02:21 +08:00
parent bef1906747
commit 4da6832b44
112 changed files with 6616 additions and 4802 deletions
+43
View File
@@ -0,0 +1,43 @@
# ============== 环境变量模板 ==============
# 复制为 .env.development / .env.production / .env.test 后填入真实值。
# 真实值不要 commit 到 git。
# 当前模式名(dev / test / prod
VITE_MODE_NAME=development
# 资源 CDN 前缀
VITE_RES_URL=http://localhost:3000/
# 后端 API 基础地址
# dev: http://localhost:8080/auth
# prod: https://www.violin-home.cn
VITE_APP_URL=http://localhost:8080/auth
# 应用元信息
VITE_APP_TITLE=violin-home
VITE_APP_ID=123456
VITE_AGENT_ID=123456
# 是否启用 mockdev 启用,prod 关闭)
VITE_LOGIN_TEST=true
# ============== OIDC / Authentik 配置 ==============
# 三个环境的 issuer + client-id + redirect-uri 都不一样。
# dev 与 prod 必须用 Authentik 后台两个独立的 Application
# 因为 redirect-uri 不同(dev 走 localhostprod 走域名)。
# Authentik 域名(dev / prod 共用,dev 仅用于登录页跳转)
VITE_OIDC_ISSUER=https://auth.violin-work.online
# 客户端 ID(在 Authentik 后台创建)
# dev: violin-home-dev
# prod: violin-home
VITE_OIDC_CLIENT_ID=
# 回调 URI(必须与 Authentik 后台配置的完全一致)
# dev: http://localhost:3000/auth/callback
# prod: https://www.violin-home.cn/auth/callback
VITE_OIDC_REDIRECT_URI=
# 编辑器标识
VITE_EDITOR=vscode