From 0a5b1aaed616a4bf54544223e4802175b6cafead Mon Sep 17 00:00:00 2001
From: gaoluyang <2820782392@qq.com>
Date: 星期三, 16 四月 2025 15:22:31 +0800
Subject: [PATCH] 检验想偏差预警-修改
---
src/store/modules/user.js | 16 ++++++++++------
1 files changed, 10 insertions(+), 6 deletions(-)
diff --git a/src/store/modules/user.js b/src/store/modules/user.js
index 1fc3208..b02eb61 100644
--- a/src/store/modules/user.js
+++ b/src/store/modules/user.js
@@ -113,12 +113,16 @@
LogOut({ commit, state }) {
return new Promise((resolve, reject) => {
logout(state.token)
- .then(() => {
- commit("SET_TOKEN", "");
- commit("SET_ROLES", []);
- commit("SET_PERMISSIONS", []);
- removeToken();
- resolve();
+ .then((res) => {
+ if (res.data) {
+ window.location.href = res.data
+ } else {
+ commit("SET_TOKEN", "");
+ commit("SET_ROLES", []);
+ commit("SET_PERMISSIONS", []);
+ removeToken();
+ resolve();
+ }
})
.catch((error) => {
reject(error);
--
Gitblit v1.9.3