<view class="page">
    <view class="page-bd">
        <block wx:if="{{services.length > 0 || goods.length > 0}}">
            <!-- 服务 -->
            <view class="service">
                <view class="cell" wx:for="{{services}}">
                    <view class="left">
                        <image class="order-img" src="{{item.photo}}"></image>
                        <view class="info">
                            <view class="name">{{item.classify1}}</view>
                            <view class="text">{{item.classify2}}</view>
                            <view class="text">{{item.created_at}}</view>
                        </view>
                    </view>
                    <view class="right">
                        <view class="text-top">{{item.orderText}}</view>
                        <view class="text-bottom" wx:if="{{item.status != 0}}">￥{{item.price}}</view>
                        <view class="btn-blue" bindtap="toPay" data-id="{{item.id}}" data-type="{{item.order_type}}"
                            wx:if="{{item.status == 1}}">立即付款</view>
                        <view class="btn-blue" bindtap="addComment" data-id="{{item.id}}" data-type="{{item.order_type}}"
                            wx:if="{{item.status == 2 && !item.comment}}">添加评价</view>
                    </view>
                </view>
                <!-- <view class="cell">
                    <view class="left">
                        <image class="order-img" src="/img/demo/order-img.png"></image>
                        <view class="info">
                            <view class="name">家政</view>
                            <view class="text">老人看护</view>
                            <view class="text">2018-08-09 12:33:32</view>
                        </view>
                    </view>
                    <view class="right">
                        <view class="text-top">未付款</view>
                        <view class="text-bottom">￥200</view>
                        <view class="btn-blue">立即付款</view>
                    </view>
                </view> -->
            </view>
            <!-- 商品 -->
            <view class="goods" wx:if="{{goods.length > 0}}">
                <view class="cell" wx:for="{{goods}}">
                    <view class="left">
                        <image class="order-img" src="{{item.products[0].photo}}"></image>
                        <view class="info">
                            <view class="name">{{item.text}}</view>
                            <!-- <view class="text">{{item.classify2}}</view> -->
                            <view class="text">{{item.created_at}}</view>
                        </view>
                    </view>
                    <view class="right">
                        <view class="text-top">{{item.orderText}}</view>
                        <view class="text-bottom">￥{{item.price}}</view>
                        <view class="btn-blue" bindtap="toPay" data-id="{{item.id}}" data-type="{{item.order_type}}"
                            wx:if="{{item.status == 1}}">立即付款</view>
                        <view class="btn-blue" bindtap="addComment" data-id="{{item.id}}" data-type="{{item.order_type}}"
                            wx:if="{{item.status == 2 && !item.comment}}">添加评价</view>
                    </view>
                </view>
            </view>
        </block>
        <view class="empty-content" wx:else>
            <view class="empty-content-text">暂无订单</view>
        </view>
    </view>
</view>