diff --git a/luckydiamond/src/assets/css/PagesStyles/profile.css b/luckydiamond/src/assets/css/PagesStyles/profile.css index 35480ac..720bc68 100644 --- a/luckydiamond/src/assets/css/PagesStyles/profile.css +++ b/luckydiamond/src/assets/css/PagesStyles/profile.css @@ -193,6 +193,39 @@ 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) { diff --git a/luckydiamond/src/components/PaymentsModal.vue b/luckydiamond/src/components/PaymentsModal.vue index 81120e4..83c3852 100644 --- a/luckydiamond/src/components/PaymentsModal.vue +++ b/luckydiamond/src/components/PaymentsModal.vue @@ -67,22 +67,31 @@
+
+

Ошибка с суммой депозита

+

Сумма вывода

- + +
+
+

Ошибка с вводом карты

Введите номер карты

- +
-
-

Введите сначало карту

+
+

Подтвердите согласие!

- +

Я согласен с пользовательским соглашением.

+
+

Пройдите проверку!

+
Вы подтверждаете правильность введенных данных при создании вывода.

-

@@ -109,7 +118,7 @@ import { GettingMoneyOperation, WithdrawMoneyOperation } from "@/assets/js/money import CaptchaComponent from "@/components/CaptchaComponent.vue"; import { useVuelidate } from '@vuelidate/core' -import { maxValue, minValue, required, numeric, integer } from "@vuelidate/validators"; +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"; @@ -119,7 +128,7 @@ export default { data() { return { amount: 0, - amountWithdraw: 1, + amountWithdraw: 0, balance: 0, amountSave: 1, card: '', @@ -129,6 +138,8 @@ export default { showPromocodeStatus: false, errorAgree: false, errorDeposit: false, + errorCard: false, + errorCaptcha: false, captchaToken: null, clickedBtn: "", url: "", @@ -157,7 +168,7 @@ export default { return { amount: { required, numeric, minValue: minValue(1), integer }, amountWithdraw: { required, numeric, minValue: minValue(1), maxValue: maxValue(this.balance), integer }, - card: { required, numeric, minValue: (6), maxValue: (6), integer } + card: { required, numeric, minLength: minLength(5), maxLength: maxLength(5), integer } } }, watch: { @@ -266,26 +277,68 @@ export default { } }, 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) - }, - checkBtn() { - if (this.offBtn === false) { - if (this.agreeUser !== false) { - return false; - } + // 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') + }) } - return true; }, + // checkBtn() { + // if (this.offBtn === false) { + // if (this.agreeUser !== false) { + // return false; + // } + // } + // return true; + // }, clickedBtnChoice(index, content) { this.clickedBtn = index; this.amount = content;