From 8478e23be4f61a3358c98fbce6742d3c2b0638ab Mon Sep 17 00:00:00 2001 From: Kostya Date: Sun, 4 Feb 2024 22:10:30 +0300 Subject: [PATCH] added vision old-bid if exit from page crash --- luckydiamond/src/pages/games-pages/CrashgamePage.vue | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/luckydiamond/src/pages/games-pages/CrashgamePage.vue b/luckydiamond/src/pages/games-pages/CrashgamePage.vue index 2872848..f691448 100644 --- a/luckydiamond/src/pages/games-pages/CrashgamePage.vue +++ b/luckydiamond/src/pages/games-pages/CrashgamePage.vue @@ -108,12 +108,13 @@ export default { const dataCrashParse = JSON.parse(dataCrash) this.crashObject = dataCrashParse - console.log(this.crashObject) + // console.log(this.crashObject) } catch (e) { console.error(e) } - if (this.crashObject.Status === 'GameEnd' && this.crashObject.Players.some(player => player.UserName === GetCookie('SpUserName'))) { + + if (this.crashObject.Status === 'GameEnd' && this.startGame === true && this.crashObject.Players.some(player => player.UserName === GetCookie('SpUserName'))) { this.startGame = false } if ( @@ -123,6 +124,13 @@ export default { this.crashObject.Players.some(player => player.UserGameState !== 'Win') ) { this.startGame = true; + + let User = this.crashObject.Players.find(player => player.UserName === GetCookie('SpUserName')) + console.log(User) + if (User) { + this.amountDeposit = User.Bid + User = null + } } }) },