123
This commit is contained in:
@@ -1,5 +1,5 @@
|
|||||||
{
|
{
|
||||||
"tenantId": "000000",
|
"tenantId": "000000",
|
||||||
"apiUrl": "http://124.222.254.188:8889",
|
"apiUrl": "",
|
||||||
"apiUrlList": ["http://124.222.254.188:8889"]
|
"apiUrlList": []
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ export type Config = {
|
|||||||
|
|
||||||
export const getConfig = async (): Promise<Config> => {
|
export const getConfig = async (): Promise<Config> => {
|
||||||
const configStr = await fetch('/config.json').then(res => res.text())
|
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
|
const config = JSON.parse(configStr) as Config
|
||||||
config.apiUrl = ''
|
config.apiUrl = ''
|
||||||
@@ -84,4 +84,4 @@ const t_000000: Config = {
|
|||||||
// return {
|
// return {
|
||||||
// tenantId: '000000'
|
// tenantId: '000000'
|
||||||
// }
|
// }
|
||||||
// }
|
// }
|
||||||
|
|||||||
@@ -146,9 +146,8 @@ const transform: AxiosTransform = {
|
|||||||
if(config.url && config.url.endsWith("domain.txt")){
|
if(config.url && config.url.endsWith("domain.txt")){
|
||||||
return config
|
return config
|
||||||
}else if(domain && domain.length > 0){
|
}else if(domain && domain.length > 0){
|
||||||
// let domainUrl = domain[Math.floor((Math.random()*domain.length))];
|
let domainUrl = domain[Math.floor((Math.random()*domain.length))];
|
||||||
// config.url = domainUrl + config.url;
|
config.url = domainUrl + config.url;
|
||||||
// config.url = domainUrl + config.url;
|
|
||||||
}else if(apiUrl && isString(apiUrl)){
|
}else if(apiUrl && isString(apiUrl)){
|
||||||
config.url = `${apiUrl}${config.url}`;
|
config.url = `${apiUrl}${config.url}`;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user