This commit is contained in:
zhaofang
2022-09-30 14:15:51 +08:00
parent 636b282be8
commit 36854b62f3
3 changed files with 17 additions and 13 deletions

View File

@@ -1,9 +1,9 @@
<template>
<div class="item-author">
<div style="width:40px;height:40px;" @click="toHome()">
<div :style="`width:${width};height:${height};`" @click="toHome()">
<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%;width: 40px;height: 40px;"></div>
<div v-if="sex == null" style="border-radius: 50%;" :style="`width:${width};height:${height};`"></div>
<div v-else>
<div v-if="sex === 1 "><img src="../../../public/images/Avatarman.png" alt=""></div>
<div v-else><img src="../../../public/images/Avatarwoman.png" alt=""></div>
@@ -90,8 +90,8 @@
}
.uavatar{
// border: 1px solid #73adfe;
// width: 28px;
// height: 28px;
width: 100%;
height: 100%;
// background: #d9e9ff;
display: flex;
justify-content: center;
@@ -103,8 +103,8 @@
}
img{
border-radius: 50%;
width: 28px;
height: 28px;
width: 100%;
height: 100%;
}
}
}

View File

@@ -32,7 +32,9 @@
<p class="ach-title">可能感兴趣</p>
<ul>
<li class="ava-info" v-for="ava in interestedList" :key="ava.aid">
<img :src="baseUrl + ava.avatar" />
<!-- <img :src="baseUrl + ava.avatar" /> -->
<author-img width="48px" height="48px" :avatar="ava.avatar" :aid="ava.aid" :sex="ava.sex"></author-img>
<!-- <medal-img style="width:48px;height:48px" :item="ava"></medal-img> -->
<div class="ava-text">
<p style="color: #333333;">{{ava.name}}</p>
<p style="color: #666666;">{{ava.sign}}</p>
@@ -53,10 +55,11 @@
import apiUserhobby from '@/api/phase2/userhobby.js';
import apiUser from "@/api/system/user.js";
import apiFollow from "@/api/phase2/userfollow.js";
import authorImg from '@/components/Portal/authorImg.vue';
import { mapGetters } from 'vuex';
export default{
components:{top,UcHeader,MedalImg},
components:{top,UcHeader,MedalImg,authorImg},
data(){
return{
baseUrl:process.env.VUE_APP_FILE_BASE_URL,
@@ -86,13 +89,14 @@
})
},
userhobbyInfo() {
apiUserhobby.info(this.pageId).then(res=>{
apiUserhobby.list(this.pageId).then(res=>{
if(res.status == 200) {
let ids = res.result.map(item=>item.aid);
const noReapetIds = [...new Set(ids)];
apiUser.getByIds(noReapetIds).then(res => {
if (res.status == 200) {
this.interestedList = res.result;
console.log(this.interestedList,'interestedList');
} else {
this.$message.error(res.message);
}

View File

@@ -1,10 +1,10 @@
<template>
<div class="home-page-left">
<div class="book-input">
<!-- <div class="book-input">
<span>分享书籍</span>
<el-input style="width:130px" v-model="input" placeholder="请输入内容"></el-input>
<i style="color: #333333" class="el-icon-search"></i>
</div>
</div> -->
<el-tabs v-model="activeName" @tab-click="handleClick">
<el-tab-pane name="">
<span slot="label"><svg-icon icon-class="home-dynamic" style="font-size: 30px;"></svg-icon> <span class="tabs-info">动态</span></span>
@@ -46,10 +46,10 @@
<span slot="label"><svg-icon icon-class="home-follow" style="font-size: 30px;"></svg-icon><span class="tabs-info">关注</span></span>
<follow-list ref="followList"></follow-list>
</el-tab-pane>
<el-tab-pane name="8">
<!-- <el-tab-pane name="8">
<span slot="label"><svg-icon icon-class="home-book" style="font-size: 30px;"></svg-icon><span class="tabs-info">书籍</span></span>
<book-list></book-list>
</el-tab-pane>
</el-tab-pane> -->
</el-tabs>
<div style="text-align: center; margin-top:57px;" v-show="page.count > 0">
<el-pagination