Commit 14712a2d authored by GuanHua's avatar GuanHua

fix: 修改获取平台首页子域名的方法

parent fb323524
...@@ -18,10 +18,18 @@ export const TOP_DOMAIN = process.env.NODE_ENV !== 'development' ? getTopDomainB ...@@ -18,10 +18,18 @@ export const TOP_DOMAIN = process.env.NODE_ENV !== 'development' ? getTopDomainB
// export const TOP_DOMAIN = getTopDomainByHost(GlobalConfig.global.siteInfo.siteUrl) // export const TOP_DOMAIN = getTopDomainByHost(GlobalConfig.global.siteInfo.siteUrl)
/** /**
* 获取平台首页子域名
*/
const getPlatformSubDomain = (defaultSubDomian: string) => {
const siteUrl = GlobalConfig.global.siteInfo.siteUrl
return siteUrl.split('.')[0] || defaultSubDomian
}
/**
* 平台首页域名 * 平台首页域名
*/ */
export const PLATFORM_DOMAIN = `${REQUEST_HEADER}www.${TOP_DOMAIN}` export const PLATFORM_DOMAIN = `${REQUEST_HEADER}${getPlatformSubDomain('lx-www')}.${TOP_DOMAIN}`
/** /**
* 企业商城域名 * 企业商城域名
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment