fix bug with money

This commit is contained in:
Hepatica
2023-12-02 16:19:33 +01:00
parent 9e2a7136f4
commit 7fb400b559

View File

@@ -48,36 +48,23 @@ export default {
console.log(response);
})
.catch((error) => {
// Обработка ошибки
console.error(error);
});
// let currentMoney = GetCurrentMoney(
// response.authtoken,
// response.searchToken
// );
// this.balance = currentMoney;
})
.catch(() => {
let currentUserName = GetCookie("SpUserName");
// let currentMoney = GetCurrentMoney(
// GetCookie("AUTHTOKEN"),
// GetCookie("SearchToken")
// ).then(response);
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;
} else {
this.auth = false;
@@ -98,6 +85,7 @@ export default {
if (currentUserName) {
this.imageUrl = this.imageUrl + `${currentUserName}.png`;
this.userName = GetCookie("SpUserName");
this.auth = true;
} else {
this.auth = false;