From 681becdfb47290a61ceeb24b31d6cd88f3776862 Mon Sep 17 00:00:00 2001 From: daihh Date: Fri, 14 Oct 2022 17:38:13 +0800 Subject: [PATCH] =?UTF-8?q?=E4=B8=AA=E4=BA=BA=E4=B8=BB=E9=A1=B5=EF=BC=8C?= =?UTF-8?q?=E6=84=9F=E5=85=B4=E8=B6=A3=E7=9A=84=E4=BA=BA=E5=A4=B4=E5=83=8F?= =?UTF-8?q?=E6=98=BE=E7=A4=BA=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/Portal/authorImg.vue | 9 +++++---- src/views/homepage/Index.vue | 8 +++++--- 2 files changed, 10 insertions(+), 7 deletions(-) diff --git a/src/components/Portal/authorImg.vue b/src/components/Portal/authorImg.vue index bfba83a8..4d36235b 100644 --- a/src/components/Portal/authorImg.vue +++ b/src/components/Portal/authorImg.vue @@ -49,10 +49,13 @@ mounted() { this.userName=this.name; if(this.avatar){ - this.userAvatar=this.avatar; + if(this.avatar.startsWith('http')){ + this.userAvatar=this.avatar; + }else{ + this.userAvatar=this.baseUrl+this.avatar; + } } this.usersex = this.sex; - console.log(this.userAvatar,"this.userAvatar newVal"); }, methods:{ toHome() { @@ -65,14 +68,12 @@ this.userName=newVal; }, avatar(newVal,oldVal){ - console.log(newVal,"this.userAvatar newVal"); if(newVal){ if(newVal.startsWith('http')){ this.userAvatar=newVal; }else{ this.userAvatar=this.baseUrl+newVal; } - } }, aid(newVal,oldVal){ diff --git a/src/views/homepage/Index.vue b/src/views/homepage/Index.vue index 53cbc5e3..a9841f6f 100644 --- a/src/views/homepage/Index.vue +++ b/src/views/homepage/Index.vue @@ -99,16 +99,18 @@ }) }, userhobbyInfo() { + let $this=this; + $this.interestedList=[]; apiUserhobby.list(this.pageId).then(res=>{ if(res.status == 200) { let ids = res.result.map(item=>item.aid); const noReapetIds = [...new Set(ids)]; apiUser.getByIds(noReapetIds).then(res => { if (res.status == 200) { - this.interestedList = res.result; - //console.log(this.interestedList,'interestedList'); + $this.interestedList = res.result; + //console.log($this.interestedList,'interestedList'); } else { - this.$message.error(res.message); + $this.$message.error(res.message); } }); }