完成50%

This commit is contained in:
2026-07-23 08:23:59 +08:00
parent 9b0ad62df4
commit f1edc6b533
218 changed files with 24318 additions and 5514 deletions
+7 -1
View File
@@ -1,9 +1,15 @@
export const runtimeConfig = {
mode: 'mock',
baseUrl: 'http://182.61.18.23:8080',
baseUrl: 'https://backend-api.ddxcjp.cn',
clientId: '428a8310cd442757ae699df5d894f051',
tenantId: '000000'
}
export const isMockMode = () => runtimeConfig.mode === 'mock'
export const hasRemoteConfig = () => runtimeConfig.mode === 'remote' && Boolean(runtimeConfig.baseUrl && runtimeConfig.clientId)
export const resolveRuntimeMode = () => {
if (isMockMode()) return 'mock'
if (hasRemoteConfig()) return 'remote'
throw new Error('运行模式配置无效:只允许 mock 或配置完整的 remote')
}