67 lines
3.2 KiB
Plaintext
67 lines
3.2 KiB
Plaintext
<!--pages/community/info.wxml-->
|
|
<view>
|
|
<view style="padding-bottom: 250rpx;">
|
|
<view wx:if="{{info}}" class="padding row mb-32" data-id="{{item.id}}" bind:tap="goInfo">
|
|
<view class="flex flex-center flex-justify-start">
|
|
<image src="{{info.user.avatar.url}}" class="avatar"></image>
|
|
<view class="ml-16">
|
|
<view class="bold">{{info.user.name}}</view>
|
|
<view class="font-12 grey">{{info.createdAt}}</view>
|
|
</view>
|
|
</view>
|
|
<view class="mt-16">
|
|
<view>{{info.content}}</view>
|
|
</view>
|
|
<view class="mt-16">
|
|
<view wx:if="{{info.imgList.length == 1}}" data-url="{{info.imgList[0].url}}" bind:tap="goPreview">
|
|
<image src="{{info.imgList[0].url}}" style="border-radius: 16rpx; height: 50vw; width: 100%;" mode="aspectFill"></image>
|
|
</view>
|
|
<view wx:else class="grid">
|
|
<view class="item" wx:for="{{info.imgList}}" data-url="{{item.url}}" bind:tap="goPreview">
|
|
<view>
|
|
<image src="{{item.url}}" style="width: 100%;height: 30vw; border-radius: 16rpx;" mode="aspectFill" b></image>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
<view class="mt-32 flex flex-center flex-justify-end">
|
|
<view class="flex flex-center" data-item="{{info}}" bind:tap="like">
|
|
<t-icon name="{{info.hasLiked === 1 ?'thumb-up-filled':'thumb-up'}}" style="color: {{info.hasLiked === 1 ?'red':''}};"></t-icon>
|
|
<view class="ml-16">{{info.likeCount}}</view>
|
|
</view>
|
|
<view class="flex flex-center ml-32">
|
|
<t-icon name="chat-bubble-smile"></t-icon>
|
|
<view class="ml-16">{{info.commentCount}}</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
<view class="white-bg padding" style="border-bottom: #F6F6F6 1rpx solid;" wx:for="{{info.commentList}}">
|
|
<view class="flex flex-center flex-justify-start flex-aligin-start">
|
|
<t-avatar class="avatar-example" shape="round" wx:if="{{item.user.avatar}}" image="{{item.user.avatar.url}}" size="60rpx" />
|
|
<t-avatar class="avatar-example" shape="round" wx:else image="https://res.catter.cn/pub/2025/12/02/202512021046843.jpg" size="60rpx" />
|
|
<view class="full-width">
|
|
<view class="font-12 ml-16 flex flex-center flex-justify-between">
|
|
<view class="primary">
|
|
{{item.user.name}}
|
|
</view>
|
|
<view class="font-12 grey">
|
|
{{item.createdAt}}
|
|
</view>
|
|
</view>
|
|
<view class="mt-16 ml-16 font-12">
|
|
<view>{{item.content}}</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
|
|
<view class="bottom white-bg" style="background-color: white;">
|
|
<view class="flex flex-center flex-justify-between" style="margin-bottom: 32rpx; padding-bottom: 50rpx;">
|
|
<t-textarea placeholder="发表评论..." value="{{content}}" placeholder-style="padding-top:10rpx;" autosize="{{ { minRows: 1, maxRows: 4 } }}" disableDefaultPadding="{{true}}" cursor-spacing="{{10}}" fixed="{{true}}" bind:change="input" style="background-color: #F6F6F6; border-radius: 8rpx; flex: 1; padding: 16rpx 24rpx; line-height: 60rpx;"></t-textarea>
|
|
<t-icon name="send" size="30" class="ml-32" bind:tap="add"></t-icon>
|
|
</view>
|
|
</view>
|
|
|
|
|
|
</view> |