diff --git a/project/短视频脚本创作/V1.0/mcn-work-shop/public/data-pages.js b/project/短视频脚本创作/V1.0/mcn-work-shop/public/data-pages.js index cfb8510..529f7c5 100644 --- a/project/短视频脚本创作/V1.0/mcn-work-shop/public/data-pages.js +++ b/project/短视频脚本创作/V1.0/mcn-work-shop/public/data-pages.js @@ -376,6 +376,9 @@ async function renderAccounts(view) { async function renderAccountDetail(view, id) { const accountId = Number(id); let page = 1, tab = 'info'; + // hash 第三段支持直达指定 tab:#/account/1629/persona → 视频列表(含趋势图) + const seg = (location.hash || '').replace(/^#\/?/, '').split('/'); + if (seg.length >= 3 && ['info', 'persona', 'analysis'].includes(seg[2])) tab = seg[2]; const bstate = { batch: false }; const d = await api('/api/dsh/account-videos?accountId=' + accountId + '&page=1&pageSize=20').catch((e) => ({ ok: false, error: e.message })); if (!d.ok) { view.innerHTML = `
${toolbarBack()}
${esc(d.error || '账号不存在')}
`; bindBack(view); return; } @@ -548,7 +551,8 @@ async function renderAccountDetail(view, id) { mono token:纸 #F0EFEB / 墨 #1C1C1A / 灰 #8F8E88 / 网格 #DEDDD6;tipLight 黑底纸字;quarticOut 入场 */ function renderTrendChart(view) { const el = view.querySelector('#trendChart'); - if (!el || typeof echarts === 'undefined') return; + if (!el) return; + if (typeof echarts === 'undefined') { el.innerHTML = `
图表组件未加载(vendor/echarts.min.js 缺失),请重开页面
`; return; } const items = (trendData || []).filter((v) => v.publish_time); if (items.length < 2) { el.innerHTML = `
暂无足够视频数据展示趋势
`; return; } const pts = items