This commit is contained in:
Hepatica
2024-01-27 01:30:41 +01:00
5 changed files with 89 additions and 23 deletions

View File

@@ -3,6 +3,9 @@
import "@/assets/css/ComponentsStyles/header.css";
import { LogIn } from "@/assets/js/authentication/AuthService.js";
import { GetCurrentMoney } from "@/assets/js/rest/RestMethods.js";
import {eventBus} from "@/main";
import {
SetCookie,
GetCookie,
@@ -17,6 +20,12 @@ export default {
this.balance = 0;
DeleteAllCookie();
},
updateBalanceMethod() {
GetCurrentMoney(GetCookie("AUTHTOKEN"), GetCookie("SearchToken"))
.then(response => {
this.balance = response.currentMoney
})
}
},
data() {
return {
@@ -26,6 +35,11 @@ export default {
userName: "",
};
},
mounted() {
eventBus.on('Updatebalance', () => {
this.updateBalanceMethod()
})
},
created() {
try {
let authCode = this.$route.query.code;