12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232 |
- <script setup lang="ts">
- //@ts-ignore
- import MetaMaskSDK from '../utils/metamask-sdk.js'
- //@ts-ignore
- import getZksEra from '../utils/getZksEra.js'
- //@ts-ignore
- import getZksLite from '../utils/getZksLite.js'
- //@ts-ignore
- import getZkSyncBridge from '../utils/getZkSyncBridge.js'
- import * as echarts from 'echarts';
- import {onMounted, ref,onBeforeUnmount} from 'vue';
- import balancerBg from '../project/balancer/balancerBg.png'
- import balancerAv from '../project/balancer/balancerAv.png'
- import argentBg from '../project/argent/argentBg.png'
- import argentAv from '../project/argent/argentAv.png'
- import ontoBg from '../project/onto/ontoBg.png'
- import ontoAv from '../project/onto/ontoAv.png'
- import zerionBg from '../project/zerion/zerionBg.png'
- import zerionAv from '../project/zerion/zerionAv.png'
- import zksEraBridgeAv from '../project/zksEraBridge/zksEraBridgeAv.png'
- import zksEraBridgeBg from '../project/zksEraBridge/zksEraBridgeBg.png'
- import zksLiteBridgeBg from '../project/zksLiteBridge/zksLiteBridgeBg.png'
- import zksLiteBridgeAv from '../project/zksLiteBridge/zksLiteBridgeAv.png'
- import orbiterAv from '../project/orbiter/orbiterAv.png'
- import orbiterBg from '../project/orbiter/orbiterBg.png'
- import muteAv from '../project/mute/muteAv.png'
- import muteBg from '../project/mute/muteBg.png'
- import syncswapBg from '../project/syncswap/syncswapBg.png'
- import syncswapAv from '../project/syncswap/syncswapAv.png'
- import getcoinBg from '../project/getcoin/getcoinBg.png'
- import getcoinAv from '../project/getcoin/getcoinAv.png'
- import dmailAv from '../project/dmail/dmailAv.png'
- import dmailBg from '../project/dmail/dmailBg.png'
- import tiktokFiAv from '../project/tiktokFi/tiktokFiAv.png'
- import tiktokFiBg from '../project/tiktokFi/tiktokFiBg.png'
- import karatDAOAv from '../project/karatDAO/karatDAOAv.png'
- import karatDAOBg from '../project/karatDAO/karatDAOBg.png'
- import router from "@/router";
- import {useSunStore,useAddressStore} from "@/stores/sun";
- import Footer from '@/components/Footer.vue'
- //@ts-ignore
- import {getAllZksSyncData} from "@/utils/getZksyncData/index.js";
- import axios from 'axios';
- import {Area, Bar} from '@antv/g2plot';
- import moment from "moment";
- import eventBus from '../libs/eventBus'
- import { inject } from "vue";
- const refresh:any = inject("reload");
- const sunStore = useSunStore()
- const addressStore = useAddressStore()
- type EChartsOption = echarts.EChartsOption;
- onMounted(() => {
- checkWalletAddress()
- listeningDisconnect()
- fetchData()
- fetchData2()
- refresh()
- })
- onBeforeUnmount(() => {
- eventBus.off('zksConnectWallet',connectWallet)
- })
- type dataArrType = {
- name: string,
- type: string[],
- BG: string,
- avatar: string,
- url:string
- }[]
- let dataArr: dataArrType = [
- {
- name: 'zks-era bridge',
- type: ['OFFICAL','BRIDGE'],
- BG: zksEraBridgeBg,
- avatar: zksEraBridgeAv,
- url:'https://bridge.zksync.io/'
- },
- {
- name:'TiktokFi',
- type: ['NFT'],
- BG:tiktokFiBg,
- avatar:tiktokFiAv,
- url:'https://zksync.tiktokfi.xyz/'
- },
- {
- name: 'Orbiter',
- type: ['ERA', 'SWAP'],
- BG: orbiterBg,
- avatar: orbiterAv,
- url:'https://www.orbiter.finance/'
- },
- {
- name: 'Syncswap',
- type: ['ERA', 'SWAP'],
- BG: syncswapBg,
- avatar: syncswapAv,
- url:'https://syncswap.xyz/'
- },
- {
- name: 'zks-lite bridge',
- type: ['OFFICAL','BRIDGE'],
- BG: zksLiteBridgeBg,
- avatar: zksLiteBridgeAv,
- url:'https://lite.zksync.io/transaction/deposit'
- },
- {
- name: 'Mute',
- type: ['ERA', 'DEFI', 'SWAP'],
- BG: muteBg,
- avatar: muteAv,
- url:'https://app.mute.io/swap'
- },
- {
- name:'Dmail',
- type: ['Dapp'],
- BG:dmailBg,
- avatar:dmailAv,
- url:'https://mail.dmail.ai/login?icode=393233'
- },
- {
- name: 'Gitcoin',
- type: ['DEFI', 'SWAP'],
- BG: getcoinBg,
- avatar: getcoinAv,
- url:'https://bounties.gitcoin.co/'
- },
- {
- name: 'KaratDAO',
- type: ['DAO', 'NFT'],
- BG: karatDAOBg,
- avatar: karatDAOAv,
- url:'https://karatdao.com/mint/claimer?lieutenantAddress=0x0870682e56A9069E7655afD728D91f3653Bff0bE&validatorId=117'
- },
- ]
- let MM = ref()//MetaMaskSDK
- // let address = ref('')//钱包地址
- let chainId = '0x144'
- const MMSDK = new MetaMaskSDK()
- MM.value = MMSDK.getProvider()
- //监听连接断开(通过监听账号的变化判断是否断开连接)
- const listeningDisconnect = () => {
- MM.value.on('accountsChanged', (accounts: string[]) => {
- if (accounts.length >= 1) {
- addressStore.address = accounts[0]
- connectWallet()
- } else {
- addressStore.address = ''
- }
- })
- }
- //查询钱包地址
- const checkWalletAddress = async () => {
- let accounts: string[] = await MM.value.request({method: 'eth_accounts'});//不弹窗
- addressStore.address = accounts[0]
- getMainTx()
- getLiteTx()
- getMoreInfo()
- await addChain()
- await switchEthereumChain()
- }
- //添加链
- const addChain = () => {
- MM.value.request({
- method: 'wallet_addEthereumChain',
- params: [{
- chainId: chainId,
- chainName: 'zkSync Era Mainnet',
- rpcUrls: ['https://mainnet.era.zksync.io'],
- blockExplorerUrls: ['https://explorer.zksync.io'],
- nativeCurrency: {
- name: 'ETH',
- symbol: 'ETH',
- decimals: 18,
- },
- }]
- })
- }
- //切换链
- const switchEthereumChain = () => {
- MM.value.request({
- method: 'wallet_switchEthereumChain',
- params: [{chainId: chainId}],
- }).then(() => {
- }).catch(() => {
- });
- }
- //连接钱包按钮
- const connectWallet = async () => {
- let accounts: string[] = await MM.value.request({method: 'eth_requestAccounts'});
- addressStore.address = accounts[0]
- getMainTx()
- getLiteTx()
- getMoreInfo()
- await addChain()
- await switchEthereumChain()
- }
- eventBus.on('zksConnectWallet',connectWallet)
- //获取主网交易次数
- let mainTx = ref('-')
- const getMainTx = () => {
- getZksEra(addressStore.address).then(({tx2}:{tx2:number}) => {
- mainTx.value = tx2.toString()
- })
- }
- //获取lite网交易次数
- let liteTx = ref('-')
- const getLiteTx = () => {
- getZksLite(addressStore.address).then(({tx1}:{tx1:number}) => {
- liteTx.value = tx1.toString()
- })
- }
- //获取更多信息
- let amount = ref('-')
- let fee = ref('-')
- let contract = ref('-')
- let tradingTimeArr = ref()
- let l1Tol2Tx = ref('-')
- let l2Tol1Tx = ref('-')
- const getMoreInfo = () => {
- // getZkSyncBridge(addressStore.address).then((
- // {
- // totalExchangeAmount,
- // contractActivity,
- // overTimeArr,
- // l1Tol2Times,
- // l2Tol1Times
- // }:{
- // totalExchangeAmount:number
- // contractActivity:number
- // overTimeArr:any
- // l1Tol2Times:number
- // l2Tol1Times:number
- // }) => {
- // amount.value = totalExchangeAmount
- // contract.value = contractActivity
- // tradingTimeArr.value = overTimeArr
- // l1Tol2Tx.value = l1Tol2Times
- // l2Tol1Tx.value = l2Tol1Times
- // processTime()
- // })
- getAllZksSyncData(addressStore.address).then((res:any)=>{
- amount.value = res.totalExchangeAmount
- fee.value = res.totalFee
- contract.value = res.contractActivity
- tradingTimeArr.value = res.overTimeArr
- l1Tol2Tx.value = res.l1Tol2Times
- l2Tol1Tx.value = res.l2Tol1Times
- processTime()
- })
- }
- //处理时间数据
- const monthArr = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec']
- let showMonthNumberArr = ref([0,0,0,0,0,0,0,0,0,0,0,0])
- let showMonthArr = ref()
- const processTime = () => {
- let nowDate = new Date().toString()
- let nowDateArr = nowDate.split(' ')
- let nowMonth = nowDateArr[1]
- showMonthArr.value = []
- showMonthArr.value.push(nowMonth)
- let nowMonthIndex = monthArr.indexOf(nowMonth)
- const forLoop = () => {
- for (let i = 11; i !== nowMonthIndex ; i--) {
- showMonthArr.value.unshift(monthArr[i])
- }
- }
- for (let i = nowMonthIndex; i !== 0 ; i--) {
- showMonthArr.value.unshift(monthArr[i-1])
- if (i === 1) {
- forLoop()
- }
- }
- if (tradingTimeArr.value){
- tradingTimeArr.value.forEach((item:any) => {
- // if(item.balanceChanges[0].from && item.balanceChanges[0].from.toLowerCase() === addressStore.address.toLowerCase()){
- let receivedAt = new Date(Date.parse(item.receivedAt)).toString();
- let strArr = receivedAt.split(' ')
- let month = strArr[1]
- let index = showMonthArr.value.indexOf(month)
- showMonthNumberArr.value[index]++
- // }
- })
- }
- initEcharts()
- }
- //初始化echarts
- const initEcharts = () => {
- let chartDom = document.getElementById('echartsBox1')!
- let myChart = echarts.init(chartDom);
- let option: EChartsOption;
- option = {
- tooltip: {
- trigger: 'axis',
- axisPointer: {
- type: 'shadow'
- }
- },
- xAxis: {
- type: 'category',
- axisTick: {
- alignWithLabel: true
- },
- data: showMonthArr.value
- },
- yAxis: {
- type: 'value',
- },
- series: [
- {
- color: '#95a0a4',
- data: showMonthNumberArr.value,
- type: 'bar'
- }
- ]
- };
- option && myChart.setOption(option);
- }
- //跳转网页
- const toLink = (url:string) => {
- window.open(url)
- }
- const toPage = (url:string) => {
- router.push(url)
- }
- const toEmail = (email:string) => {
- const emailAddress = email; // 替换为你想发送邮件的收件人地址
- const subject = 'Hello'; // 替换为你想在邮件中设置的主题
- const body = 'This is the email body.'; // 替换为你想在邮件中设置的内容
- const mailtoUrl = `mailto:${emailAddress}?subject=${encodeURIComponent(subject)}&body=${encodeURIComponent(body)}`;
- window.open(mailtoUrl);
- }
- let affix = ref(false)
- let chart = ref(false)
- const affixMouseenter = () => {
- const slideDiv = document.getElementById("slideDiv")!;
- slideDiv.style.bottom = "0";
- }
- const affixMouseleave = () => {
- const slideDiv = document.getElementById("slideDiv")!;
- slideDiv.style.bottom = "-608px";
- }
- const getStarkTvl = async () => {
- const url = 'https://api.llama.fi/v2/historicalChainTvl/zkSync%20Era';
- const response = await axios.get(url);
- return response.data;
- }
- const getZkTvlDetail = async () => {
- const url = "https://api.llama.fi/protocols";
- const response = await axios.get(url);
- let result:any[] = [];
- response.data.forEach((item:any) => {
- if (item['chains'].includes("zkSync Era") && item.category !== "CEX") {
- result.push({
- name: item.name,
- tvl: item['chainTvls']['zkSync Era'] / 1000000,
- });
- }
- });
- result.sort((a, b) => b.tvl - a.tvl);
- result = result.slice(0, 10);
- return result;
- }
- let change = ref(0)
- let change24h = ref('-')
- let nowTvl = ref('-')
- const fetchData = async () => {
- const result = await getStarkTvl();
- change.value = ((result[result.length - 1].tvl - result[result.length - 2].tvl) / result[result.length - 2].tvl) * 100;
- change24h.value = change.value.toFixed(2) + '%'
- nowTvl.value = (result[result.length - 1].tvl / 1000000).toFixed(2) + 'M'
- let VolData:any[] = [];
- result.forEach((item:any) => {
- VolData.push({
- date: new Date(item.date * 1000).toLocaleDateString(),
- tvl: item.tvl / 1000000,
- });
- });
- const max = Math.max(...VolData.map(item => item.tvl));
- const chart = new Area('TVLBox',{
- data: VolData,
- xField: 'date',
- yField: 'tvl',
- smooth: true,
- isStack: true,
- padding:[60],
- color: '#FFF',
- // label: {
- // style:{
- // fill:'#FFF'
- // },
- // content: (originData) => {
- // return `${originData.tvl.toFixed(0)}`;
- // },
- // },
- slider: {
- start: 0,
- end: 1,
- formatter: (v) => moment(v).format('YYYY-MM-DD'),
- textStyle:{
- fill:'#FFF'
- }
- },
- meta: {
- tvl: {
- alias: 'TVL(M)',
- min: 0,
- max: max * 1.1,
- }
- }
- });
- chart.render();
- }
- let TVLTopData = ref()
- const fetchData2 = async () => {
- let result = await getZkTvlDetail();
- TVLTopData.value = result.slice(0,5)
- const max = Math.max(...result.map(item => item.tvl));
- const chart = new Bar('TVLTop', {
- data:result,
- xField: 'tvl',
- yField: 'name',
- color: '#95a0a3',
- yAxis: {
- label: {
- formatter: (v) => `${v}`,
- }
- },
- label: {
- position: 'right',
- style:{
- fill:'#FFF'
- },
- formatter: (v) => `${v.tvl.toFixed(2)}`,
- },
- meta: {
- tvl: {
- alias: 'TVL(M)',
- max: max * 1.1,
- }
- }
- });
- chart.render();
- }
- </script>
- <template>
- <main class="main">
- <!-- <div class="mainBG">-->
- <!-- <img src="../assets/navBg.png" alt="BG">-->
- <!-- </div>-->
- <!-- <Nav @doSth="connectWallet"/>-->
- <div class="dataBox">
- <div class="left">
- <div class="leftTop">
- <div class="item">
- <div class="top">
- <div class="img">
- <img v-show="!sunStore.sun" src="../assets/group1-white.svg" alt="group1">
- <img v-show="sunStore.sun" src="../assets/group1.svg" alt="group1">
- </div>
- <div class="title">
- Protocols lnteraction
- <el-popover
- placement="bottom"
- :width="230"
- trigger="hover"
- effect="dark"
- >
- <template #reference>
- <img src="../assets/info.svg" alt="info">
- </template>
- <div class="popoverText">
- Number of protocolsinteracted
- </div>
- <div class="popoverText">
- with out of allavailable protocols
- </div>
- </el-popover>
- </div>
- </div>
- <div class="number">
- {{ contract }}
- </div>
- </div>
- <div class="item">
- <div class="top">
- <div class="img">
- <img class="img" src="../assets/group4.svg" alt="group2">USDT
- </div>
- <div class="title">
- <span style="width: 150px">amount</span>
- <span>fee</span>
- </div>
- </div>
- <div class="number">
- <span class="number" style="width: 150px">
- {{ amount }}
- </span>
- <span class="number">
- {{fee}}
- </span>
- </div>
- </div>
- <img src="../assets/zks.svg" alt="zks">
- </div>
- <div class="leftBottom">
- <div class="item">
- <div class="top">
- <div class="img">
- <img v-show="!sunStore.sun" class="img" src="../assets/group3-white.svg" alt="group2">
- <img v-show="sunStore.sun" class="img" src="../assets/group3.svg" alt="group2">
- </div>
- <div class="title">
- Total Transactions
- <el-popover
- placement="bottom"
- :width="250"
- trigger="hover"
- effect="dark"
- >
- <template #reference>
- <img src="../assets/info.svg" alt="info">
- </template>
- <div class="popoverText">
- Total zkSync lite
- </div>
- <div class="popoverText">
- transactions issuedfrom the account
- </div>
- </el-popover>
- </div>
- </div>
- <div class="number">
- {{ liteTx }}
- <img @click="toLink('https://zkscan.io/')" style="cursor: pointer" src="../assets/arrow-right-up-line.svg" alt="arrow">
- </div>
- </div>
- <div class="item">
- <div class="top">
- <div class="img">
- <img v-show="!sunStore.sun" class="img" src="../assets/group2-white.svg" alt="group2">
- <img v-show="sunStore.sun" class="img" src="../assets/group2.svg" alt="group2">
- </div>
- <div class="title">
- Total Transactions
- <el-popover
- placement="bottom"
- :width="250"
- trigger="hover"
- effect="dark"
- >
- <template #reference>
- <img src="../assets/info.svg" alt="info">
- </template>
- <div class="popoverText">
- Total zkSync era
- </div>
- <div class="popoverText">
- transactions issuedfrom the account
- </div>
- </el-popover>
- </div>
- </div>
- <div class="number">
- {{ mainTx }}
- <img @click="toLink('https://explorer.zksync.io/')" style="cursor: pointer" src="../assets/arrow-right-up-line.svg" alt="arrow">
- </div>
- </div>
- <div class="item" style="height: 94px">
- <div class="top">
- <div class="img">
- <img v-show="!sunStore.sun" class="img" src="../assets/official-bridge-white.svg" alt="group2">
- <img v-show="sunStore.sun" class="img" src="../assets/official-bridge-black.svg" alt="group2">
- </div>
- <div style="display: flex;gap:40px">
- <div style="display: flex;flex-direction: column;gap:20px">
- <img v-show="!sunStore.sun" src="../assets/L1-To-L2-white.svg" alt="To">
- <img v-show="sunStore.sun" src="../assets/L1-To-L2.svg" alt="To">
- <div class="number">
- {{ l1Tol2Tx }}
- </div>
- </div>
- <div style="display: flex;flex-direction: column;gap:20px">
- <img v-show="!sunStore.sun" src="../assets/L2-To-L1-white.svg" alt="To">
- <img v-show="sunStore.sun" src="../assets/L2-To-L1.svg" alt="To">
- <div class="number">
- {{ l2Tol1Tx }}
- </div>
- </div>
- </div>
- </div>
- </div>
- </div>
- </div>
- <div style="position: relative">
- <div style="display: flex;align-items: center;position: absolute;left: 40px;top:10px;z-index: 10;gap:4px">
- Transactions Over Time
- <el-popover
- placement="right"
- :width="240"
- trigger="hover"
- effect="dark"
- >
- <template #reference>
- <img src="../assets/info.svg" alt="info">
- </template>
- <div class="popoverText">
- Number of transactions permonth
- </div>
- </el-popover>
- </div>
- <div class="right" id="echartsBox1">
- </div>
- </div>
- </div>
- <div class="projectBox">
- <div class="item" @click="toLink(item.url)" v-for="item in dataArr">
- <div class="BG">
- <img class="BG" :src="item.BG" alt="BG">
- </div>
- <div class="infoBox">
- <div class="avatar">
- <img class="avatar" :src="item.avatar" alt="avatar">
- </div>
- <div class="nameAndType">
- <div class="name">
- {{ item.name }}
- </div>
- <div class="typeBox">
- <div class="type" v-for="item1 in item.type">
- {{ item1 }}
- </div>
- </div>
- </div>
- </div>
- </div>
- </div>
- <div class="dividingLine"/>
- <Footer/>
- <div class="dividingLine"/>
- <div style="height: 61px;" @mouseenter="affixMouseenter" @mouseleave="affixMouseleave">
- <div class="dataChart" id="slideDiv">
- <div class="box">
- <div class="titleBox">
- <div class="title">
- <img src="../assets/title.svg" alt="title">
- zkSync info
- </div>
- <!-- <div class="exit" v-show="chart" @click="chart = false">-->
- <!-- <img src="../assets/exit.svg" alt="exit">-->
- <!-- Exit-->
- <!-- </div>-->
- </div>
- <div class="data" >
- <div class="dataGroup">
- <div class="dataGroupTitle">
- <img src="../assets/TVL.svg" alt="TVL">
- TVL(M)
- </div>
- <div class="itemBox">
- <div class="item">
- <div class="text1">
- {{nowTvl}}
- </div>
- <div class="text2">
- Now
- </div>
- </div>
- <div class="item">
- <div class="text3" v-show="change>=0">
- {{change24h}}
- </div>
- <div class="text3" style="color: red" v-show="change<0">
- {{change24h}}
- </div>
- <div class="text2">
- 24h
- </div>
- </div>
- </div>
- </div>
- <div class="verticalLine"/>
- <div class="dataGroup">
- <div class="dataGroupTitle">
- <img src="../assets/tag.svg" alt="TVL">
- Top 5 TVL(M)
- </div>
- <div class="itemBox">
- <div class="item" v-for="(item,index) in TVLTopData">
- <div class="text1">
- {{ item.tvl.toFixed(2) }}M
- </div>
- <div class="text2">
- {{ item.name }}
- </div>
- </div>
- </div>
- </div>
- </div>
- <!-- <div class="viewMore" v-show="affix" @click="chart = true">-->
- <!-- <img src="../assets/viewMore.svg" alt="viewMore">-->
- <!-- view more-->
- <!-- </div>-->
- <div class="chartBox">
- <div class="TVLBox" id="TVLBox">
- </div>
- <div class="TVLTop" id="TVLTop">
- </div>
- </div>
- </div>
- </div>
- </div>
- </main>
- </template>
- <style scoped lang="scss">
- .main {
- width: 1440px;
- height: 100%;
- margin: auto;
- //border: 1px solid var(--vt-c-border);
- //border-top: none;
- //border-bottom: none;
- padding: 0 60px 0;
- .dividingLine {
- width: 100vw;
- height: 1px;
- border-bottom: 1px solid var(--vt-c-border);
- position: absolute;
- left: 0;
- }
- .mainBG{
- position: absolute;
- top: 0;
- left: 0;
- right: 0;
- display: flex;
- justify-content: center;
- z-index: -1;
- }
- .topBar {
- display: flex;
- align-items: center;
- justify-content: space-between;
- padding: 0 60px 25px;
- margin: 0 -60px;
- border-bottom: 1px solid var(--vt-c-border);
- .left{
- display: flex;
- align-items: center;
- .nav{
- font-family: HONOR Sans CN;
- font-size: 21px;
- font-style: normal;
- font-weight: 700;
- line-height: normal;
- padding: 0 60px;
- height: 100px;
- display: flex;
- align-items: center;
- margin-bottom: -25px;
- margin-top: -30px;
- border-right: 1px solid var(--vt-c-border);
- position: relative;
- .line{
- position: absolute;
- width: 100%;
- height: 10px;
- background: var(--color-text);
- left: 0;
- bottom: 0;
- }
- }
- .navOne{
- font-family: HONOR Sans CN;
- font-size: 21px;
- font-style: normal;
- font-weight: 700;
- line-height: normal;
- padding: 0 60px;
- height: 100px;
- display: flex;
- align-items: center;
- margin-bottom: -25px;
- margin-top: -30px;
- border-right: 1px solid var(--vt-c-border);
- margin-left: 57px;
- border-left: 1px solid var(--vt-c-border);
- position: relative;
- .line{
- position: absolute;
- width: 100%;
- height: 10px;
- background: var(--color-text);
- left: 0;
- bottom: 0;
- }
- }
- }
- .mid{
- font-weight: 400;
- font-size: 15px;
- line-height: 21px;
- font-family: 'Chillax';
- text-transform: uppercase;
- }
- .right {
- display: flex;
- align-items: center;
- gap:40px;
- cursor: pointer;
- .button {
- width: fit-content;
- height: 44px;
- display: flex;
- align-items: center;
- gap: 6px;
- background: #010101;
- padding: 0 24px;
- font-weight: 500;
- font-size: 15px;
- line-height: 20px;
- color: #FFFFFF;
- cursor: pointer;
- }
- .connect {
- width: fit-content;
- height: 44px;
- display: flex;
- align-items: center;
- gap: 6px;
- background: #FFFFFF;
- border: 1px solid #010101;
- border-radius: 30px;
- padding: 0 24px;
- font-weight: 500;
- font-size: 15px;
- line-height: 20px;
- color: #010101;
- }
- }
- }
- .chainBox{
- width: 100%;
- display: flex;
- align-items: center;
- margin: 0 -60px;
- .item{
- padding: 24px 65px;
- //border-right: 1px solid var(--vt-c-border);
- font-family: HONOR Sans CN;
- font-size: 15px;
- font-style: normal;
- font-weight: 700;
- line-height: normal;
- position: relative;
- cursor: pointer;
- .line{
- position: absolute;
- width: 60px;
- height: 4px;
- background: var(--color-text);
- left: 0;
- right: 0;
- margin: auto;
- bottom: 0;
- }
- }
- }
- .dataBox {
- height: 365px;
- margin: 0 -60px;
- //border-bottom: 1px solid var(--vt-c-border);
- //border-top: 1px solid var(--vt-c-border);
- display: flex;
- align-items: center;
- border: 1px solid var(--vt-c-border);
- .left {
- width: 845px;
- height: 100%;
- border-right: 1px solid var(--vt-c-border);
- .item {
- width: 260px;
- display: flex;
- flex-direction: column;
- gap: 20px;
- .top {
- display: flex;
- flex-direction: column;
- gap: 6px;
- .img {
- height: 16px;
- }
- }
- .publicChainBox{
- display: flex;
- align-items: center;
- gap:40px;
- .publicChainItem{
- display: flex;
- flex-direction: column;
- gap:20px;
- }
- }
- .title {
- display: flex;
- align-items: center;
- gap: 8px;
- font-weight: 400;
- font-size: 14px;
- line-height: 18px;
- //color: #010101;
- font-family: 'HONOR Sans CN';
- .popoverText{
- font-weight: 400;
- font-size: 12px;
- line-height: 24px;
- }
- }
- .number {
- display: flex;
- align-items: center;
- gap: 8px;
- font-weight: 700;
- font-size: 26px;
- line-height: 34px;
- //color: #010101;
- }
- }
- .leftTop {
- height: 175px;
- width: 100%;
- display: flex;
- justify-content: space-between;
- align-items: center;
- padding-left: 60px;
- padding-right: 60px;
- border-bottom: 1px solid var(--vt-c-border);
- .img{
- display: flex;
- align-items: center;
- font-weight: 700;
- gap:4px
- }
- }
- .leftBottom {
- display: flex;
- align-items: center;
- height: 175px;
- padding-left: 60px;
- }
- }
- .right {
- height: 365px;
- width: 596px;
- }
- }
- .projectBox{
- display: flex;
- flex-wrap: wrap;
- overflow:auto;
- gap: 28px;
- height: 585px;
- margin: 0px -60px;
- padding: 20px 0;
- //border-bottom: 1px solid var(--vt-c-border);
- border: 1px solid var(--vt-c-border);
- .item {
- height: 256px;
- width: 336px;
- cursor: pointer;
- .BG {
- width: 100%;
- height: 175px;
- }
- .infoBox {
- display: flex;
- align-items: center;
- gap: 12px;
- padding: 0 24px;
- height: 80px;
- //border: 1px solid #010101;
- border-top: none;
- background: #141414;
- .avatar {
- width: 40px;
- height: 40px;
- border-radius: 50%;
- }
- .nameAndType {
- display: flex;
- flex-direction: column;
- gap: 2px;
- .name {
- font-weight: 700;
- font-size: 17px;
- line-height: 22px;
- color: #ffffff;
- }
- .typeBox {
- display: flex;
- align-items: center;
- gap: 10px;
- .type {
- width: fit-content;
- font-weight: 400;
- font-size: 12px;
- line-height: 16px;
- color: #898989;
- padding: 0 4px;
- }
- .type::before {
- content: "\00B7";
- margin-right: 5px;
- }
- }
- }
- }
- }
- }
- .dataChart{
- width: 100vw;
- position: fixed;
- bottom: -608px;
- left: 0;
- background: rgba(0, 255, 194, 0.10);
- backdrop-filter: blur(179px);
- display: flex;
- justify-content: center;
- transition: bottom 0.3s ease-in-out;
- .box{
- width: 1440px;
- height: 100%;
- .titleBox{
- display: flex;
- align-items: center;
- justify-content: space-between;
- padding: 20px 0;
- .title{
- display: flex;
- color: #FFF;
- font-family: HONOR Sans CN;
- font-size: 15px;
- font-style: normal;
- font-weight: 700;
- line-height: normal;
- gap:8px;
- opacity: 0.5;
- }
- .exit{
- color: #FFF73F;
- font-family: Space Grotesk;
- font-size: 15px;
- font-style: normal;
- font-weight: 700;
- line-height: normal;
- display: flex;
- gap:8px;
- cursor: pointer;
- }
- }
- .data{
- display: flex;
- gap:80px;
- align-items: center;
- padding: 24px 0;
- border-bottom: 1px solid #4C4C4C;
- border-top: 1px solid #4C4C4C;
- .dataGroup{
- display: flex;
- flex-direction: column;
- gap:16px;
- .dataGroupTitle{
- display: flex;
- color: #FFF;
- font-family: HONOR Sans CN;
- font-size: 15px;
- font-style: normal;
- font-weight: 700;
- line-height: normal;
- gap:8px;
- opacity: 0.5;
- }
- .itemBox{
- display: flex;
- align-items: center;
- gap:80px;
- .item{
- display: flex;
- flex-direction: column;
- gap:8px;
- .text1{
- color: #FFF;
- font-family: HONOR Sans CN;
- font-size: 21px;
- font-style: normal;
- font-weight: 700;
- line-height: normal;
- }
- .text2{
- color: #FFF;
- font-family: HONOR Sans CN;
- font-size: 14px;
- font-style: normal;
- font-weight: 400;
- line-height: normal;
- opacity: 0.5;
- }
- .text3{
- color: #57EB92;
- font-family: HONOR Sans CN;
- font-size: 21px;
- font-style: normal;
- font-weight: 700;
- line-height: normal;
- }
- }
- }
- }
- .verticalLine{
- width: 1px;
- height: 88px;
- border-right: 1px solid #4c4c4c;
- }
- }
- .viewMore{
- width: 100%;
- padding: 20px 0;
- display: flex;
- justify-content: center;
- gap:8px;
- color: #FFF73F;
- font-family: Space Grotesk;
- font-size: 15px;
- font-style: normal;
- font-weight: 700;
- line-height: normal;
- cursor: pointer;
- }
- .chartBox{
- width: 100%;
- height: 468px;
- display: flex;
- .TVLBox{
- width: 840px;
- height: 100%;
- border-right: 1px solid #4c4c4c;
- border-left: 1px solid #4c4c4c;
- }
- .TVLTop{
- width: 600px;
- height: 100%;
- border-right: 1px solid #4c4c4c;
- padding: 60px
- }
- }
- }
- }
- }
- ::-webkit-scrollbar {
- width: 4px; /* 滚动条宽度 */
- }
- // /* 滚动条轨道 */
- // ::-webkit-scrollbar-track {
- // background: #f1f1f1; /* 轨道背景色 */
- // }
- /* 滚动条滑块 */
- ::-webkit-scrollbar-thumb {
- background: #888; /* 滑块背景色 */
- }
- /* 滚动条滑块悬停状态 */
- ::-webkit-scrollbar-thumb:hover {
- background: #555; /* 悬停状态下滑块背景色 */
- }
- </style>
|