From 8c8c548f70a8bb449e4831ec1b639fe67f0e16af Mon Sep 17 00:00:00 2001 From: liaoboping <344114999@qq.com> Date: Sun, 28 Sep 2025 10:50:29 +0800 Subject: [PATCH] =?UTF-8?q?=E4=B8=89=E6=96=B9=E7=99=BB=E5=BD=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/utils/request.js | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/src/utils/request.js b/src/utils/request.js index 44f3817..cfc0549 100644 --- a/src/utils/request.js +++ b/src/utils/request.js @@ -41,16 +41,18 @@ const errorHandler = (error) => { if (process.env.NODE_ENV === 'production') { openThirdLogin() } else { - window.location.reload() + window.location = '/user/login?redirect=' + window.location.pathname } - }, 1500) + }, 1000) }) } else { - if (process.env.NODE_ENV === 'production') { - openThirdLogin() - } else { - window.location.reload() - } + setTimeout(() => { + if (process.env.NODE_ENV === 'production') { + openThirdLogin() + } else { + window.location = '/user/login?redirect=' + window.location.pathname + } + }, 1000) } } }