From f5915f418b8d22ae58161429c3eade1c87a3b87e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=97=B6=E5=90=AF=E9=BE=99?= Date: Fri, 30 Aug 2024 09:33:44 +0800 Subject: [PATCH] fix: modify --- src/store/modules/permission.js | 1 - src/store/modules/ukey.js | 11 ++++++++--- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/src/store/modules/permission.js b/src/store/modules/permission.js index 7ba3ad3..cbfd4a9 100644 --- a/src/store/modules/permission.js +++ b/src/store/modules/permission.js @@ -152,7 +152,6 @@ const actions = { if (redirectToLogin) { dispatch('ukey/Logout', null, { root: true }).then(res => { console.log('调用天融信单点退出系统 dispatch(ukey/Logout) 方法 res:', res) - if (!res.success) return reset() }) } else { diff --git a/src/store/modules/ukey.js b/src/store/modules/ukey.js index 7c99959..702e1ca 100644 --- a/src/store/modules/ukey.js +++ b/src/store/modules/ukey.js @@ -87,12 +87,17 @@ const actions = { Logout() { return new Promise((resolve, reject) => { // 调用天融信单点退出系统 - const trxToken = getTrxToken() - if (!trxToken) reject(new Error('未找到 trxToken')) console.log('开始调用天融信 offlineToken') + const trxToken = getTrxToken() + if (!trxToken) { + console.log('调用天融信登出接口,没有获取到 trxToken') + resolve({ + success: false + }) + return + } offlineToken(trxToken).then( res => { - console.log('调用天融信单点退出系统', res) resolve(res) }, err => {