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