mirror of
https://github.com/yawaflua/LuckyDiamond.git
synced 2025-12-10 12:19:31 +02:00
Merge branch 'main' into DevelopCkutls
This commit is contained in:
@@ -2,10 +2,12 @@
|
||||
position: absolute;
|
||||
top: 0%;
|
||||
left: 34%;
|
||||
background: #000;
|
||||
background: #232630;
|
||||
width: 20%;
|
||||
height: 5%;
|
||||
z-index: 1000;
|
||||
border-radius: 10px;
|
||||
font-family: Montserrat Alternates;
|
||||
}
|
||||
|
||||
.notification__content {
|
||||
|
||||
@@ -140,7 +140,7 @@ input[type="number"]::-webkit-outer-spin-button {
|
||||
}
|
||||
|
||||
.crystal-icon,
|
||||
.diamond-icon {
|
||||
.diamond-icon {
|
||||
position: relative;
|
||||
left: 25px;
|
||||
top: 2px;
|
||||
@@ -274,8 +274,9 @@ input[type="number"]::-webkit-outer-spin-button {
|
||||
position: absolute;
|
||||
top: 15%;
|
||||
left: 45%;
|
||||
background: #000;
|
||||
background: #262C48;
|
||||
padding: 20px;
|
||||
border-radius: 10px;
|
||||
}
|
||||
|
||||
.saper-game {
|
||||
@@ -348,7 +349,8 @@ input[type="number"]::-webkit-outer-spin-button {
|
||||
pointer-events: unset !important;
|
||||
}
|
||||
|
||||
.game-start__menu-off .crystals, .game-start__menu-off .diamonds,
|
||||
.game-start__menu-off .crystals,
|
||||
.game-start__menu-off .diamonds,
|
||||
.game-start__menu-off .saper-start__btns .btn-start {
|
||||
pointer-events: none;
|
||||
}
|
||||
@@ -480,39 +482,51 @@ input[type="number"]::-webkit-outer-spin-button {
|
||||
.saper-game__content {
|
||||
width: auto;
|
||||
}
|
||||
|
||||
.saper-start {
|
||||
width: 30%;
|
||||
height: 500px;
|
||||
}
|
||||
|
||||
.btns-style__steps button {
|
||||
width: 60px;
|
||||
height: 50px;
|
||||
}
|
||||
|
||||
.swiper-slide {
|
||||
margin-right: 29px !important;
|
||||
}
|
||||
|
||||
.steps-btns__display {
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.margin-lines .firstline {
|
||||
margin-top: 2%;
|
||||
}
|
||||
|
||||
.info-emeralds {
|
||||
margin-top: 6.5%;
|
||||
}
|
||||
|
||||
.info-crystals {
|
||||
margin-top: 6.5%;
|
||||
}
|
||||
.crystals-btns__choices button, .btn-style__diamonds button {
|
||||
|
||||
.crystals-btns__choices button,
|
||||
.btn-style__diamonds button {
|
||||
padding: 4px 13px;
|
||||
}
|
||||
|
||||
.diamond-icon {
|
||||
top: 12px;
|
||||
left: 35px;
|
||||
}
|
||||
|
||||
#diamonds-input {
|
||||
width: 60%;
|
||||
}
|
||||
|
||||
.btns-style__steps button {
|
||||
padding: 6px 9px;
|
||||
}
|
||||
@@ -525,15 +539,19 @@ input[type="number"]::-webkit-outer-spin-button {
|
||||
.card-info img {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.circles-1 {
|
||||
top: 110px;
|
||||
}
|
||||
|
||||
.circles-2 {
|
||||
top: 220px;
|
||||
}
|
||||
|
||||
.circles-3 {
|
||||
top: 330px;
|
||||
}
|
||||
|
||||
.circles-4 {
|
||||
top: 440px;
|
||||
}
|
||||
@@ -543,57 +561,75 @@ input[type="number"]::-webkit-outer-spin-button {
|
||||
.bg-two {
|
||||
left: 300px;
|
||||
}
|
||||
|
||||
.saper-game__content {
|
||||
width: auto;
|
||||
}
|
||||
|
||||
.saper-start {
|
||||
width: 30%;
|
||||
height: 510px;
|
||||
}
|
||||
|
||||
.steps-btns__display {
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.btns-style__steps button {
|
||||
width: 60px;
|
||||
height: 50px;
|
||||
}
|
||||
|
||||
.swiper-slide {
|
||||
margin-right: 30px !important;
|
||||
}
|
||||
|
||||
.margin-lines .firstline {
|
||||
margin-top: 2%;
|
||||
}
|
||||
|
||||
.square {
|
||||
width: 75px;
|
||||
}
|
||||
|
||||
.img-style-click {
|
||||
left: -15px;
|
||||
}
|
||||
|
||||
.info-emeralds {
|
||||
margin-top: 6.5%;
|
||||
}
|
||||
|
||||
.info-crystals {
|
||||
margin-top: 6.5%;
|
||||
}
|
||||
|
||||
.text-style__subtitle h2 {
|
||||
font-size: 11px;
|
||||
}
|
||||
|
||||
.text-style__comment p {
|
||||
font-size: 11px;
|
||||
}
|
||||
.crystals-btns__choices button, .btn-style__diamonds button {
|
||||
|
||||
.crystals-btns__choices button,
|
||||
.btn-style__diamonds button {
|
||||
padding: 4px 7px;
|
||||
}
|
||||
|
||||
.diamonds-btns__display {
|
||||
margin-left: 3%;
|
||||
}
|
||||
|
||||
.diamond-icon {
|
||||
top: 12px;
|
||||
left: 35px;
|
||||
}
|
||||
|
||||
#diamonds-input {
|
||||
width: 60%;
|
||||
}
|
||||
|
||||
.btns-style__steps button {
|
||||
padding: 6px 4px;
|
||||
}
|
||||
@@ -606,6 +642,7 @@ input[type="number"]::-webkit-outer-spin-button {
|
||||
.card-info img {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.circles__content {
|
||||
display: none;
|
||||
}
|
||||
@@ -636,7 +673,8 @@ input[type="number"]::-webkit-outer-spin-button {
|
||||
object-fit: cover;
|
||||
}
|
||||
|
||||
.swiper-button-prev:after, .swiper-button-next:after {
|
||||
.swiper-button-prev:after,
|
||||
.swiper-button-next:after {
|
||||
font-size: 30px;
|
||||
color: rgb(210 31 31 / 62%);
|
||||
}
|
||||
|
||||
@@ -180,6 +180,52 @@
|
||||
color: #EA3D38;
|
||||
}
|
||||
|
||||
.error-deposit {
|
||||
position: absolute;
|
||||
left: 190px;
|
||||
top: 52px;
|
||||
}
|
||||
|
||||
.error-deposit h2 {
|
||||
color: #BA3636;
|
||||
font-family: "Montserrat Alternates";
|
||||
font-weight: 700;
|
||||
font-size: 11px;
|
||||
}
|
||||
|
||||
.error-card {
|
||||
position: absolute;
|
||||
top: 130px;
|
||||
left: 210px;
|
||||
}
|
||||
|
||||
.error-card h2 {
|
||||
color: #BA3636;
|
||||
font-family: "Montserrat Alternates";
|
||||
font-weight: 700;
|
||||
font-size: 11px;
|
||||
}
|
||||
|
||||
.error-checkbox h2 {
|
||||
color: #BA3636;
|
||||
font-family: "Montserrat Alternates";
|
||||
font-weight: 700;
|
||||
font-size: 11px;
|
||||
}
|
||||
|
||||
.error-captcha {
|
||||
top: 235px;
|
||||
left: 45px;
|
||||
position: absolute;
|
||||
}
|
||||
|
||||
.error-captcha h2 {
|
||||
color: #BA3636;
|
||||
font-family: "Montserrat Alternates";
|
||||
font-weight: 700;
|
||||
font-size: 13px;
|
||||
}
|
||||
|
||||
/* Media */
|
||||
|
||||
@media screen and (min-device-width: 1400px) and (max-device-width: 1600px) {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { BackendApiUrl } from '@/properties/Сonfig.js';
|
||||
|
||||
import { DeleteAllCookie } from "@/assets/js/storage/CookieStorage";
|
||||
|
||||
export async function Post(url = "", data = {}) {
|
||||
try {
|
||||
@@ -40,6 +40,9 @@ export async function GetCurrentMoney(authToken, searchToken) {
|
||||
});
|
||||
|
||||
if (!response.ok) {
|
||||
|
||||
DeleteAllCookie()
|
||||
|
||||
console.log("Fetch error:", response.status);
|
||||
}
|
||||
|
||||
|
||||
@@ -43,6 +43,7 @@ export default {
|
||||
return {
|
||||
array: [],
|
||||
id: 0,
|
||||
lastMsgTime: null,
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
@@ -53,8 +54,13 @@ export default {
|
||||
});
|
||||
},
|
||||
ClaimDatamsg(msg) {
|
||||
SendMessageToChat(msg[0]);
|
||||
|
||||
const now = Date.now();
|
||||
if (!this.lastMsgTime || now - this.lastMsgTime >= 2000) {
|
||||
SendMessageToChat(msg[0]);
|
||||
this.lastMsgTime = now;
|
||||
} else {
|
||||
alert("Вы не можете отправлять сообщения чаще, чем раз в 2 секунды.");
|
||||
}
|
||||
// if(this.array.length > 7) {
|
||||
// this.array.shift()
|
||||
// }
|
||||
|
||||
@@ -18,6 +18,7 @@ export default {
|
||||
logout() {
|
||||
this.auth = false;
|
||||
this.balance = 0;
|
||||
this.authtoken = ''
|
||||
DeleteAllCookie();
|
||||
},
|
||||
updateBalanceMethod() {
|
||||
@@ -25,12 +26,14 @@ export default {
|
||||
.then(response => {
|
||||
this.balance = response.currentMoney
|
||||
})
|
||||
eventBus.emit('Updatebalance-saper')
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
balance: 0,
|
||||
auth: false,
|
||||
authtoken: '',
|
||||
imageUrl: "https://avatar.spworlds.ru/face/55/",
|
||||
userName: "",
|
||||
};
|
||||
@@ -56,6 +59,7 @@ export default {
|
||||
this.imageUrl = this.imageUrl + `${response.spUserName}.png`;
|
||||
this.userName = response.spUserName;
|
||||
this.auth = true;
|
||||
this.authtoken = response.authtoken
|
||||
GetCurrentMoney(GetCookie("AUTHTOKEN"), GetCookie("SearchToken"))
|
||||
.then((response) => {
|
||||
this.balance = response.currentMoney;
|
||||
@@ -80,6 +84,7 @@ export default {
|
||||
this.imageUrl = this.imageUrl + `${currentUserName}.png`;
|
||||
this.userName = GetCookie("SpUserName");
|
||||
this.auth = true;
|
||||
this.authtoken = GetCookie('AUTHTOKEN')
|
||||
} else {
|
||||
this.auth = false;
|
||||
this.balance = 0;
|
||||
@@ -101,6 +106,7 @@ export default {
|
||||
this.imageUrl = this.imageUrl + `${currentUserName}.png`;
|
||||
this.userName = GetCookie("SpUserName");
|
||||
this.auth = true;
|
||||
this.authtoken = GetCookie('AUTHTOKEN')
|
||||
} else {
|
||||
this.auth = false;
|
||||
this.balance = 0;
|
||||
@@ -121,12 +127,12 @@ export default {
|
||||
<div class="header__nav">
|
||||
<nav>
|
||||
<a href="#" @click="$router.push({ name: 'home' })" :class="{ 'header__nav--now' : $route.name === 'home' }">Главная</a>
|
||||
<a href="#" @click="$router.push({ name: 'profile' })" :class="{ 'header__nav--now' : $route.name === 'profile' }">Профиль</a>
|
||||
<a v-if="authtoken !== ''" href="#" @click="$router.push({ name: 'profile' })" :class="{ 'header__nav--now' : $route.name === 'profile' }">Профиль</a>
|
||||
<a href="#">Помощь</a>
|
||||
</nav>
|
||||
</div>
|
||||
<div class="header__balance">
|
||||
<div class="header__content--balance">
|
||||
<div class="header__content--balance" v-if="authtoken">
|
||||
<div class="header__card--balance">
|
||||
<h2>
|
||||
<img src="../assets/icons-header/diamond-ore-icon.png" />{{
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<template>
|
||||
<div class="notification" v-if="notification">
|
||||
<div class="notification__content">
|
||||
<h3>Успешный вывод!</h3>
|
||||
<h3>Операция вывода отправлена</h3>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -8,12 +8,15 @@
|
||||
/>
|
||||
</div>
|
||||
<div v-if="payments" class="payments-modal__deposit">
|
||||
<div class="error-deposit" v-if="errorDeposit">
|
||||
<h2>Ошибка с суммой депозита</h2>
|
||||
</div>
|
||||
<div
|
||||
class="deposit-input deposit-text deposit-icon-diamond deposit-icon__input"
|
||||
>
|
||||
<h3>Сумма пополнения</h3>
|
||||
<img src="@/assets/icons-games/saper-game/icon-diamond-ore-saper.png" />
|
||||
<input class="deposit-amount__input" v-model="amount" type="number" />
|
||||
<input :class="{ 'animate-start-btn' : errorDeposit }" class="deposit-amount__input" v-model="amount" type="number" />
|
||||
<div class="deposit-btns">
|
||||
<ul class="display-btns btns-style-diamonds">
|
||||
<li v-for="number in PaymentsModalNumbers" :key="number">
|
||||
@@ -36,9 +39,12 @@
|
||||
<div class="deposit-promocode deposit-promocode__padding--input">
|
||||
<h3>Промокод</h3>
|
||||
<input @focusout="checkValidationPromocode" v-model="promocode" class="promo-input" type="text" />
|
||||
</div>
|
||||
<div class="error-checkbox" v-if="errorAgree">
|
||||
<h2>Подтвердите согласие!</h2>
|
||||
</div>
|
||||
<div class="deposit-checkbox checkbox-styles">
|
||||
<input @click="agreeUser = !agreeUser" type="checkbox" />
|
||||
<input @click="agreeUser = !agreeUser" type="checkbox" :class="{ 'animate-start-btn' : errorAgree }" />
|
||||
<h3>Я согласен с пользовательским соглашением.</h3>
|
||||
</div>
|
||||
<div
|
||||
@@ -49,7 +55,6 @@
|
||||
</p>
|
||||
<button
|
||||
type="submit"
|
||||
:disabled="checkOffBtn"
|
||||
@click="RedirectedMethodDep"
|
||||
>
|
||||
Пополнить
|
||||
@@ -62,22 +67,31 @@
|
||||
</div>
|
||||
</div>
|
||||
<div v-else class="payments-modal__withdraw deposit-text withdraw-input">
|
||||
<div class="error-deposit" v-if="errorDeposit">
|
||||
<h2>Ошибка с суммой депозита</h2>
|
||||
</div>
|
||||
<div class="count-withdraw deposit-icon-diamond">
|
||||
<h3>Сумма вывода</h3>
|
||||
<img src="@/assets/icons-games/saper-game/icon-diamond-ore-saper.png" />
|
||||
<input class="with-input" v-model="amountWithdraw" type="number" />
|
||||
<input :class="{ 'animate-start-btn' : errorDeposit }" class="with-input" v-model="amountWithdraw" type="number" />
|
||||
</div>
|
||||
<div class="error-card" v-if="errorCard">
|
||||
<h2>Ошибка с вводом карты</h2>
|
||||
</div>
|
||||
<div class="number-card deposit-promocode__padding--input">
|
||||
<h3>Введите номер карты</h3>
|
||||
<input class="with-input" v-model="card" type="text" />
|
||||
<input :class="{ 'animate-start-btn' : errorCard }" class="with-input" v-model="card" type="text" />
|
||||
</div>
|
||||
<div v-if="offAgree" class="error-checkbox">
|
||||
<h2 v-show="errorAgree">Введите сначало карту</h2>
|
||||
<div class="error-checkbox" v-if="errorAgree">
|
||||
<h2>Подтвердите согласие!</h2>
|
||||
</div>
|
||||
<div class="withdraw-checkbox checkbox-styles">
|
||||
<input :disabled="offAgree" @mouseover="errorAgree = true" @mouseleave="errorAgree = false" @click="agreeUser = !agreeUser" type="checkbox"/>
|
||||
<input @click="agreeUser = !agreeUser" type="checkbox"/>
|
||||
<h3>Я согласен с пользовательским соглашением.</h3>
|
||||
</div>
|
||||
<div class="error-captcha" v-if="errorCaptcha && agreeUser === true">
|
||||
<h2>Пройдите проверку!</h2>
|
||||
</div>
|
||||
<captcha-component @captchatokendata="claimCaptchaToken" :showcaptcha="agreeUser" @captchadata="closeModal"></captcha-component>
|
||||
<div
|
||||
class="btn-withdraw btn-text-style btn-display-deposit btn-style-payments"
|
||||
@@ -85,7 +99,7 @@
|
||||
<p>
|
||||
Вы подтверждаете правильность введенных данных при создании вывода.
|
||||
</p>
|
||||
<button type="submit" :disabled="checkOffBtn" @click="RedirectedMethodTransferMoneyToSp">
|
||||
<button type="submit" @click="RedirectedMethodTransferMoneyToSp">
|
||||
Вывод
|
||||
</button>
|
||||
<p>
|
||||
@@ -103,13 +117,21 @@ import PaymentsModalNumbers from "@/mocks/PaymentsModalNumbers";
|
||||
import { GettingMoneyOperation, WithdrawMoneyOperation } from "@/assets/js/moneyoperation/Claimmoney";
|
||||
import CaptchaComponent from "@/components/CaptchaComponent.vue";
|
||||
|
||||
import {eventBus} from "@/main";
|
||||
|
||||
import { useVuelidate } from '@vuelidate/core'
|
||||
import {maxValue, minValue, required, numeric, integer, minLength, maxLength} from "@vuelidate/validators";
|
||||
import {GetCurrentMoney} from "@/assets/js/rest/RestMethods";
|
||||
import {GetCookie} from "@/assets/js/storage/CookieStorage";
|
||||
|
||||
export default {
|
||||
components: { CaptchaComponent },
|
||||
props: ["payments"],
|
||||
data() {
|
||||
return {
|
||||
amount: 0,
|
||||
amountWithdraw: 1,
|
||||
amountWithdraw: 0,
|
||||
balance: 0,
|
||||
amountSave: 1,
|
||||
card: '',
|
||||
promocode: '',
|
||||
@@ -117,6 +139,9 @@ export default {
|
||||
errorPromocode: false,
|
||||
showPromocodeStatus: false,
|
||||
errorAgree: false,
|
||||
errorDeposit: false,
|
||||
errorCard: false,
|
||||
errorCaptcha: false,
|
||||
captchaToken: null,
|
||||
clickedBtn: "",
|
||||
url: "",
|
||||
@@ -132,45 +157,61 @@ export default {
|
||||
PaymentsModalNumbers,
|
||||
};
|
||||
},
|
||||
created() {
|
||||
GetCurrentMoney(GetCookie("AUTHTOKEN"), GetCookie("SearchToken"))
|
||||
.then(response => {
|
||||
this.balance = response.currentMoney
|
||||
})
|
||||
},
|
||||
setup() {
|
||||
return { v$: useVuelidate() }
|
||||
},
|
||||
validations() {
|
||||
return {
|
||||
amount: { required, numeric, minValue: minValue(1), integer },
|
||||
amountWithdraw: { required, numeric, minValue: minValue(1), maxValue: maxValue(this.balance), integer },
|
||||
card: { required, numeric, minLength: minLength(5), maxLength: maxLength(5), integer }
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
amount(newAmount) {
|
||||
this.offBtn = true;
|
||||
if (this.amount > 0 && this.amount !== "") {
|
||||
setTimeout(() => {
|
||||
try {
|
||||
GettingMoneyOperation(newAmount).then((response) => {
|
||||
console.log("Payments Modal Working!: ", response);
|
||||
this.url = response;
|
||||
this.offBtn = false;
|
||||
});
|
||||
} catch (e) {
|
||||
console.error("Error in PaymentModal!", e);
|
||||
}
|
||||
}, 2000);
|
||||
}
|
||||
},
|
||||
amountWithdraw(newAmount) {
|
||||
this.completeValidtaion.amountsaving = false
|
||||
if (newAmount > 0) {
|
||||
this.amountSave = newAmount
|
||||
this.completeValidtaion.amountsaving = true
|
||||
console.log(this.completeValidtaion)
|
||||
}
|
||||
},
|
||||
card(newAmount) {
|
||||
this.completeValidtaion.cardsaving = false
|
||||
const cardPattern = /^\d{5}$/;
|
||||
if(cardPattern.test(newAmount)) {
|
||||
this.offAgree = false
|
||||
this.completeValidtaion.cardsaving = true
|
||||
}
|
||||
},
|
||||
agreeUser(newAgree) {
|
||||
this.completeValidtaion.agreesaving = false
|
||||
if (newAgree !== false) {
|
||||
this.completeValidtaion.agreesaving = true
|
||||
}
|
||||
},
|
||||
// amount(newAmount) {
|
||||
// this.offBtn = true;
|
||||
// if (this.amount > 0 && this.amount !== "") {
|
||||
// setTimeout(() => {
|
||||
// try {
|
||||
// GettingMoneyOperation(newAmount).then((response) => {
|
||||
// console.log("Payments Modal Working!: ", response);
|
||||
// this.url = response;
|
||||
// this.offBtn = false;
|
||||
// });
|
||||
// } catch (e) {
|
||||
// console.error("Error in PaymentModal!", e);
|
||||
// }
|
||||
// }, 2000);
|
||||
// }
|
||||
// },
|
||||
// amountWithdraw(newAmount) {
|
||||
// this.completeValidtaion.amountsaving = false
|
||||
// if (newAmount > 0) {
|
||||
// this.amountSave = newAmount
|
||||
// this.completeValidtaion.amountsaving = true
|
||||
// console.log(this.completeValidtaion)
|
||||
// }
|
||||
// },
|
||||
// card(newAmount) {
|
||||
// this.completeValidtaion.cardsaving = false
|
||||
// const cardPattern = /^\d{5}$/;
|
||||
// if(cardPattern.test(newAmount)) {
|
||||
// this.offAgree = false
|
||||
// this.completeValidtaion.cardsaving = true
|
||||
// }
|
||||
// },
|
||||
// agreeUser(newAgree) {
|
||||
// this.completeValidtaion.agreesaving = false
|
||||
// if (newAgree !== false) {
|
||||
// this.completeValidtaion.agreesaving = true
|
||||
// }
|
||||
// },
|
||||
completeValidtaion: {
|
||||
handler() {
|
||||
this.completeValidationCheck()
|
||||
@@ -207,31 +248,100 @@ export default {
|
||||
this.captchaToken = Token
|
||||
this.completeValidtaion.captchatokensaving = true
|
||||
},
|
||||
RedirectedMethodDep() {
|
||||
console.log(`From /profile to - ${this.url} url`)
|
||||
window.location.href = this.url
|
||||
},
|
||||
async RedirectedMethodTransferMoneyToSp() {
|
||||
setTimeout(async () => {
|
||||
async RedirectedMethodDep() {
|
||||
this.v$.$touch()
|
||||
|
||||
if (this.v$.amount.$error) {
|
||||
this.errorDeposit = true
|
||||
|
||||
setTimeout(() => {
|
||||
this.errorDeposit = false
|
||||
}, 1500)
|
||||
}
|
||||
if (this.agreeUser !== true) {
|
||||
this.errorAgree = true
|
||||
setTimeout(() => {
|
||||
this.errorAgree = false
|
||||
}, 1500)
|
||||
}
|
||||
if (!this.v$.amount.$error && this.agreeUser === true) {
|
||||
try {
|
||||
WithdrawMoneyOperation(this.amountSave, this.card.toString(), this.captchaToken).then((response) => {
|
||||
console.log(`work withdraw - ${response}`)
|
||||
})
|
||||
}
|
||||
catch (e) {
|
||||
console.error(`Error in wihdrawmoney operation - ${e}`)
|
||||
}
|
||||
await this.$emit('notifacetionmoney')
|
||||
}, 4000)
|
||||
},
|
||||
checkBtn() {
|
||||
if (this.offBtn === false) {
|
||||
if (this.agreeUser !== false) {
|
||||
return false;
|
||||
GettingMoneyOperation(this.amount).then((response) => {
|
||||
console.log("Payments Modal Working!: ", response);
|
||||
this.url = response;
|
||||
this.offBtn = false;
|
||||
|
||||
window.location.href = this.url
|
||||
});
|
||||
} catch (e) {
|
||||
console.error("Error in PaymentModal!", e);
|
||||
}
|
||||
}
|
||||
return true;
|
||||
},
|
||||
async RedirectedMethodTransferMoneyToSp() {
|
||||
// setTimeout(async () => {
|
||||
// try {
|
||||
// WithdrawMoneyOperation(this.amountSave, this.card.toString(), this.captchaToken).then((response) => {
|
||||
// console.log(`work withdraw - ${response}`)
|
||||
// })
|
||||
// }
|
||||
// catch (e) {
|
||||
// console.error(`Error in wihdrawmoney operation - ${e}`)
|
||||
// }
|
||||
// await this.$emit('notifacetionmoney')
|
||||
// }, 4000)
|
||||
this.v$.$touch()
|
||||
|
||||
if (this.v$.amountWithdraw.$error) {
|
||||
this.errorDeposit = true
|
||||
|
||||
setTimeout(() => {
|
||||
this.errorDeposit = false
|
||||
}, 1500)
|
||||
}
|
||||
if (this.v$.card.$error) {
|
||||
this.errorCard = true
|
||||
|
||||
setTimeout(() => {
|
||||
this.errorCard = false
|
||||
}, 1500)
|
||||
}
|
||||
if (this.agreeUser !== true) {
|
||||
this.errorAgree = true
|
||||
|
||||
setTimeout(() => {
|
||||
this.errorAgree = false
|
||||
}, 1500)
|
||||
}
|
||||
if (this.captchaToken === null) {
|
||||
this.errorCaptcha = true
|
||||
|
||||
setTimeout(() => {
|
||||
this.errorCaptcha = false
|
||||
}, 1500)
|
||||
}
|
||||
if (!this.v$.amountWithdraw.$error && !this.v$.card.$error && this.agreeUser === true && this.captchaToken !== null) {
|
||||
WithdrawMoneyOperation(this.amountWithdraw, this.card.toString(), this.captchaToken)
|
||||
.then(async response => {
|
||||
try {
|
||||
console.log('work', response)
|
||||
}
|
||||
catch (e) {
|
||||
console.error(e)
|
||||
}
|
||||
await this.$emit('notifacetionmoney')
|
||||
eventBus.emit('Updatebalance')
|
||||
})
|
||||
}
|
||||
},
|
||||
// checkBtn() {
|
||||
// if (this.offBtn === false) {
|
||||
// if (this.agreeUser !== false) {
|
||||
// return false;
|
||||
// }
|
||||
// }
|
||||
// return true;
|
||||
// },
|
||||
clickedBtnChoice(index, content) {
|
||||
this.clickedBtn = index;
|
||||
this.amount = content;
|
||||
|
||||
@@ -329,7 +329,6 @@ export default {
|
||||
this.offEventPointers = false
|
||||
this.gameStart = false
|
||||
this.gamesCircle = 0
|
||||
this.flippedCards = []
|
||||
|
||||
this.claimWinningAmount()
|
||||
|
||||
@@ -381,6 +380,14 @@ export default {
|
||||
}
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
eventBus.on('Updatebalance-saper', () => {
|
||||
GetCurrentMoney(GetCookie("AUTHTOKEN"), GetCookie("SearchToken"))
|
||||
.then(response => {
|
||||
this.balance = response.currentMoney
|
||||
})
|
||||
})
|
||||
},
|
||||
methods: {
|
||||
clickPlayButton() {
|
||||
this.v$.$touch()
|
||||
@@ -388,10 +395,10 @@ export default {
|
||||
if (this.v$.amountDeposit.$error) {
|
||||
this.errorPlayButton()
|
||||
}
|
||||
else if (this.v$.amountCrystals.$error) {
|
||||
if (this.v$.amountCrystals.$error) {
|
||||
this.errorPlayButton()
|
||||
}
|
||||
else {
|
||||
if (!this.v$.amountCrystals.$error && !this.v$.amountDeposit.$error) {
|
||||
this.flippedCards = []
|
||||
this.unCorrectClick = []
|
||||
this.CorrectsClick = []
|
||||
@@ -423,12 +430,15 @@ export default {
|
||||
try {
|
||||
this.offEventPointers = false
|
||||
this.gameStart = false
|
||||
this.flippedCards = []
|
||||
this.unCorrectClick = []
|
||||
this.CorrectsClick = []
|
||||
this.gamesCircle = 0
|
||||
await GetWinningAmount({ SearchToken: GetCookie('SearchToken'), AuthToken: GetCookie('AUTHTOKEN') })
|
||||
this.winningAmount = 0
|
||||
|
||||
this.ValidationPlay.winGame = true
|
||||
setTimeout(() => {
|
||||
this.ValidationPlay.winGame = false
|
||||
}, 1500)
|
||||
|
||||
return eventBus.emit('Updatebalance')
|
||||
}
|
||||
catch (e) {
|
||||
@@ -481,7 +491,12 @@ export default {
|
||||
if (content === 'max') {
|
||||
await GetCurrentMoney(GetCookie('AUTHTOKEN'), GetCookie('SearchToken'))
|
||||
.then((response) => {
|
||||
this.amountDeposit = parseInt(response.currentMoney)
|
||||
console.log(response.currentMoney, this.balance)
|
||||
const responseBalance = response.currentMoney
|
||||
|
||||
if (responseBalance === this.balance) {
|
||||
this.amountDeposit = parseInt(responseBalance)
|
||||
}
|
||||
})
|
||||
}
|
||||
else {
|
||||
|
||||
Reference in New Issue
Block a user