From e5d6c3a6741bf8fbaa5d220083c1c24ee661db4e Mon Sep 17 00:00:00 2001 From: richarjiang Date: Fri, 24 Apr 2026 21:37:13 +0800 Subject: [PATCH] =?UTF-8?q?fix(level):=20=E9=BB=98=E8=AE=A4=E8=BF=94?= =?UTF-8?q?=E5=9B=9E=20punchline=20=E5=92=8C=20hint1=20=E7=BA=BF=E7=B4=A2?= =?UTF-8?q?=E6=8F=90=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 未通关用户现在可以查看谐音梗说明和第一个线索提示, hint2/hint3 仍需通关后才显示。 Co-Authored-By: Claude Opus 4.7 --- src/modules/level/dto/level-list.dto.ts | 4 ++-- src/modules/wechat-game/level-fields.helper.ts | 5 +++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/src/modules/level/dto/level-list.dto.ts b/src/modules/level/dto/level-list.dto.ts index 39ae94c..4617fda 100644 --- a/src/modules/level/dto/level-list.dto.ts +++ b/src/modules/level/dto/level-list.dto.ts @@ -22,10 +22,10 @@ export class LevelListItemDto { @ApiProperty({ description: '答案(仅已通关时返回)', nullable: true }) answer!: string | null; - @ApiProperty({ description: '谐音梗说明(仅已通关时返回)', nullable: true }) + @ApiProperty({ description: '谐音梗说明(始终返回)', nullable: true }) punchline!: string | null; - @ApiProperty({ description: '线索1(仅已通关时返回)', nullable: true }) + @ApiProperty({ description: '线索1(始终返回)', nullable: true }) hint1!: string | null; @ApiProperty({ description: '线索2(仅已通关时返回)', nullable: true }) diff --git a/src/modules/wechat-game/level-fields.helper.ts b/src/modules/wechat-game/level-fields.helper.ts index 1ea0ede..5f27830 100644 --- a/src/modules/wechat-game/level-fields.helper.ts +++ b/src/modules/wechat-game/level-fields.helper.ts @@ -31,6 +31,7 @@ export function pickLevelImageFields(level: Level): LevelImageFields { /** * Pick image fields with answer/hints masked for non-completed levels. + * hint1 is always shown (first clue is the default hint shown to players). */ export function pickLevelImageFieldsMasked( level: Level, @@ -41,8 +42,8 @@ export function pickLevelImageFieldsMasked( image1Description: level.image1Description, image2Url: level.image2Url, image2Description: level.image2Description, - punchline: completed ? level.punchline : null, - hint1: completed ? level.hint1 : null, + punchline: level.punchline, + hint1: level.hint1, hint2: completed ? level.hint2 : null, hint3: completed ? level.hint3 : null, };