From 154b6b2dd51214144ba3a81aa425d48b538579c2 Mon Sep 17 00:00:00 2001 From: Hepatica Date: Sun, 21 Jan 2024 03:14:54 +0100 Subject: [PATCH] final test --- .../src/assets/js/games/saper/SaperAPI.js | 7 ++-- .../src/pages/games-pages/SapergamePage.vue | 38 +++++++++---------- 2 files changed, 22 insertions(+), 23 deletions(-) diff --git a/luckydiamond/src/assets/js/games/saper/SaperAPI.js b/luckydiamond/src/assets/js/games/saper/SaperAPI.js index 12aafc6..014bf9f 100644 --- a/luckydiamond/src/assets/js/games/saper/SaperAPI.js +++ b/luckydiamond/src/assets/js/games/saper/SaperAPI.js @@ -27,15 +27,15 @@ export async function GetPercentageSteps(CrystalsCount) { } } -export async function GetUserData(SearchToken, AUTHTOKEN) { +export async function GetUserData(AUTHTOKEN, SearchToken) { const data = { AUTHTOKEN: AUTHTOKEN, SearchToken: SearchToken - }; + }; try { - const response = await fetch(`${BackendApiUrl}/Payment/UserMoney`, { + const response = await fetch(`${BackendApiUrl}/GameMines/GetCurrentData`, { method: 'POST', headers: { 'Content-Type': 'application/json' @@ -48,7 +48,6 @@ export async function GetUserData(SearchToken, AUTHTOKEN) { console.log('Fetch error:', response.status) } - console.log(response) return await response.json() } catch (error) { diff --git a/luckydiamond/src/pages/games-pages/SapergamePage.vue b/luckydiamond/src/pages/games-pages/SapergamePage.vue index 291d333..f9dfbc1 100644 --- a/luckydiamond/src/pages/games-pages/SapergamePage.vue +++ b/luckydiamond/src/pages/games-pages/SapergamePage.vue @@ -175,29 +175,29 @@ export default { } }, - // created() { - // // const AUTHTOKEN = GetCookie('AUTHTOKEN') - // // const SEARCHTOKEN = GetCookie('SearchToken') + created() { + // const AUTHTOKEN = GetCookie('AUTHTOKEN') + // const SEARCHTOKEN = GetCookie('SearchToken') - // GetUserData(GetCookie("AUTHTOKEN"), GetCookie("SearchToken")) - // .then(response => { - // console.log(response) - // }) - // .catch((error) => { - // console.error(error); - // }); + GetUserData(GetCookie("AUTHTOKEN"), GetCookie("SearchToken")) + .then(response => { + console.log(response) + }) + .catch((error) => { + console.error(error); + }); - // // GetCurrentMoney(GetCookie("AUTHTOKEN"), GetCookie("SearchToken")) - // // .then((response) => { - // // this.balance = response.currentMoney; - // // console.log(response); - // // }) - // // .catch((error) => { - // // console.error(error); - // // }); + // GetCurrentMoney(GetCookie("AUTHTOKEN"), GetCookie("SearchToken")) + // .then((response) => { + // this.balance = response.currentMoney; + // console.log(response); + // }) + // .catch((error) => { + // console.error(error); + // }); - // }, + }, watch: { async amountDeposit(DiamondCount) { if (DiamondCount >= 1) {