<view class="header">
    <view class="tabs">
        <view class="item {{listType == 'paid' ? 'show' : ''}}" bindtap="onTabs" data-type="paid">待发货</view>
        <view class="item {{listType == 'unpay' ? 'show' : ''}}" bindtap="onTabs" data-type="unpay">待付款</view>
        <view class="item {{listType == 'delivered' ? 'show' : ''}}" bindtap="onTabs" data-type="delivered">已发货</view>
        <view class="item {{listType == 'signed' ? 'show' : ''}}" bindtap="onTabs" data-type="signed">已签收</view>
        <!-- <view class="item {{listType == 'completed' ? 'show' : ''}}" bindtap="onTabs" data-type="completed">已完成</view> -->
    </view>
</view>

<view class="order" wx:if="{{orderArr.length > 0}}">
    <view class="While order-list" wx:for="{{orderArr}}" wx:key="orderArr">
        <view class="order-top">
            <view class="order-top-number">{{ item.order_no }}</view>
            <view class="order-top-tips">{{ item.state }}</view>
        </view>
        <view class="order-name" wx:for-item="goodItem" wx:for="{{item.items}}" wx:key="items">
            <!-- 先默认固定图 -->
            <image class="order-img" src="{{ goodItem.sku.cover }}" mode="aspectFill"></image>
            <view class="order-goods">
                <view class="order-label">
                    <view class="nowrap order-label-name">
                        {{ goodItem.sku.goods_name }}
                    </view>
                    <view class="order-label-price">
                        {{goodItem.sku.price != 0 ? '￥' + goodItem.sku.price : '兑换'}}
                    </view>
                </view>
                <view class="order-specs">
                    x{{ goodItem.qty }}
                </view>
            </view>
        </view>
        <view class="order-text">
            <view class="order-time">下单时间：{{ item.created_at }}</view>
        </view>
        <view class="order-btn">
            <!-- <view class="order-btn-type">
                <text class="active" wx:if="{{item.type == '积分兑换'}}">兑换订单</text>
                <text wx:else>提货订单</text>
            </view> -->

            <view class="order-btn-atn order-btn-go" bindtap="payTap" data-no="{{item.order_no}}" wx:if="{{item.can.pay}}">去付款</view>
            <navigator hover-class="none" url="../details/index?orderNo={{item.order_no}}" class="order-btn-atn">订单详情</navigator>
        </view>
    </view>
    <view class="pagesLoding" wx:if="{{lodingStats}}">
        <block wx:if="{{page.has_more}}">
            <image class="pagesLoding-icon" src="/static/icon/refresh_loding.gif" mode="widthFix"></image>加载中...
        </block>
        <block wx:else>
            没有更多了~
        </block>
    </view>
</view>
<view class="pack-center pages-hint" wx:else>
    <image src="/static/imgs/coupon_null.png"></image>
    <view>暂无数据</view>
</view>

<!-- 支付弹出 -->
<view class="payPop {{payEject ? 'active' : ''}}"></view>
<view class="payCont {{payEject ? 'active' : ''}}">
    <image class="payCont-label-close" src="/static/icons/reportColse_grey.png" bindtap="payClose"></image>
    <radio-group bindchange="radioChange" style="width: 100%; display: block;">
        <view class="payCont-label {{ payType == 'wechat' ? 'active' : ''}}">
            <view class="payContList-label-name">
                <image class="payCont-label-img" src="/static/imgs/wx.jpg"></image>
                <text>微信支付</text>
            </view>
            <image class="payContList-label-arrow" src="{{ payType == 'wechat' ? '/static/icons/check_icon.png' : '/static/icons/userLogin_icon.png'}}"></image>
            <radio class="radio" value="wechat"></radio>
        </view>
        <!-- <view class="payCont-label {{ payType == 'water' ? 'active' : ''}}" wx:if="{{surplus > 0}}">
            <view class="payContList-label-name">
                <image class="payCont-label-img" src="/static/imgs/wqb.jpg"></image>
                <text>水滴兑换</text>
            </view>
            <image class="payContList-label-arrow" src="{{ payType == 'water' ? '/static/icons/check_icon.png' : '/static/icons/userLogin_icon.png'}}"></image>
            <radio class="radio" value="water"></radio>
        </view> -->
    </radio-group>
    <view class="payCont-btn" bindtap="paySubmit">{{ payType == 'wechat' ? '立即支付' : '立即兑换'}}</view>
</view>