feat(digest): 每天把当天视频情况画成一张图推到企业微信
运营要看的是「他们今天发了什么」,文字版在企业微信手机上没法对齐, 所以直接用 PIL 画成表:博主 / 标题 / 点赞 / 评论 / 收藏 / 分享, 按发布时间取当天,指标取最近一轮,按点赞降序。 - 播放量没进表:抖音对普通作品恒返回 0,摆一列 0 只会误导 - 定时按「今天发过没有」判断,进程重启也不会重复推 - 发送失败不写标记,下一拍继续重试 - 设置页有开关和时间;Webhook 面板加了「预览今天」和「发今天图」 - 容器需要中文字体,Dockerfile 装上 fonts-wqy-zenhei
This commit is contained in:
@@ -308,6 +308,14 @@ export const monitorApi = {
|
||||
api.get<LoginState>('/monitor/login/state', { params: { force } }),
|
||||
|
||||
getWebhook: () => api.get<WebhookStatus>('/monitor/webhook'),
|
||||
/** 当天视频情况图:手动发一次(定时那条由后端按设置触发)。 */
|
||||
sendDailyDigest: (platform?: string) =>
|
||||
api.post<{ ok: boolean; rows: number; detail: string }>('/monitor/digest/send', null, {
|
||||
params: { platform },
|
||||
}),
|
||||
/** 预览图 —— 直接给 <img>/window.open 用,不带 Authorization 头,靠 cookie。 */
|
||||
dailyDigestPreviewUrl: (platform?: string) =>
|
||||
`/api/monitor/digest/preview${platform ? `?platform=${platform}` : ''}`,
|
||||
setWebhook: (url: string) => api.post('/monitor/webhook', { url }),
|
||||
clearWebhook: () => api.delete('/monitor/webhook'),
|
||||
testWebhook: (url?: string) => api.post('/monitor/webhook/test', { url: url ?? null }),
|
||||
|
||||
Reference in New Issue
Block a user