From 0d70f01c3553b6c33e5ee86f89f8d0fbd42825d5 Mon Sep 17 00:00:00 2001
From: 闫增涛 <1829501689@qq.com>
Date: 星期三, 19 六月 2024 20:00:41 +0800
Subject: [PATCH] 答题器功能

---
 src/plugin/axios/index.ts |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/src/plugin/axios/index.ts b/src/plugin/axios/index.ts
index 320cff3..5a9ed77 100644
--- a/src/plugin/axios/index.ts
+++ b/src/plugin/axios/index.ts
@@ -36,7 +36,8 @@
   (error) => {
     let msg = '璇锋眰鍙戠敓閿欒';
     if ((error.response && error.response.status == 401) || error.code == "ERR_NETWORK") {
-      localStorage.clear()
+      localStorage.removeItem("token")
+      localStorage.removeItem("userInfo")
       router.replace({
         path: '/login'
       })

--
Gitblit v1.9.1