feat: 成长报告海报改周报口径 + 显示统计周期
- 海报四项统计原来是全部累计,和「周报告」不符;改成近 7 天口径 (和报告页本周概览一致),高风险异常也按本周真实统计(原来写死 0) - Poster 加 period 字段,海报上画出「近 7 天 · 07.25 - 07.31」 Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
@@ -261,10 +261,17 @@ Component({
|
||||
ctx.textAlign = 'center';
|
||||
ctx.fillStyle = '#8D8277';
|
||||
ctx.font = '24px sans-serif';
|
||||
ctx.fillText([pet.age, pet.weight, pet.stage].filter(Boolean).join(' | '), W / 2, 268);
|
||||
ctx.fillText([pet.age, pet.weight, pet.stage].filter(Boolean).join(' | '), W / 2, 262);
|
||||
|
||||
// 周报告:显示统计周期,让人知道这四个数是近 7 天的
|
||||
if (p.period) {
|
||||
ctx.fillStyle = '#C7A36A';
|
||||
ctx.font = '22px sans-serif';
|
||||
ctx.fillText('近 7 天 · ' + p.period, W / 2, 298);
|
||||
}
|
||||
|
||||
ctx.fillStyle = 'rgba(255,255,255,.8)';
|
||||
this.roundRect(ctx, 60, 310, W - 120, 232, 24);
|
||||
this.roundRect(ctx, 60, 316, W - 120, 232, 24);
|
||||
ctx.fill();
|
||||
const lines = [
|
||||
'完成任务 ' + (p.tasks_completed || 0) + ' 项',
|
||||
|
||||
Reference in New Issue
Block a user