余额刷新添加点击限制
All checks were successful
Gitea Actions Demo / Explore-Gitea-Actions (push) Successful in 1m19s
All checks were successful
Gitea Actions Demo / Explore-Gitea-Actions (push) Successful in 1m19s
This commit is contained in:
parent
1ac74e9b95
commit
9b051cb097
@ -541,10 +541,25 @@ export class SlotBar extends Component {
|
||||
});
|
||||
}
|
||||
|
||||
async onClickBalance() {
|
||||
private isGetBalance: boolean = false;
|
||||
async onClickBalance(): Promise<number | null> {
|
||||
if (this.isGetBalance) return
|
||||
this.isGetBalance = true;
|
||||
try {
|
||||
let balacneData = await callGameBalanceApi({ GameId: getGameId() });
|
||||
this.setBalance(balacneData.Balance)
|
||||
return balacneData.Balance;
|
||||
} catch (err) {
|
||||
console.log('获取余额失败')
|
||||
return null;
|
||||
} finally {
|
||||
this.scheduleOnce(() => {
|
||||
this.isGetBalance = false;
|
||||
}, 1)
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
setLeftAutoCount(count: number) {
|
||||
let num = this.getBtnNode(Btn_Key.StopAutoSpinBtn)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user