From efac688b258925e1630bbeb99e4052591614b89d Mon Sep 17 00:00:00 2001 From: zouzhibin <3517876561@qq.com> Date: Sun, 1 May 2022 23:10:46 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8F=90=E4=BA=A4404?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/layout/components/TagsView/index.vue | 7 +++++-- src/views/home/index.vue | 2 +- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/src/layout/components/TagsView/index.vue b/src/layout/components/TagsView/index.vue index ff7e4ee..9747dc3 100644 --- a/src/layout/components/TagsView/index.vue +++ b/src/layout/components/TagsView/index.vue @@ -147,8 +147,11 @@ }) router.beforeEach(async (to, from, next)=>{ - if(from.fullPath==='/error/404'&&to.fullPath==="/home") { - await store.dispatch('tagsView/removeView', [from.fullPath]) + + + if((from.fullPath==='/error/404'||from.fullPath==='/error/401')&&to.fullPath==="/home") { + let whiteList = ['/error/404','/error/401'] + await store.dispatch('tagsView/removeView', whiteList) } next() }) diff --git a/src/views/home/index.vue b/src/views/home/index.vue index 05b32b9..750c2df 100644 --- a/src/views/home/index.vue +++ b/src/views/home/index.vue @@ -34,7 +34,7 @@
---------- 开心最重要
-
如果对你有帮助的话,可以麻烦点一颗 star!
+
如果对你有帮助的话,可以麻烦您点一颗 star!