hku-class/miniprogram/pages/timeline-detail/index.wxml
2026-05-16 23:59:13 +08:00

49 lines
2.4 KiB
Plaintext
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<view class="page" wx:if="{{post}}">
<view class="circle-detail-head">
<view class="circle-avatar large">{{post.author_initial}}</view>
<view class="circle-head-body">
<view class="circle-author">{{post.author_name}}</view>
<view class="circle-time">{{post.created_at_text}}</view>
</view>
<view wx:if="{{canDelete}}" class="detail-more" bindtap="openActions">···</view>
</view>
<view class="circle-detail">
<view class="circle-post-title">{{post.title}}</view>
<view wx:if="{{post.content}}" class="circle-content">{{post.content}}</view>
<view wx:if="{{post.image_urls && post.image_urls.length}}" class="circle-images detail-images">
<image wx:for="{{post.image_urls}}" wx:key="*this" src="{{item}}" mode="aspectFill" data-src="{{item}}" bindtap="previewImage" />
</view>
<view class="circle-actions-row">
<view class="circle-action {{post.like_action_class}}" bindtap="toggleLike">{{post.like_action_text}} {{post.like_count}}</view>
<view class="circle-action" bindtap="openComment">评论 {{post.comment_count}}</view>
</view>
</view>
<view class="circle-feedback detail-feedback">
<view wx:if="{{post.like_count}}" class="circle-likes">赞 {{post.like_count}}</view>
<view wx:for="{{post.comments}}" wx:key="id" class="circle-comment" data-comment-id="{{item.id}}" data-name="{{item.author_name}}" data-can-delete="{{item.can_delete}}" bindtap="replyComment">
<text class="circle-comment-name">{{item.author_name}}</text>
<text>{{item.content}}</text>
</view>
<view wx:if="{{!post.like_count && !post.comments.length}}" class="muted">还没有点赞和评论</view>
</view>
<view class="comment-dock {{keyboardOpen ? 'keyboard-open' : ''}}">
<view wx:if="{{replyToName}}" class="replying-bar">
<view>回复 {{replyToName}}</view>
<view bindtap="cancelReply">取消</view>
</view>
<view class="comment-box">
<input value="{{commentText}}" bindinput="onCommentInput" bindfocus="onCommentFocus" bindblur="onCommentBlur" bindkeyboardheightchange="onKeyboardHeightChange" placeholder="{{inputPlaceholder}}" adjust-position="{{true}}" cursor-spacing="{{0}}" focus="{{inputFocus}}" hold-keyboard="{{true}}" />
<button loading="{{submitting}}" bindtap="submitComment">发送</button>
</view>
</view>
</view>
<view class="page" wx:elif="{{!loading}}">
<view class="empty">
<view class="muted">未找到动态</view>
</view>
</view>