<view class="comments-wrap page-section-spacing" >
    <block wx:if="{{title}}">
        <view class="comments-header">
            <view class="title" >{{title}}</view>
            <view class="more" wx:if="{{showMore}}" bind:tap="more">更多<van-icon name="arrow"></van-icon></view>
        </view>
        <van-divider customStyle="margin: 16rpx 0;" />
    </block>
    <view id="comments" wx:if="{{comments.length}}">
        <view class="comment page-section-spacing" wx:for="{{comments}}" wx:key="index" wx:if="{{!item.hiddenComment}}">
            <view class="comment-header">
                <view class="header-avatar">
                    <image class="header-avatar-image" src="{{item.user.avatar}}"></image>
                </view>
                <view class="header-text">
                    <view class="comment-name text-small">{{item.user.nickname}}</view>
                    <view class="comment-score ">
                        <van-rate readonly allow-half value="{{ item.score }}" size="{{ 12 }}" color="#FF8936"
                            void-icon="star" void-color="#eee" />
                    </view>
                </view>
                <view class="comment-date text-small grey">{{item.time}}</view>
            </view>
            <view class="comment-content">
                <view class="comment-text text">
                    {{item.content}}
                </view>
                <view class="comment-images">
                    <block wx:for="{{item.images}}" wx:key="index" wx:for-item="image">
                        <image class="comment-image" src="{{image}}" fit="contain"  lazy-load  data-item="{{item}}" data-image="{{image}}" bind:tap="preview" />
                    </block>
                </view>
            </view>
            <view class="merchant-reply" wx:if="{{item.reply}}">
                <view class="reply-title">商家回复：</view>
                <view class="reply-content">{{item.reply}}</view>
            </view>
        </view>
        <view class="comments-footer" wx:if="{{footer}}">
            <view class="text" bind:tap="more">全部{{commentCount || 0}}条评价 <van-icon name="arrow"></van-icon>
            </view>
        </view>
    </view>
    <block wx:else>
        <van-empty description="暂无评价"></van-empty>
    </block>
</view>