巡回赛claim列表信息
This commit is contained in:
parent
e9d97f1cd4
commit
41b51aef24
1
.env.dev
1
.env.dev
@ -11,6 +11,7 @@ VUE_APP_PASSPORT_CLIENT_ID=0FNfXxQywm7wjdbyLTDzWt4txc53yRrT
|
||||
VUE_APP_PASSPORT_MARKET_ADDRESS=0x7d117aA8BD6D31c4fa91722f246388f38ab1942c
|
||||
VUE_APP_UAW_API='https://oauth-svr.cebggame.com/task'
|
||||
VUE_APP_MKT_API='https://market-test.kingsome.cn'
|
||||
VUE_APP_REWARD_API='https://game2006api-test.kingsome.cn'
|
||||
VUE_APP_NET_ID='13473'
|
||||
VUE_APP_MARKET_CURRENCY='0xFd42bfb03212dA7e1A4608a44d7658641D99CF34'
|
||||
VUE_APP_MAKEFEE_ADDRESS='0x50A8e60041A206AcaA5F844a1104896224be6F39'
|
||||
|
@ -11,6 +11,7 @@ VUE_APP_PASSPORT_CLIENT_ID=0FNfXxQywm7wjdbyLTDzWt4txc53yRrT
|
||||
VUE_APP_PASSPORT_MARKET_ADDRESS=0x7d117aA8BD6D31c4fa91722f246388f38ab1942c
|
||||
VUE_APP_UAW_API='https://oauth-svr.cebggame.com/task'
|
||||
VUE_APP_MKT_API='https://market-test.kingsome.cn'
|
||||
VUE_APP_REWARD_API='https://game2006api-test.kingsome.cn'
|
||||
VUE_APP_NET_ID='13473'
|
||||
VUE_APP_MARKET_CURRENCY='0xFd42bfb03212dA7e1A4608a44d7658641D99CF34'
|
||||
VUE_APP_MAKEFEE_ADDRESS='0x50A8e60041A206AcaA5F844a1104896224be6F39'
|
||||
|
@ -11,6 +11,7 @@ VUE_APP_PASSPORT_CLIENT_ID=tTB5eEedqDOHPHMI41sRDGmqAQwus9oE
|
||||
VUE_APP_PASSPORT_MARKET_ADDRESS=0x7d117aA8BD6D31c4fa91722f246388f38ab1942c
|
||||
VUE_APP_UAW_API='https://taskapi.cebggame.com'
|
||||
VUE_APP_MKT_API='https://market-api.counterfire.games'
|
||||
VUE_APP_REWARD_API='https://game2006api-test.kingsome.cn'
|
||||
VUE_APP_NET_ID='13371'
|
||||
VUE_APP_MARKET_CURRENCY='0x52A6c53869Ce09a731CD772f245b97A4401d3348'
|
||||
VUE_APP_MAKEFEE_ADDRESS='0x50A8e60041A206AcaA5F844a1104896224be6F39'
|
||||
|
@ -11,6 +11,7 @@ VUE_APP_PASSPORT_CLIENT_ID=tTB5eEedqDOHPHMI41sRDGmqAQwus9oE
|
||||
VUE_APP_PASSPORT_MARKET_ADDRESS=0x7d117aA8BD6D31c4fa91722f246388f38ab1942c
|
||||
VUE_APP_UAW_API='https://taskapi.cebggame.com'
|
||||
VUE_APP_MKT_API='https://market-api.counterfire.games'
|
||||
VUE_APP_REWARD_API='https://game2006api-test.kingsome.cn'
|
||||
VUE_APP_NET_ID='13371'
|
||||
VUE_APP_MARKET_CURRENCY='0x52A6c53869Ce09a731CD772f245b97A4401d3348'
|
||||
VUE_APP_MAKEFEE_ADDRESS='0x50A8e60041A206AcaA5F844a1104896224be6F39'
|
||||
|
@ -32,6 +32,9 @@ export const sliceAddress = (address) => {
|
||||
export const timeFormat = (value) => {
|
||||
return moment(value).format('YYYY-MM-DD HH:mm:ss')
|
||||
}
|
||||
export const timeReward = (value) => {
|
||||
return moment(Number(value)*1000).format('MM.DD')
|
||||
}
|
||||
|
||||
export const royaltiesPrice = (price) => {
|
||||
let str = (Number(price) * 0.02).toFixed(5)
|
||||
|
@ -4,6 +4,7 @@ import axios from "axios"
|
||||
|
||||
const API_BASE = import.meta.env.VUE_APP_MKT_API
|
||||
const API_UAW = import.meta.env.VUE_APP_UAW_API
|
||||
const KingSome = import.meta.env.VUE_APP_REWARD_API
|
||||
const net_id = import.meta.env.VUE_APP_NET_ID
|
||||
|
||||
const toJson = res => res.json();
|
||||
@ -230,3 +231,10 @@ export const apiGameLog = async (data) => {
|
||||
const url = `https://gamelog-test.kingsome.cn/webapp/index.php?c=GameLog&a=customReport`
|
||||
return httpPost(url,data)
|
||||
}
|
||||
|
||||
|
||||
// 拉力赛列表
|
||||
export const apiCircuitRewardHistory = async (data) => {
|
||||
const url = `${KingSome}/webapp/index.php?c=OutAppCircuit&a=getCircuitRewardHistory`
|
||||
return httpGet(url,data)
|
||||
}
|
@ -140,21 +140,20 @@
|
||||
<div class="user-address">
|
||||
<span>Address:</span> {{address}}
|
||||
</div>
|
||||
<div class="rewards" v-if="localWalletStore.walletType == 3">
|
||||
<div class="rewards" v-if="localWalletStore.walletType == 3 && (rewardList !== undefined && rewardList.length > 0)">
|
||||
<div class="rewards-text">Tournament Rewards</div>
|
||||
<div class="rewards-hover">
|
||||
<li>
|
||||
<h6>Tournament: 9.15-9.22</h6>
|
||||
<div class="rewards-hover-btm">
|
||||
<img src="@/assets/img/cec_claim/CEC_ICON.png" alt="">
|
||||
<span>CEC: 5000000</span>
|
||||
<li v-for="(item, index) in rewardList" :key="index">
|
||||
<h6>Tournament: {{ timeReward(item.start_time) }}-{{ timeReward(item.end_time) }}</h6>
|
||||
<div v-if="item.reward == -1" class="rewards-hover-btm">
|
||||
<p>Unavailable</p>
|
||||
</div>
|
||||
</li>
|
||||
<li>
|
||||
<h6>Tournament: 9.15-9.22</h6>
|
||||
<div class="rewards-hover-btm">
|
||||
<div v-else-if="item.reward == 0" class="rewards-hover-btm">
|
||||
<p>NO rewards</p>
|
||||
</div>
|
||||
<div v-else-if="item.reward > 0" class="rewards-hover-btm">
|
||||
<img src="@/assets/img/cec_claim/CEC_ICON.png" alt="">
|
||||
<span>CEC: 5000000</span>
|
||||
<span>CEC: {{ item.reward }}</span>
|
||||
</div>
|
||||
</li>
|
||||
</div>
|
||||
@ -382,12 +381,12 @@ const message = inject('$message')
|
||||
import { FileTextOutlined } from '@ant-design/icons-vue';
|
||||
import LoadingDialog from "@/components/Dialogs/loadingDialog.vue";
|
||||
|
||||
import { priceCalculated } from "@/configs/priceCalculate"
|
||||
import { priceCalculated, timeReward } from "@/configs/priceCalculate"
|
||||
import {switchEthereumChain} from "@/components/chain/utils"
|
||||
import {walletStore} from "@/store/wallet";
|
||||
import { useMarketplaceStore } from "@/store/marketplace"
|
||||
import { BlockChain } from "@/components/chain/BlockChain"
|
||||
import { apiCecInfoAll, apiBindAccount, apiCecClaim } from "@/utils/marketplace"
|
||||
import { apiCecInfoAll, apiBindAccount, apiCecClaim, apiCircuitRewardHistory } from "@/utils/marketplace"
|
||||
import ConfirmDialog from "@/components/Dialogs/confirmDialog.vue";
|
||||
import {createModal} from "@/utils/model.util";
|
||||
|
||||
@ -415,21 +414,21 @@ const getCecTotal = async () => {
|
||||
if(address.value) {
|
||||
let token = marketplaceStore.fireToken || localWalletStore.token
|
||||
let data = await apiCecInfoAll(address.value, token)
|
||||
cecInfo.value = data.data
|
||||
availableAmount.value = cecInfo.value.available
|
||||
if(data.data.bindUid) {
|
||||
if(data.data.available == 0 || data.data.available == '0') {
|
||||
cecUserStatus.value = -2
|
||||
} else {
|
||||
cecUserStatus.value = -1
|
||||
}
|
||||
} else {
|
||||
if(data.data.available == 0 || data.data.available == '0') {
|
||||
cecUserStatus.value = -2
|
||||
} else {
|
||||
cecUserStatus.value = -1
|
||||
}
|
||||
}
|
||||
// cecInfo.value = data.data
|
||||
// availableAmount.value = cecInfo.value.available
|
||||
// if(data.data.bindUid) {
|
||||
// if(data.data.available == 0 || data.data.available == '0') {
|
||||
// cecUserStatus.value = -2
|
||||
// } else {
|
||||
// cecUserStatus.value = -1
|
||||
// }
|
||||
// } else {
|
||||
// if(data.data.available == 0 || data.data.available == '0') {
|
||||
// cecUserStatus.value = -2
|
||||
// } else {
|
||||
// cecUserStatus.value = -1
|
||||
// }
|
||||
// }
|
||||
|
||||
}
|
||||
}
|
||||
@ -607,7 +606,38 @@ const walletClaim = async () => {
|
||||
}
|
||||
}
|
||||
|
||||
const rewardList = ref([
|
||||
{
|
||||
start_time: 1727078400,
|
||||
end_time: 1727088400,
|
||||
reward: -1,
|
||||
},
|
||||
{
|
||||
start_time: 1727098400,
|
||||
end_time: 1727108400,
|
||||
reward: 0,
|
||||
},
|
||||
{
|
||||
start_time: 1727118400,
|
||||
end_time: 1727128400,
|
||||
reward: 50,
|
||||
}
|
||||
])
|
||||
// 获取拉力赛列表
|
||||
const getCircuitRewardHistory = async () => {
|
||||
if(localWalletStore.walletType == 3) {
|
||||
const query = {
|
||||
address: localWalletStore.address
|
||||
}
|
||||
console.log(query)
|
||||
let res = await apiCircuitRewardHistory(query)
|
||||
console.log(res)
|
||||
// rewardList.value = res.data
|
||||
}
|
||||
}
|
||||
|
||||
onMounted(() => {
|
||||
getCircuitRewardHistory()
|
||||
address.value = marketplaceStore.fireAddress || localWalletStore.address
|
||||
getCecTotal()
|
||||
})
|
||||
@ -814,7 +844,7 @@ onMounted(() => {
|
||||
display: none;
|
||||
position: absolute;
|
||||
top: -20px;
|
||||
right: -115%;
|
||||
right: -110%;
|
||||
background: #1a1821;
|
||||
border: 1px solid #B966FF;
|
||||
box-shadow: 0px 15px 28px 3px rgba(22,22,22,0.13);
|
||||
@ -822,8 +852,14 @@ onMounted(() => {
|
||||
border-radius: 15px;
|
||||
box-sizing: border-box;
|
||||
li {
|
||||
font-family: 'Poppins';
|
||||
font-weight: 500;
|
||||
font-size: 14px;
|
||||
h6 {
|
||||
margin: 10px 0;
|
||||
font-family: 'Poppins';
|
||||
font-weight: 500;
|
||||
font-size: 14px;
|
||||
}
|
||||
.rewards-hover-btm {
|
||||
display: flex;
|
||||
@ -834,6 +870,13 @@ onMounted(() => {
|
||||
height: 27px;
|
||||
margin-right: 10px;
|
||||
}
|
||||
p {
|
||||
width: 100%;
|
||||
text-align: center;
|
||||
font-family: 'Poppins';
|
||||
font-weight: 500;
|
||||
font-size: 14px;
|
||||
}
|
||||
}
|
||||
&:last-child {
|
||||
.rewards-hover-btm {
|
||||
|
Loading…
x
Reference in New Issue
Block a user