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
+10 -10
View File
@@ -1,7 +1,7 @@
import { Tenant } from '@/entity';
import { tenantStore } from '@/store/modules/tenant';
import { Customer } from '@/entity';
import { customerStore } from '@/store/modules/customer';
import router from '../router'
import { setToken, setTenant } from '../utils/auth'
import { setToken, setCustomer } from '../utils/auth'
// config/index.js
const env = process.env.NODE_ENV!;
@@ -45,14 +45,14 @@ const scan_method: any = {
},
development: async () => {
const useTenantStore = tenantStore()
const tenant: Tenant = {
tenant_id: '7788',
const useCustomerStore = customerStore()
const customer: Customer = {
customerId: '7788',
account: '小小的测试账户'
}
let token = 'ABCDEFG'
await useTenantStore.login(tenant, token).then(() => {
await useCustomerStore.login(customer, token).then(() => {
const { href } = router.resolve({
path: '/'
})
@@ -65,9 +65,9 @@ const scan_method: any = {
})
setToken("token")
setTenant(
setCustomer(
{
tenantId: "111"
customerId: "111"
}
)
router.push({
@@ -82,4 +82,4 @@ const scan_method: any = {
const scan = scan_method[env]
const config = configObj[env]
export { scan, config }
export { scan, config }