|
@@ -127,14 +127,19 @@ export const matchProductApiUrl = () => {
|
|
|
'instrument': {
|
|
|
'dev': 'https://dev.kt.colexiu.com',
|
|
|
'test': 'https://test.kt.colexiu.com',
|
|
|
+ 'test2': 'https://test.lexiaoya.cn',
|
|
|
'online': 'https://kt.colexiu.com'
|
|
|
}
|
|
|
}
|
|
|
- const environment = location.origin.includes('//dev') ? 'dev' : location.origin.includes('//test') ? 'test' : location.origin.includes('//online') ? 'online' : 'dev'
|
|
|
+ let environment: 'dev' | 'test' | 'test2' | 'online' = location.origin.includes('//dev') ? 'dev' : location.origin.includes('//test') ? 'test' : location.origin.includes('//online') ? 'online' : 'dev'
|
|
|
if (query.isCbs) {
|
|
|
return apiUrls.cbs[environment] + '/cbs-app'
|
|
|
} else {
|
|
|
const pathName = location.pathname.includes('index') ? 'gym' : location.pathname.includes('colexiu') ? 'colexiu' : location.pathname.includes('orchestra') ? 'orchestra' : 'instrument'
|
|
|
+ // 兼容课堂乐器,测试环境两个域名
|
|
|
+ if (pathName === 'instrument' && environment === 'test') {
|
|
|
+ environment = location.origin.includes('//test.kt') ? 'test' : 'test2'
|
|
|
+ }
|
|
|
return apiUrls[pathName][environment] + '/edu-app'
|
|
|
}
|
|
|
}
|