From c54649258b82a3d7c5c37927046c116177ff1a21 Mon Sep 17 00:00:00 2001 From: ABAPPLO <1134226402@qq.com> Date: Thu, 8 Oct 2026 14:44:47 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E4=B8=A4=E7=AB=AF?= =?UTF-8?q?=E8=B5=B0=E6=9F=A5=E5=8F=91=E7=8E=B0=E7=9A=844=E4=B8=AAUI?= =?UTF-8?q?=E6=96=AD=E7=82=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 门户回填表单:缺发布截图时提交按钮前置禁用并提示「先上传发布截图, 链接回填需以截图为凭证」,不再等提交后才 toast 报错(服务端守卫保留) - 门户笔记详情:回填链接前收起回收区块的说明与示例图,只留一行锁定提示, 降低回填阶段信息密度 - 运营端分发表:数据状态按任务采集计划显示等待日(等待D{首个采集日}), 未设置计划时显示「待设置采集计划」,不再写死「等待D2」 - 截图包回收清单:序号列对无 source_row 的内容回退行号;种子内容补 source_row,演示数据导出不再出现空序号 --- app/admin-app.tsx | 27 +++++++++- app/api/screenshot-task-export/route.ts | 2 +- koc-portal/app/page.tsx | 25 ++++++--- lib/mvp-db.ts | 14 ++++-- tests/ui-walkthrough-fixes.test.mjs | 67 +++++++++++++++++++++++++ 5 files changed, 120 insertions(+), 15 deletions(-) create mode 100644 tests/ui-walkthrough-fixes.test.mjs diff --git a/app/admin-app.tsx b/app/admin-app.tsx index 3e19eb3..d71233f 100644 --- a/app/admin-app.tsx +++ b/app/admin-app.tsx @@ -188,6 +188,8 @@ type Distribution = { task_platform: "小红书" | "抖音"; content_format: "image_text" | "video"; due_at: string; + task_collection_days: string | null; + task_collection_start_date: string | null; }; type RecoverySortKey = @@ -5033,6 +5035,25 @@ function DistributionTable({ onRelease?: (distribution: Distribution) => void; showRecovery?: boolean; }) { + // 已发布但还没采到数据的行:有计划时按首个采集日显示,没计划时 + // 明说待设置,而不是写死「等待D2」误导运营。 + const waitingCollectionLabel = (item: Distribution) => { + let days: number[] = []; + try { + const parsed = JSON.parse(item.task_collection_days || "[]") as unknown; + if (Array.isArray(parsed)) { + days = parsed + .map(Number) + .filter((day) => Number.isInteger(day) && day >= 1 && day <= 7); + } + } catch { + days = []; + } + if (!item.task_collection_start_date || days.length === 0) { + return "待设置采集计划"; + } + return `等待D${Math.min(...days)}`; + }; return (
@@ -5075,7 +5096,11 @@ function DistributionTable({ ) : item.d2_likes !== null ? ( 采集中 ) : ( - {item.publish_url ? "等待D2" : "尚未发布"} + + {item.publish_url + ? waitingCollectionLabel(item) + : "尚未发布"} + )} {showRecovery && ( diff --git a/app/api/screenshot-task-export/route.ts b/app/api/screenshot-task-export/route.ts index dad7735..aa5591a 100644 --- a/app/api/screenshot-task-export/route.ts +++ b/app/api/screenshot-task-export/route.ts @@ -78,7 +78,7 @@ export async function GET(request: Request) { exported += 1; } manifest.push([ - String(row.source_row ?? ""), + String(row.source_row ?? rowIndex + 1), row.title, row.claimant_name || row.partner_name, row.claimed_at, diff --git a/koc-portal/app/page.tsx b/koc-portal/app/page.tsx index dd503f4..fed1e9b 100644 --- a/koc-portal/app/page.tsx +++ b/koc-portal/app/page.tsx @@ -1666,9 +1666,15 @@ export default function Home() { - + {!(screenshot || selected.publish_screenshot_key) && ( +

先上传发布截图,链接回填需以截图为凭证

+ )} {selected.publish_time && (

上次回填:{formatDate(selected.publish_time, true)}

)} @@ -1796,13 +1802,16 @@ export default function Home() { {selected.result_submitted_at ? "已提交" : "待提交"} -

- {payload.task.recoveryInstructions || "请提交发布后的笔记截图"} - {payload.task.recoveryDueAt - ? ` 截止:${formatDate(payload.task.recoveryDueAt)}。` - : ""} -

- {(payload.task.recoveryExampleImages?.length ?? 0) > 0 && ( + {selected.publish_url && ( +

+ {payload.task.recoveryInstructions || "请提交发布后的笔记截图"} + {payload.task.recoveryDueAt + ? ` 截止:${formatDate(payload.task.recoveryDueAt)}。` + : ""} +

+ )} + {selected.publish_url && + (payload.task.recoveryExampleImages?.length ?? 0) > 0 && (
{payload.task.recoveryExampleImages?.map((image) => (