From 5dc51486a5ebd9477291baed13446271dd30e232 Mon Sep 17 00:00:00 2001 From: Kostya Date: Tue, 5 Mar 2024 20:51:18 +0300 Subject: [PATCH] added connect for profile --- .../adaptive-pages/profilemobile.css | 5 +++- .../adaptive-pages/ProfilemobilePage.vue | 25 ++++++++++++++++--- 2 files changed, 25 insertions(+), 5 deletions(-) diff --git a/luckydiamond/src/assets/css/PagesStyles/adaptive-pages/profilemobile.css b/luckydiamond/src/assets/css/PagesStyles/adaptive-pages/profilemobile.css index d2cdb8e..85eb240 100644 --- a/luckydiamond/src/assets/css/PagesStyles/adaptive-pages/profilemobile.css +++ b/luckydiamond/src/assets/css/PagesStyles/adaptive-pages/profilemobile.css @@ -44,8 +44,11 @@ body { } .macroinfo-profile img { - width: 45%; + width: 55%; height: 100%; + background: #969c8d; + border-radius: 20px; + padding: 2%; } .img-margin img { diff --git a/luckydiamond/src/pages/adaptive-pages/ProfilemobilePage.vue b/luckydiamond/src/pages/adaptive-pages/ProfilemobilePage.vue index aa2d89a..975f8fe 100644 --- a/luckydiamond/src/pages/adaptive-pages/ProfilemobilePage.vue +++ b/luckydiamond/src/pages/adaptive-pages/ProfilemobilePage.vue @@ -6,11 +6,11 @@

Профиль

- +
-

Artmeka

-

999

+

{{ username }}

+

{{ balance }}

Пополнить Вывести @@ -28,6 +28,9 @@ import HeaderMobileComponent from "@/components/adaptive-components/HeaderMobile import MenuMobileComponent from "@/components/adaptive-components/MenuMobileComponent.vue"; import PaymentsMobile from "@/components/adaptive-components/PaymentsMobile.vue"; +import { GetCookie } from "@/assets/js/storage/CookieStorage"; +import {GetCurrentMoney} from "@/assets/js/rest/RestMethods"; + import '@/assets/css/PagesStyles/adaptive-pages/profilemobile.css' export default { @@ -36,8 +39,22 @@ export default { return { payments: { paymentsWindow: false, - paymentsView: false + paymentsView: false, }, + username: 'Artemka', + imageUrl: '', + balance: 0 + } + }, + created() { + if (GetCookie('AUTHTOKEN') && GetCookie('SearchToken')) { + this.username = GetCookie('SpUserName') + GetCurrentMoney(GetCookie('AUTHTOKEN'), GetCookie('SearchToken')) + .then((response) => { + this.balance = response.currentMoney + }) + + this.imageUrl = `https://avatar.spworlds.ru/front/256/${this.username}` } }, methods: {