final test

This commit is contained in:
Hepatica
2024-01-21 03:14:54 +01:00
parent 1e34ff841f
commit 154b6b2dd5
2 changed files with 22 additions and 23 deletions

View File

@@ -27,15 +27,15 @@ export async function GetPercentageSteps(CrystalsCount) {
} }
} }
export async function GetUserData(SearchToken, AUTHTOKEN) { export async function GetUserData(AUTHTOKEN, SearchToken) {
const data = { const data = {
AUTHTOKEN: AUTHTOKEN, AUTHTOKEN: AUTHTOKEN,
SearchToken: SearchToken SearchToken: SearchToken
}; };
try { try {
const response = await fetch(`${BackendApiUrl}/Payment/UserMoney`, { const response = await fetch(`${BackendApiUrl}/GameMines/GetCurrentData`, {
method: 'POST', method: 'POST',
headers: { headers: {
'Content-Type': 'application/json' 'Content-Type': 'application/json'
@@ -48,7 +48,6 @@ export async function GetUserData(SearchToken, AUTHTOKEN) {
console.log('Fetch error:', response.status) console.log('Fetch error:', response.status)
} }
console.log(response)
return await response.json() return await response.json()
} }
catch (error) { catch (error) {

View File

@@ -175,29 +175,29 @@ export default {
} }
}, },
// created() { created() {
// // const AUTHTOKEN = GetCookie('AUTHTOKEN') // const AUTHTOKEN = GetCookie('AUTHTOKEN')
// // const SEARCHTOKEN = GetCookie('SearchToken') // const SEARCHTOKEN = GetCookie('SearchToken')
// GetUserData(GetCookie("AUTHTOKEN"), GetCookie("SearchToken")) GetUserData(GetCookie("AUTHTOKEN"), GetCookie("SearchToken"))
// .then(response => { .then(response => {
// console.log(response) console.log(response)
// }) })
// .catch((error) => { .catch((error) => {
// console.error(error); console.error(error);
// }); });
// // GetCurrentMoney(GetCookie("AUTHTOKEN"), GetCookie("SearchToken")) // GetCurrentMoney(GetCookie("AUTHTOKEN"), GetCookie("SearchToken"))
// // .then((response) => { // .then((response) => {
// // this.balance = response.currentMoney; // this.balance = response.currentMoney;
// // console.log(response); // console.log(response);
// // }) // })
// // .catch((error) => { // .catch((error) => {
// // console.error(error); // console.error(error);
// // }); // });
// }, },
watch: { watch: {
async amountDeposit(DiamondCount) { async amountDeposit(DiamondCount) {
if (DiamondCount >= 1) { if (DiamondCount >= 1) {