diff --git a/pages/login/loading.vue b/pages/login/loading.vue index 7a256af..1b6f9f0 100644 --- a/pages/login/loading.vue +++ b/pages/login/loading.vue @@ -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'); } diff --git a/utils/tologin.js b/utils/tologin.js index 1039780..a800f6d 100644 --- a/utils/tologin.js +++ b/utils/tologin.js @@ -25,7 +25,7 @@ export function toLogin(ajaxUrl) { if(process.env.NODE_ENV === 'development'){ location.href=config.loginPath+"?returnUrl="+encodeURIComponent(returnPage); }else{ - location.href=config.loginPath+"?returnUrl="+encodeURIComponent(urlPre+urlContext+'/pages/login/loading?returnUrl='+returnPage); + location.href=config.loginPath+"?returnUrl="+encodeURIComponent(urlPre+urlContext+'/pages/login/loading?returnUrl='+encodeURIComponent(returnPage)); } //location.href=config.loginPath }