mirror of
https://github.com/yawaflua/LuckyDiamond.git
synced 2025-12-13 08:46:20 +02:00
Merge branch 'main' into DevelopCkutls
This commit is contained in:
@@ -9,7 +9,8 @@
|
||||
<!-- <div class="fotosloti"><a href="#"><img src="../assets/icons-menu/slots-icon.svg" ></a></div> -->
|
||||
<a href="#" @click="$router.push({ name: 'jackpot' })"><img class="menu__content--jackpot-icon" src="../assets/icons-menu/jackpot-icon.svg"></a>
|
||||
<a href="#" @click="$router.push({ name: 'crash' })"><img class="menu__content--cruch-icon" src="../assets/icons-menu/crush-icon.svg"></a>
|
||||
<a href="#"><img src="../assets/icons-menu/case-icon.png"></a>
|
||||
<a href="#" @click="$router.push({ name: 'double' })"><img class="menu__content--chest-icon" src="../assets/icons-menu/case-icon.png"></a>
|
||||
|
||||
<!-- <a href="#" @click="$router.push({ name: 'saper' })"><img class="menu__content--bomb-icon" src="../assets/icons-menu/bomb-icon.svg"></a> -->
|
||||
<a href="#" @click="$router.push({ name: 'saper' })"><img class="menu__content--bomb-icon" src="../assets/icons-menu/bomb-icon.svg"></a>
|
||||
</div>
|
||||
|
||||
@@ -29,6 +29,8 @@
|
||||
</li>
|
||||
</transition-group>
|
||||
</ul>
|
||||
|
||||
|
||||
</div>
|
||||
<writechat-component @send="ClaimDatamsg"></writechat-component>
|
||||
<!-- <div class="chat__mute-button">
|
||||
@@ -68,11 +70,11 @@ export default {
|
||||
},
|
||||
ClaimDatamsg(msg) {
|
||||
const now = Date.now();
|
||||
if (!this.lastMsgTime || now - this.lastMsgTime >= 2000) {
|
||||
if (!this.lastMsgTime || now - this.lastMsgTime >= 1000) {
|
||||
SendMessageToChat(msg[0]);
|
||||
this.lastMsgTime = now;
|
||||
} else {
|
||||
alert("Вы не можете отправлять сообщения чаще, чем раз в 2 секунды.");
|
||||
alert("Вы не можете отправлять сообщения так часто");
|
||||
}
|
||||
},
|
||||
muteChat() {
|
||||
@@ -135,5 +137,4 @@ export default {
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
</style>
|
||||
|
||||
@@ -115,7 +115,7 @@
|
||||
</div>
|
||||
<div class="withdraw-checkbox checkbox-styles">
|
||||
<input @click="agreeUser = !agreeUser" type="checkbox" />
|
||||
<h3>Я согласен с пользовательским соглашением.</h3>
|
||||
<h3>Я согласен <a href="https://docs.google.com/document/d/1lU_zTWJdD1lcMlIAFDIVz-DlZAoq3a-OFkoO8WBIkzo/edit?usp=sharing">пользовательским соглашением</a></h3>
|
||||
</div>
|
||||
<div class="error-captcha" v-if="errorCaptcha && agreeUser === true">
|
||||
<h2>Пройдите проверку!</h2>
|
||||
|
||||
167
luckydiamond/src/components/ReferalModal.vue
Normal file
167
luckydiamond/src/components/ReferalModal.vue
Normal file
@@ -0,0 +1,167 @@
|
||||
<template>
|
||||
<div class="payment-modal withdraw-modal">
|
||||
<div class="payments-modal__content close-modal__icon text-styles__margin">
|
||||
<h1>Рефералы</h1>
|
||||
<img @click="closeModal" src="@/assets/icons-other/icon-payments-modal-close.svg" />
|
||||
</div>
|
||||
<div class="payments-modal__deposit">
|
||||
<div class="error-deposit" v-if="errorDeposit">
|
||||
<h2>Ошибка с суммой депозита</h2>
|
||||
</div>
|
||||
<div
|
||||
class="deposit-input deposit-text referal-icon-diamond deposit-icon__input"
|
||||
>
|
||||
<br>
|
||||
<h3>Ваш реферальный код</h3>
|
||||
<input
|
||||
:class="{ 'animate-start-btn': errorDeposit }"
|
||||
readonly
|
||||
class="deposit-amount__input"
|
||||
v-if="referralData.referralCode"
|
||||
:value="referralData.referralCode"
|
||||
/>
|
||||
<br>
|
||||
<br>
|
||||
<h3>Доступно к выводу</h3>
|
||||
<img src="@/assets/icons-games/saper-game/icon-diamond-ore-saper.png" />
|
||||
<input
|
||||
:class="{ 'animate-start-btn': errorDeposit }"
|
||||
readonly
|
||||
class="deposit-amount__input"
|
||||
v-if="referralData.avalibleAmount !== 0"
|
||||
:value="referralData.avalibleAmount"
|
||||
/>
|
||||
<input
|
||||
:class="{ 'animate-start-btn': errorDeposit }"
|
||||
readonly
|
||||
class="deposit-amount__input"
|
||||
v-else
|
||||
:value="'0'"
|
||||
/>
|
||||
<div class="deposit-btns">
|
||||
<ul class="display-btns btns-style-diamonds">
|
||||
<li v-for="(number, index) in PaymentsModalNumbers" :key="index">
|
||||
<button
|
||||
@click="clickedBtnChoice(index, number.diamonds)"
|
||||
:class="{
|
||||
'btn-click': clickedBtn === index,
|
||||
[number]: clickedBtn === number,
|
||||
}"
|
||||
>
|
||||
{{ number.diamonds }}
|
||||
</button>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="deposit-promocode deposit-promocode__padding--input">
|
||||
<h3>Всего привели рефералов</h3>
|
||||
<div class="promokods">
|
||||
<input
|
||||
:class="{ 'animate-start-btn': errorDeposit }"
|
||||
readonly
|
||||
class="deposit-amount__input"
|
||||
v-if="referralData.activationsAmount !== 0"
|
||||
:value="referralData.activationsAmount"
|
||||
/>
|
||||
<input
|
||||
:class="{ 'animate-start-btn': errorDeposit }"
|
||||
readonly
|
||||
class="deposit-amount__input"
|
||||
v-else
|
||||
:value="'0'"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="error-checkbox" v-if="errorAgree">
|
||||
<h2>Подтвердите согласие!</h2>
|
||||
</div>
|
||||
<div class="deposit-checkbox checkbox-styles">
|
||||
<input
|
||||
@click="agreeUser = !agreeUser"
|
||||
type="checkbox"
|
||||
:class="{ 'animate-start-btn': errorAgree }"
|
||||
/>
|
||||
<h3>Я согласен с <a href="https://docs.google.com/document/d/1lU_zTWJdD1lcMlIAFDIVz-DlZAoq3a-OFkoO8WBIkzo/edit?usp=sharing">пользовательским соглашением</a></h3>
|
||||
</div>
|
||||
<div
|
||||
class="btn-deposit btn-text-style btn-display-deposit btn-style-payments"
|
||||
>
|
||||
<p>
|
||||
Вы подтверждаете правильность введенных данных при создании вывода.
|
||||
</p>
|
||||
<button type="submit" @click="handleWithdraw">Вывести</button>
|
||||
<p>
|
||||
Перед пополнение прочитайте политику конфиденциальности и
|
||||
пользовательское соглашение.
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import "@/assets/css/ComponentsStyles/payments-modal.css";
|
||||
import { GetReferralData } from "@/assets/js/Profile/Referrals";
|
||||
import { WithdrawReferralMoney } from "@/assets/js/Profile/Referrals";
|
||||
import { eventBus } from "@/main";
|
||||
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
referralData: {},
|
||||
errorDeposit: false,
|
||||
errorAgree: false,
|
||||
agreeUser: false,
|
||||
amount: 0,
|
||||
PaymentsModalNumbers: [],
|
||||
};
|
||||
},
|
||||
props: ["payments"],
|
||||
async created() {
|
||||
this.referralData = await GetReferralData();
|
||||
},
|
||||
computed: {
|
||||
avalibleAmountValue() {
|
||||
return this.referralData.avalibleAmount !== 0 ? this.referralData.avalibleAmount : '0';
|
||||
},
|
||||
activationsAmountValue() {
|
||||
return this.referralData.activationsAmount !== 0 ? this.referralData.activationsAmount : '0';
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
async handleWithdraw() {
|
||||
try {
|
||||
if (!this.agreeUser) {
|
||||
this.errorAgree = true;
|
||||
setTimeout(() => {
|
||||
this.errorAgree = false;
|
||||
}, 1500);
|
||||
return;
|
||||
}
|
||||
|
||||
if (this.referralData.avalibleAmount == 0) {
|
||||
window.alert("У вас нет денег на вывод :(");
|
||||
return;
|
||||
}
|
||||
|
||||
await WithdrawReferralMoney().then(async (response) => {
|
||||
try {
|
||||
console.log("work", response);
|
||||
} catch (e) {
|
||||
console.error(e);
|
||||
}
|
||||
await this.$emit("notifacetionmoney");
|
||||
eventBus.emit("Updatebalance");
|
||||
this.$emit("closemodal");
|
||||
});
|
||||
} catch (error) {
|
||||
console.error("Error withdrawing referral money:", error);
|
||||
}
|
||||
},
|
||||
closeModal() {
|
||||
this.$emit("closemodal");
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
Reference in New Issue
Block a user