两次编码url

This commit is contained in:
daihh
2023-03-02 10:47:30 +08:00
parent b874ef5307
commit b72df146b9
2 changed files with 4 additions and 3 deletions

View File

@@ -15,6 +15,7 @@
},
onLoad(options) {
this.toUrl=options.returnUrl;
console.log(this.toUrl,'options.returnUrl');
},
mounted() {
let token=getToken();
@@ -31,7 +32,7 @@
//console.log('this.toUrl',this.toUrl);
//console.log('this.$config.loginPath',this.$config.loginPath);
if(this.toUrl){
location.href=this.$config.loginPath+"?returnUrl="+encodeURIComponent(urlPre+'/pages/login/loading?returnUrl='+this.toUrl);
location.href=this.$config.loginPath+"?returnUrl="+encodeURIComponent(urlPre+'/pages/login/loading?returnUrl='+encodeURIComponent(this.toUrl));
}else{
location.href=this.$config.loginPath+"?returnUrl="+encodeURIComponent(urlPre+'/pages/login/loading');
}
@@ -78,7 +79,7 @@
// #endif
// #ifdef H5
if(this.toUrl){
location.href=this.$config.loginPath+"?returnUrl="+encodeURIComponent(urlPre+'/pages/login/loading?returnUrl='+this.toUrl);
location.href=this.$config.loginPath+"?returnUrl="+encodeURIComponent(urlPre+'/pages/login/loading?returnUrl='+encodeURIComponent(this.toUrl));
}else{
location.href=this.$config.loginPath+"?returnUrl="+encodeURIComponent(urlPre+'/pages/login/loading');
}