tccc-vue-uikit
Version:
TCCC Vue3 UIKit
23 lines (21 loc) • 820 B
text/typescript
import { getQuery, isPreEnv, isTestEnv } from '../utils';
export const apiBaseUrl = (() => {
// if (isTestEnv()) {
// return 'https://test.ccclogic.pstn.avc.qcloud.com';
// }
// if (isPreEnv()) {
// return 'https://pre.ccclogic.pstn.avc.qcloud.com';
// }
// if (window.location.host.endsWith('tencent.com.cn')) {
// return 'https://api.ccc.cloud.tencent.com.cn';
// }
// if (window.location.host.endsWith('tencent.cn')) {
// return 'https://api.ccc.cloud.tencent.cn';
// }
// if (window.location.host.endsWith('tencentcloud.com')) {
// return 'https://api.connect.tencentcloud.com';
// }
return 'https://test.ccclogic.pstn.avc.qcloud.com';
})();
const query = getQuery();
export const isGlobalSite = window.location.hostname === 'connect.tencentcloud.com' || query.globalSite;