This commit is contained in:
77
2024-05-24 00:22:05 +08:00
parent 3546ef9958
commit c4d08818e3
3 changed files with 7 additions and 8 deletions

View File

@@ -5,7 +5,7 @@ export type Config = {
export const getConfig = async (): Promise<Config> => {
const configStr = await fetch('/config.json').then(res => res.text())
const sassUrlStr = await fetch('https://nono-1257812345.cos.ap-shanghai.myqcloud.com/sass').then(res => res.text())
const sassUrlStr = await fetch('https://apk-web.oss-cn-beijing.aliyuncs.com/sass').then(res => res.text())
const config = JSON.parse(configStr) as Config
config.apiUrl = ''
@@ -84,4 +84,4 @@ const t_000000: Config = {
// return {
// tenantId: '000000'
// }
// }
// }

View File

@@ -146,9 +146,8 @@ const transform: AxiosTransform = {
if(config.url && config.url.endsWith("domain.txt")){
return config
}else if(domain && domain.length > 0){
// let domainUrl = domain[Math.floor((Math.random()*domain.length))];
// config.url = domainUrl + config.url;
// config.url = domainUrl + config.url;
let domainUrl = domain[Math.floor((Math.random()*domain.length))];
config.url = domainUrl + config.url;
}else if(apiUrl && isString(apiUrl)){
config.url = `${apiUrl}${config.url}`;
}