首页推荐接口对接

This commit is contained in:
zhaofang
2022-11-09 14:06:13 +08:00
parent 5559d0a227
commit 7edbcfa743
7 changed files with 290 additions and 53 deletions

View File

@@ -1,17 +1,17 @@
<template>
<view class="item-author" style="display: flex;line-height: 25px;">
<view>
<u-avatar v-if="avatar && avatar!=''" shape="circle" :size="20" :src="fileUrl+avatar" ></u-avatar>
<u-avatar v-if="avatar && avatar!=''" shape="circle" :size="width" :src="fileUrl+avatar" ></u-avatar>
<!-- <u-avatar v-else :size="25" icon="account" shape="square"></u-avatar> -->
<view v-else>
<view v-if="sex == null" class="peo"></view>
<view v-else>
<view v-else :style="{width:width,height:height}">
<view class="peo" v-if="sex === 1 "><image src="../../static/images/man.png" alt=""></view>
<view class="peo" v-else><image src="../../static/images/woman.png" alt=""></view>
</view>
</view>
</view>
<view style="padding-left:16upx;padding-top: 4upx;font-size: 28upx;color: #666666;">{{name}}</view>
<view class="author-name">{{name}}</view>
<!-- <view v-if="showInfo && info!=''" style="padding-left: 10upx;padding-top: 10upx;">({{info}})</view> -->
<!-- ({{info}}) -->
</view>
@@ -43,7 +43,15 @@
sex:{
type:Number,
default:null
}
},
width:{
type:String,
default:'20px'
},
height:{
type:String,
default:'20px'
},
},
data(){
return {
@@ -88,8 +96,8 @@
<style lang="scss" scoped>
.peo{
width: 25px;
height: 25px;
width: 100%;
height: 100%;
image{
width: 100%;
height: 100%;
@@ -114,5 +122,11 @@
font-size: 14upx;
display: flex;
align-items: center;
.author-name{
padding-left:16upx;
padding-top: 4upx;
font-size: 28upx;
color: #666666;
}
}
</style>