From eade3fae08290d1b278beae507fc0ab9ef29318b Mon Sep 17 00:00:00 2001 From: yuyongdong Date: Tue, 3 Sep 2024 17:23:52 +0800 Subject: [PATCH] cec staking --- src/components/layout/NavBar.vue | 30 +++++++++++++++++-- src/components/staking/index.vue | 4 ++- src/router/index.js | 20 +++++++++++++ src/views/cecStakingView.vue | 19 ++++++++++++ .../{StakingView.vue => esCecStakingView.vue} | 0 5 files changed, 70 insertions(+), 3 deletions(-) create mode 100644 src/views/cecStakingView.vue rename src/views/{StakingView.vue => esCecStakingView.vue} (100%) diff --git a/src/components/layout/NavBar.vue b/src/components/layout/NavBar.vue index b3699c1..eb71e65 100644 --- a/src/components/layout/NavBar.vue +++ b/src/components/layout/NavBar.vue @@ -20,13 +20,16 @@ class="link-content" > + {{ item.label }} + {{ item.label }} + @@ -213,6 +216,21 @@ const navList = reactive([ name: "CLAIM", path: "/claim", }, + { + id: 8, + name: "STAKING", + path: "/staking", + submenu: [ + { + label: "CEC Staking", + path: "/staking", + }, + { + label: "esCEC Staking", + path: "/esCecStaking", + } + ] + }, ]); function click(event) { router.push(event.key); @@ -232,7 +250,7 @@ const handlHome = () => { }; function handNavCurent(nav) { - // console.log(nav) + console.log(nav) // return activeIndex.value = nav.id; // if (nav.id == 1) { @@ -257,6 +275,11 @@ function handNavCurent(nav) { } else if(nav.id == 7) { // window.open(`${location.origin}${nav.path}`, "_blank") router.push(nav.path); + // } else if(nav.id == 8) { + // itemPathLink() + // window.open(`${location.origin}${nav.path}`, "_blank") + // router.push(nav.path); + // console.log(nav.submenu.length) } // if (nav.id == 1 || nav.id == 2 || nav.id == 3) { // window.open(nav.path, "_blank"); @@ -266,6 +289,9 @@ function handNavCurent(nav) { // router.push(nav.path); // } } +const itemPathLink = (path) => { + router.push(path) +} function openThirdPartyLink(url) { window.open(url, "_blank"); } diff --git a/src/components/staking/index.vue b/src/components/staking/index.vue index 43989c9..44b9395 100644 --- a/src/components/staking/index.vue +++ b/src/components/staking/index.vue @@ -1,7 +1,7 @@