fix(site): 按 Host 注入租户标题与 SEO 信息
This commit is contained in:
@@ -473,9 +473,18 @@ export const useDistributionSiteStore = defineStore('distributionSite', {
|
||||
sessionStorage.removeItem('hfb_site_name')
|
||||
localStorage.removeItem('hfb_site_code')
|
||||
localStorage.removeItem('hfb_site_name')
|
||||
document.title = '大锤商行 - 官方租号平台'
|
||||
this.faviconUrl = siteBrandFor('dachui').favicon
|
||||
this.applyFavicon()
|
||||
// 服务端注入或静态 bootstrap 已经给出正确品牌时,不要因为接口失败
|
||||
// 把经营租户域名回退成主站标题和图标。
|
||||
const serverInjected =
|
||||
typeof document !== 'undefined' &&
|
||||
document.querySelector('meta[name="site-shell"]') !== null
|
||||
const bootstrapped =
|
||||
typeof document !== 'undefined' && Boolean(document.documentElement.dataset.siteBootstrap)
|
||||
if (!serverInjected && !bootstrapped) {
|
||||
document.title = '大锤商行 - 官方租号平台'
|
||||
this.faviconUrl = siteBrandFor('dachui').favicon
|
||||
this.applyFavicon()
|
||||
}
|
||||
},
|
||||
|
||||
applyTenantContext(info: TenantSiteContext) {
|
||||
|
||||
Reference in New Issue
Block a user