From 071a1d7a73b876218247eec69e5e0b762c46c5b7 Mon Sep 17 00:00:00 2001 From: daihh Date: Mon, 5 Dec 2022 14:57:12 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8F=90=E4=BA=A4=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components/author-img/author-img.vue | 9 ++++++--- pages/login/loading.vue | 13 ++++++++++--- pages/news/index.vue | 4 +++- 3 files changed, 19 insertions(+), 7 deletions(-) diff --git a/components/author-img/author-img.vue b/components/author-img/author-img.vue index 0cdf6f2..d9dff48 100644 --- a/components/author-img/author-img.vue +++ b/components/author-img/author-img.vue @@ -3,10 +3,13 @@ - + + + - - + + + diff --git a/pages/login/loading.vue b/pages/login/loading.vue index abfa1aa..afd5cfa 100644 --- a/pages/login/loading.vue +++ b/pages/login/loading.vue @@ -27,7 +27,14 @@ plus.runtime.openURL(this.$config.loginPath) //这里默认使用外部浏览器打开而不是内部web-view组件打开 // #endif // #ifdef H5 - window.open(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'); + }else{ + location.href=this.$config.loginPath; + } + // #endif }else{ apiLogin.boeLogin(token).then(rs=>{ @@ -55,9 +62,9 @@ } } }else{ - uni.switchTab({ + uni.switchTab({ url:'/pages/index/index' - }) + }) } }); diff --git a/pages/news/index.vue b/pages/news/index.vue index 755d969..6aa7b11 100644 --- a/pages/news/index.vue +++ b/pages/news/index.vue @@ -105,7 +105,9 @@ if(res.result.list.length!=0){ res.result.list.forEach(item => { item.authorInfo={avatar:'',name:'',code:'',sex:null}; - ids.push(item.sendAid); + if(item.sendAid){ + ids.push(item.sendAid); + } item.checked = false; this.message.list.push(item); });