fix(router): 修复当myQuery为空对象时仍添加查询参数的问题

This commit is contained in:
feige996
2025-09-07 16:40:58 +08:00
parent 6653ea60fd
commit ca283f0619

View File

@@ -73,7 +73,7 @@ export const navigateToInterceptor = {
}
let fullPath = path
if (myQuery) {
if (Object.keys(myQuery).length) {
fullPath += `?${Object.keys(myQuery).map(key => `${key}=${myQuery[key]}`).join('&')}`
}
const redirectUrl = `${LOGIN_PAGE}?redirect=${encodeURIComponent(fullPath)}`