diff --git a/public/logo.png b/public/logo.png index a32812b..5d3a441 100644 Binary files a/public/logo.png and b/public/logo.png differ diff --git a/src/components/assets/assetsHeader.vue b/src/components/assets/assetsHeader.vue index 7e0cd2b..9df2baa 100644 --- a/src/components/assets/assetsHeader.vue +++ b/src/components/assets/assetsHeader.vue @@ -406,7 +406,7 @@
- - + +

Unit

@@ -641,7 +641,6 @@ const getRechargeGoods = async () => { // selectItem 预选充值数量 const selectItem = (data, index) => { - console.log(toRaw(data)) activeIndex.value = index if(data.goods_id == 1006) { confirmRecharge.value = { @@ -660,10 +659,10 @@ const handleInput = (e) => { if(Number(brickworkAmount.value) > toRaw(confirmRecharge.value).max_buy_times) { brickworkAmount.value = toRaw(confirmRecharge.value).max_buy_times toRaw(confirmRecharge.value).price = toRaw(confirmRecharge.value).max_buy_times - toRaw(confirmRecharge.value).diamond = brickworkAmount.value*50 + toRaw(confirmRecharge.value).diamond = brickworkAmount.value*100 } else { toRaw(confirmRecharge.value).price = brickworkAmount.value - toRaw(confirmRecharge.value).diamond = brickworkAmount.value*50 + toRaw(confirmRecharge.value).diamond = brickworkAmount.value*100 priceAmount.value = brickworkAmount.value } @@ -672,8 +671,9 @@ const handleInput = (e) => { const rechargeDecrease = async () => { if(brickworkAmount.value == 1) return false brickworkAmount.value-- - priceAmount.value-- - if(confirmRecharge.value.goods_id == 1001) { + priceAmount.value = brickworkAmount.value + // priceAmount.value-- + if(confirmRecharge.value.goods_id == 1006) { toRaw(confirmRecharge.value).price = brickworkAmount.value toRaw(confirmRecharge.value).diamond = brickworkAmount.value*100 } @@ -681,7 +681,8 @@ const rechargeDecrease = async () => { const rechargeIncrease = async () => { if(brickworkAmount.value == toRaw(confirmRecharge.value).max_buy_times) return false brickworkAmount.value++ - priceAmount.value++ + priceAmount.value = brickworkAmount.value + // priceAmount.value++ if(confirmRecharge.value.goods_id == 1006) { toRaw(confirmRecharge.value).price = brickworkAmount.value toRaw(confirmRecharge.value).diamond = brickworkAmount.value*100 @@ -690,7 +691,6 @@ const rechargeIncrease = async () => { // 充值 const conformBtn = async () => { - // console.log(toRaw(confirmRecharge.value)) // return // if(localWalletStore.walletType == 3) { let address = localWalletStore.address @@ -700,9 +700,10 @@ const conformBtn = async () => { loadingDialogVisible.value = true // getGameLog() // return + let goods_num = Number(toRaw(confirmRecharge.value).goods_id) == 1006 ? Number(brickworkAmount.value) : 1 try { const bc = new BlockChain() - let res = await bc.mall.execBuyItem(Number(toRaw(confirmRecharge.value).goods_id), Number(brickworkAmount.value),toRaw(confirmRecharge.value).currency_list[0].address) + let res = await bc.mall.execBuyItem(Number(toRaw(confirmRecharge.value).goods_id), goods_num,toRaw(confirmRecharge.value).currency_list[0].address) // console.log(res) if(res) { brickworkAmount.value = 1 @@ -2193,6 +2194,7 @@ onMounted(() => { div { width: 36px; height: 28px; + margin-right: 10px; img { width: 100%; height: 100%; @@ -2202,25 +2204,37 @@ onMounted(() => { .item-amount-input { width: 222px; height: 42px; + padding: 0 20px; display: flex; align-items: center; - justify-content: space-evenly; + justify-content: space-between; margin: 0 auto; background: #1E1B26; border-radius: 21px; position: relative; input { color: #fff; - width: 100px; + width: 90px; height: 42px; border: 0px; text-align: center; + font-size: 28px; + margin-right: 35px; + } + input[type=number] { + -moz-appearance:textfield; + } + input[type=number]::-webkit-inner-spin-button, + input[type=number]::-webkit-outer-spin-button { + -webkit-appearance: none; + margin: 0; } h4 { position: absolute; top: 50%; + right: 50px; transform: translateY(-50%); - right: -43px; + // right: -43px; font-size: 20px; } } diff --git a/src/router/index.js b/src/router/index.js index 6149efa..7df8144 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -78,7 +78,7 @@ const routes = [ name: "CecActivityView", component: CecActivityView, meta: { - title: "CecActivityView", + title: "Counter Fire-CecActivity", canonical: "https://.counterfire.games", }, }, diff --git a/src/views/CecActivityView.vue b/src/views/CecActivityView.vue index c07d09b..443b5c0 100644 --- a/src/views/CecActivityView.vue +++ b/src/views/CecActivityView.vue @@ -15,15 +15,16 @@
-
- Connect Wallet +
+ Connect Wallet +
+ + +
+
+
{{ localWalletStore.showAddress }}
@@ -37,7 +38,7 @@
-

$CEC Bounty Hunt

+

Contribution Clash

@@ -58,7 +59,7 @@
-
{{ marketplaceStore.contributionPoint }}
+
{{ cecInfo.my_contribution }}
@@ -90,7 +91,7 @@
  • Your Credits
    - {{ marketplaceStore.contributionPoint }} + {{ cecInfo.my_contribution }}
  • @@ -99,7 +100,8 @@
  • -
    +
    +
  • @@ -165,17 +167,21 @@ const router = useRouter(); const totalCecPool = ref(0) const cecInfo = ref({ - my_contribution: '', - global_contribution: '', - total_cec_pool: '', - my_expected_cec: '' + my_contribution: '-', + global_contribution: '-', + total_cec_pool: 500000, + my_expected_cec: '-' }) const myWidth = computed(() => { let str = (Number(cecInfo.value.my_contribution) / Number(cecInfo.value.global_contribution)) * 100 // let str = cecInfo.value.total_cec_pool - if(str < 10) return 10 + if(!localWalletStore.token) { + str = 0 + } else { + if(str < 10) return 10 + } return str }) @@ -186,11 +192,13 @@ const totalWidth = computed(() => { // const getCecActivity = async () => { + if(localWalletStore.token) { + const { errcode, errmsg, contributionPoint, info } = await apiCecActivity(localWalletStore.address) if(errcode != 0) return totalCecPool.value = contributionPoint cecInfo.value = info - +} } // 链接钱包 @@ -228,22 +236,23 @@ const downloadGame = (platform) => { } }; -// const loginDiscord = () => { - // const _address = localWalletStore.address; - // const codeChallenge = Date.now(); - // const state = btoa(`${_address}|${codeChallenge}`); - // // const url = 'https://discord.com/api/oauth2/authorize?client_id=1116692240224501850&redirect_uri=http%3A%2F%2Flocalhost%3A3010%2Fdiscord%2Fredirect_uri&response_type=code&scope=guilds%20identify%20guilds.members.read' - // const url = `https://discord.com/api/oauth2/authorize?client_id=1117759635269636096&redirect_uri=https%3A%2F%2Foauth-svr.cebggame.com%2Fdiscord%2Fredirect_uri&response_type=code&scope=guilds%20identify%20guilds.members.read&state=${state}`; - // // location.href = url - // // // Redirect the user to the Discord OAuth2 authorization page - // let params = `scrollbars=yes,resizable=yes,status=no,location=no,toolbar=no,menubar=no,width=600,height=800,left=100,top=100`; - // let newwin = window.open(url, "discord login", params); - // var timer = setInterval(function() { - // if (newwin.closed) { - // clearInterval(timer); - // } - // }, 10); - // }; +const loginDiscord = () => { + const _address = localWalletStore.address; + const codeChallenge = Date.now(); + const state = btoa(`${_address}|${codeChallenge}`); + // const url = 'https://discord.com/api/oauth2/authorize?client_id=1116692240224501850&redirect_uri=http%3A%2F%2Flocalhost%3A3010%2Fdiscord%2Fredirect_uri&response_type=code&scope=guilds%20identify%20guilds.members.read' + const url = `https://discord.com/api/oauth2/authorize?client_id=1117759635269636096&redirect_uri=https%3A%2F%2Foauth-svr.cebggame.com%2Fdiscord%2Fredirect_uri&response_type=code&scope=guilds%20identify%20guilds.members.read&state=${state}`; + // location.href = url + // // Redirect the user to the Discord OAuth2 authorization page + let params = `scrollbars=yes,resizable=yes,status=no,location=no,toolbar=no,menubar=no,width=600,height=800,left=100,top=100`; + let newwin = window.open(url, "discord login", params); + console.log(newwin) + var timer = setInterval(function() { + if (newwin.closed) { + clearInterval(timer); + } + }, 10); + }; // 发送推文 const toTwitter = () => { @@ -714,6 +723,10 @@ onMounted(() => { background: linear-gradient(180deg, #8929ff, #e362ff); border-radius: 0 20px 20px 0; } + .total-right { + background: linear-gradient(180deg, #8929ff, #e362ff); + border-radius: 20px; + } } .total { position: absolute;