mirror of
https://github.com/yawaflua/LuckyDiamond.git
synced 2025-12-10 12:19:31 +02:00
add SettingsPage
This commit is contained in:
@@ -24,7 +24,7 @@
|
||||
<div class="payments__types">
|
||||
<div class="types types-margin types-text">
|
||||
<h3>Игрок и вид транзакции</h3>
|
||||
<h3>sdds</h3>
|
||||
<h3>Дата</h3>
|
||||
<h3>Сумма</h3>
|
||||
</div>
|
||||
<div class="types-line"></div>
|
||||
|
||||
114
luckydiamond/src/pages/SettingsPage.vue
Normal file
114
luckydiamond/src/pages/SettingsPage.vue
Normal file
@@ -0,0 +1,114 @@
|
||||
<template>
|
||||
<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">
|
||||
|
||||
</div>
|
||||
</section>
|
||||
<payments-modal v-if="openModal" @notifacetionmoney="NotificationEventListener" @closemodal="openModal = false" :payments="payments"></payments-modal>
|
||||
<notiicationwindow-component @notificationremove="NotificationMethod" :notification="notification"></notiicationwindow-component>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import AsideBarComponent from "@/components/AsidebarComponent.vue";
|
||||
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/SettingsPage.css'
|
||||
import {GetCurrentMoney} from "@/assets/js/rest/RestMethods";
|
||||
|
||||
export default {
|
||||
components: {ProfilemobilePage, HeaderComponent, AsideBarComponent, ChatComponent, PaymentsModal, NotiicationwindowComponent },
|
||||
data() {
|
||||
return {
|
||||
username: 'Artemka',
|
||||
imageUrl: '',
|
||||
notification: false,
|
||||
balance: 0,
|
||||
mobile: false,
|
||||
openModal: false,
|
||||
payments: true,
|
||||
arrayHistory: [],
|
||||
}
|
||||
},
|
||||
emits: ['notificationremove'],
|
||||
mounted() {
|
||||
this.checkWindowSize()
|
||||
|
||||
this.AddWindowListener()
|
||||
},
|
||||
beforeUnmount() {
|
||||
this.RemoveWindowListener()
|
||||
},
|
||||
created() {
|
||||
this.username = GetCookie('SpUserName')
|
||||
|
||||
GetCurrentMoney(GetCookie('AUTHTOKEN'), GetCookie('SearchToken'))
|
||||
.then((response) => {
|
||||
this.balance = response.currentMoney
|
||||
console.log('balance in profile', this.balance)
|
||||
})
|
||||
.catch((error) => {
|
||||
console.error('error in profile, get money', error)
|
||||
})
|
||||
|
||||
this.imageUrl = `https://avatar.spworlds.ru/front/256/${this.username}`
|
||||
},
|
||||
methods: {
|
||||
depositClick() {
|
||||
this.openModal = true
|
||||
this.payments = true
|
||||
},
|
||||
withdrawClick() {
|
||||
this.openModal = true
|
||||
this.payments = false
|
||||
},
|
||||
NotificationEventListener() {
|
||||
this.notification = true
|
||||
this.openModal = false
|
||||
},
|
||||
NotificationMethod() {
|
||||
this.notification = false
|
||||
}
|
||||
// formatNumber(number) {
|
||||
// return number < 10 ? `0${number}` : number;
|
||||
// },
|
||||
// getCurrentFormattedDate() {
|
||||
// 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)
|
||||
// }
|
||||
}
|
||||
}
|
||||
</script>
|
||||
Reference in New Issue
Block a user