提交修改

This commit is contained in:
lmj
2022-10-10 19:45:12 +08:00
parent f41bf46b6d
commit 254666382e
2 changed files with 14 additions and 5 deletions

View File

@@ -50,6 +50,7 @@
this.userName=this.name; this.userName=this.name;
if(this.avatar && this.avatar!=''){ if(this.avatar && this.avatar!=''){
this.userAvatar=this.avatar; this.userAvatar=this.avatar;
} }
this.usersex = this.sex; this.usersex = this.sex;
}, },
@@ -64,9 +65,15 @@
this.userName=newVal; this.userName=newVal;
}, },
avatar(newVal,oldVal){ avatar(newVal,oldVal){
console.log(newVal,'222')
if(newVal){ if(newVal){
if(newVal.startWith('http')){
this.userAvatar=newVal;
}else{
this.userAvatar=this.baseUrl+newVal; this.userAvatar=this.baseUrl+newVal;
} }
}
}, },
sex(newVal,oldVal){ sex(newVal,oldVal){
this.usersex=newVal; this.usersex=newVal;

View File

@@ -13,8 +13,8 @@
</div> </div>
<div class="personal-panel"> <div class="personal-panel">
<div class="personal-img"> <div class="personal-img">
<author-img :avatar="userInfo.avatar" :aid="userInfo.aid" :sex="userInfo.sex"></author-img> <author-img v-if="userInfo.avatar" :avatar="userInfo.avatar" :aid="userInfo.aid" :sex="userInfo.sex"></author-img>
<!-- {{ userInfo.avatar }} -->
</div> </div>
<!-- <img style="width:68px;height:68px" src="/images/Avatarman.png" alt=""> --> <!-- <img style="width:68px;height:68px" src="/images/Avatarman.png" alt=""> -->
<p class="personal-name">{{userInfo.name}} {{userInfo.userNo}}</p> <p class="personal-name">{{userInfo.name}} {{userInfo.userNo}}</p>
@@ -484,7 +484,7 @@
}, },
mounted() { mounted() {
this.userInfo = this.$store.getters.userInfo; this.userInfo = this.$store.getters.userInfo;
console.log(this.userInfo) console.log(this.userInfo,'111')
this.getCourseData(1); this.getCourseData(1);
this.getCaseData(); this.getCaseData();
this.getArticleData(); this.getArticleData();
@@ -581,7 +581,6 @@
if (item.type == 10) { if (item.type == 10) {
return this.webBaseUrl + '/course/micro?id=' + item.id; return this.webBaseUrl + '/course/micro?id=' + item.id;
} else if (item.type == 20) { } else if (item.type == 20) {
console.log(item)
return this.webBaseUrl + '/course/detail?id=' + item.id; return this.webBaseUrl + '/course/detail?id=' + item.id;
} }
return ''; return '';
@@ -961,6 +960,9 @@
::v-deep .el-avatar { ::v-deep .el-avatar {
width: 68px; width: 68px;
height: 68px; height: 68px;
img{
width: 100% !important;
}
} }
} }