mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/learning-system-portal.git
synced 2025-12-10 03:16:42 +08:00
首页卡片头像不出现问题
This commit is contained in:
@@ -1,7 +1,9 @@
|
||||
<template>
|
||||
<div class="item-author">
|
||||
<div :style="`width:${width};height:${height};`" @click="toHome()">
|
||||
{{userAvatar}}
|
||||
<el-avatar shape="circle" :src="userAvatar" v-if="userAvatar"></el-avatar>
|
||||
|
||||
<div v-else class="uavatar">
|
||||
<div v-if="sex == null" style="border-radius: 50%;" :style="`width:${width};height:${height};`"></div>
|
||||
<div v-else>
|
||||
@@ -52,6 +54,7 @@
|
||||
},
|
||||
mounted() {
|
||||
this.userName=this.name;
|
||||
this.usersex = this.sex;
|
||||
if(this.avatar){
|
||||
if(this.avatar.startsWith('http')){
|
||||
this.userAvatar=this.avatar;
|
||||
@@ -59,7 +62,8 @@
|
||||
this.userAvatar=this.baseUrl+this.avatar;
|
||||
}
|
||||
}
|
||||
this.usersex = this.sex;
|
||||
console.log(this.usersex)
|
||||
|
||||
},
|
||||
methods:{
|
||||
toHome() {
|
||||
|
||||
@@ -14,8 +14,10 @@
|
||||
</swiper>
|
||||
</div>
|
||||
<div class="personal-panel">
|
||||
<div class="personal-img">
|
||||
<author-img v-if="userInfo.avatar" :avatar="userInfo.avatar" :aid="userInfo.aid" :noJump="false" :sex="userInfo.sex"></author-img>
|
||||
<div class="personal-img">
|
||||
<author-img width="68px" height="68px" :avatar="userInfo.avatar" :aid="userInfo.aid" :noJump="false" :sex="userInfo.sex"></author-img>
|
||||
{{ userInfo.avatar }}
|
||||
|
||||
<!-- {{ userInfo.avatar }} -->
|
||||
</div>
|
||||
<!-- <img style="width:68px;height:68px" src="/images/Avatarman.png" alt=""> -->
|
||||
@@ -463,7 +465,7 @@
|
||||
needHobbyShow:false,//是否显示兴趣爱好
|
||||
formatNum:formatUserNumber,
|
||||
cutOrgNamePath:cutOrgNamePath,
|
||||
//userInfo: {},
|
||||
// userInfo: {},
|
||||
ankingList: [],
|
||||
answersList: [],
|
||||
Popularity: [],
|
||||
|
||||
Reference in New Issue
Block a user