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
+7 -7
View File
@@ -56,7 +56,7 @@
<span class="header-avatar" style="cursor: pointer">
<CustomPic />
<span v-show="!useSettingsStore.isMobile" style="margin-left: 5px">{{
useTenantStore.tenant.account
useCustomerStore.customer.account
}}</span>
<el-icon>
<arrow-down />
@@ -67,10 +67,10 @@
<el-dropdown-menu class="dropdown-group">
<el-dropdown-item>
<span style="font-weight: 600;">
当前角色{{ useTenantStore.tenant.account }}
当前角色{{ useCustomerStore.customer.account }}
</span>
</el-dropdown-item>
<template v-if="useTenantStore.tenant.account">
<template v-if="useCustomerStore.customer.account">
<!-- <el-dropdown-item v-for="item in userStore.userInfo.authorities.filter(i=>i.authorityId!==userStore.userInfo.authorityId)" :key="item.authorityId" @click="changeUserAuth(item.authorityId)">
<span>
切换为{{ item.authorityName }}
@@ -78,7 +78,7 @@
</el-dropdown-item> -->
</template>
<el-dropdown-item icon="avatar" @click="toPerson">个人信息</el-dropdown-item>
<el-dropdown-item icon="reading-lamp" @click="useTenantStore.logout"> </el-dropdown-item>
<el-dropdown-item icon="reading-lamp" @click="useCustomerStore.logout"> </el-dropdown-item>
</el-dropdown-menu>
</template>
</el-dropdown>
@@ -89,13 +89,13 @@
<script setup lang='ts'>
import CustomPic from "@/components/customPic/index.vue";
import { tenantStore } from '@/store/modules/tenant'
import { customerStore } from '@/store/modules/customer'
import { settingsStore } from '@/store/modules/settings'
import { Message } from "@element-plus/icons-vue"
import { reactive, ref } from "vue";
// -- IMPORT --
const useTenantStore = tenantStore()
const useCustomerStore = customerStore()
const useSettingsStore = settingsStore()
// -- REACTIVE OBJECT --
@@ -131,7 +131,7 @@ const toPerson = () => {
}
useTenantStore.reflush()
useCustomerStore.reflush()
</script>