feat: 完善挑战结算页面

This commit is contained in:
richarjiang
2026-05-10 15:10:57 +08:00
parent 110038ceea
commit b68e32ddce
14 changed files with 4502 additions and 12 deletions

View File

@@ -1679,6 +1679,11 @@ export class PageLevel extends BaseView {
// 不论是否有谐音梗,都停留固定时间再弹出通关弹窗,保证节奏一致
await this.delay(PageLevel.PASS_MODAL_DELAY_MS);
if (this._isFinalShareLevel()) {
this._showShareEndPage();
return;
}
// 显示通关弹窗
this._showPassModal();
}
@@ -2016,8 +2021,7 @@ export class PageLevel extends BaseView {
if (this._shareLevelIndex >= totalLevels) {
console.log('[PageLevel] 分享关卡全部完成');
this.stopCountdown();
ShareManager.instance.clearShareMode();
ViewManager.instance.replace('PageHome');
this._showShareEndPage();
return;
}
@@ -2042,4 +2046,19 @@ export class PageLevel extends BaseView {
await this._enterAndInitLevel();
console.log(`[PageLevel] 进入关卡 第${this._currentLevelNumber}`);
}
private _isFinalShareLevel(): boolean {
if (!this._isShareMode) {
return false;
}
const totalLevels = ShareManager.instance.getShareLevelCount();
return totalLevels > 0 && this._shareLevelIndex >= totalLevels - 1;
}
private _showShareEndPage(): void {
console.log('[PageLevel] 分享关卡全部完成,进入 PK 结算页');
this.stopCountdown();
ViewManager.instance.replace('PagePKEnd');
}
}