From c553e1b328675bba88aaf7f320bba3cecfb1f352 Mon Sep 17 00:00:00 2001 From: xiaozhiyong Date: Thu, 6 Apr 2023 14:54:57 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/permission.js | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/src/permission.js b/src/permission.js index fd3b908..4d1412d 100644 --- a/src/permission.js +++ b/src/permission.js @@ -16,11 +16,15 @@ router.beforeEach(async (to, from, next) => { if (!token) { let paramsTarget = obtainUrlPathParameterTarget(location.href) - console.log('paramsTarget', paramsTarget) sessionStorage.setItem('paramsTarget', JSON.stringify(paramsTarget)) - store.login(paramsTarget).then(() => { - next() - }) + store.login(paramsTarget).then( + () => { + next() + }, + () => { + next() + } + ) return }