mirror of
https://github.com/yawaflua/LuckyDiamond.git
synced 2025-12-08 19:29:27 +02:00
Adding more mobile features
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
<template>
|
||||
<div class="notification" v-if="notification">
|
||||
<div class="notification__content">
|
||||
<h3>Операция вывода отправлена</h3>
|
||||
<h3>{{ text }}</h3>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
@@ -11,7 +11,8 @@ import '@/assets/css/ComponentsStyles/notification.css'
|
||||
|
||||
export default {
|
||||
props: {
|
||||
notification: Boolean
|
||||
notification: Boolean,
|
||||
text: String,
|
||||
},
|
||||
emits: ['notificationremove'],
|
||||
methods: {
|
||||
|
||||
@@ -25,6 +25,16 @@
|
||||
|
||||
<script>
|
||||
import '@/assets/css/ComponentsStyles/AdaptiveStyles/headermobile.css'
|
||||
import { LogIn } from "@/assets/js/authentication/AuthService.js";
|
||||
import { GetCurrentMoney } from "@/assets/js/rest/RestMethods.js";
|
||||
|
||||
import { eventBus } from "@/main";
|
||||
|
||||
import {
|
||||
SetCookie,
|
||||
GetCookie,
|
||||
DeleteAllCookie,
|
||||
} from "@/assets/js/storage/CookieStorage.js";
|
||||
export default {
|
||||
methods: {
|
||||
logout() {
|
||||
|
||||
@@ -2,12 +2,18 @@
|
||||
<footer class="footer-mobile">
|
||||
<div class="footer-mobile__content">
|
||||
<div class="footer-mobile__icons icons-size">
|
||||
<a href="#"><img class="icon-start" src="@/assets/icons-adaptive/home-adaptive/icon-home-menu.png"></a>
|
||||
<a href="#" @click="$router.push({ name: 'home' })"><img class="icon-start" src="@/assets/icons-adaptive/home-adaptive/icon-home-menu.png"></a>
|
||||
<a href="#" @click="$router.push({ name: 'profile' })"><img class="icon-center" src="@/assets/icons-adaptive/home-adaptive/icon-wallet-menu.svg"></a>
|
||||
<a href="#"><img class="icon-center" src="@/assets/icons-adaptive/home-adaptive/icon-chat-menu.png"></a>
|
||||
<a href="#"><img class="icon-center" src="@/assets/icons-adaptive/home-adaptive/icon-info-menu.png"></a>
|
||||
<a href="#"><img class="icon-end" src="@/assets/icons-adaptive/home-adaptive/icon-menu.png"></a>
|
||||
<a href="#" @click="this.chatOpened = !this.chatOpened"><img class="icon-center" src="@/assets/icons-adaptive/home-adaptive/icon-chat-menu.png"></a>
|
||||
<a href="#" @click="$router.push({ name: 'about'})"><img class="icon-center" src="@/assets/icons-adaptive/home-adaptive/icon-info-menu.png"></a>
|
||||
|
||||
|
||||
<a href="#" @click="this.menuOpened = !this.menuOpened"><img class="icon-end" src="@/assets/icons-adaptive/home-adaptive/icon-menu.png"></a>
|
||||
</div>
|
||||
<notiicationwindow-component @notificationremove="NotificationMethod" :notification="menuOpened == true" :text="Тест"></notiicationwindow-component>
|
||||
<div class="chat-component" v-if="chatOpened == true">
|
||||
<chat-component></chat-component>
|
||||
</div>
|
||||
</div>
|
||||
</footer>
|
||||
</template>
|
||||
@@ -15,7 +21,12 @@
|
||||
<script>
|
||||
import '@/assets/css/ComponentsStyles/AdaptiveStyles/menumobile.css'
|
||||
export default {
|
||||
|
||||
data() {
|
||||
return {
|
||||
chatOpened: false,
|
||||
menuOpened: false
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
|
||||
@@ -60,7 +60,7 @@
|
||||
</section>
|
||||
<referal-modal v-if="openRef" @notifacetionmoney="NotificationEventListener" @closemodal="openRef = false"></referal-modal>
|
||||
<payments-modal v-if="openModal" @notifacetionmoney="NotificationEventListener" @closemodal="openModal = false" :payments="payments"></payments-modal>
|
||||
<notiicationwindow-component @notificationremove="NotificationMethod" :notification="notification"></notiicationwindow-component>
|
||||
<notiicationwindow-component @notificationremove="NotificationMethod" :notification="notification" text="Операция проведена успешно"></notiicationwindow-component>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
|
||||
@@ -24,10 +24,12 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { GetCurrentMoney } from "@/assets/js/rest/RestMethods";
|
||||
import { GetCookie } from "@/assets/js/storage/CookieStorage";
|
||||
import HeaderMobileComponent from "@/components/adaptive-components/HeaderMobileComponent.vue";
|
||||
import MenuMobileComponent from "@/components/adaptive-components/MenuMobileComponent.vue";
|
||||
import PaymentsMobile from "@/components/adaptive-components/PaymentsMobile.vue";
|
||||
|
||||
import {eventBus} from "@/main"
|
||||
import '@/assets/css/PagesStyles/adaptive-pages/profilemobile.css'
|
||||
|
||||
export default {
|
||||
@@ -40,20 +42,6 @@ export default {
|
||||
paymentsClose() {
|
||||
this.payments.paymentsWindow = false
|
||||
},
|
||||
logout() {
|
||||
this.auth = false;
|
||||
this.balance = 0;
|
||||
this.authtoken = "";
|
||||
DeleteAllCookie();
|
||||
},
|
||||
updateBalanceMethod() {
|
||||
GetCurrentMoney(GetCookie("AUTHTOKEN"), GetCookie("SearchToken")).then(
|
||||
(response) => {
|
||||
this.balance = response.currentMoney;
|
||||
}
|
||||
);
|
||||
eventBus.emit("Updatebalance-saper");
|
||||
},
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
@@ -74,51 +62,6 @@ export default {
|
||||
});
|
||||
},
|
||||
created() {
|
||||
try {
|
||||
let authCode = this.$route.query.code;
|
||||
|
||||
if (authCode) {
|
||||
LogIn(authCode)
|
||||
.then((response) => {
|
||||
SetCookie("UserId", response.userId);
|
||||
SetCookie("SpUserName", response.spUserName);
|
||||
SetCookie("AUTHTOKEN", response.authtoken);
|
||||
SetCookie("SearchToken", response.searchToken);
|
||||
|
||||
this.imageUrl = this.imageUrl + `${response.spUserName}.png`;
|
||||
this.userName = response.spUserName;
|
||||
this.auth = true;
|
||||
this.authtoken = response.authtoken;
|
||||
GetCurrentMoney(GetCookie("AUTHTOKEN"), GetCookie("SearchToken"))
|
||||
.then((response) => {
|
||||
this.balance = response.currentMoney;
|
||||
})
|
||||
.catch((error) => {
|
||||
console.error(error);
|
||||
});
|
||||
})
|
||||
.catch(() => {
|
||||
let currentUserName = GetCookie("SpUserName");
|
||||
GetCurrentMoney(GetCookie("AUTHTOKEN"), GetCookie("SearchToken"))
|
||||
.then((response) => {
|
||||
this.balance = response.currentMoney;
|
||||
console.log(response);
|
||||
})
|
||||
.catch((error) => {
|
||||
console.error(error);
|
||||
});
|
||||
|
||||
if (currentUserName) {
|
||||
this.imageUrl = this.imageUrl + `${currentUserName}.png`;
|
||||
this.userName = GetCookie("SpUserName");
|
||||
this.auth = true;
|
||||
this.authtoken = GetCookie("AUTHTOKEN");
|
||||
} else {
|
||||
this.auth = false;
|
||||
this.balance = 0;
|
||||
}
|
||||
});
|
||||
} else {
|
||||
let currentUserName = GetCookie("SpUserName");
|
||||
GetCurrentMoney(GetCookie("AUTHTOKEN"), GetCookie("SearchToken"))
|
||||
.then((response) => {
|
||||
@@ -138,10 +81,7 @@ export default {
|
||||
this.auth = false;
|
||||
this.balance = 0;
|
||||
}
|
||||
}
|
||||
} catch (error) {
|
||||
console.error("Auth Code error:", error);
|
||||
}
|
||||
|
||||
},
|
||||
components: { HeaderMobileComponent, MenuMobileComponent, PaymentsMobile },
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user