|
|
@@ -34,12 +34,18 @@ export function getPlatformCode(): PlatformCode {
|
|
|
}
|
|
|
|
|
|
// 生产环境:泛解析 *.yoe365.com
|
|
|
+ const prodAliasMap: Record<string, PlatformCode> = {
|
|
|
+ 'work': 'market'
|
|
|
+ };
|
|
|
const PROD_DOMAIN_SUFFIX = '.yoe365.com';
|
|
|
if (host.endsWith(PROD_DOMAIN_SUFFIX)) {
|
|
|
const subdomain = host.slice(0, -PROD_DOMAIN_SUFFIX.length);
|
|
|
if (SUPPORTED_PLATFORMS.includes(subdomain as PlatformCode)) {
|
|
|
return subdomain as PlatformCode;
|
|
|
}
|
|
|
+ if (prodAliasMap[subdomain]) {
|
|
|
+ return prodAliasMap[subdomain];
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
// IP 地址或未知域名 → 默认 market(开发友好)
|