1
0
mirror of https://github.com/ialley-workshop-open/uni-halo.git synced 2026-07-26 12:00:46 +08:00

refactor: 对token配置进行重构、同时修复token获取失败的问题

This commit is contained in:
小莫唐尼
2025-07-01 20:09:05 +08:00
parent 4246d8cdcb
commit d521a641de
14 changed files with 236 additions and 195 deletions
+5 -1
View File
@@ -4,7 +4,11 @@ export const _AppMockJsonKey = 'APP_GLOBAL_MOCK_JSON';
// 默认的应用设置
export const DefaultAppConfigs = {
basicConfig: {},
basicConfig: {
tokenConfig: {
personalToken: "",
}
},
loveConfig: {},
imagesConfig: {},
authorConfig: {},
-15
View File
@@ -1,15 +0,0 @@
import {getAppConfigs} from "@/config/index";
/** 应用配置 */
const UniHaloConfig = Object.freeze({
/** 基础请求域名:你的Halo博客基础域名 */
BASE_API: "",
// 比如:
// BASE_API: "https://blog.xiaoxiaomo.cn",
// token
systemToken: getAppConfigs()?.basicConfig?.tokenConfig?.personalToken,
})
export default UniHaloConfig;
+12
View File
@@ -0,0 +1,12 @@
/** 应用基础配置 */
const UHaloBaseConfig = Object.freeze({
/** 基础请求域名:你的Halo博客基础域名 */
BASE_API: "",
// 示例:
// BASE_API: "https://blog.xiaoxiaomo.cn",
// todo:可能有其他配置
})
export default UHaloBaseConfig;