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