diff --git a/index.html b/index.html index 80fa3e1..29b58c5 100644 --- a/index.html +++ b/index.html @@ -8,11 +8,11 @@
Whitepaper
- Learn more about our studio mission >>
diff --git a/src/components/chain/BlockChain.js b/src/components/chain/BlockChain.js index 1757e78..4bd3fa7 100644 --- a/src/components/chain/BlockChain.js +++ b/src/components/chain/BlockChain.js @@ -338,6 +338,30 @@ export class BlockChain { } return { provider, address: accounts[0] }; } + + async claimAddress({title, subTitle, targetChainId}) { + const initData = {} + initData[this.store.walletType] = this.store.address + const rewardModal = createModal(WalletSelectModel, { + title: title || 'Select Address', + message: subTitle || 'Please select the address you want to use', + subTitle: subTitle, + initData: { 1: 'MetaMask', 2: 'OKX Wallet', 3: 'Passport' }, + disabled: [5,3] + }); + const { errcode, errmsg, walletInstance, provider, accounts } = await rewardModal.show(); + if (errcode) { + console.log(`select address result : ${errmsg}`); + throw new Error(errmsg); + } + targetChainId = targetChainId || cfgChainId; + let chainId = await walletInstance.getChainId(); + if (chainId !== targetChainId) { + console.log(`current chain: ${chainId}, want: ${targetChainId}`) + chainId = await switchEthereumChain(provider.provider, targetChainId); + } + return { provider, address: accounts[0] }; + } /** * CEC Claim登录 diff --git a/src/components/chain/ClaimSelectModel.vue b/src/components/chain/ClaimSelectModel.vue index b2ce652..9211e4a 100644 --- a/src/components/chain/ClaimSelectModel.vue +++ b/src/components/chain/ClaimSelectModel.vue @@ -66,7 +66,6 @@ const props = defineProps({ }); const currentDatas = computed(() => { - // debugger let list = ALL_PROVIDERS.map((item) => { const Provider = allProviders[item.id]; // console.log(Provider) @@ -175,10 +174,13 @@ function hideModal(result = null) { background-color: #2d2738; border-radius: 40px; color: white; - margin: auto; + // margin: auto; display: flex; position: relative; - margin-top: 15vh; + right: -100%; + transform: translateX(-481px); + // margin-top: 15vh; + margin-top: 84px; flex-direction: column; .mobile { width: 100vw; @@ -263,7 +265,7 @@ function hideModal(result = null) { .fire-wallet { position: absolute; top: 0; - right: -260px; + left: -260px; width: 256px; // height: 100%; // border-radius: .41667vw; diff --git a/src/components/chain/WalletSelectModel.vue b/src/components/chain/WalletSelectModel.vue index cc263db..a5fa84c 100644 --- a/src/components/chain/WalletSelectModel.vue +++ b/src/components/chain/WalletSelectModel.vue @@ -152,10 +152,13 @@ function hideModal(result = null) { background-color: #2d2738; border-radius: 40px; color: white; - margin: auto; + // margin: auto; display: flex; position: relative; - margin-top: 15vh; + right: -100%; + transform: translateX(-481px); + // margin-top: 15vh; + margin-top: 84px; flex-direction: column; .mobile { width: 100vw; diff --git a/src/utils/marketplace.js b/src/utils/marketplace.js index 55602c4..a779650 100644 --- a/src/utils/marketplace.js +++ b/src/utils/marketplace.js @@ -117,8 +117,6 @@ export const nftDetail = async(address, tokenId) => { export const apiCecInfoAll = async(address,token) => { let url = `${API_UAW}/api/cec/info_all/${address}` return httpGet(url) - // let url = await axios.get(`${API_UAW}/api/cec/claim`) - // return httpPost(url,{address},token) } // CEC Claim 查询 @@ -127,6 +125,12 @@ export const apiCecInfo = async(address,token) => { return httpGet(url) } +// CEC Claim 领取 +export const apiCecClaim = async(address,token) => { + let url = `${API_UAW}/api/cec/claim` + return httpPost(url,address,token) +} + // 绑定交易所账号 export const apiBindAccount = async(data, token) => { let url = `${API_UAW}/api/cec/bind_account` diff --git a/src/views/ClaimView.vue b/src/views/ClaimView.vue index 80ade18..bc320c1 100644 --- a/src/views/ClaimView.vue +++ b/src/views/ClaimView.vue @@ -173,6 +173,7 @@ Claim to your wallet
+ Coming soon
@@ -209,11 +210,21 @@
-
+

{{Number(cecInfo.available) == 0 ? 0 : priceCalculated(cecInfo.available,18).toString().match(/^\d+(?:\.\d{0,2})?/)[0]}} $CEC deposit to Bitget in progress

-
-

You'll receive your $CEC airdrop in Bitget spot account before the listing time

+
+

Well done! You're all set!

+
+
+

You'll receive your $CEC airdrop in Bitget spot account before the listing time.

+
+ + +
+

Jump to Bitget Launchpool and grab your share of 11M $CEC now!

Cancel the Pre-Deposit to Bitget

@@ -262,7 +273,7 @@ {{ cecInfo.bindAddress }}
  • -
    You may lose your tokens if this UID Wallet Address are incorrect blocked or doesn't exist
    +
    You may not receive your airdrop in Bitget if your UID, deposit address is not correct or doesn't exist
  • KYC passed only
    @@ -340,7 +351,7 @@ import { priceCalculated } from "@/configs/priceCalculate" import {walletStore} from "@/store/wallet"; import { useMarketplaceStore } from "@/store/marketplace" import { BlockChain } from "@/components/chain/BlockChain" -import { apiCecInfoAll, apiBindAccount } from "@/utils/marketplace" +import { apiCecInfoAll, apiBindAccount, apiCecClaim } from "@/utils/marketplace" const localWalletStore = walletStore() @@ -460,6 +471,16 @@ const reqGetInfo = async () => { getCecTotal() } +// 领取 +const cecClaim = async () => { + let res = await new BlockChain().claimAddress({}) + console.log(res.address) + // let walletToken = await new BlockChain().token() + // let token = marketplaceStore.fireToken || walletToken + // let res1 = await apiCecClaim(res.address, token) + // console.log(res1) +} + onMounted(() => { address.value = marketplaceStore.fireAddress || localWalletStore.address getCecTotal() @@ -933,6 +954,15 @@ onMounted(() => { width: 283px; text-align: left; } + .claim-btn { + span { + color: #fff; + padding: 10px; + border: 1px solid #31FFF3; + border-radius: 20px; + cursor: pointer; + } + } } } } @@ -1070,6 +1100,11 @@ onMounted(() => { margin: 0 40px; } } + .padding-top { + h3 { + padding-top: 10px; + } + } .body-box-con { p { width: 747px; @@ -1170,6 +1205,9 @@ onMounted(() => { margin-left: 40px; } } + .font-size-14 { + font-size: 15px; + } &:nth-child(3) { // margin-top: 10px; } @@ -1244,6 +1282,31 @@ onMounted(() => { cursor: pointer; } } + + .center { + text-align: center; + color: #fff; + a { + margin-top: 20px !important; + color: #00f0ff; + } + } + } + .margin-top-20 { + margin-top: 20px; + p { + margin: -0px auto !important; + } + } + .margin-20 { + margin-top: 10px; + margin-bottom: 30px; + p { + margin: -0px auto !important; + } + } + .margin-top { + margin-top: 10px !important; } .body-box-find { p { diff --git a/src/views/DetailView.vue b/src/views/DetailView.vue index 07954bf..e1d5579 100644 --- a/src/views/DetailView.vue +++ b/src/views/DetailView.vue @@ -1248,7 +1248,8 @@ onMounted(() => { } } .gold-content { - width: 455px; + // width: 455px; + width: 321px; height: 84px; background: #2d2738; border-radius: 20px;