fix(router): 修复当myQuery为空对象时仍添加查询参数的问题
This commit is contained in:
@@ -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)}`
|
||||
|
||||
Reference in New Issue
Block a user