Merge branch 'main' into ruoyi

This commit is contained in:
xlsea
2024-08-30 15:56:48 +08:00
10 changed files with 888 additions and 737 deletions

View File

@ -1,3 +1,5 @@
import json5 from 'json5';
/**
* Create service config by current env
*
@ -8,10 +10,12 @@ export function createServiceConfig(env: Env.ImportMeta) {
let other = {} as Record<App.Service.OtherBaseURLKey, string>;
try {
other = JSON.parse(VITE_OTHER_SERVICE_BASE_URL || '{}');
if (VITE_OTHER_SERVICE_BASE_URL) {
other = json5.parse(VITE_OTHER_SERVICE_BASE_URL);
}
} catch (error) {
// eslint-disable-next-line no-console
console.error('VITE_OTHER_SERVICE_BASE_URL is not a valid JSON string');
console.error('VITE_OTHER_SERVICE_BASE_URL is not a valid json5 string');
}
const httpConfig: App.Service.SimpleServiceConfig = {