From 768bb771d6c2a78e7b1524b285af7a6a673a71d1 Mon Sep 17 00:00:00 2001 From: fit2cloud-chenyw Date: Wed, 18 Sep 2024 15:45:37 +0800 Subject: [PATCH] =?UTF-8?q?fix(X-Pack):=20=E5=AF=86=E7=A0=81=E6=9C=89?= =?UTF-8?q?=E6=95=88=E6=9C=9F=E6=9C=BA=E5=88=B6=E5=BC=95=E5=8F=91=E7=99=BB?= =?UTF-8?q?=E5=BD=95=E6=97=A0=E6=B3=95=E8=B7=B3=E8=BD=AC=E5=88=B0=E4=B8=BB?= =?UTF-8?q?=E9=A1=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- core/core-frontend/src/views/login/index.vue | 17 +++++++++-------- de-xpack | 2 +- 2 files changed, 10 insertions(+), 9 deletions(-) diff --git a/core/core-frontend/src/views/login/index.vue b/core/core-frontend/src/views/login/index.vue index 2ba4b36101..84b01a4ae7 100644 --- a/core/core-frontend/src/views/login/index.vue +++ b/core/core-frontend/src/views/login/index.vue @@ -113,14 +113,7 @@ const handleLogin = () => { userStore.setExp(exp) if (!xpackLoadFail.value && xpackInvalidPwd.value?.invokeMethod) { const param = { - methodName: 'init', - args: r => { - duringLogin.value = !!r - if (r) { - const queryRedirectPath = getCurLocation() - router.push({ path: queryRedirectPath }) - } - } + methodName: 'init' } xpackInvalidPwd?.value.invokeMethod(param) return @@ -146,6 +139,13 @@ const ldapValidate = callback => { const ldapFeedback = () => { duringLogin.value = false } +const invalidPwdCb = val => { + duringLogin.value = !!val + if (val) { + const queryRedirectPath = getCurLocation() + router.push({ path: queryRedirectPath }) + } +} const xpackLoadFail = ref(false) const loadingText = ref('登录中...') const loginContainer = ref() @@ -376,6 +376,7 @@ onMounted(async () => { ref="xpackInvalidPwd" jsname="L2NvbXBvbmVudC9sb2dpbi9JbnZhbGlkUHdk" @load-fail="() => (xpackLoadFail = true)" + @call-back="invalidPwdCb" /> diff --git a/de-xpack b/de-xpack index bf9cd45f20..303250e24b 160000 --- a/de-xpack +++ b/de-xpack @@ -1 +1 @@ -Subproject commit bf9cd45f206458e3bfa385e451f56e74dea334ee +Subproject commit 303250e24bf9c59dffe5d88898e7428ba8657751