vip、巡回赛排行榜

This commit is contained in:
yuyongdong 2024-10-22 11:15:09 +08:00
parent 04681df049
commit cb6c257e9e
12 changed files with 1456 additions and 543 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 621 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 92 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

File diff suppressed because it is too large Load Diff

View File

@ -8,6 +8,7 @@ import Detail from "../views/DetailView.vue";
import PrivacyView from '../views/PrivacyView.vue';
import TermsView from '../views/TermsView.vue';
import CecActivityView from '../views/CecActivityView.vue';
import RankingView from '../views/rankingView.vue';
import ClaimView from '../views/ClaimView.vue';
import StakingView from "../views/StakingView.vue";
import ConversionView from "../views/ConversionView.vue";
@ -85,10 +86,19 @@ const routes = [
canonical: "https://.counterfire.games",
},
},
// {
// path: "/cecActivity",
// name: "CecActivityView",
// component: CecActivityView,
// meta: {
// title: "Counter Fire-CecActivity",
// canonical: "https://.counterfire.games",
// },
// },
{
path: "/cecActivity",
name: "CecActivityView",
component: CecActivityView,
component: RankingView,
meta: {
title: "Counter Fire-CecActivity",
canonical: "https://.counterfire.games",

817
src/views/rankingView.vue Normal file
View File

@ -0,0 +1,817 @@
<template>
<div class="mint">
<div class="mint-page">
<div class="mint-header">
<div class="mint-header-logo" @click="handlHome">
<img src="@/assets/img/cec_activity/mint_Logo1.png" alt />
</div>
<div class="mint-header-right">
<div class="left">
<div>
<a href="https://discord.gg/counterfire" target="_blank">
<img src="@/assets/img/cec_activity/Icon_Disc.png" alt />
</a>
</div>
<div @click="toTwitter">
<img src="@/assets/img/cec_activity/Icon_X.png" alt />
</div>
</div>
<div class="right">
<div
class="wallet"
v-if="localWalletStore.address == null || localWalletStore.address == ''"
@click="getLinkWallet"
>
<span>Connect Wallet</span>
<div class="wallet-btn">
<img class="hover-show" src="@/assets/img/cec_activity/ConnectMenu1.png" alt />
<img class="hover-none" src="@/assets/img/cec_activity/ConnectMenu2.png" alt />
</div>
</div>
<div class="wallet" v-else @click="isLogout = !isLogout">
<div class="wallet-address">{{ localWalletStore.showAddress }}</div>
<div class="wallet-btn">
<img class="hover-show" src="@/assets/img/cec_activity/ConnectMenu1.png" alt />
<img class="hover-none" src="@/assets/img/cec_activity/ConnectMenu2.png" alt />
</div>
<div class="log-out" v-if="isLogout" @click="logOut">logout</div>
</div>
</div>
</div>
</div>
<div class="mint-body">
<div class="mint-body-left">
<div class="mint-body-left-title">
<div>
<img src="@/assets/img/ranking/Tournament_title.png" alt />
</div>
</div>
<div class="mint-body-left-content">
<div class="mint-body-left-table">
<div
:class="{active: scoreIndex == index}"
v-for="(item, index) in scoreList"
:key="index"
@click="checkTable(index)"
>{{ item }}</div>
</div>
<div class="mint-body-left-contribute">
<li>
<h6>{{ Number(0) == 0 ? '-' : 100 }}</h6>
<div>
<img src="@/assets/img/ranking/Circuit_point.png" alt />
</div>
</li>
</div>
<div class="mint-body-left-my-pro">
<div>My Ranking</div>
<div>
<img src="@/assets/img/ranking/Icon_history.png" alt />
<span>History</span>
</div>
</div>
<div class="mint-body-left-cec">
<h3>10</h3>
</div>
</div>
</div>
<div class="mint-body-right">
<div class="mint-body-right-top">
<div class="right-table">
<div
:class="{active: scoreIndex == index}"
v-for="(item, index) in scoreList"
:key="index"
@click="checkTable(index)"
>{{ item }}</div>
</div>
<div class="right-time">
<p>The current phase</p>
<div>
<h3>10.1</h3>
<h3>-</h3>
<h3>10.10</h3>
</div>
</div>
</div>
<div class="mint-body-right-btm">
<div class="content">
<div v-if="rankingTableData.length == 0" class="ranking-content-right-list-no">
<div>
<p>None</p>
</div>
</div>
<div v-else class="ranking-content-right-list">
<li v-for="(item, index) in rankingTableData" :key="index">
<div class="left">
<div class="left-left">
<div class="rank">
<img v-if="item.rank == 1" src="@/assets/img/ranking/Ranking1.png" alt />
<img v-else-if="item.rank == 2" src="@/assets/img/ranking/Ranking2.png" alt />
<img v-else-if="item.rank == 3" src="@/assets/img/ranking/Ranking3.png" alt />
<span v-else>{{ item.rank }}</span>
</div>
</div>
<div class="left-right">
<div class="user-img">
<!-- <UserImg :imgSrc="item.avatar" /> -->
<!-- <img v-if="imgSrc" :src="imgSrc" alt="" :onerror="defalutUrl"> -->
<img src="@/assets/img/ranking/head_default.jpg" alt />
</div>
<div class="user-name">
<div class="label">Username</div>
<div class="name">{{ item.nickname }}</div>
</div>
</div>
</div>
<div class="right">
<div class="label" v-if="pointsIndex == 0">Points</div>
<div class="label" v-else>Gems</div>
<div class="records">{{ item.score }}</div>
</div>
</li>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="footer">
<div class="footer-left">
<div>
<img src="@/assets/img/cec_activity/game_logo02.png" alt />
</div>
<p>© Candy Bubble Global Limited.ALL RIGHTS RESERVED.</p>
</div>
<div class="footer-right">
<!-- <li>
<a href="https://discord.com/invite/counterfire" target="_blank">
<img src="./../assets/home/com_Discord_icon.png" alt="">
</a>
</li>
<li>
<a href="https://twitter.com/@playCounterFire" target="_blank">
<img src="./../assets/home/com_X_icon.png" alt="">
</a>
</li>
<li>
<a href="https://www.youtube.com/@playCounterFire" target="_blank">
<img src="./../assets/home/com_Youtube_icon.png" alt="">
</a>
</li>-->
</div>
</div>
</div>
</template>
<script setup>
import {ref, watch, computed, onMounted} from "vue";
import {BlockChain} from "@/components/chain/BlockChain";
import {apiCecActivity} from "@/utils/marketplace";
import {contributionLogs} from "@/configs/priceCalculate";
import {walletStore} from "@/store/wallet";
import {useMarketplaceStore} from "@/store/marketplace";
const localWalletStore = walletStore();
const marketplaceStore = useMarketplaceStore();
import {useRouter, useRoute} from "vue-router";
const router = useRouter();
const scoreList = ref(["Total score", "Weekly score"]);
const scoreIndex = ref(0);
const rankingIndex = ref(0);
const rankingTableData = ref([
{
rank: 1,
avatar: 0,
nickname: "aa",
score: 0,
},
{
rank: 2,
avatar: 0,
nickname: "aa",
score: 0,
},
{
rank: 3,
avatar: 0,
nickname: "aa",
score: 0,
},
{
rank: 0,
avatar: 0,
nickname: "aa",
score: 0,
},
{
rank: 0,
avatar: 0,
nickname: "aa",
score: 0,
},
{
rank: 0,
avatar: 0,
nickname: "aa",
score: 0,
},
{
rank: 0,
avatar: 0,
nickname: "aa",
score: 0,
},
{
rank: 0,
avatar: 0,
nickname: "aa",
score: 0,
},
{
rank: 0,
avatar: 0,
nickname: "aa",
score: 0,
},
]);
const checkTable = (index) => {
scoreIndex.value = index;
};
//
const getLinkWallet = async () => {
await new BlockChain().connect();
};
const isLogout = ref(false);
// 退
const logOut = async () => {
try {
isLogout.value = false;
await new BlockChain().logout();
location.reload();
} catch (e) {
console.log(e);
}
};
//
const handlHome = () => {
router.push("/");
};
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 = () => {
const url = "https://twitter.com/intent/tweet?text=";
const hashtags = encodeURIComponent("500,000 $CEC Awaits - Earn Your Share!");
const imageUrl = encodeURIComponent(`https://counterfire.games/cecActivity`);
const params = `${hashtags}&url=${imageUrl}`;
// const params = `${hashtags}`;
window.open(`${url}${params}`, "_blank");
};
const mintInit = async () => {};
onMounted(() => {});
</script>
<style lang="scss" scoped>
.mint {
background: #0f1013;
.mint-page {
width: 1803px;
height: 1084px;
background: url("@/assets/img/ranking/CFbg.png") no-repeat;
background-size: 100% 100%;
margin: 0 auto;
margin-top: 29px;
// height: 100vh;
.mint-header {
position: relative;
left: 50%;
transform: translateX(-50%);
width: 1497px;
height: 152px;
display: flex;
justify-content: space-between;
align-items: center;
z-index: 9;
.mint-header-logo {
width: 263px;
height: 100%;
cursor: pointer;
}
.mint-header-right {
display: flex;
align-items: center;
color: #fff;
.left {
width: 106px;
height: 47px;
display: flex;
justify-content: space-evenly;
align-items: center;
background: #2d2738;
border-radius: 25px;
margin-right: 21px;
div {
width: 19px;
height: 14px;
display: flex;
align-items: center;
cursor: pointer;
a {
display: block;
width: 19px;
height: 14px;
}
img {
width: 100%;
height: 100%;
}
}
}
.right {
cursor: pointer;
.wallet {
width: 220px;
height: 50px;
border-radius: 26px;
padding-left: 40px;
display: flex;
align-items: center;
margin-right: 80px;
background: #2d2738;
position: relative;
span {
display: inline-block;
width: 100%;
height: 100%;
line-height: 50px;
margin-right: 10px;
font-size: 16px;
}
.wallet-address {
width: 100%;
height: 100%;
line-height: 50px;
font-size: 16px;
}
.wallet-btn {
z-index: 999;
position: absolute;
top: -25px;
right: -45px;
width: 100px;
height: 100px;
img {
width: 100%;
height: 100%;
}
.hover-show {
display: block;
}
.hover-none {
display: none;
}
.wallet-list {
position: absolute;
left: 50%;
bottom: -50%;
transform: translateX(-50%);
border-radius: 20px;
overflow: hidden;
display: none;
li {
width: 200px;
height: 40px;
line-height: 40px;
padding: 10px;
font-size: 14px;
text-align: center;
display: flex;
align-items: center;
box-sizing: border-box;
background: #342f3b;
img {
width: 30px;
height: 30px;
margin-right: 8px;
}
&:hover {
background: #e0e0e0;
color: #0f1013;
}
}
}
&:hover {
.hover-show {
display: none;
}
.hover-none {
display: block;
}
.wallet-list {
display: block;
}
}
}
.log-out {
position: absolute;
left: 0;
top: 100%;
width: 100%;
height: 100%;
background: #2d2738;
border-radius: 26px;
display: flex;
align-items: center;
justify-content: center;
font-size: 16px;
border: 2px solid #bb7fff;
}
}
}
}
}
.mint-body {
width: 1497px;
margin: 0 auto;
position: relative;
top: -152px;
.mint-body-left {
position: absolute;
top: 140px;
left: 35px;
z-index: 9;
.mint-body-left-title {
display: flex;
align-items: center;
div {
width: 392px;
height: 151px;
img {
width: 100%;
height: 100%;
}
}
}
.mint-body-left-content {
width: 241px;
height: 303px;
margin-top: 31px;
background: #2c2635;
border-radius: 40px;
text-align: left;
.mint-body-left-table {
padding-top: 21px;
// padding-left: 17px;
font-family: "Poppins";
font-weight: 400;
font-size: 16px;
color: #fff;
margin-bottom: 20px;
display: flex;
justify-content: space-around;
div {
padding-bottom: 3px;
border-bottom: 3px solid #fff;
cursor: pointer;
}
.active {
color: #994ffd;
border-color: #994ffd;
position: relative;
&::after {
display: block;
content: "";
border-width: 5px;
border-style: solid;
border-color: transparent transparent #9950fd transparent;
/* 定位 */
position: absolute;
left: 50%;
bottom: 0px;
transform: translateX(-50%);
}
}
}
.mint-body-left-contribute {
width: 100%;
height: 69px;
margin-top: 4px;
position: relative;
li {
position: absolute;
left: -14px;
width: 269px;
height: 69px;
display: flex;
align-items: center;
padding-left: 27px;
background: url("@/assets/img/cec_activity/Credit_bg1.png") no-repeat;
background-size: 100% 100%;
div {
width: 35px;
height: 50px;
img {
width: 100%;
height: 100%;
}
}
h6 {
font-family: "Anton";
font-weight: 400;
font-size: 42px;
color: #00deff;
margin-right: 11px;
}
}
}
.mint-body-left-my-pro {
display: flex;
justify-content: space-evenly;
// align-items: center;
font-family: "Poppins";
font-weight: 600;
font-size: 16px;
color: #fff;
margin-top: 20px;
div {
display: flex;
align-items: center;
font-family: "Poppins";
font-weight: 600;
font-size: 16px;
color: #fff;
cursor: pointer;
img {
margin-right: 8px;
}
span {
font-weight: 400;
font-size: 12px;
color: #fdfdff;
}
}
}
.mint-body-left-cec {
display: flex;
align-items: center;
padding-left: 50px;
margin-top: 20px;
h3 {
font-family: "Anton";
font-weight: 400;
font-size: 46px;
color: #ffc35b;
}
}
}
}
.mint-body-right {
position: absolute;
top: 154px;
right: 0px;
.mint-body-right-top {
display: flex;
align-items: flex-end;
justify-content: flex-end;
margin-bottom: 30px;
color: #fff;
.right-table {
display: flex;
height: 28px;
margin-right: 80px;
div {
margin: 0 10px;
border-bottom: 3px solid #fff;
cursor: pointer;
}
.active {
color: #994ffd;
border-color: #994ffd;
position: relative;
&::after {
display: block;
content: "";
border-width: 5px;
border-style: solid;
border-color: transparent transparent #9950fd transparent;
/* 定位 */
position: absolute;
left: 50%;
bottom: 0px;
transform: translateX(-50%);
}
}
}
.right-time {
width: 148px;
margin-right: 80px;
p {
font-family: "Poppins";
font-weight: 500;
font-size: 16px;
color: #ffffff;
}
div {
display: flex;
justify-content: space-between;
h3 {
font-family: "Anton";
font-weight: 400;
font-size: 31px;
color: #ffffff;
height: 35px;
}
}
}
}
.mint-body-right-btm {
.content {
width: 630px;
color: #fff;
height: 620px;
padding: 0 30px;
box-sizing: border-box;
position: relative;
overflow-y: scroll;
.ranking-content-right-list {
li {
display: flex;
align-items: center;
justify-content: space-between;
background: #2d2738;
padding: 8px 50px;
border-radius: 30px;
margin-top: 15px;
.left {
display: flex;
align-items: center;
.left-left {
width: 50px;
margin-right: 30px;
.rank {
width: 40px;
text-align: center;
span {
font-size: 18px;
font-weight: 700;
// font-family: "Anton-Regular";
color: #9950fd;
}
img {
width: 40px;
height: 30px;
}
}
}
.left-right {
display: flex;
align-items: center;
.user-name {
font-size: 16px;
margin-left: 20px;
line-height: 1.4;
.label {
text-align: left;
color: #979797;
font-size: 14px;
}
.name {
font-size: 14px;
}
}
.user-img {
width: 40px;
height: 40px;
display: flex;
justify-content: center;
align-items: center;
background: url("@/assets/img/ranking/Picture frame .png") no-repeat;
background-size: 100% 100%;
padding: 3px;
img {
width: 100%;
height: 100%;
border-radius: 50%;
}
}
}
}
.right {
line-height: 1.4;
.label {
text-align: left;
color: #979797;
font-size: 14px;
}
.records {
font-size: 14px;
text-align: left;
}
.icon {
width: 10px;
height: 12px;
margin-left: 5px;
display: flex;
align-items: center;
img {
width: 100%;
height: 100%;
}
}
}
}
}
.ranking-content-right-list-no {
height: 500px;
position: relative;
div {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
width: 200px;
height: 140px;
background: url("./../../assets/box/none01.png") no-repeat;
background-size: 100% 100%;
p {
position: absolute;
bottom: 8%;
left: 50%;
transform: translate(-50%, -50%);
font-size: 14px;
}
}
}
&::-webkit-scrollbar {
width: 5px;
}
&::-webkit-scrollbar-track {
background: #171220;
border-radius: 2px;
}
&::-webkit-scrollbar-corner {
display: block;
}
&::-webkit-scrollbar-thumb {
height: 15px;
background: #9950fd;
}
}
}
}
}
}
.footer {
width: 100%;
height: 98px;
display: flex;
justify-content: space-between;
align-items: center;
padding: 0 45px;
box-sizing: border-box;
border-top: 2px solid #2c2635;
background: #1a1821;
.footer-left {
color: #877e98;
font-size: 18px;
display: flex;
align-items: center;
div {
width: 235px;
height: 51px;
img {
width: 100%;
height: 100%;
}
}
}
}
}
</style>