added connect for profile

This commit is contained in:
Kostya
2024-03-05 20:51:18 +03:00
parent 7e5cd1bbdc
commit 5dc51486a5
2 changed files with 25 additions and 5 deletions

View File

@@ -44,8 +44,11 @@ body {
} }
.macroinfo-profile img { .macroinfo-profile img {
width: 45%; width: 55%;
height: 100%; height: 100%;
background: #969c8d;
border-radius: 20px;
padding: 2%;
} }
.img-margin img { .img-margin img {

View File

@@ -6,11 +6,11 @@
<div class="profile-mobile__content"> <div class="profile-mobile__content">
<div class="macroinfo-profile text-default-mobile img-margin"> <div class="macroinfo-profile text-default-mobile img-margin">
<h2>Профиль</h2> <h2>Профиль</h2>
<img src="@/assets/icons-test/person-icon-profile-userinfo.png"> <img :src="imageUrl">
</div> </div>
<div class="info-profile"> <div class="info-profile">
<h3 class="text-nickname-user">Artmeka</h3> <h3 class="text-nickname-user">{{ username }}</h3>
<h3 class="balance-border balance-display balance-text"><img src="@/assets/icons-profile/icon-diamond-ore.png">999</h3> <h3 class="balance-border balance-display balance-text"><img src="@/assets/icons-profile/icon-diamond-ore.png">{{ balance }}</h3>
<div class="profile-mobile__btns-payments"> <div class="profile-mobile__btns-payments">
<a href="#" @click="paymetsCall('dep')" class="deposit-button"><img class="icon-margin-deposit-withdraw" src="@/assets/icons-profile/icon-deposit.svg"> Пополнить</a> <a href="#" @click="paymetsCall('dep')" class="deposit-button"><img class="icon-margin-deposit-withdraw" src="@/assets/icons-profile/icon-deposit.svg"> Пополнить</a>
<a href="#" @click="paymetsCall('with')" class="withdraw-button"><img class="icon-margin-deposit-withdraw" src="@/assets/icons-profile/icon-withdraw.png"> Вывести</a> <a href="#" @click="paymetsCall('with')" class="withdraw-button"><img class="icon-margin-deposit-withdraw" src="@/assets/icons-profile/icon-withdraw.png"> Вывести</a>
@@ -28,6 +28,9 @@ import HeaderMobileComponent from "@/components/adaptive-components/HeaderMobile
import MenuMobileComponent from "@/components/adaptive-components/MenuMobileComponent.vue"; import MenuMobileComponent from "@/components/adaptive-components/MenuMobileComponent.vue";
import PaymentsMobile from "@/components/adaptive-components/PaymentsMobile.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' import '@/assets/css/PagesStyles/adaptive-pages/profilemobile.css'
export default { export default {
@@ -36,8 +39,22 @@ export default {
return { return {
payments: { payments: {
paymentsWindow: false, 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: { methods: {