mirror of
https://github.com/yawaflua/LuckyDiamond.git
synced 2025-12-10 12:19:31 +02:00
refactor logic for send request
This commit is contained in:
@@ -164,21 +164,19 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
amountCrystals(CrystalsCount) {
|
async amountCrystals(CrystalsCount) {
|
||||||
if (CrystalsCount >= 1) {
|
if (CrystalsCount >= 1) {
|
||||||
this.amountSaveCrystals = CrystalsCount
|
this.amountSaveCrystals = CrystalsCount
|
||||||
setTimeout(async () => {
|
try {
|
||||||
try {
|
|
||||||
await GetPercentageSteps(this.amountSaveCrystals)
|
await GetPercentageSteps(this.amountSaveCrystals)
|
||||||
.then((response) => {
|
.then((response) => {
|
||||||
this.PercentageGameSteps = response
|
this.PercentageGameSteps = response
|
||||||
console.log(response)
|
console.log(response)
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
catch (e) {
|
catch (e) {
|
||||||
console.error('Error in Percantage', e)
|
console.error('Error in Percantage', e)
|
||||||
}
|
}
|
||||||
}, 1500)
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user