mirror of
https://github.com/yawaflua/LuckyDiamond.git
synced 2026-02-04 18:24:14 +02:00
Merge branch 'main' of https://github.com/danilt2000/LuckyDiamond
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user