我在使用路由重定向时增加了一个值为路径的参数, 先通过encodeURIComponent转码后, 将参数带到新页面, 然后这时的浏览器所带的参数与自己转码后的不一样了
跳转前
let redirect = encodeURIComponent(transition.to.path); //%2Fapp%2Fcreation
transition.redirect('/login?redirect=' + redirect);
跳转后

此时浏览器地址上的参数与之前转码后的不一样了
%2Fapp%2Fcreation //正确的
%252Fapp%252Fcreation //浏览器上的
问题已解决.
使用unescape
Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号
学习是最好的投资!