From 05f543cb51a305a7f9b29ead63b11a926a7724c1 Mon Sep 17 00:00:00 2001 From: "Captain.B" Date: Thu, 28 Jan 2021 14:23:47 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E7=99=BB=E5=BD=95?= =?UTF-8?q?=E5=90=8E=E7=B3=BB=E7=BB=9F=E5=8F=82=E6=95=B0=E9=85=8D=E7=BD=AE?= =?UTF-8?q?-=E6=98=BE=E7=A4=BA=E8=AE=BE=E7=BD=AE=E5=92=8C=E8=AE=A4?= =?UTF-8?q?=E8=AF=81=E8=AE=BE=E7=BD=AE=E4=B8=8D=E6=98=BE=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../metersphere/commons/utils/ShiroUtils.java | 1 + frontend/src/login/Login.vue | 243 +++++++++--------- 2 files changed, 125 insertions(+), 119 deletions(-) diff --git a/backend/src/main/java/io/metersphere/commons/utils/ShiroUtils.java b/backend/src/main/java/io/metersphere/commons/utils/ShiroUtils.java index f6f8fd71ca..27430e98ae 100644 --- a/backend/src/main/java/io/metersphere/commons/utils/ShiroUtils.java +++ b/backend/src/main/java/io/metersphere/commons/utils/ShiroUtils.java @@ -28,6 +28,7 @@ public class ShiroUtils { filterChainDefinitionMap.put("/authsource/list/allenable", "anon"); filterChainDefinitionMap.put("/sso/signin", "anon"); filterChainDefinitionMap.put("/sso/callback", "anon"); + filterChainDefinitionMap.put("/license/valid", "anon"); // for swagger filterChainDefinitionMap.put("/swagger-ui.html", "anon"); diff --git a/frontend/src/login/Login.vue b/frontend/src/login/Login.vue index 666462ea7e..c121db1877 100644 --- a/frontend/src/login/Login.vue +++ b/frontend/src/login/Login.vue @@ -3,45 +3,45 @@ -
-
- -
-
- Metersphere - {{ $t('commons.welcome') }} -
+
+
+
+
+ Metersphere + {{ $t('commons.welcome') }} +
+
-
-
- - - - LDAP - 普通登录 - {{ auth.type }} {{ auth.name }} - - - - - - - - - -
-
- - {{ $t('commons.login') }} - -
-
- {{ msg }} -
+
+
+ + + + LDAP + 普通登录 + {{ auth.type }} {{ auth.name }} + + + + + + + + +
+
+ + {{ $t('commons.login') }} + +
+
+ {{ msg }} +
+
@@ -62,6 +62,7 @@ import {DEFAULT_LANGUAGE} from "@/common/js/constants"; const requireComponent = require.context('@/business/components/xpack/', true, /\.vue$/); const display = requireComponent.keys().length > 0 ? requireComponent("./display/Display.vue") : {}; const auth = requireComponent.keys().length > 0 ? requireComponent("./auth/Auth.vue") : {}; +const license = requireComponent.keys().length > 0 ? requireComponent("./license/LicenseMessage.vue") : null; export default { name: "Login", @@ -117,6 +118,10 @@ export default { created: function () { // 主页添加键盘事件,注意,不能直接在焦点事件上添加回车 document.addEventListener("keydown", this.watchEnter); + // + if (license.default) { + license.default.valid(this) + } }, destroyed() { @@ -182,106 +187,106 @@ export default {