mirror of
https://github.com/yawaflua/LuckyDiamond.git
synced 2025-12-10 04:09:29 +02:00
added request for get percentage-steps in saper-game
This commit is contained in:
@@ -136,6 +136,7 @@
|
||||
import ChatComponent from "@/components/ChatComponent.vue";
|
||||
import AsideBarElement from "@/components/AsidebarComponent.vue";
|
||||
import HeaderElementPage from "@/components/HeaderComponent.vue";
|
||||
import { GetPercentageSteps } from "@/assets/js/games/saper/SaperAPI";
|
||||
|
||||
import { Swiper, SwiperSlide } from 'swiper/vue';
|
||||
import 'swiper/css';
|
||||
@@ -153,13 +154,33 @@ export default {
|
||||
clickedBtn: '',
|
||||
clickedBtnCrystal : '',
|
||||
amountCrystals: 5,
|
||||
amountSaveCrystals: 0,
|
||||
balance: 1000,
|
||||
amountDeposit: 5,
|
||||
flippedCards: [],
|
||||
|
||||
PercentageGameSteps: [],
|
||||
modules: [ Pagination ]
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
PercentageGameSteps(CrystalsCount) {
|
||||
if (CrystalsCount >= 1) {
|
||||
this.amountSaveCrystals = CrystalsCount
|
||||
setTimeout(() => {
|
||||
try {
|
||||
GetPercentageSteps(this.amountSaveCrystals)
|
||||
.then((response) => {
|
||||
this.PercentageGameSteps.push(response)
|
||||
console.log(response)
|
||||
})
|
||||
}
|
||||
catch (e) {
|
||||
console.error('Error in Percantage', e)
|
||||
}
|
||||
}, 1500)
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
flipCard(index) {
|
||||
if (this.flippedCards.includes(index)) {
|
||||
|
||||
Reference in New Issue
Block a user