mirror of
https://github.com/yawaflua/LuckyDiamond.git
synced 2026-02-05 02:34:13 +02:00
Merge branch 'DevelopMadara'
This commit is contained in:
@@ -81,7 +81,7 @@
|
||||
<ul>
|
||||
<li v-for="mode in twolinefirstelementGameMode" :key="mode">
|
||||
<div :class="'linecontent-' + mode.id">
|
||||
<h3 class="title-twoline">{{ mode.title }}</h3>
|
||||
<h3 class="title-twoline">скоро</h3>
|
||||
</div>
|
||||
<div class="container">
|
||||
<a href="#" class="line__btn"
|
||||
|
||||
@@ -2,11 +2,8 @@
|
||||
<profilemobile-page v-if="mobile"></profilemobile-page>
|
||||
<div class="content__grid-profile" v-else>
|
||||
<aside-bar-component></aside-bar-component>
|
||||
|
||||
<chat-component></chat-component>
|
||||
|
||||
<header-component></header-component>
|
||||
|
||||
<section class="profile">
|
||||
<div class="profile__content">
|
||||
<img class="profile__user--img" :src="imageUrl">
|
||||
@@ -16,6 +13,7 @@
|
||||
</div>
|
||||
<div class="profile__btns--payments">
|
||||
<a href="#" class="text-btn btn-bg btn-margin btn-display" @click="depositClick"><img class="icon-margin-deposit-withdraw" src="@/assets/icons-profile/icon-deposit.svg"> Пополнить</a>
|
||||
<a href="#" class="withdraw text-btn btn-bg btn-display" @click="claimDataDeposit(1000)"><img class="icon-margin-deposit-withdraw" src="@/assets/icons-profile/icon-withdraw.png"> Вывести</a>
|
||||
<a href="#" class="withdraw text-btn btn-bg btn-display" @click="withdrawClick"><img class="icon-margin-deposit-withdraw" src="@/assets/icons-profile/icon-withdraw.png"> Вывести</a>
|
||||
</div>
|
||||
</div>
|
||||
@@ -23,19 +21,28 @@
|
||||
<div class="payments__content">
|
||||
<div class="payments__types">
|
||||
<div class="types types-margin types-text">
|
||||
<h3>Игрок и вид транзакции</h3>
|
||||
<div class="playerandvid">
|
||||
<h3>Вид транзакции</h3>
|
||||
</div>
|
||||
<div class="data1">
|
||||
<h3>Дата</h3>
|
||||
</div>
|
||||
<div class="summa1">
|
||||
<h3>Сумма</h3>
|
||||
</div>
|
||||
</div>
|
||||
<div class="types-line"></div>
|
||||
</div>
|
||||
<div class="hisorypaymond">
|
||||
<div class="payments__history">
|
||||
<div class="payments__card" v-for="payment in arrayHistory" :key="payment.id">
|
||||
<div class="user-info">
|
||||
<img src="@/assets/icons-test/person-icon-profile-userinfo.png">
|
||||
<div class="user-name user-name__text">
|
||||
<div class="user-name user-name__text" :class="{ 'withdraw-color1': payment.name }">
|
||||
<h3>{{ payment.name }}</h3>
|
||||
<p>{{ payment.comment }}</p>
|
||||
</div>
|
||||
<div class="user-name1 user-name1__text">
|
||||
<h3>{{ payment.name1 }}</h3>
|
||||
</div>
|
||||
</div>
|
||||
<div class="data-info data-info__text">
|
||||
@@ -45,7 +52,9 @@
|
||||
<h3>{{ payment.amount }} АР</h3>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
@@ -53,19 +62,17 @@
|
||||
<notiicationwindow-component @notificationremove="NotificationMethod" :notification="notification"></notiicationwindow-component>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import AsideBarComponent from "@/components/AsidebarComponent.vue";
|
||||
import axios from 'axios';
|
||||
import ChatComponent from "@/components/ChatComponent.vue";
|
||||
import HeaderComponent from "@/components/HeaderComponent.vue";
|
||||
import PaymentsModal from "@/components/PaymentsModal.vue";
|
||||
import ProfilemobilePage from "@/pages/adaptive-pages/ProfilemobilePage.vue";
|
||||
import NotiicationwindowComponent from "@/components/NotiicationwindowComponent.vue";
|
||||
|
||||
import { GetCookie } from "@/assets/js/storage/CookieStorage";
|
||||
import '@/assets/css/PagesStyles/profile.css'
|
||||
import {GetCurrentMoney} from "@/assets/js/rest/RestMethods";
|
||||
|
||||
export default {
|
||||
components: {ProfilemobilePage, HeaderComponent, AsideBarComponent, ChatComponent, PaymentsModal, NotiicationwindowComponent },
|
||||
data() {
|
||||
@@ -80,18 +87,35 @@ export default {
|
||||
arrayHistory: [],
|
||||
}
|
||||
},
|
||||
|
||||
emits: ['notificationremove'],
|
||||
mounted() {
|
||||
this.checkWindowSize()
|
||||
|
||||
this.AddWindowListener()
|
||||
},
|
||||
beforeUnmount() {
|
||||
this.RemoveWindowListener()
|
||||
},
|
||||
created() {
|
||||
axios.post('https://spsystemcore20231122004605.azurewebsites.net/api/Payment/GetPaymentHistory', {
|
||||
searchToken: GetCookie('SearchToken'),
|
||||
authtoken: GetCookie('AUTHTOKEN')
|
||||
})
|
||||
.then(response => {
|
||||
// Обработка полученных данных
|
||||
const paymentHistory = response.data.paymentHistory;
|
||||
paymentHistory.forEach(payment => {
|
||||
if (payment.amount > 0) {
|
||||
this.claimDataDeposit(payment.amount,payment.utcDate); // Добавление депозита в историю
|
||||
} else {
|
||||
this.claimDataWithdraw(-payment.amount,payment.utcDate); // Добавление вывода в историю
|
||||
}
|
||||
});
|
||||
})
|
||||
.catch(error => {
|
||||
console.error('Error fetching hisorypaymond:', error);
|
||||
});
|
||||
this.username = GetCookie('SpUserName')
|
||||
|
||||
GetCurrentMoney(GetCookie('AUTHTOKEN'), GetCookie('SearchToken'))
|
||||
.then((response) => {
|
||||
this.balance = response.currentMoney
|
||||
@@ -100,7 +124,6 @@ export default {
|
||||
.catch((error) => {
|
||||
console.error('error in profile, get money', error)
|
||||
})
|
||||
|
||||
this.imageUrl = `https://avatar.spworlds.ru/front/256/${this.username}`
|
||||
},
|
||||
methods: {
|
||||
@@ -126,26 +149,55 @@ export default {
|
||||
const currentDate = new Date();
|
||||
return `${this.formatNumber(currentDate.getDate())}.${this.formatNumber(currentDate.getMonth() + 1)}.${currentDate.getFullYear()}, ${this.formatNumber(currentDate.getHours())}:${this.formatNumber(currentDate.getMinutes())}`;
|
||||
},
|
||||
claimDataDeposit(amount) {
|
||||
const historyPayments = {
|
||||
name: 'TEST USER',
|
||||
comment: 'test',
|
||||
data: this.getCurrentFormattedDate(),
|
||||
amount: amount
|
||||
}
|
||||
|
||||
this.arrayHistory.unshift(historyPayments)
|
||||
},
|
||||
claimDataWithdraw(amount) {
|
||||
const historyPayments = {
|
||||
name: 'TEST USER',
|
||||
comment: 'test',
|
||||
data: this.getCurrentFormattedDate(),
|
||||
amount: -amount
|
||||
}
|
||||
|
||||
this.arrayHistory.unshift(historyPayments)
|
||||
claimDataDeposit(amount, utcDate) {
|
||||
const historyPayments = {
|
||||
name1: 'Пополнение',
|
||||
data: this.formatTime(utcDate),
|
||||
amount: amount
|
||||
}
|
||||
|
||||
this.arrayHistory.unshift(historyPayments);
|
||||
},
|
||||
|
||||
claimDataWithdraw(amount, utcDate) {
|
||||
const historyPayments = {
|
||||
name: 'Вывод',
|
||||
data: this.formatTime(utcDate),
|
||||
amount: -amount
|
||||
}
|
||||
|
||||
this.arrayHistory.unshift(historyPayments);
|
||||
},
|
||||
|
||||
formatTime(utcDate) {
|
||||
const dateUTC = new Date(utcDate);
|
||||
const userTimeZone = Intl.DateTimeFormat().resolvedOptions().timeZone;
|
||||
const currentTime = new Date();
|
||||
const diffTime = currentTime - dateUTC;
|
||||
const diffDays = Math.floor(diffTime / (1000 * 60 * 60 * 24));
|
||||
const diffHours = Math.floor(diffTime / (1000 * 60 * 60));
|
||||
const diffMinuts = Math.floor(diffTime/(1000*60));
|
||||
|
||||
if (diffDays < 7)
|
||||
{
|
||||
if (diffDays > 0)
|
||||
{
|
||||
return `${diffDays} ${diffDays === 1 ? 'день' : 'дня'} назад`;
|
||||
}
|
||||
else if(diffHours >0)
|
||||
{
|
||||
return `${diffHours} ${diffHours === 1 ? 'час' : 'часа'} назад`;
|
||||
}
|
||||
else{
|
||||
return `${diffMinuts} ${diffMinuts === 1 ? 'минута' : 'минут'} назад`;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
return dateUTC.toLocaleString('ru-RU', { timeZone: userTimeZone });
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
</script>
|
||||
@@ -6,7 +6,16 @@
|
||||
|
||||
<header-component></header-component>
|
||||
|
||||
<section class="settings"></section>
|
||||
<section class="settings">
|
||||
|
||||
<div id="volume-control">
|
||||
<button id="volume-up" @click="volumeUp">+</button>
|
||||
<button id="volume-down" @click="volumeDown">-</button>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</section>
|
||||
|
||||
</div>
|
||||
</template>
|
||||
@@ -19,10 +28,42 @@ import HeaderComponent from "@/components/HeaderComponent.vue";
|
||||
import '@/assets/css/PagesStyles/settings.css'
|
||||
export default {
|
||||
components: {
|
||||
ChatComponent,
|
||||
HeaderComponent,
|
||||
AsideBarComponent
|
||||
}
|
||||
ChatComponent,
|
||||
HeaderComponent,
|
||||
AsideBarComponent
|
||||
},
|
||||
methods: {
|
||||
volumeUp() {
|
||||
var volume = document.getElementById("volume-indicator").value;
|
||||
if (volume) {
|
||||
volume += 10;
|
||||
|
||||
if (volume > 100) {
|
||||
volume = 100;
|
||||
}
|
||||
|
||||
document.getElementById("volume-indicator").value = volume;
|
||||
} else {
|
||||
console.error("Element with id 'volume-indicator' not found or does not have a value property.");
|
||||
}
|
||||
},
|
||||
// остальной код метода volumeDown()
|
||||
|
||||
volumeDown() {
|
||||
// Получить текущий уровень громкости
|
||||
var volume = document.getElementById("volume-indicator").value;
|
||||
|
||||
// Уменьшить уровень громкости на 10%
|
||||
volume -= 10;
|
||||
|
||||
// Убедиться, что уровень громкости не ниже 0%
|
||||
if (volume < 0) {
|
||||
volume = 0;
|
||||
}
|
||||
|
||||
// Установить новый уровень громкости
|
||||
document.getElementById("volume-indicator").value = volume;
|
||||
},
|
||||
},
|
||||
}
|
||||
</script>
|
||||
Reference in New Issue
Block a user