feat: 支持分享关卡通关上报
This commit is contained in:
@@ -688,12 +688,15 @@ export class PageLevel extends BaseView {
|
||||
// 播放成功音效
|
||||
this.playSuccessSound();
|
||||
|
||||
// 通关奖励:分享模式下不增加积分
|
||||
const levelId = this._currentConfig?.id ?? '';
|
||||
const timeSpent = 60 - this._countdown;
|
||||
|
||||
if (!this._isShareMode) {
|
||||
const levelId = this._currentConfig?.id ?? '';
|
||||
const timeSpent = 60 - this._countdown;
|
||||
await UserAssetsManager.instance.earnPoint(levelId, timeSpent);
|
||||
this.updatePointsLabel();
|
||||
} else {
|
||||
// fire-and-forget: errors are logged inside reportLevelProgress
|
||||
void ShareManager.instance.reportLevelProgress(levelId, true, timeSpent);
|
||||
}
|
||||
|
||||
// 显示通关弹窗
|
||||
|
||||
Reference in New Issue
Block a user