feat: 整体页面优化,删除无用svg
This commit is contained in:
@@ -15,6 +15,11 @@
|
||||
enhanced="{{true}}"
|
||||
show-scrollbar="{{false}}"
|
||||
bindtap="hideActionPopup"
|
||||
scroll-top="{{scrollTop}}"
|
||||
bindscrolltolower="onReachBottom"
|
||||
refresher-enabled="{{true}}"
|
||||
bindrefresherrefresh="onRefresh"
|
||||
refresher-triggered="{{isRefreshing}}"
|
||||
>
|
||||
<block wx:if="{{displayedPosts.length > 0}}">
|
||||
<view wx:for="{{displayedPosts}}" wx:key="id" class="moment-post">
|
||||
@@ -49,10 +54,15 @@
|
||||
<!-- WeChat Style Popup -->
|
||||
<view class="action-popup {{activePostId === item.id ? 'show' : ''}}" catchtap="stopPropagation">
|
||||
<view class="popup-btn like-btn" catchtap="likePost" data-id="{{item.id}}">
|
||||
<t-icon name="heart" size="32rpx" color="#fff" />
|
||||
<t-icon name="{{item.likedByMe ? 'heart-filled' : 'heart'}}" size="32rpx" color="{{item.likedByMe ? '#FA5151' : '#fff'}}" />
|
||||
<text>{{item.likedByMe ? '取消' : '赞'}}</text>
|
||||
</view>
|
||||
<view class="popup-divider"></view>
|
||||
<view class="popup-btn fav-btn" catchtap="collectPost" data-id="{{item.id}}">
|
||||
<t-icon name="{{item.isFavorited ? 'star-filled' : 'star'}}" size="32rpx" color="{{item.isFavorited ? '#FFC107' : '#fff'}}" />
|
||||
<text>{{item.isFavorited ? '取消' : '收藏'}}</text>
|
||||
</view>
|
||||
<view class="popup-divider"></view>
|
||||
<view class="popup-btn comment-btn" catchtap="showCommentInput" data-id="{{item.id}}">
|
||||
<t-icon name="chat" size="32rpx" color="#fff" />
|
||||
<text>评论</text>
|
||||
@@ -68,17 +78,26 @@
|
||||
</view>
|
||||
|
||||
<!-- Likes & Comments Box -->
|
||||
<view wx:if="{{item.likes.length > 0 || item.comments.length > 0}}" class="likes-comments-box">
|
||||
<!-- Likes -->
|
||||
<view wx:if="{{item.likes.length > 0}}" class="likes-section">
|
||||
<t-icon name="heart-filled" size="28rpx" color="#FA5151" />
|
||||
<view class="likes-list">
|
||||
<text wx:for="{{item.likes}}" wx:for-item="liker" wx:key="*this" class="like-name">{{liker}}{{index < item.likes.length - 1 ? ',' : ''}}</text>
|
||||
</view>
|
||||
<view wx:if="{{item.likes.length > 0 || item.isFavorited || item.comments.length > 0}}" class="likes-comments-box">
|
||||
<!-- Likes & Stars Combined -->
|
||||
<view wx:if="{{item.likes.length > 0 || item.isFavorited}}" class="likes-section" style="flex-wrap: wrap;">
|
||||
<block wx:if="{{item.likes.length > 0}}">
|
||||
<t-icon name="{{item.likedByMe ? 'heart-filled' : 'heart'}}" size="28rpx" color="{{item.likedByMe ? '#FA5151' : '#576b95'}}" />
|
||||
<view class="likes-list" style="flex: unset; margin-right: 24rpx;">
|
||||
<text wx:for="{{item.likes}}" wx:for-item="liker" wx:key="*this" class="like-name">{{liker}}{{index < item.likes.length - 1 ? ',' : ''}}</text>
|
||||
</view>
|
||||
</block>
|
||||
|
||||
<block wx:if="{{item.isFavorited}}">
|
||||
<t-icon name="star-filled" size="28rpx" color="#FFC107" />
|
||||
<view class="likes-list" style="flex: unset;">
|
||||
<text class="like-name">我</text>
|
||||
</view>
|
||||
</block>
|
||||
</view>
|
||||
|
||||
<!-- Divider -->
|
||||
<view wx:if="{{item.likes.length > 0 && item.comments.length > 0}}" class="divider"></view>
|
||||
<view wx:if="{{(item.likes.length > 0 || item.isFavorited) && item.comments.length > 0}}" class="divider"></view>
|
||||
|
||||
<!-- Comments -->
|
||||
<view wx:if="{{item.comments.length > 0}}" class="comments-section">
|
||||
|
||||
Reference in New Issue
Block a user