fix: After entering the password for the public access link, the parameters carried by the URL address are missing (#3570)
This commit is contained in:
parent
827c06c03f
commit
4c9d024b67
@ -71,12 +71,13 @@ router.beforeEach(
|
|||||||
params: {
|
params: {
|
||||||
accessToken: to.params.accessToken,
|
accessToken: to.params.accessToken,
|
||||||
},
|
},
|
||||||
|
query: to.query,
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
if (p_token) {
|
if (p_token) {
|
||||||
next({ ...to, query: {} })
|
next({ ...to, query: to.query })
|
||||||
} else {
|
} else {
|
||||||
next()
|
next()
|
||||||
}
|
}
|
||||||
|
|||||||
@ -209,11 +209,19 @@ const loginHandle = () => {
|
|||||||
loginFormRef.value?.validate().then(() => {
|
loginFormRef.value?.validate().then(() => {
|
||||||
if (loginMode.value === 'LDAP') {
|
if (loginMode.value === 'LDAP') {
|
||||||
chatUser.ldapLogin(loginForm.value).then((ok) => {
|
chatUser.ldapLogin(loginForm.value).then((ok) => {
|
||||||
router.push({name: 'chat', params: {accessToken: chatUser.accessToken}})
|
router.push({
|
||||||
|
name: 'chat',
|
||||||
|
params: { accessToken: chatUser.accessToken },
|
||||||
|
query: route.query,
|
||||||
|
})
|
||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
chatUser.login(loginForm.value).then((ok) => {
|
chatUser.login(loginForm.value).then((ok) => {
|
||||||
router.push({name: 'chat', params: {accessToken: chatUser.accessToken}})
|
router.push({
|
||||||
|
name: 'chat',
|
||||||
|
params: { accessToken: chatUser.accessToken },
|
||||||
|
query: route.query,
|
||||||
|
})
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
@ -292,8 +300,7 @@ function redirectAuth(authType: string, needMessage: boolean = false) {
|
|||||||
.then(() => {
|
.then(() => {
|
||||||
window.location.href = url
|
window.location.href = url
|
||||||
})
|
})
|
||||||
.catch(() => {
|
.catch(() => {})
|
||||||
})
|
|
||||||
} else {
|
} else {
|
||||||
console.log('url', url)
|
console.log('url', url)
|
||||||
window.location.href = url
|
window.location.href = url
|
||||||
@ -328,7 +335,7 @@ onBeforeMount(() => {
|
|||||||
}
|
}
|
||||||
loginMode.value = modeList.value[0] || 'LOCAL'
|
loginMode.value = modeList.value[0] || 'LOCAL'
|
||||||
if (!modeList.value.includes('LOCAL') && !modeList.value.includes('LDAP')) {
|
if (!modeList.value.includes('LOCAL') && !modeList.value.includes('LDAP')) {
|
||||||
loginMode.value = '';
|
loginMode.value = ''
|
||||||
}
|
}
|
||||||
if (modeList.value.length == 1 && ['CAS', 'OIDC', 'OAuth2'].includes(modeList.value[0])) {
|
if (modeList.value.length == 1 && ['CAS', 'OIDC', 'OAuth2'].includes(modeList.value[0])) {
|
||||||
redirectAuth(modeList.value[0])
|
redirectAuth(modeList.value[0])
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user