mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/learning-system-portal.git
synced 2025-12-16 22:36:43 +08:00
个人主页,感兴趣的人头像显示问题
This commit is contained in:
@@ -49,10 +49,13 @@
|
|||||||
mounted() {
|
mounted() {
|
||||||
this.userName=this.name;
|
this.userName=this.name;
|
||||||
if(this.avatar){
|
if(this.avatar){
|
||||||
|
if(this.avatar.startsWith('http')){
|
||||||
this.userAvatar=this.avatar;
|
this.userAvatar=this.avatar;
|
||||||
|
}else{
|
||||||
|
this.userAvatar=this.baseUrl+this.avatar;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
this.usersex = this.sex;
|
this.usersex = this.sex;
|
||||||
console.log(this.userAvatar,"this.userAvatar newVal");
|
|
||||||
},
|
},
|
||||||
methods:{
|
methods:{
|
||||||
toHome() {
|
toHome() {
|
||||||
@@ -65,14 +68,12 @@
|
|||||||
this.userName=newVal;
|
this.userName=newVal;
|
||||||
},
|
},
|
||||||
avatar(newVal,oldVal){
|
avatar(newVal,oldVal){
|
||||||
console.log(newVal,"this.userAvatar newVal");
|
|
||||||
if(newVal){
|
if(newVal){
|
||||||
if(newVal.startsWith('http')){
|
if(newVal.startsWith('http')){
|
||||||
this.userAvatar=newVal;
|
this.userAvatar=newVal;
|
||||||
}else{
|
}else{
|
||||||
this.userAvatar=this.baseUrl+newVal;
|
this.userAvatar=this.baseUrl+newVal;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
aid(newVal,oldVal){
|
aid(newVal,oldVal){
|
||||||
|
|||||||
@@ -99,16 +99,18 @@
|
|||||||
})
|
})
|
||||||
},
|
},
|
||||||
userhobbyInfo() {
|
userhobbyInfo() {
|
||||||
|
let $this=this;
|
||||||
|
$this.interestedList=[];
|
||||||
apiUserhobby.list(this.pageId).then(res=>{
|
apiUserhobby.list(this.pageId).then(res=>{
|
||||||
if(res.status == 200) {
|
if(res.status == 200) {
|
||||||
let ids = res.result.map(item=>item.aid);
|
let ids = res.result.map(item=>item.aid);
|
||||||
const noReapetIds = [...new Set(ids)];
|
const noReapetIds = [...new Set(ids)];
|
||||||
apiUser.getByIds(noReapetIds).then(res => {
|
apiUser.getByIds(noReapetIds).then(res => {
|
||||||
if (res.status == 200) {
|
if (res.status == 200) {
|
||||||
this.interestedList = res.result;
|
$this.interestedList = res.result;
|
||||||
//console.log(this.interestedList,'interestedList');
|
//console.log($this.interestedList,'interestedList');
|
||||||
} else {
|
} else {
|
||||||
this.$message.error(res.message);
|
$this.$message.error(res.message);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user