龙虎榜
All checks were successful
Gitea Actions Demo / Explore-Gitea-Actions (push) Successful in 47s

This commit is contained in:
TJH 2025-12-30 12:32:23 +08:00
parent c3853aa3fe
commit f6ead2deed
2 changed files with 13 additions and 12 deletions

View File

@ -1092,9 +1092,9 @@
"_dstBlendFactor": 4,
"_color": {
"__type__": "cc.Color",
"r": 90,
"g": 6,
"b": 7,
"r": 221,
"g": 162,
"b": 154,
"a": 255
},
"_string": "4",

View File

@ -4,6 +4,7 @@ import { Palette } from './Palette';
import { SlotRankingDataManager } from './SlotRankingDataManager';
import { callGameApiForRank } from 'db://assets/Loading/scripts/comm';
import { AudioManager } from 'db://assets/Loading/scripts/manager/AudioManager';
import { I18nManager } from 'db://assets/Loading/scripts/manager/I18nManager';
const { ccclass, property } = _decorator;
@ -46,7 +47,7 @@ export class RewardList extends Component {
init(rewardListNode: Node) {
this.rewardList = rewardListNode;
this.rewardLoadingNode = this.rewardList.getChildByName('list').getChildByName('loading');
this.rewardLoadingNode = this.rewardList.getChildByName('list').getChildByName('loading');
this.rewardListVScroll = this.rewardList.getChildByName('list').getChildByName('vScroll').getComponent(VirtualScrollView);
this.rewardRadioDWM = this.rewardList.getChildByName('rewardRadioDWM');
this.rewardRadioDayBtn = this.rewardRadioDWM.getChildByName('dayBtn');
@ -106,7 +107,7 @@ export class RewardList extends Component {
showActivityNotOpenTip() {
this.activityNotOpenTip.active = true;
this.rewardListVScroll.setTotalCount(0);
this.rewardListVScroll.setTotalCount(0);
}
async switchRewardTab(type: string) {
@ -208,19 +209,19 @@ export class RewardList extends Component {
if (this.rewardsData.DayRanks && this.rewardsData.DayRanks.length > 0) {
for (let item of this.rewardsData.DayRanks) {
this.selfRewardsList.push({ ...item, TypeLabel: '日榜' });
this.selfRewardsList.push({ ...item, TypeLabel: I18nManager.instance.t('Daily Ranking') });
}
}
if (this.rewardsData.WeekRanks && this.rewardsData.WeekRanks.length > 0) {
for (let item of this.rewardsData.WeekRanks) {
this.selfRewardsList.push({ ...item, TypeLabel: '周榜' });
this.selfRewardsList.push({ ...item, TypeLabel: I18nManager.instance.t('Weekly Ranking') });
}
}
if (this.rewardsData.MonthRanks && this.rewardsData.MonthRanks.length > 0) {
for (let item of this.rewardsData.MonthRanks) {
this.selfRewardsList.push({ ...item, TypeLabel: '月榜' });
this.selfRewardsList.push({ ...item, TypeLabel: I18nManager.instance.t('Monthly Ranking') });
}
}
@ -302,7 +303,7 @@ export class RewardList extends Component {
if (result.Balance !== undefined && this.slotScene && this.slotScene.slotBar) {
this.slotScene.slotBar.setBalance(result.Balance);
}
console.log(`成功领取 ${result.Ids.length} 个奖励,新余额: ${result.Balance}`);
} else {
@ -315,7 +316,7 @@ export class RewardList extends Component {
this.isReceiving = false;
this.setButtonsInteractable(true);
}
}
}
setButtonsInteractable(interactable: boolean) {
let receiveBtn = this.rewardReceivedBtn.getComponent(Button);
@ -431,7 +432,7 @@ export class RewardList extends Component {
this.countdownTimer = null;
}
let endTime = SlotRankingDataManager.instance.getRankEndTimeByType(type);
let endTime = SlotRankingDataManager.instance.getRankEndTimeByType(type);
this.updateCountdown(endTime);
@ -452,7 +453,7 @@ export class RewardList extends Component {
return;
}
let timeStr = this.formatCountdown(remainingSeconds);
let timeStr = this.formatCountdown(remainingSeconds);
}
formatCountdown(seconds: number): string {