From 46fdb4915292fb39a44de8e8382e07c85a155ca1 Mon Sep 17 00:00:00 2001 From: shiziyuan9527 Date: Tue, 22 Nov 2022 15:27:24 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E7=B3=BB=E7=BB=9F=E8=AE=BE=E7=BD=AE):=20?= =?UTF-8?q?=E7=99=BB=E5=BD=95=E8=AE=A4=E8=AF=81=E6=BA=90=E8=A2=AB=E5=85=B3?= =?UTF-8?q?=E9=97=AD=E5=90=8E=E4=BE=9D=E7=84=B6=E5=8F=AF=E4=BB=A5=E8=BF=9B?= =?UTF-8?q?=E8=A1=8C=E8=AE=A4=E8=AF=81=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --bug=1020042 --user=李玉号 【系统设置】禁用OAuth2-登录ms一直是加载状态 https://www.tapd.cn/55049933/s/1301188 --- .../gateway/controller/LoginController.java | 4 + framework/sdk-parent/frontend/src/api/user.js | 4 + .../frontend/src/business/login/index.vue | 77 +++++++++++-------- .../frontend/src/i18n/lang/en-US.js | 1 + .../frontend/src/i18n/lang/zh-CN.js | 1 + .../frontend/src/i18n/lang/zh-TW.js | 1 + 6 files changed, 58 insertions(+), 30 deletions(-) diff --git a/framework/gateway/src/main/java/io/metersphere/gateway/controller/LoginController.java b/framework/gateway/src/main/java/io/metersphere/gateway/controller/LoginController.java index 1fb1095054..01482aa3d2 100644 --- a/framework/gateway/src/main/java/io/metersphere/gateway/controller/LoginController.java +++ b/framework/gateway/src/main/java/io/metersphere/gateway/controller/LoginController.java @@ -119,6 +119,10 @@ public class LoginController { return Mono.just(ResultHolder.success(authSourceService.listAllEnable())); } + @GetMapping("authsource/{authId}") + public Mono getAuthSource(@PathVariable("authId") String authId) { + return Mono.just(ResultHolder.success(authSourceService.getAuthSource(authId))); + } @GetMapping(value = "/services") public Mono getServices() { diff --git a/framework/sdk-parent/frontend/src/api/user.js b/framework/sdk-parent/frontend/src/api/user.js index 19bf3f9688..f183d71550 100644 --- a/framework/sdk-parent/frontend/src/api/user.js +++ b/framework/sdk-parent/frontend/src/api/user.js @@ -57,6 +57,10 @@ export function getAuthSources() { return get('/authsource/list/allenable') } +export function getAuthSource(id) { + return get('/authsource/' + id) +} + export function getProjectMemberOption() { return get('/user/project/member/option'); } diff --git a/framework/sdk-parent/frontend/src/business/login/index.vue b/framework/sdk-parent/frontend/src/business/login/index.vue index 62732604f2..725a8d172a 100644 --- a/framework/sdk-parent/frontend/src/business/login/index.vue +++ b/framework/sdk-parent/frontend/src/business/login/index.vue @@ -59,9 +59,17 @@