急急急!希望老师尽快解答呀
来源:5-8 数据插入云数据库
一定能学会
2022-03-27
问题描述:
显示渲染层网络层错误,而且发布卡片不出头像。
相关截图:
blog-card.wxml如下
<view class="blog">
<view class="blog-title">
<image class="blog-portrait" src="{{blog.avatarUrl}}"></image>
<view class="blog-box">
<view class="blog-nickName">{{blog.nickName}}</view>
<view class="blog-time">{{blog.createTime}}</view>
</view>
</view>
<view class="blog-content">
<text>{{blog.content}}</text>
</view>
<view class="blog-img">
<block wx:for="{{blog.img}}" wx:key="index">
<image class="img" src="{{item}}" mode="aspectFill" catch:tap="onPreviewImage" data-imgsrc="{{item}}" data-imgs="{{blog.img}}"></image>
</block>
</view>
</view>
blog-card.wxss如下
page{
background-color: #f1f1f1;
}
.blog {
padding: 20rpx;
background-color: #fff;
}
.blog-title {
display: flex;
align-items: center;
}
.blog-portrait {
width: 64rpx;
height: 64rpx;
border-radius: 50%;
margin-right: 20rpx;
}
.blog-box {
flex: 1;
}
.blog-time {
font-size: 24rpx;
color: #939393;
}
.blog-content {
margin: 20rpx 0;
font-size: 32rpx;
font-weight: 400;
line-height: 1.5;
}
.blog-img {
display: flex;
flex-wrap: wrap;
margin: 0 auto;
}
.blog-img .img {
width: 230rpx;
height: 230rpx;
margin-right: 10rpx;
margin-bottom: 10rpx;
}
.blog-img .img:nth-child(3n) {
margin-right: 0;
}
.blog-nickName {
font-size: 32rpx;
}
1回答
-
谢成
2022-03-28
头像的图片路径有问题,不应该有上面红线的这部分。
00
相似问题