forked from github/dataease
Merge pull request #12257 from dataease/pr@dev-v2@fix_pwd_invalid
fix(X-Pack): 密码有效期机制引发登录无法跳转到主页
This commit is contained in:
commit
e74015ed75
@ -113,14 +113,7 @@ const handleLogin = () => {
|
|||||||
userStore.setExp(exp)
|
userStore.setExp(exp)
|
||||||
if (!xpackLoadFail.value && xpackInvalidPwd.value?.invokeMethod) {
|
if (!xpackLoadFail.value && xpackInvalidPwd.value?.invokeMethod) {
|
||||||
const param = {
|
const param = {
|
||||||
methodName: 'init',
|
methodName: 'init'
|
||||||
args: r => {
|
|
||||||
duringLogin.value = !!r
|
|
||||||
if (r) {
|
|
||||||
const queryRedirectPath = getCurLocation()
|
|
||||||
router.push({ path: queryRedirectPath })
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
xpackInvalidPwd?.value.invokeMethod(param)
|
xpackInvalidPwd?.value.invokeMethod(param)
|
||||||
return
|
return
|
||||||
@ -146,6 +139,13 @@ const ldapValidate = callback => {
|
|||||||
const ldapFeedback = () => {
|
const ldapFeedback = () => {
|
||||||
duringLogin.value = false
|
duringLogin.value = false
|
||||||
}
|
}
|
||||||
|
const invalidPwdCb = val => {
|
||||||
|
duringLogin.value = !!val
|
||||||
|
if (val) {
|
||||||
|
const queryRedirectPath = getCurLocation()
|
||||||
|
router.push({ path: queryRedirectPath })
|
||||||
|
}
|
||||||
|
}
|
||||||
const xpackLoadFail = ref(false)
|
const xpackLoadFail = ref(false)
|
||||||
const loadingText = ref('登录中...')
|
const loadingText = ref('登录中...')
|
||||||
const loginContainer = ref()
|
const loginContainer = ref()
|
||||||
@ -376,6 +376,7 @@ onMounted(async () => {
|
|||||||
ref="xpackInvalidPwd"
|
ref="xpackInvalidPwd"
|
||||||
jsname="L2NvbXBvbmVudC9sb2dpbi9JbnZhbGlkUHdk"
|
jsname="L2NvbXBvbmVudC9sb2dpbi9JbnZhbGlkUHdk"
|
||||||
@load-fail="() => (xpackLoadFail = true)"
|
@load-fail="() => (xpackLoadFail = true)"
|
||||||
|
@call-back="invalidPwdCb"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
2
de-xpack
2
de-xpack
@ -1 +1 @@
|
|||||||
Subproject commit bf9cd45f206458e3bfa385e451f56e74dea334ee
|
Subproject commit 303250e24bf9c59dffe5d88898e7428ba8657751
|
Loading…
Reference in New Issue
Block a user