From bed04e3df337584fec80d6779029d2191097d49b Mon Sep 17 00:00:00 2001 From: song-cc-rock Date: Fri, 2 Dec 2022 16:00:13 +0800 Subject: [PATCH 1/2] =?UTF-8?q?fix(=E6=B5=8B=E8=AF=95=E8=B7=9F=E8=B8=AA):?= =?UTF-8?q?=20=E7=BC=BA=E9=99=B7=E7=AE=A1=E7=90=86=E8=87=AA=E5=AE=9A?= =?UTF-8?q?=E4=B9=89=E5=AD=97=E6=AE=B5=E7=AD=9B=E9=80=89=E6=97=A0=E6=95=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --bug=1020601 --user=宋昌昌 【测试跟踪】github#20399,缺陷字段筛选无效 https://www.tapd.cn/55049933/s/1311314 --- test-track/frontend/src/business/issue/IssueList.vue | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/test-track/frontend/src/business/issue/IssueList.vue b/test-track/frontend/src/business/issue/IssueList.vue index 1ebce9d082..ebb8554edc 100644 --- a/test-track/frontend/src/business/issue/IssueList.vue +++ b/test-track/frontend/src/business/issue/IssueList.vue @@ -350,10 +350,7 @@ export default { this.editParam(); }, methods: { - generateColumnKey(field){ - let columnKey = generateColumnKey(field); - return "custom_" + columnKey.substr(columnKey.indexOf("-") + 1); - }, + generateColumnKey, hasPermission, tableDoLayout() { if (this.$refs.table) this.$refs.table.doLayout(); From 07babd30c9726397d4b09b12dbfbd4c9bcd71bfd Mon Sep 17 00:00:00 2001 From: CaptainB Date: Fri, 2 Dec 2022 16:14:09 +0800 Subject: [PATCH 2/2] =?UTF-8?q?refactor:=20=E4=BC=98=E5=8C=96=E5=90=8E?= =?UTF-8?q?=E5=8F=B0=E7=99=BB=E5=87=BA=E7=9A=84=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- framework/sdk-parent/frontend/src/api/user.js | 4 +-- .../frontend/src/store/modules/user.js | 25 ++++++++++--------- .../controller/LoginController.java | 5 ++-- 3 files changed, 17 insertions(+), 17 deletions(-) diff --git a/framework/sdk-parent/frontend/src/api/user.js b/framework/sdk-parent/frontend/src/api/user.js index f183d71550..9991606133 100644 --- a/framework/sdk-parent/frontend/src/api/user.js +++ b/framework/sdk-parent/frontend/src/api/user.js @@ -5,8 +5,8 @@ export function login(url, data) { return post(url, data) } -export function logout(sessionId) { - return sessionId ? get("/signout?X-AUTH-TOKEN=" + sessionId) : get("/signout"); +export function logout() { + return get("/signout"); } export function isLogin() { diff --git a/framework/sdk-parent/frontend/src/store/modules/user.js b/framework/sdk-parent/frontend/src/store/modules/user.js index 26cadda794..21b47acc24 100644 --- a/framework/sdk-parent/frontend/src/store/modules/user.js +++ b/framework/sdk-parent/frontend/src/store/modules/user.js @@ -111,19 +111,20 @@ export default { }, userLogout() { - let user = JSON.parse(localStorage.getItem(TokenKey)); - let sessionId = user ? user.sessionId : null; - clearSessionStorage(); return new Promise((resolve, reject) => { - logout(sessionId).then(() => { - location.href = '/#/login'; - location.reload(); - resolve(); - }).catch(error => { - location.href = '/#/login'; - location.reload(); - reject(error); - }) + logout() + .then(() => { + clearSessionStorage(); + location.href = '/#/login'; + location.reload(); + resolve(); + }) + .catch(error => { + clearSessionStorage(); + location.href = '/#/login'; + location.reload(); + reject(error); + }); }) }, switchWorkspace(response) { diff --git a/framework/sdk-parent/sdk/src/main/java/io/metersphere/controller/LoginController.java b/framework/sdk-parent/sdk/src/main/java/io/metersphere/controller/LoginController.java index 8407ad88d4..bfa99159d2 100644 --- a/framework/sdk-parent/sdk/src/main/java/io/metersphere/controller/LoginController.java +++ b/framework/sdk-parent/sdk/src/main/java/io/metersphere/controller/LoginController.java @@ -95,10 +95,9 @@ public class LoginController { @GetMapping(value = "/signout") @MsAuditLog(module = OperLogModule.AUTH_TITLE, beforeEvent = "#msClass.getUserId(id)", type = OperLogConstants.LOGIN, title = "登出", msClass = SessionUtils.class) - public ResultHolder logout(@RequestParam(name = SessionConstants.HEADER_TOKEN, required = false) String sessionId, HttpServletResponse response) throws Exception { - ssoLogoutService.logout(sessionId, response); + public void logout(HttpServletResponse response) throws Exception { + ssoLogoutService.logout(SessionUtils.getSessionId(), response); SecurityUtils.getSubject().logout(); - return ResultHolder.success(StringUtils.EMPTY); } /*Get default language*/