fix(monitor): 没有作品的博主在作品栏里也要看得见
分组是从作品推出来的(按作品的 creator_hash 归组),于是没有作品的博主根本 不进列表:目标加了、资料采到了、粉丝数就躺在库里,界面上什么都看不见。 而这类博主恰恰是最该看见的 —— 还在涨粉,只是最近没发东西。藏起来正好藏反了。 线上就有一个:5 个目标里 3 个没作品,那 3 个连同已采到的粉丝数一起消失了。 改成 **账号快照 ∪ 作品** 两个来源: * 有快照没作品 → 一个 0 篇的组,备注和粉丝数照常显示,组里写「暂无作品」; * 有作品没快照 → 一个没有账号指标的组(小红书那条路不产生快照)。 /notes 因此多返回一份 `creators`,而不是让前端从作品里推 —— 作品推不出上面 第一类人。组头改读它,`MonitorNote` 上那几个字段降级成「顺着作品问作者」用。
This commit is contained in:
@@ -5,6 +5,7 @@ import type {
|
||||
CookieStatus,
|
||||
MetricPoint,
|
||||
MonitorComment,
|
||||
MonitorCreator,
|
||||
MonitorEvent,
|
||||
MonitorNote,
|
||||
MonitorOverview,
|
||||
@@ -186,7 +187,7 @@ export const monitorApi = {
|
||||
api.get<{ runs: MonitorRun[] }>(`/monitor/tasks/${id}/runs`, { params: { limit } }),
|
||||
|
||||
getNotes: (taskId?: number, onlyNew = false, limit = 200, platform?: string) =>
|
||||
api.get<{ notes: MonitorNote[] }>('/monitor/notes', {
|
||||
api.get<{ notes: MonitorNote[]; creators: MonitorCreator[] }>('/monitor/notes', {
|
||||
params: { task_id: taskId, only_new: onlyNew, limit, platform },
|
||||
}),
|
||||
// Metric time series for one note; the chart reads this.
|
||||
|
||||
Reference in New Issue
Block a user