mirror of
https://gitee.com/qqtt-ah/ecom-dmb.git
synced 2026-11-25 03:49:19 +08:00
refactor: 统一文件存储与上传流程,解耦 OSS 客户端、存储类型与前端上传模式
This commit is contained in:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user