4da6832b44
- 命名重构: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 与后端风格对齐
44 lines
1.3 KiB
Bash
44 lines
1.3 KiB
Bash
# ============== 环境变量模板 ==============
|
||
# 复制为 .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
|
||
|
||
# 是否启用 mock(dev 启用,prod 关闭)
|
||
VITE_LOGIN_TEST=true
|
||
|
||
# ============== OIDC / Authentik 配置 ==============
|
||
# 三个环境的 issuer + client-id + redirect-uri 都不一样。
|
||
# dev 与 prod 必须用 Authentik 后台两个独立的 Application,
|
||
# 因为 redirect-uri 不同(dev 走 localhost,prod 走域名)。
|
||
|
||
# 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
|