fixed visual bug with start game on click max-btn

This commit is contained in:
Kostya
2024-01-27 23:28:58 +03:00
parent b97bce1dc6
commit 96bea8824c
2 changed files with 15 additions and 1 deletions

View File

@@ -373,6 +373,14 @@ export default {
}
}
},
mounted() {
eventBus.on('Updatebalance-saper', () => {
GetCurrentMoney(GetCookie("AUTHTOKEN"), GetCookie("SearchToken"))
.then(response => {
this.balance = response
})
})
},
methods: {
clickPlayButton() {
this.v$.$touch()
@@ -472,7 +480,12 @@ export default {
if (content === 'max') {
await GetCurrentMoney(GetCookie('AUTHTOKEN'), GetCookie('SearchToken'))
.then((response) => {
this.amountDeposit = parseInt(response.currentMoney)
console.log(response.currentMoney, this.balance)
const responseBalance = response.currentMoney
if (responseBalance === this.balance) {
this.amountDeposit = parseInt(responseBalance)
}
})
}
else {