e484d2a87d
- 移除原通用funds工具代码与配置 - 新增国信证券、华泰证券专属资金工具页面、样式与逻辑 - 为两个工具添加独立的鉴权配置 - 更新导航菜单,将原通用入口替换为两个券商专属入口 - 新增对应券商的SVG图标文件
28 lines
1.1 KiB
JavaScript
28 lines
1.1 KiB
JavaScript
(async function(){
|
|
try {
|
|
const wrap = document.querySelector('#topbar')
|
|
if (!wrap) return
|
|
const res = await fetch('/common/nav.html')
|
|
const html = await res.text()
|
|
wrap.innerHTML = html
|
|
const path = location.pathname.toLowerCase()
|
|
let key = ''
|
|
if (path.includes('/tools/weibo/')) key = 'weibo'
|
|
else if (path.includes('/tools/markets/')) key = 'markets'
|
|
else if (path.includes('/tools/wall/')) key = 'wall'
|
|
else if (path.includes('/tools/funds_guoxin/')) key = 'funds_guoxin'
|
|
else if (path.includes('/tools/funds_huatai/')) key = 'funds_huatai'
|
|
else if (path.includes('/tools/ccb_private_funds/')) key = 'ccb_private_funds'
|
|
else if (path.includes('/tools/cloud/')) key = 'cloud'
|
|
else if (path.includes('/tools/weekly/')) key = 'weekly'
|
|
else if (path.includes('/tools/ai-lib/')) key = 'ai-lib'
|
|
else if (path.includes('/tools/expense/')) key = 'expense'
|
|
if (key) {
|
|
wrap.querySelectorAll('a.tab').forEach(a => {
|
|
if (a.dataset.key === key) a.classList.add('active')
|
|
else a.classList.remove('active')
|
|
})
|
|
}
|
|
} catch {}
|
|
})()
|