mirror of
https://github.com/yawaflua/LuckyDiamond.git
synced 2025-12-10 12:19:31 +02:00
fix bugs
This commit is contained in:
@@ -40,7 +40,7 @@ export async function GetCurrentMoney(authToken, searchToken) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const data = await response.json();
|
const data = await response.json();
|
||||||
console.log(data); // Здесь вы можете обработать полученные данные
|
console.log(data);
|
||||||
return data;
|
return data;
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error('There was a problem with the fetch operation:', error);
|
console.error('There was a problem with the fetch operation:', error);
|
||||||
|
|||||||
@@ -42,24 +42,32 @@ export default {
|
|||||||
this.userName = response.spUserName;
|
this.userName = response.spUserName;
|
||||||
this.auth = true;
|
this.auth = true;
|
||||||
let currentMoney = GetCurrentMoney(
|
let currentMoney = GetCurrentMoney(
|
||||||
GetCookie("AuthToken"),
|
response.authtoken,
|
||||||
GetCookie("SearchToken")
|
response.searchToken
|
||||||
);
|
);
|
||||||
this.balance = currentMoney;
|
this.balance = currentMoney;
|
||||||
})
|
})
|
||||||
.catch((error) => {
|
.catch((error) => {
|
||||||
console.error("Auth Code error:", error);
|
let currentUserName = GetCookie("SpUserName");
|
||||||
|
let currentMoney = GetCurrentMoney(
|
||||||
|
GetCookie("AUTHTOKEN"),
|
||||||
|
GetCookie("SearchToken")
|
||||||
|
);
|
||||||
|
|
||||||
|
if (currentUserName) {
|
||||||
|
this.imageUrl = this.imageUrl + `${currentUserName}.png`;
|
||||||
|
this.auth = true;
|
||||||
|
this.balance = currentMoney;
|
||||||
|
} else {
|
||||||
|
this.auth = false;
|
||||||
|
}
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
let currentUserName = GetCookie("SpUserName");
|
let currentUserName = GetCookie("SpUserName");
|
||||||
let currentMoney = GetCurrentMoney(
|
let currentMoney = GetCurrentMoney(
|
||||||
GetCookie("AuthToken"),
|
GetCookie("AUTHTOKEN"),
|
||||||
GetCookie("SearchToken")
|
GetCookie("SearchToken")
|
||||||
);
|
);
|
||||||
// let currentMoney = GetCurrentMoney(
|
|
||||||
// "2405bf72008f835c9f5b336a84d3efbd7a742b828ca41fcaab1c40ca842e6425"
|
|
||||||
// );
|
|
||||||
// let currentMoney = GetCurrentMoney(GetCookie("AuthToken"));
|
|
||||||
|
|
||||||
if (currentUserName) {
|
if (currentUserName) {
|
||||||
this.imageUrl = this.imageUrl + `${currentUserName}.png`;
|
this.imageUrl = this.imageUrl + `${currentUserName}.png`;
|
||||||
|
|||||||
Reference in New Issue
Block a user