关于跳转登录URL传递的问题

0,在跳转登录前务必使用[encodeURIComponent]将URL编码

login: function() {
	//登录
        mui.msg('正在登录,请稍等哒...');
	window.location.href = '/auth/login?RedirectUrl=' + encodeURIComponent(window.location.href);
	}

1,否则当前url带有两个参数时会发生

     跳转的url为 /auth/login?RedirectUrl=https://www.xxx.com/fuck/?uuid=abc&bitch=def

2,这时后台拿到的RedirectUrl会仅包含https://www.xxx.com/fuck/?uuid=abc 而 bitch 参数将会丢失

猜你喜欢

转载自blog.csdn.net/qq_40312076/article/details/80744649