未登录跳转,url进行编码处理

This commit is contained in:
daihh
2022-10-16 17:54:05 +08:00
parent 02b5d5834f
commit fe22454311
2 changed files with 6 additions and 2 deletions

View File

@@ -70,8 +70,8 @@ router.beforeEach((to, from, next) => {
//store.commit('portal/SetBackUrl',location.href);
//console.log(location.href,'location.href');
//let urlPre=window.location.protocol+'//'+window.location.host;
//let backUrl=location.href.substring(urlPre.length);
location.href=process.env.VUE_APP_LOGIN_URL+"?returnUrl="+location.href;
//let backUrl=location.href.substring(urlPre.length); encodeURIComponent()
location.href=process.env.VUE_APP_LOGIN_URL+"?returnUrl="+encodeURIComponent(location.href);
NProgress.done()
}