diff --git a/pages/login/loading.vue b/pages/login/loading.vue index afd5cfa..be36ef3 100644 --- a/pages/login/loading.vue +++ b/pages/login/loading.vue @@ -27,7 +27,7 @@ plus.runtime.openURL(this.$config.loginPath) //这里默认使用外部浏览器打开而不是内部web-view组件打开 // #endif // #ifdef H5 - console.log('this.$config.loginPath',this.$config.loginPath); + //console.log('this.$config.loginPath',this.$config.loginPath); if(this.$config.loginPath.startsWith('http')){ let returnUrl=window.location.protocol+'//'+window.location.host+"/"+this.$config.context; location.href=this.$config.loginPath+"?returnUrl="+encodeURIComponent(returnUrl+'/pages/login/loading'); diff --git a/utils/xajax.js b/utils/xajax.js index afd92d3..939c59e 100644 --- a/utils/xajax.js +++ b/utils/xajax.js @@ -40,7 +40,8 @@ const formRequest=function(method,url,data){ // #endif // #ifdef H5 //window.open(loginPath) - location.href=loginPath + let returnUrl=window.location.protocol+'//'+window.location.host+"/"+config.context; + location.href=config.loginPath+"?returnUrl="+encodeURIComponent(returnUrl+'/pages/login/loading'); // #endif }else{ uni.redirectTo({ @@ -89,7 +90,8 @@ const jsonRequest=function(method,url,data){ // #endif // #ifdef H5 //window.open(loginPath) - location.href=loginPath + let returnUrl=window.location.protocol+'//'+window.location.host+"/"+config.context; + location.href=config.loginPath+"?returnUrl="+encodeURIComponent(returnUrl+'/pages/login/loading'); // #endif }else{ uni.redirectTo({