diff --git a/.env.development b/.env.development index 419a9f5..b8abc9c 100644 --- a/.env.development +++ b/.env.development @@ -1,6 +1,6 @@ # API -# VUE_APP_API_URL = 'https://oauth-svr.cebggame.com/task' -VUE_APP_API_URL = 'http://192.168.100.22:3006' +VUE_APP_API_URL = 'https://oauth-svr.cebggame.com/task' +# VUE_APP_API_URL = 'http://192.168.100.22:3006' # VUE_APP_API_URL = 'http://127.0.0.1:3006/api' VUE_APP_WL_URL = 'https://nftwl.counterfire.games/wl_test' VUE_APP_CONFIG_URL = 'https://sepolia.infura.io/v3/b6bf7d3508c941499b10025c0776eaf8' diff --git a/src/utils/webapi.js b/src/utils/webapi.js index 583c643..2919d79 100644 --- a/src/utils/webapi.js +++ b/src/utils/webapi.js @@ -262,3 +262,9 @@ export const apiNftList = async () => { const url = `${API_BASE}/api/partner/nfts`; return httpPost(url, {}) } + +// 领取NFT holder 奖励 +export const apiClaimNft = async (contract) => { + const url = `${API_BASE}/api/partner/claim`; + return httpPost(url, {contract}) +} diff --git a/src/views/home/index.vue b/src/views/home/index.vue index f80da0d..e69c15d 100644 --- a/src/views/home/index.vue +++ b/src/views/home/index.vue @@ -455,7 +455,7 @@
-
Partner
+
Partner
激活码
@@ -501,9 +501,8 @@
-
Chick
-
Claim
-
+
Chick
+
@@ -703,7 +702,8 @@ import { apiGameStat, apiUsercheckin, apiEnhanceBox, - apiNftList + apiNftList, + apiClaimNft, } from "./../../utils/webapi.js"; import { sendToChain, sendHelp } from "./../../utils/chainapi.js"; import { Wallet } from "@/wallet/index.js"; @@ -1350,6 +1350,13 @@ export default { this.nftsList = res.data.data; }, + async generate() { + let res = await this.$axios.post(process.env.VUE_APP_API_URL + "/api/voucher/generate", + {num: 5}, + { headers: { Authorization: `Bearer ${this.token}` } }) + console.log(res.data.data) + }, + // 提交nft合作邀请码 submitCode() { if (this.token) { @@ -1362,7 +1369,13 @@ export default { } else { this.walletDialogVisible = true; } - } + }, + + // 领取NFT holder 奖励 + async chickNftClaim(contract) { + let res = await apiClaimNft(contract) + console.log('contract---------------------------------',res) + }, } };