refactor: 统一文件存储与上传流程,解耦 OSS 客户端、存储类型与前端上传模式

This commit is contained in:
2026-08-25 00:00:19 +08:00
parent 78dbc865fd
commit 81358e6d7c
57 changed files with 776 additions and 672 deletions
@@ -19,10 +19,12 @@ import {
registerApi,
} from '#/api';
import { $t } from '#/locales';
import { useAppConfigStore } from '#/store/app-config';
export const useAuthStore = defineStore('auth', () => {
const accessStore = useAccessStore();
const userStore = useUserStore();
const appConfigStore = useAppConfigStore();
const router = useRouter();
const loginLoading = ref(false);
@@ -64,6 +66,13 @@ export const useAuthStore = defineStore('auth', () => {
// 获取用户信息
userInfo = await fetchUserInfo();
// 系统配置(上传模式等)
try {
await appConfigStore.fetchConfig(true);
} catch (error) {
console.warn('获取系统配置失败:', error);
}
// 获取用户权限码(可选,如果接口不存在则跳过)
try {
const accessCodes = await getAccessCodesApi();
@@ -138,6 +147,13 @@ export const useAuthStore = defineStore('auth', () => {
// 获取用户信息
userInfo = await fetchUserInfo();
// 系统配置(上传模式等)
try {
await appConfigStore.fetchConfig(true);
} catch (error) {
console.warn('获取系统配置失败:', error);
}
// 获取用户权限码(可选,如果接口不存在则跳过)
try {
const accessCodes = await getAccessCodesApi();