fix(仪表板): 移动端访问带密码的分享链接错误 #15961

This commit is contained in:
fit2cloud-chenyw
2025-04-30 11:51:32 +08:00
parent 3885f05a88
commit 7b5cedafe4

View File

@@ -94,6 +94,13 @@ const refresh = async (formEl: FormInstance | undefined) => {
}
})
}
const formatPwd = (pwdText: string) => {
try {
return decodeURIComponent(pwdText)
} catch (e) {
return pwdText
}
}
const prepare = () => {
const curLocation = window.location.href
const pmIndex = curLocation.lastIndexOf('?')
@@ -114,6 +121,7 @@ const prepare = () => {
}
vid.value = uuid
if (pwd) {
pwd = formatPwd(pwd)
form.value.password = pwd
refresh(pwdForm.value)
}