From 554a7931db2bd27a8d30dd37ab128fa251df272f Mon Sep 17 00:00:00 2001 From: daihh Date: Tue, 6 Dec 2022 15:40:09 +0800 Subject: [PATCH 1/3] =?UTF-8?q?=E8=B7=B3=E8=BD=AC=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- api/ajax.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/api/ajax.js b/api/ajax.js index c8ccc6e..8895378 100644 --- a/api/ajax.js +++ b/api/ajax.js @@ -41,7 +41,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,8 +90,8 @@ const jsonRequest=function(method,url,data){ plus.runtime.openURL(loginPath) //这里默认使用外部浏览器打开而不是内部web-view组件打开 // #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({ From 341c40c79c961f69359cb7a9212df2646064719f Mon Sep 17 00:00:00 2001 From: daihh Date: Tue, 6 Dec 2022 15:41:26 +0800 Subject: [PATCH 2/3] =?UTF-8?q?=E6=8F=90=E4=BA=A4=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/login/loading.vue | 2 +- utils/xajax.js | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) 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({ From 0d339879845d7a79612e1bb4bd59b1ce3e80cf82 Mon Sep 17 00:00:00 2001 From: daihh Date: Tue, 6 Dec 2022 15:58:15 +0800 Subject: [PATCH 3/3] =?UTF-8?q?=E6=8F=90=E4=BA=A4=E6=B5=8B=E8=AF=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/my/index.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pages/my/index.vue b/pages/my/index.vue index 271df68..dfe4979 100644 --- a/pages/my/index.vue +++ b/pages/my/index.vue @@ -51,7 +51,7 @@ - {{userInfoObj.name}} {{ userData.sign }} + {{userInfoObj.name}} {{ statData.level }}