nft 合作完成、新增X、DC重复链接提示
@ -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'
|
||||
|
BIN
src/assets/username/Asterix.jpg
Normal file
After Width: | Height: | Size: 4.0 KiB |
BIN
src/assets/username/Cheers Up.jpg
Normal file
After Width: | Height: | Size: 16 KiB |
BIN
src/assets/username/Cyberkongz.jpg
Normal file
After Width: | Height: | Size: 18 KiB |
BIN
src/assets/username/Delabs Games.jpg
Normal file
After Width: | Height: | Size: 15 KiB |
BIN
src/assets/username/Ink .jpg
Normal file
After Width: | Height: | Size: 20 KiB |
BIN
src/assets/username/L3E7.jpg
Normal file
After Width: | Height: | Size: 11 KiB |
BIN
src/assets/username/Llamaverse.jpg
Normal file
After Width: | Height: | Size: 30 KiB |
BIN
src/assets/username/Matr1x.jpg
Normal file
After Width: | Height: | Size: 11 KiB |
BIN
src/assets/username/Memeland.jpg
Normal file
After Width: | Height: | Size: 9.5 KiB |
BIN
src/assets/username/Metacene.jpg
Normal file
After Width: | Height: | Size: 46 KiB |
BIN
src/assets/username/Mofu Mofu.jpg
Normal file
After Width: | Height: | Size: 17 KiB |
BIN
src/assets/username/Neo Tokyo.jpg
Normal file
After Width: | Height: | Size: 9.8 KiB |
BIN
src/assets/username/PG.jpg
Normal file
After Width: | Height: | Size: 8.4 KiB |
BIN
src/assets/username/Pirate Nation.jpg
Normal file
After Width: | Height: | Size: 20 KiB |
BIN
src/assets/username/Pixelmon.jpg
Normal file
After Width: | Height: | Size: 5.9 KiB |
BIN
src/assets/username/Space Nation.jpg
Normal file
After Width: | Height: | Size: 7.6 KiB |
BIN
src/assets/username/Test.jpg
Normal file
After Width: | Height: | Size: 624 B |
BIN
src/assets/username/Today.jpg
Normal file
After Width: | Height: | Size: 8.7 KiB |
BIN
src/assets/username/Ultiverse.jpg
Normal file
After Width: | Height: | Size: 15 KiB |
BIN
src/assets/username/Weirdo Ghost Gang.jpg
Normal file
After Width: | Height: | Size: 17 KiB |
BIN
src/assets/username/WolvesDAO.jpg
Normal file
After Width: | Height: | Size: 19 KiB |
BIN
src/assets/username/ZooVerse.jpg
Normal file
After Width: | Height: | Size: 24 KiB |
@ -20,9 +20,16 @@ export default {
|
||||
methods: {
|
||||
async beginAction() {
|
||||
try {
|
||||
let { errcode, data } = await apiCheckActivity(this.dataid);
|
||||
let { errcode, errmsg, data } = await apiCheckActivity(this.dataid);
|
||||
if (errcode !== 0) {
|
||||
this.beginCountdown();
|
||||
if(errmsg == 'twitter already binded') {
|
||||
this.$showErr('twitter already binded')
|
||||
} else if(errmsg == 'discord already binded to another account') {
|
||||
this.$showErr('discord already binded to another account')
|
||||
} else {
|
||||
this.beginCountdown();
|
||||
this.$showErr('Please try again')
|
||||
}
|
||||
return;
|
||||
}
|
||||
if (data.status === 2) {
|
||||
|
@ -21,7 +21,7 @@ let errmsg = err
|
||||
} else if(errmsg.indexOf('Hash: not available') > -1) {
|
||||
errmsg = `Operation timed out. Please retry.`
|
||||
} else if(errmsg.indexOf('chest already opened') > -1) {
|
||||
errmsg = 'chest already opened'
|
||||
errmsg = 'This chest has been opened already'
|
||||
} else if(errmsg.indexOf('check error: not found guild') > -1) {
|
||||
errmsg = 'Transaction failed please try again'
|
||||
} else if(errmsg.indexOf('execution reverted: TreasureHunt: paused') > -1) {
|
||||
@ -29,19 +29,32 @@ let errmsg = err
|
||||
} else if(errmsg.indexOf('waiting for chain confirm') > -1) {
|
||||
errmsg = 'waiting for chain confirm'
|
||||
} else if(errmsg.indexOf('voucher not found') > -1) {
|
||||
errmsg = 'Code invalid or already redeemed'
|
||||
errmsg = 'Invalid Redemption Code'
|
||||
} else if(errmsg.indexOf('Can not be empty') > -1) {
|
||||
errmsg = 'Redemption Code is required'
|
||||
} else if(errmsg.indexOf('need connect discord first') > -1) {
|
||||
errmsg = `Discord account unlinked. Please ensure the 'Connect Your Discord' quest is complete.`
|
||||
} else if(errmsg.indexOf("You do not hold the required role in the 'Ink' Discord server") > -1) {
|
||||
errmsg = `You do not hold the required role in the 'Ink' Discord server`
|
||||
} else if(errmsg.indexOf("You do not hold the required role in the 'Counter Fire' Discord server") > -1) {
|
||||
errmsg = `"You do not hold the required role in the 'Counter Fire' Discord server"`
|
||||
} else if(errmsg.indexOf('Invalid Voucher Code') > -1) {
|
||||
errmsg = 'Invalid Redemption Code'
|
||||
} else if(errmsg.indexOf('voucher already used') > -1) {
|
||||
errmsg = 'Redemption Code has already been used'
|
||||
} else if(errmsg.indexOf('already claimed') > -1) {
|
||||
errmsg = 'This reward chest has been claimed already'
|
||||
} else if(errmsg.indexOf('had no role') > -1) {
|
||||
errmsg = 'You do not hold the required role in the "Counter Fire" Discord server'
|
||||
} else if(errmsg.indexOf('have not join guild') > -1) {
|
||||
errmsg = 'You do not hold the required role in the "Counter Fire" Discord server'
|
||||
} else if(errmsg.indexOf('twitter already binded') > -1) {
|
||||
errmsg = 'This X account has already been linked'
|
||||
} else if(errmsg.indexOf('discord already binded to another account') > -1) {
|
||||
errmsg = 'This Discord account has already been linked'
|
||||
} else {
|
||||
// 请重试
|
||||
errmsg = 'Please try again'
|
||||
}
|
||||
|
||||
const _confirm = new iErrorMessage({
|
||||
|
@ -42,7 +42,7 @@
|
||||
<div class="icon">
|
||||
<img src="./../../assets/box/Icon_history.png" alt="">
|
||||
</div>
|
||||
<div>History Records</div>
|
||||
<div>Historical Records</div>
|
||||
</div>
|
||||
<div class="btn" @click="boostingDialogVisible = true">
|
||||
<div class="icon">
|
||||
@ -216,7 +216,7 @@
|
||||
>
|
||||
<div class="touxiang">
|
||||
<UserImg class="userImg" :imgSrc="scope.row.avatar" />
|
||||
{{ scope.row.nickname }}
|
||||
<span>{{ scope.row.nickname }}</span>
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
@ -340,7 +340,7 @@ export default {
|
||||
})
|
||||
this.boxList = res.data.data
|
||||
this.boxData = res.data.data[0]
|
||||
if(this.boxList == undefined || this.boxList.length <= 0) {
|
||||
if(this.boxList !== undefined && this.boxList.length > 0) {
|
||||
await this.getHistorical(this.boxData.id)
|
||||
}
|
||||
},
|
||||
@ -1038,7 +1038,12 @@ export default {
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
.userImg {
|
||||
margin-right: 10px;
|
||||
margin-right: 20px;
|
||||
}
|
||||
span {
|
||||
display: inline-block;
|
||||
width: 136px;
|
||||
text-align: left;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -60,12 +60,15 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="left-title">
|
||||
<div class="left-title-left" v-if="navIndex == 0 || navIndex == 3">
|
||||
<div class="left-title-left" v-if="navIndex == 0">
|
||||
<div>Complete <img src="./../../assets/home/Icon_star.png" alt="">Social Quests</div>
|
||||
</div>
|
||||
<div class="left-title-left1" v-if="navIndex == 1">
|
||||
<div>Check In <img src="./../../assets/home/Icon_star.png" alt=""> & Explore</div>
|
||||
</div>
|
||||
<div class="left-title-left1" v-if="navIndex == 3">
|
||||
<div>Claim <img src="./../../assets/home/Icon_star.png" alt=""> Chests</div>
|
||||
</div>
|
||||
<div class="left-title-right">
|
||||
<div class="text">
|
||||
<!-- <p></p> -->
|
||||
@ -86,7 +89,7 @@
|
||||
@awardDialog="exploreAwardDialog"
|
||||
/>
|
||||
</div>
|
||||
<div class="explore-desc" v-if="navIndex == 0">
|
||||
<div class="explore-desc" v-if="navIndex == 0 || navIndex == 3">
|
||||
<!-- <div class="explore-desc-logo" @click="openLink">
|
||||
<img src="./../../assets/home/Icon_smile.png" alt="">
|
||||
</div> -->
|
||||
@ -95,7 +98,7 @@
|
||||
class="desc"
|
||||
>Complete Social Quests, Embark on Explorations, Open/Boost Chests to earn Airdrop Points, which will eventually be converted to $CEC.<br /><p @click="openLink">Read here for more details.</p></div>
|
||||
</div>
|
||||
<div class="explore-desc-map" v-if="navIndex == 1 || navIndex == 3">
|
||||
<div class="explore-desc-map" v-if="navIndex == 1">
|
||||
<li>
|
||||
<h2>EXPLORE</h2>
|
||||
<div class="logo">
|
||||
@ -166,9 +169,9 @@
|
||||
<div class="right-title" v-if="navIndex == 0">
|
||||
<h3>Complete Social Quests to earn Airdrop Points and unlock exclusive perks!</h3>
|
||||
</div>
|
||||
<div class="right-title" v-if="navIndex == 2">
|
||||
<div class="right-title1" v-if="navIndex == 3">
|
||||
<p></p>
|
||||
<h3>Embark on a collaborative journey with us and our partners to achieve your objectives</h3>
|
||||
<h3>Claim bonus chests with your NFT from our curated collections or using a redemption code</h3>
|
||||
</div>
|
||||
<div class="content-right" v-if="navIndex == 0">
|
||||
<div class="title">
|
||||
@ -220,7 +223,7 @@
|
||||
v-if="item.status == 1"
|
||||
@stateupdate="toCheck"
|
||||
:dataid="item.id"
|
||||
time="10"
|
||||
time="5"
|
||||
title="Verify"
|
||||
class="started"
|
||||
>Verify</CheckBtn>
|
||||
@ -1771,6 +1774,15 @@ export default {
|
||||
font-family: 'Anton-Regular';
|
||||
}
|
||||
}
|
||||
.right-title1 {
|
||||
color: #fff;
|
||||
line-height: 1.4;
|
||||
margin-bottom: 20px;
|
||||
h3 {
|
||||
font-size: 22px;
|
||||
font-family: 'Anton-Regular';
|
||||
}
|
||||
}
|
||||
.content-right {
|
||||
width: 100%;
|
||||
z-index: 999;
|
||||
|
@ -21,7 +21,7 @@
|
||||
<template slot-scope="scope">
|
||||
<div class="touxiang">
|
||||
<UserImg :imgSrc="scope.row.avatar" />
|
||||
{{ scope.row.nickname }}
|
||||
<span>{{ scope.row.nickname }}</span>
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
@ -196,6 +196,11 @@ div {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-evenly;
|
||||
span {
|
||||
display: inline-block;
|
||||
width: 134px;
|
||||
text-align: left;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -2,7 +2,8 @@
|
||||
<div class="content-right">
|
||||
<div class="title">
|
||||
<div class="title-left">
|
||||
<div>Partner</div>
|
||||
<div>Collection</div>
|
||||
<!-- <el-button @click="generate">激活码</el-button> -->
|
||||
</div>
|
||||
</div>
|
||||
<div class="check-code">
|
||||
@ -20,7 +21,7 @@
|
||||
<div class="partner-list">
|
||||
<div class="partner">
|
||||
<div>Partner</div>
|
||||
<div>Chain</div>
|
||||
<!-- <div>Chain</div> -->
|
||||
<div>Rewards</div>
|
||||
</div>
|
||||
<div class="nft-list">
|
||||
@ -29,26 +30,28 @@
|
||||
<div class="content-rewards-left">
|
||||
<div class="img-logo">
|
||||
<a v-if="item.link != ''" :href="item.link" target="_blank">
|
||||
<img src="./../../assets/home/twitter.png" alt />
|
||||
<img :src="require(`@/assets/username/${item.projectName}.jpg`)" alt />
|
||||
</a>
|
||||
</div>
|
||||
<div class="desc">
|
||||
<h3>{{ item.collection }}</h3>
|
||||
<el-tooltip placement="top" :content="item.collection">
|
||||
<h3>{{ item.collection }}</h3>
|
||||
</el-tooltip>
|
||||
<p>{{ item.projectName }}</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="chain">
|
||||
<!-- <div class="chain">
|
||||
<a v-if="item.contract.slice(0,2) == '0x'" :href="`https://etherscan.io/address/${item.contract.replace(/_\d$/, '')}`" target="_blank">
|
||||
<img src="@/assets/common/logo-etherscan.png" alt="">
|
||||
</a>
|
||||
</div>
|
||||
</div> -->
|
||||
<div class="Rewards">
|
||||
<div class="box-img">
|
||||
<img :src="require(`@/assets/box/box0${item.tier}.png`)" alt />
|
||||
</div>
|
||||
<div v-if="token != null" class="btn">
|
||||
<div class="is-btn">
|
||||
<div v-if="item.status == 0" class="check-no" @click.stop="chickNftClaim(item.contract)">
|
||||
<div v-if="item.status == 0" class="check-no" @click.stop="chickNftClaim(item)">
|
||||
<span>Verify</span>
|
||||
</div>
|
||||
<div v-if="item.status == 1" class="check-yes">
|
||||
@ -69,7 +72,7 @@
|
||||
<script>
|
||||
import { getToken } from "@/utils/cookies.js";
|
||||
import { apiNftList, apiVoucherClaim, apiClaimNft } from '@/utils/webapi.js'
|
||||
const BASE52_ALPHABET = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'
|
||||
const BASE52_ALPHABET = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'
|
||||
const isValidVoucherCode = (str) => {
|
||||
let reg = new RegExp(`^[${BASE52_ALPHABET}]{12}$`)
|
||||
return reg.test(str)
|
||||
@ -84,6 +87,8 @@ export default {
|
||||
timeLeft: 0,
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
},
|
||||
created() {
|
||||
this.token = getToken();
|
||||
this.getNftList()
|
||||
@ -112,40 +117,9 @@ export default {
|
||||
|
||||
async generate() {
|
||||
let res = await this.$axios.post(process.env.VUE_APP_API_URL + "/api/voucher/generate",
|
||||
{num: 10},
|
||||
{num: 20},
|
||||
{ headers: { Authorization: `Bearer ${this.token}` } })
|
||||
console.log(res.data.data)
|
||||
},
|
||||
// 0
|
||||
// :
|
||||
// "testT9uo9gbl"
|
||||
// 1
|
||||
// :
|
||||
// "testOPXqIEx2"
|
||||
// 2
|
||||
// :
|
||||
// "testf29qGaFy"
|
||||
// 3
|
||||
// :
|
||||
// "testUG6ZQoTD"
|
||||
// 4
|
||||
// :
|
||||
// "testeralYA9o"
|
||||
// 5
|
||||
// :
|
||||
// "test4WjfY8lB"
|
||||
// 6
|
||||
// :
|
||||
// "testkfhwdWVc"
|
||||
// 7
|
||||
// :
|
||||
// "testrpQlku6M"
|
||||
// 8
|
||||
// :
|
||||
// "testIySydB0z"
|
||||
// 9
|
||||
// :
|
||||
// "testR2JBM2T9"
|
||||
|
||||
// 提交nft合作邀请码
|
||||
async submitCode() {
|
||||
@ -159,6 +133,8 @@ export default {
|
||||
this.$emit('awardDialog',data)
|
||||
} else if(errcode == 11) {
|
||||
this.$showErr(errmsg)
|
||||
} else if(errmsg == 'voucher already used') {
|
||||
this.$showErr('voucher already used')
|
||||
}
|
||||
} else {
|
||||
this.$showErr(`Can not be empty`)
|
||||
@ -169,30 +145,39 @@ export default {
|
||||
},
|
||||
|
||||
// 领取NFT holder 奖励
|
||||
async chickNftClaim(contract) {
|
||||
let discordId = JSON.parse(localStorage.getItem("userData")).discordId
|
||||
async chickNftClaim(itemData) {
|
||||
let discordId = this.$store.state.user.userData?.discordId || undefined
|
||||
const nextAction = function(){
|
||||
this.$emit('toNavIndex')
|
||||
}
|
||||
if(discordId) {
|
||||
console.log('zheli')
|
||||
try {
|
||||
let { errcode, errmsg, data } = await apiClaimNft(contract);
|
||||
let { errcode, errmsg, data } = await apiClaimNft(itemData.contract);
|
||||
if (!errcode) {
|
||||
this.nftsList = []
|
||||
this.getNftList()
|
||||
this.$emit('awardDialog',data)
|
||||
} else if(errcode == 10 || errcode == 20) {
|
||||
this.$showErr(errmsg)
|
||||
} else if(errcode == 13) {
|
||||
this.$showErr(`${errmsg}`)
|
||||
} else if(errcode == 21 || errcode == 14) {
|
||||
// this.$showErr(errmsg, nextAction)
|
||||
} else if(errcode == 14) {
|
||||
this.$showErr(errmsg)
|
||||
this.$emit('toNavIndex')
|
||||
} else if(errcode == 21) {
|
||||
// this.$showErr(errmsg, nextAction)
|
||||
if(itemData.contract == 'INK') {
|
||||
this.$showErr("You do not hold the required role in the 'Ink' Discord server")
|
||||
} else {
|
||||
this.$showErr("You do not hold the required role in the 'Counter Fire' Discord server")
|
||||
this.$emit('toNavIndex')
|
||||
}
|
||||
}
|
||||
} catch (err) {
|
||||
console.log(err)
|
||||
// this.$message.error(`claim partner reward error: ${err}`);
|
||||
}
|
||||
} else {
|
||||
this.$emit('toNavIndex')
|
||||
this.$showErr('need connect discord first')
|
||||
}
|
||||
},
|
||||
@ -296,12 +281,12 @@ export default {
|
||||
// justify-content: space-between;
|
||||
padding: 0 10px;
|
||||
div {
|
||||
width: 160px;
|
||||
width: 240px;
|
||||
height: 100%;
|
||||
line-height: 30px;
|
||||
}
|
||||
div:nth-child(2) {
|
||||
width: 60px;
|
||||
width: 160px;
|
||||
}
|
||||
}
|
||||
.nft-list {
|
||||
@ -319,7 +304,7 @@ export default {
|
||||
color: #fff;
|
||||
.content-rewards-left {
|
||||
display: flex;
|
||||
width: 160px;
|
||||
width: 240px;
|
||||
.img-logo {
|
||||
width: 40px;
|
||||
height: 40px;
|
||||
@ -331,13 +316,23 @@ export default {
|
||||
}
|
||||
}
|
||||
.desc {
|
||||
max-width: 240px;
|
||||
width: 140px;
|
||||
position: relative;
|
||||
h3 {
|
||||
width: 160px;
|
||||
overflow:hidden; //超出的文本隐藏
|
||||
text-overflow:ellipsis;
|
||||
white-space:nowrap;
|
||||
text-align: left;
|
||||
font-size: 14px;
|
||||
font-family: "Poppins-SemiBold";
|
||||
cursor: pointer;
|
||||
}
|
||||
p {
|
||||
width: 100px;
|
||||
overflow:hidden; //超出的文本隐藏
|
||||
text-overflow:ellipsis;
|
||||
white-space:nowrap;
|
||||
font-family: "Poppins-Light";
|
||||
font-size: 12px;
|
||||
text-align: left;
|
||||
@ -362,7 +357,7 @@ export default {
|
||||
}
|
||||
.Rewards {
|
||||
width: 160px;
|
||||
padding: 0 10px;
|
||||
// padding: 0 10px;
|
||||
box-sizing: border-box;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
@ -432,6 +427,7 @@ export default {
|
||||
font-size: 12px;
|
||||
padding: 5px 4px;
|
||||
border-radius: 15px;
|
||||
margin-left: 10px;
|
||||
}
|
||||
}
|
||||
</style>>
|
||||
|
@ -320,13 +320,13 @@ export default {
|
||||
return type = `Exploration`
|
||||
} else if(type.includes('open_chest')) {
|
||||
// 开宝箱
|
||||
return type = `Open the Treasure`
|
||||
return type = `Chest Opened`
|
||||
} else if(type.includes('enhance_chest_gift')) {
|
||||
// 助力
|
||||
return type = `Boosting`
|
||||
return type = `Boost`
|
||||
} else if(type.includes('invite_rebate')) {
|
||||
// 邀请收益
|
||||
return type = `Invitation Earning`
|
||||
return type = `Invitation Earned`
|
||||
} else if(type.includes('')) {
|
||||
// 任务
|
||||
return type = `Task`
|
||||
|