flower-mp/pages/community/info.wxml
2025-12-02 11:39:24 +08:00

71 lines
2.7 KiB
Plaintext

<!--pages/community/info.wxml-->
<view>
<view style="padding-bottom: 200rpx;">
<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="https://res.catter.cn/pub/2025/09/30/20250930143142508.png" class="avatar"></image>
<view class="ml-16">
<view class="bold">第五季</view>
<view class="font-12 grey">23 小时前</view>
</view>
</view>
<view class="mt-16">
<view>{{info.content}}</view>
</view>
<view class="mt-16">
<view wx:if="{{info.imgList.length == 1}}">
<view wx:for="{{info.imgList}}">
<image src="{{info.url}}" style="border-radius: 16rpx; height: 50vw; width: 100%;" mode="aspectFill"></image>
</view>
</view>
<view wx:else class="grid">
<view class="item" wx:for="{{info.imgList}}">
<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" 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">
<view class="flex flex-center flex-justify-between">
<t-input borderless placeholder="发表评论:" bind:change="input"></t-input>
<t-icon name="send" size="30" class="ml-32" bind:tap="add"></t-icon>
</view>
</view>
</view>