feat(工作台): 三列表(账号/视频/AI写脚本)批量操作——左下角图标按钮+勾选批量删除
- 后端: dsh-data.js batchDelete(kind,ids)——accounts 软删(del_flag=1)+连坐清 persona/analysis/videos/source/analysis/rewrite_log; videos|rewrites 删视频行+关联(video_id 与 aweme_id 双键,兼容 video_id=null 历史行); server.js POST /api/dsh/batch-delete(kind 校验+空 ids 幂等) - 前端: data-pages.js batchBarHtml/bindBatchBar + 三列表勾选列+左下角批量操作条; 图标版——app.js 新增 check-square/trash 图标, 批量模式图标右侧出 trash/x+全选+计数; style.css 批量样式+--danger - 修复 P0: 账号连坐删除漏删 account_videos 行(孤儿残留), 已补并复验 - 验证: API 实测(删测试账号/视频连坐全清+非法kind+空ids) + CDP UI 33项PASS + 端到端删除 PASS(cdp-verify-batch.mjs / cdp-verify-batch-e2e.mjs)
This commit is contained in:
1 parent
6bf0eca90e
commit
2e048459ea
10 files changed
+390
-9
No files matched your search
@@ -422,6 +422,20 @@ const server = http.createServer((req, res) => {
|
||||
});
|
||||
return;
|
||||
}
|
||||
if (p === '/api/dsh/batch-delete' && req.method === 'POST') {
|
||||
if (dshGuard()) return;
|
||||
let body = '';
|
||||
req.on('data', (c) => { body += c; if (body.length > 1e6) req.destroy(); });
|
||||
req.on('end', () => {
|
||||
try {
|
||||
const { kind, ids } = JSON.parse(body || '{}');
|
||||
if (!['accounts', 'videos', 'rewrites'].includes(kind)) return sendErr(400, 'kind 不合法');
|
||||
const r = dsh.batchDelete(kind, ids);
|
||||
return dshOk(200, { ok: true, deleted: r.deleted });
|
||||
} catch (e) { return sendErr(500, e.message); }
|
||||
});
|
||||
return;
|
||||
}
|
||||
if (p === '/api/dsh/account-videos') {
|
||||
if (dshGuard()) return;
|
||||
try {
|
||||
|
||||
Reference in new issue
Block a user