From 254666382ef0cf5d1bc450ea9dca7b0738c71df1 Mon Sep 17 00:00:00 2001 From: lmj <3407000732@qq.com> Date: Mon, 10 Oct 2022 19:45:12 +0800 Subject: [PATCH] =?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 --- src/components/Portal/authorImg.vue | 9 ++++++++- src/views/Index.vue | 10 ++++++---- 2 files changed, 14 insertions(+), 5 deletions(-) diff --git a/src/components/Portal/authorImg.vue b/src/components/Portal/authorImg.vue index 21f9dc3f..91c2d897 100644 --- a/src/components/Portal/authorImg.vue +++ b/src/components/Portal/authorImg.vue @@ -50,6 +50,7 @@ this.userName=this.name; if(this.avatar && this.avatar!=''){ this.userAvatar=this.avatar; + } this.usersex = this.sex; }, @@ -64,8 +65,14 @@ this.userName=newVal; }, avatar(newVal,oldVal){ + console.log(newVal,'222') if(newVal){ - this.userAvatar=this.baseUrl+newVal; + if(newVal.startWith('http')){ + this.userAvatar=newVal; + }else{ + this.userAvatar=this.baseUrl+newVal; + } + } }, sex(newVal,oldVal){ diff --git a/src/views/Index.vue b/src/views/Index.vue index 069ea812..28657bfa 100644 --- a/src/views/Index.vue +++ b/src/views/Index.vue @@ -13,8 +13,8 @@
- - + +

{{userInfo.name}} {{userInfo.userNo}}

@@ -484,7 +484,7 @@ }, mounted() { this.userInfo = this.$store.getters.userInfo; - console.log(this.userInfo) + console.log(this.userInfo,'111') this.getCourseData(1); this.getCaseData(); this.getArticleData(); @@ -581,7 +581,6 @@ if (item.type == 10) { return this.webBaseUrl + '/course/micro?id=' + item.id; } else if (item.type == 20) { - console.log(item) return this.webBaseUrl + '/course/detail?id=' + item.id; } return ''; @@ -961,6 +960,9 @@ ::v-deep .el-avatar { width: 68px; height: 68px; + img{ + width: 100% !important; + } } }