mirror of
https://github.com/yawaflua/LuckyDiamond.git
synced 2025-12-10 04:09:29 +02:00
added notification crash
This commit is contained in:
@@ -163,4 +163,18 @@
|
|||||||
height: 300px;
|
height: 300px;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* /Crash-Players */
|
/* /Crash-Players */
|
||||||
|
|
||||||
|
/* Notification */
|
||||||
|
|
||||||
|
.notification-crash {
|
||||||
|
text-align: center;
|
||||||
|
top: 20%;
|
||||||
|
left: 50%;
|
||||||
|
position: absolute;
|
||||||
|
background: #000;
|
||||||
|
width: 200px;
|
||||||
|
height: 40px;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* /Notification */
|
||||||
@@ -63,7 +63,9 @@
|
|||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="notification-crash" v-if="notificationShow">
|
||||||
|
<h2>{{ notificationText }}</h2>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@@ -92,10 +94,12 @@ export default {
|
|||||||
clickedBtn: null,
|
clickedBtn: null,
|
||||||
ErrorClick: false,
|
ErrorClick: false,
|
||||||
ErrorJoin: false,
|
ErrorJoin: false,
|
||||||
|
notificationShow: false,
|
||||||
balance: 0,
|
balance: 0,
|
||||||
amountDeposit: 0,
|
amountDeposit: 0,
|
||||||
crashObject: '',
|
crashObject: '',
|
||||||
textError: '',
|
textError: '',
|
||||||
|
notificationText: '',
|
||||||
startGame: false,
|
startGame: false,
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -246,6 +250,15 @@ export default {
|
|||||||
|
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
else if (response === 'Success') {
|
||||||
|
this.notificationText = 'Успешное добавление в очередь'
|
||||||
|
this.notificationShow = true
|
||||||
|
|
||||||
|
setTimeout(() => {
|
||||||
|
this.notificationText = ''
|
||||||
|
this.notificationShow = false
|
||||||
|
}, 1000)
|
||||||
|
}
|
||||||
this.startGame = true
|
this.startGame = true
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
@@ -268,13 +281,19 @@ export default {
|
|||||||
.then((response) => {
|
.then((response) => {
|
||||||
console.log(response)
|
console.log(response)
|
||||||
this.startGame = false
|
this.startGame = false
|
||||||
|
|
||||||
|
if (response.startsWith('Win')) {
|
||||||
|
this.notificationText = 'Деньги успешно зачислены. Игра покинута.'
|
||||||
|
this.notificationShow = true
|
||||||
|
|
||||||
|
setTimeout(() => {
|
||||||
|
this.notificationText = ''
|
||||||
|
this.notificationShow = false
|
||||||
|
}, 1500)
|
||||||
|
}
|
||||||
|
|
||||||
this.updateUserMoney()
|
this.updateUserMoney()
|
||||||
})
|
})
|
||||||
// await GetCurrentMoney(GetCookie('AUTHTOKEN'), GetCookie('SearchToken'))
|
|
||||||
// .then((response) => {
|
|
||||||
// this.balance = response.currentMoney
|
|
||||||
// return eventBus.emit('Updatebalance')
|
|
||||||
// })
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
async clickedBtnChoice(index, content) {
|
async clickedBtnChoice(index, content) {
|
||||||
|
|||||||
Reference in New Issue
Block a user