新增NFT合作方功能(领取奖励未完成)
This commit is contained in:
parent
87c1ee2c7f
commit
5f0e7816e2
@ -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'
|
||||
|
@ -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})
|
||||
}
|
||||
|
@ -455,7 +455,7 @@
|
||||
<div class="content-right" v-if="navIndex == 2">
|
||||
<div class="title">
|
||||
<div class="title-left">
|
||||
<div>Partner</div>
|
||||
<div>Partner</div> <el-button @click="generate">激活码</el-button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="check-code">
|
||||
@ -501,9 +501,8 @@
|
||||
</div>
|
||||
<div v-if="token != null" class="btn">
|
||||
<div class="is-btn">
|
||||
<div v-if="item.status == 0" @click="toPost(item)">Chick</div>
|
||||
<div v-else-if="item.status == 1" @click="toPost(item)">Claim</div>
|
||||
<div v-else-if="item.status == 3" class="check-yes">
|
||||
<div v-if="item.status == 0" @click="chickNftClaim(item.contract)">Chick</div>
|
||||
<div v-else-if="item.status == 1" class="check-yes">
|
||||
<img src="@/assets/home/check-yes.png" alt="">
|
||||
</div>
|
||||
</div>
|
||||
@ -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)
|
||||
},
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
Loading…
x
Reference in New Issue
Block a user