@tencentcloud/chat-cs-uniapp
Version:
TCCC uniapp UIKit
20 lines (16 loc) • 701 B
text/typescript
import { getQuery } from '../../utils/web/index';
const query = getQuery();
export const isGlobalSite = window.location.hostname === 'connect.tencentcloud.com' || query.globalSite;
export const apiBaseUrl = (() => {
if (window.location.host.endsWith('tencentcloud.com') || isGlobalSite) {
return 'https://api.connect.tencentcloud.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';
}
// return "https://test.ccclogic.pstn.avc.qcloud.com" ?? 'https://api.tccc.qcloud.com';
return 'https://api.tccc.qcloud.com';
})();