初始化

This commit is contained in:
zk
2026-05-09 14:55:30 +08:00
parent a64ef63433
commit 1430b38b20
16 changed files with 6967 additions and 83 deletions
+31
View File
@@ -0,0 +1,31 @@
/**
* 环境配置
*/
/** 当前环境,手动切换 */
const ENV = 'dev'
/** 各环境配置 */
const envConfigs: Record<string, {
dataBaseApi: string
aiBaseApi: string
cookieSourceUrl: string
}> = {
dev: {
dataBaseApi: 'http://localhost:8080/api',
aiBaseApi: 'http://localhost:8000',
cookieSourceUrl: 'http://192.168.31.135:5173',
},
prod: {
dataBaseApi: 'https://your-domain.com/api',
aiBaseApi: 'https://your-domain.com/ai',
cookieSourceUrl: 'https://your-domain.com',
},
}
/** 根据当前环境返回配置 */
export function getConfig() {
return envConfigs[ENV] || envConfigs.dev
}
export const config = getConfig()