fix: 修复关卡内图片圆角不正确的问题

This commit is contained in:
richarjiang
2026-05-03 22:40:24 +08:00
parent c04bde38a3
commit b288c0bc8f
5 changed files with 28 additions and 13 deletions

View File

@@ -1222,19 +1222,34 @@ export class PageLevel extends BaseView {
// 播放成功音效
this.playSuccessSound();
// 通关后根据 punchline 字数重建包袱答案块
this.setPunchline(this._currentConfig?.punchline ?? null);
const punchline = this.getValidPunchline(this._currentConfig?.punchline ?? null);
if (punchline) {
// 通关后根据 punchline 字数重建包袱答案块
this.setPunchline(punchline);
} else {
this.hidePunchline();
}
const levelId = this._currentConfig?.id ?? '';
const timeSpent = Math.max(0, Math.round((Date.now() - this._levelStartTime) / 1000));
this.reportLevelCompleted(levelId, timeSpent);
await this.delay(PageLevel.PASS_MODAL_DELAY_MS);
if (punchline) {
await this.delay(PageLevel.PASS_MODAL_DELAY_MS);
}
// 显示通关弹窗
this._showPassModal();
}
private getValidPunchline(punchline: string | null): string | null {
if (!punchline?.trim()) {
return null;
}
return punchline;
}
/**
* 上报通关并获取下一关数据
*/