<nav type="back" background-color="#46a9a4" title="评论管理" />
<van-tabs active="{{active}}" id="tabs" bind:change="tabChange" color="#FFE300" nav-class="tab_title">
    <van-tab title="未回复" name="noreply" >
        <scroll-view scroll-y="true" style="height:calc(100vh - 210rpx);" bindscrolltolower="loadMore">
            <block wx:if="{{orders.length}}">
                <block wx:for="{{orders}}" wx:key="index">
                    <view class="comments-wrapper">
                        <view class="order-number order-row text">
                            <view class="number ">订单号：{{item.orderNum}}</view>
                        </view>
                        <view class="order-content" data-item="{{item}}" >
                            <view class="order-shop order-row">
                                <image class="order-shop-img " src="{{item.room.images[0]}}" />
                                <view class="order-shop-text">
                                    <view class="order-shop-name text">{{item.room.name}}</view>
                                    <view class="order-shop-name text-small grey ellipsis-2">{{item.room.address}}</view>
                                </view>
                            </view>
                            <view class="order-info order-row text">
                                    <view class="time-area">{{item.startTime}}——{{item.endTime}}</view>
                                    <view class="time-day">{{item.day}}晚</view>
                                    <view class="order-price red">￥{{item.price}}</view>
                            </view>
                            <view class="order-user order-row">
                                <image class="order-user-avatar avatar" src="{{item.user.avatar}}" />
                                <view class="order-user-name text-small">
                                    {{item.user.nickname}}
                                    <view class="order-score text-small">
                                        <van-rate readonly allow-half value="{{ item.score }}" size="{{ 12 }}" color="#FF8936" void-icon="star" void-color="#eee" />{{item.score}}分
                                    </view>
                                </view>
                                <view class="order-time text-small grey">{{item.time}}</view>
                            </view>
                            <view class="order-comment">
                                <view class="order-comment-text text-small">{{item.content}}</view>
                            </view>
                        </view>
                        <view class="order-footer">
                            <van-button color="#46a9a4" class="btn reply-btn " round size="small"  data-id="{{item.objectId}}" bindtap="details">
                                <text class="reply-text">查看详情</text>
                            </van-button>
                        </view>
                    </view>
                </block>
            </block>
            <block wx:else>
                <van-empty description="暂无评论"></van-empty>
            </block>

        </scroll-view>
    </van-tab>
    <van-tab title="已回复" name="replied">
        <scroll-view scroll-y="true" style="height:calc(100vh - 210rpx);" bindscrolltolower="loadMore">

            <block wx:if="{{orders.length}}">
                <block wx:for="{{orders}}" wx:key="index">
                    <view class="comments-wrapper">
                        <view class="order-number order-row text">
                            <view class="number ">订单号：{{item.orderNum}}</view>
                        </view>
                        <view class="order-content" data-item="{{item}}" >
                            <view class="order-shop order-row">
                                <image class="order-shop-img " src="{{item.room.images[0]}}" />
                                <view class="order-shop-text">
                                    <view class="order-shop-name text">{{item.room.name}}</view>
                                    <view class="order-shop-name text-small grey ellipsis-2">{{item.room.address}}</view>
                                </view>
                            </view>
                            <view class="order-info order-row text">
                                    <view class="time-area">{{item.startTime}}——{{item.endTime}}</view>
                                    <view class="time-day">{{item.day}}晚</view>
                                    <view class="order-price red">￥{{item.price}}</view>
                            </view>
                            <view class="order-user order-row">
                                <image class="order-user-avatar avatar" src="{{item.user.avatar}}" />
                                <view class="order-user-name text-small">
                                    {{item.user.nickname}}
                                    <view class="order-score text-small">
                                        <van-rate readonly allow-half value="{{ item.score }}" size="{{ 12 }}" color="#FF8936" void-icon="star" void-color="#eee" />{{item.score}}分
                                    </view>
                                </view>
                                <view class="order-time text-small grey">{{item.time}}</view>
                            </view>
                            <view class="order-comment">
                                <view class="order-comment-text text-small">{{item.content}}</view>
                            </view>
                        </view>
                
                        <view class="order-footer">
                            <van-button color="#46a9a4" class="btn reply-btn " round size="small"  data-id="{{item.objectId}}" bindtap="details">
                                <text class="reply-text">查看详情</text>
                            </van-button>
                        </view>
                    </view>
                </block>
            </block>
            <block wx:else>
                <van-empty description="暂无评论"></van-empty>
            </block>
        </scroll-view>
    </van-tab>
</van-tabs>
