From 0380598f4f011df47fdc9212c3e44346210ca937 Mon Sep 17 00:00:00 2001 From: liangping <18786721@qq.com> Date: Mon, 22 Aug 2022 10:45:23 +0800 Subject: [PATCH] add single chain mode --- src/views/Home.vue | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/views/Home.vue b/src/views/Home.vue index 7b20e52a..5789968e 100644 --- a/src/views/Home.vue +++ b/src/views/Home.vue @@ -124,7 +124,7 @@ import { import Ripple from 'vue-ripple-directive' import VuexyLogo from '@core/layouts/components/Logo.vue' import store from '@/store/index' -import { timeIn, toDay } from '@/libs/utils' +import { timeIn, toDay, getLocalChains } from '@/libs/utils' import AppFooter from '@/@core/layouts/components/AppFooter.vue' import FullHeader from './components/FullHeader.vue' @@ -163,6 +163,12 @@ export default { return this.downImg }, }, + beforeCreate() { + const keys = Object.keys(getLocalChains()) + if (keys.length === 1) { + this.$router.push(`/${keys[0]}`) + } + }, methods: { fetch(k) { const chain = this.chains[k]