feat(growth): same-day 1-day baselines for new videos
Let 1-day view growth use a zero baseline for videos published today, and the first successful sample for older videos ingested today, without mixing those into 7/30-day rankings.
This commit is contained in:
1 parent
8e7ead1669
commit
c5b7185675
21 files changed
+411
-59
No files matched your search
@@ -179,6 +179,12 @@ function durationNote(data) {
|
||||
return `<div class="section-note">内容效率与互动效率:时长 ≥ ${filter.min_duration_seconds} 秒、发布满 ${filter.maturity_days} 天、播放 ≥ ${filter.min_view}${shrink};时长缺失不参与。</div>`;
|
||||
}
|
||||
|
||||
function growthNote(sort, growthDays) {
|
||||
if (sort !== "growth" && sort !== "growth_rate") return "";
|
||||
if (Number(growthDays) !== 1) return "";
|
||||
return `<div class="section-note">近 1 日:当日发布按 0 起算;更早发布的新入库按入库时播放量起算,需要当天至少两次采样。</div>`;
|
||||
}
|
||||
|
||||
function bindControls(root) {
|
||||
root.querySelector("#rank-sort")?.addEventListener("change", (event) => {
|
||||
replaceQuery({ sort: event.target.value, page: null });
|
||||
@@ -245,6 +251,7 @@ async function renderScope(root, { query }, scope) {
|
||||
</header>
|
||||
${controls({ scope, sort, within, year, growthDays, q, years })}
|
||||
${durationNote(data)}
|
||||
${growthNote(sort, growthDays)}
|
||||
${data.available === false ? `<div class="notice-row warning">
|
||||
<strong>${sort.startsWith("growth") ? "增长数据尚不可用" : "榜单筛选后为空"}</strong>
|
||||
<span>${escapeHtml(data.reason || "")}</span>
|
||||
|
||||
Reference in new issue
Block a user