diff --git a/luckydiamond/src/pages/games-pages/CrashgamePage.vue b/luckydiamond/src/pages/games-pages/CrashgamePage.vue
index 2aa5098..ce4f1a0 100644
--- a/luckydiamond/src/pages/games-pages/CrashgamePage.vue
+++ b/luckydiamond/src/pages/games-pages/CrashgamePage.vue
@@ -33,7 +33,7 @@
{{ textError }}
-
+
@@ -113,6 +113,16 @@ export default {
setup() {
return { v$: useVuelidate() }
},
+ computed: {
+ getUserPrize() {
+ let User = this.crashObject.Players.find(player => player.UserName === GetCookie('SpUserName'))
+
+ if (User) {
+ return User.Bid * this.crashObject.CurrentX
+ }
+ return 0
+ }
+ },
mounted() {
eventBus.on('crash', (dataCrash) => {
try {
@@ -127,18 +137,20 @@ export default {
if (this.crashObject.Status === 'GameEnd' && this.startGame === true && this.crashObject.Players.some(player => player.UserName === GetCookie('SpUserName'))) {
this.startGame = false
+ console.log('GAME OVER')
this.updateUserMoney()
}
if (
- this.crashObject.Players.some(player => player.UserName === GetCookie('SpUserName')) &&
+ this.crashObject.Players.some(player =>
+ player.UserName === GetCookie('SpUserName') && player.UserGameState !== 'Win'
+ ) &&
this.startGame === false &&
- this.crashObject.Status !== 'GameEnd' &&
- this.crashObject.Players.some(player => player.UserGameState !== 'Win')
+ this.crashObject.Status !== 'GameEnd'
) {
- this.startGame = true;
+ this.startGame = true
let User = this.crashObject.Players.find(player => player.UserName === GetCookie('SpUserName'))
- console.log(User)
+ console.log('ОБНОВЛЕНИЕ СТРАНИЦЫ')
if (User) {
this.amountDeposit = User.Bid
User = null