fix(site): 修复解忧站点图标
This commit is contained in:
@@ -0,0 +1,24 @@
|
||||
/* global document, URLSearchParams, window */
|
||||
|
||||
(() => {
|
||||
const host = window.location.hostname.toLowerCase()
|
||||
const params = new URLSearchParams(window.location.search)
|
||||
const tenantHint = (params.get('tenant_code') || params.get('tenant') || '').toLowerCase()
|
||||
const isJieyou =
|
||||
host === 'zuhaox.com' ||
|
||||
host.endsWith('.zuhaox.com') ||
|
||||
host.startsWith('jieyou.') ||
|
||||
tenantHint === 'jieyou'
|
||||
if (!isJieyou) return
|
||||
|
||||
document.title = '解忧商行 - 官方租号平台'
|
||||
const icon = document.getElementById('site-icon')
|
||||
if (icon) {
|
||||
icon.href = '/jieyou-favicon.svg'
|
||||
icon.type = 'image/svg+xml'
|
||||
}
|
||||
const appleIcon = document.getElementById('site-apple-touch-icon')
|
||||
if (appleIcon) {
|
||||
appleIcon.href = '/jieyou-apple-touch-icon.png'
|
||||
}
|
||||
})()
|
||||
Reference in New Issue
Block a user