|
|
@@ -375,9 +375,22 @@
|
|
|
margin-top: 7px;
|
|
|
}
|
|
|
.stat .sub.plat-break {
|
|
|
- margin-top: 3px;
|
|
|
+ margin-top: 5px;
|
|
|
color: var(--ink-soft);
|
|
|
font-weight: 600;
|
|
|
+ display: flex;
|
|
|
+ flex-wrap: wrap;
|
|
|
+ align-items: center;
|
|
|
+ gap: 4px 12px;
|
|
|
+ }
|
|
|
+ .stat .sub.plat-break .pb-item {
|
|
|
+ display: inline-flex;
|
|
|
+ align-items: center;
|
|
|
+ gap: 5px;
|
|
|
+ }
|
|
|
+ .stat .sub.plat-break .pb-item b {
|
|
|
+ font-size: 12px;
|
|
|
+ color: var(--ink);
|
|
|
}
|
|
|
.ring-row {
|
|
|
display: flex;
|
|
|
@@ -684,7 +697,8 @@
|
|
|
line-height: 0;
|
|
|
flex: none;
|
|
|
}
|
|
|
- .plat-logo svg {
|
|
|
+ .plat-logo svg,
|
|
|
+ .plat-logo img {
|
|
|
display: block;
|
|
|
}
|
|
|
.done-dot {
|
|
|
@@ -2263,32 +2277,28 @@
|
|
|
({ xhs: "xhs", gzh: "gzh", zhihu: "zhihu", douyin: "douyin", sph: "sph", youtube: "youtube", x: "x" })[p] ||
|
|
|
"other";
|
|
|
const PLAT_NAME = (p) =>
|
|
|
- ({ xhs: "小红书", gzh: "公众号", zhihu: "知乎", douyin: "抖音", sph: "视频号", youtube: "YouTube", x: "X" })[
|
|
|
- p
|
|
|
- ] ||
|
|
|
+ ({
|
|
|
+ xhs: "小红书",
|
|
|
+ gzh: "公众号",
|
|
|
+ sph: "视频号",
|
|
|
+ github: "GitHub",
|
|
|
+ toutiao: "头条",
|
|
|
+ douyin: "抖音",
|
|
|
+ bili: "哔哩哔哩",
|
|
|
+ zhihu: "知乎",
|
|
|
+ weibo: "微博",
|
|
|
+ youtube: "YouTube",
|
|
|
+ x: "X",
|
|
|
+ })[p] ||
|
|
|
p ||
|
|
|
"?";
|
|
|
/* 渠道 logo 徽标(品牌色圆角方块,hover 显示渠道名) */
|
|
|
- const PLAT_LOGO = (p, size = 18) => {
|
|
|
- const glyph = (bg, ch) => `<svg width="${size}" height="${size}" viewBox="0 0 24 24">
|
|
|
- <rect width="24" height="24" rx="5.5" fill="${bg}"/>
|
|
|
- <text x="12" y="16.6" font-size="12" font-weight="700" fill="#fff" text-anchor="middle"
|
|
|
- font-family="'Noto Sans SC',sans-serif">${ch}</text></svg>`;
|
|
|
- const svgs = {
|
|
|
- xhs: glyph("#ff2442", "红"),
|
|
|
- zhihu: glyph("#0084ff", "知"),
|
|
|
- gzh: glyph("#07c160", "公"),
|
|
|
- douyin: glyph("#161823", "抖"),
|
|
|
- sph: glyph("#fa6d20", "视"),
|
|
|
- x: glyph("#15202b", "X"),
|
|
|
- youtube: `<svg width="${size}" height="${size}" viewBox="0 0 24 24">
|
|
|
- <rect width="24" height="24" rx="5.5" fill="#f00"/>
|
|
|
- <polygon points="9.8,7.8 17,12 9.8,16.2" fill="#fff"/></svg>`,
|
|
|
- };
|
|
|
- return svgs[p]
|
|
|
- ? `<span class="plat-logo" title="${PLAT_NAME(p)}">${svgs[p]}</span>`
|
|
|
+ /* 有对应 SVG 图标的渠道(文件位于 /icons/<key>.svg) */
|
|
|
+ const PLAT_ICONS = new Set(["xhs", "gzh", "sph", "github", "douyin", "bili", "zhihu", "weibo", "youtube"]);
|
|
|
+ const PLAT_LOGO = (p, size = 18) =>
|
|
|
+ PLAT_ICONS.has(p)
|
|
|
+ ? `<span class="plat-logo" title="${PLAT_NAME(p)}"><img src="/icons/${p}.svg" width="${size}" height="${size}" alt="${PLAT_NAME(p)}" loading="lazy"></span>`
|
|
|
: `<span class="plat other">${esc(PLAT_NAME(p))}</span>`;
|
|
|
- };
|
|
|
const MODELS_PROC = ["anthropic/claude-sonnet-4-6", "google/gemini-3.1-flash-lite"];
|
|
|
const MODELS_TOOL = ["google/gemini-3.1-flash-lite", "anthropic/claude-sonnet-4-6"];
|
|
|
const scoreCls = (v) => (v == null ? "s0" : v >= 9 ? "s9" : v >= 8 ? "s8" : v >= 6 ? "s6" : "s0");
|
|
|
@@ -2324,12 +2334,18 @@
|
|
|
p = d.process_data;
|
|
|
// 进度百分比向下取整:200/201=99.5% 显示 99%,未真正做完不会显示 100%
|
|
|
const pct = (a, b) => (b ? Math.floor((a / b) * 100) : 0);
|
|
|
- const platBreak = (arr) => (arr || []).map(([k, n]) => `${PLAT_NAME(k)} ${n}`).join(" · ") || "—";
|
|
|
+ const platBreak = (arr) =>
|
|
|
+ (arr || [])
|
|
|
+ .map(
|
|
|
+ ([k, n]) =>
|
|
|
+ `<span class="pb-item">${PLAT_LOGO(k, 15)}<b class="num">${n}</b></span>`,
|
|
|
+ )
|
|
|
+ .join("") || "—";
|
|
|
v.innerHTML = `
|
|
|
<div class="dash-section"><h2>结果数据</h2><div class="rule"></div><span class="tag">RESULTS</span></div>
|
|
|
<div class="cards">
|
|
|
- <div class="card stat"><div class="lbl">采集帖子数量</div><div class="val num">${r.post_count}</div><div class="sub">${platBreak(r.collected_by_platform)}</div></div>
|
|
|
- <div class="card stat t"><div class="lbl">解构帖子数量</div><div class="val num">${r.extracted_post_count}</div><div class="sub">${platBreak(r.extracted_by_platform)}</div></div>
|
|
|
+ <div class="card stat"><div class="lbl">采集帖子数量</div><div class="val num">${r.post_count}</div><div class="sub plat-break">${platBreak(r.collected_by_platform)}</div></div>
|
|
|
+ <div class="card stat t"><div class="lbl">解构帖子数量</div><div class="val num">${r.extracted_post_count}</div><div class="sub plat-break">${platBreak(r.extracted_by_platform)}</div></div>
|
|
|
<div class="card stat a"><div class="lbl">工具数量</div><div class="val num">${r.tool_count}</div><div class="sub">mode_tools 去重工具名</div></div>
|
|
|
<div class="card stat r"><div class="lbl">内容树覆盖节点</div><div class="val num">0</div>
|
|
|
<div class="sub">0%</div></div>
|