From 4745b682956116fa09d812c59b485395f45c2e87 Mon Sep 17 00:00:00 2001
From: Surpriseplus <845948745@qq.com>
Date: 星期五, 10 二月 2023 15:38:39 +0800
Subject: [PATCH] Merge branch 'master' of http://192.168.20.39:8989/r/LFWEB_NEW

---
 src/router/index.js |   11 ++++++++++-
 1 files changed, 10 insertions(+), 1 deletions(-)

diff --git a/src/router/index.js b/src/router/index.js
index 8697648..472e956 100644
--- a/src/router/index.js
+++ b/src/router/index.js
@@ -54,7 +54,15 @@
 const originalPush = VueRouter.prototype.push;
 
 VueRouter.prototype.push = function push(location) {
-  return originalPush.call(this, location).catch((err) => err);
+  const nowPage = sessionStorage.getItem('routerName')
+  const page = {
+    path: nowPage
+  }
+  if (page === location || location === '/') {
+    return originalPush.call(this, page).catch((err) => err);
+  } else {
+    return originalPush.call(this, location).catch((err) => err);
+  }
 };
 
 // 缇ょ粍绠$悊
@@ -472,6 +480,7 @@
 });
 //璺敱瀹堝崼
 router.beforeEach((to, from, next) => {
+  sessionStorage.setItem('routerName', to.path)
   next();
   if (to.matched.some((auth) => auth.meta.requireAuth)) {
     // 鑾峰彇token

--
Gitblit v1.9.3