<view class="market">
  <i-tabs class='tabs' current="{{ current_scroll }}" scroll bindchange="handleChangeScroll">
    <i-tab class='i-tab' wx:for="{{tabs}}" wx:key="unique" key="{{item.key}}" title="{{item.name}}"></i-tab>
  </i-tabs>
  <view style='padding-top:90rpx;'>
    <view wx:if="{{list.length!=0}}" class='section' wx:for='{{list}}' wx:key='{{index}}'>
      <view class='detail_msg'>
        <view class='logo'>
          <image mode="aspectFill" src='{{item.coverImg}}'></image>
        </view>
        <view class='info'>
          <view>
            <text>{{item.title}}</text>
            <text class='wait' wx:if="{{item.orderStatus==0}}">等待付款</text>
            <text class='sucess' wx:if="{{item.orderStatus==3}}">待退款</text>
            <text class='close' wx:if="{{item.orderStatus==2}}">交易关闭</text>
            <text class='close' wx:if="{{item.orderStatus==4}}">已退款</text>
            <text class='wait' wx:if="{{item.orderStatus==5}}">退款失败</text>
            <text class='sucess' wx:if="{{item.orderStatus==1&&item.salePrice==0}}">免费领取</text>
            <text class='sucess' wx:if="{{item.orderStatus==1&&item.salePrice!=0}}">付款成功</text>
          </view>
          <view class="sub">{{item.subTitle}}</view>
          <view class="value">面额:<text>{{item.price/100}}元</text></view>
          <view class="value">下单时间:<text>{{item.createDate}}</text>
          </view>
        </view>
      </view>
      <view class='payment'>
        <view>
          <text>实付金额:</text><text>{{item.salePrice/100}}元</text>
        </view>
        <!-- 
          orderStatus 
          0待付款
          1完成
          2取消
         -->
        <view wx:if="{{item.orderStatus==1}}" class="btn" data-id="{{item.id}}" bindtap="gotopay">
          <text>查看详情</text>
        </view>
        <view wx:if="{{item.orderStatus==0}}" class="btn" data-id="{{item.id}}" bindtap="gotopay">
          <text>去支付</text>
        </view>
        <!-- <view wx:if="{{item.orderStatus==2}}" style="background:#999;opacity: .6;" class="btn">
          <text>已取消</text>
        </view> -->
        <!-- <view wx:if="{{item.orderStatus==3}}" style="background:#999;opacity: .6;color:#fff;" class="btn">
          <text>待退款</text>
        </view> -->
        <!-- <view wx:if="{{item.orderStatus==4}}" style="background:#999;opacity: .6;" class="btn">
          <text>已退款</text>
        </view> -->
        <view wx:if="{{item.orderStatus==5}}" style="background:#999;opacity: .6;" class="btn">
          <text>退款失败</text>
        </view>
      </view>
    </view>
    <view class="dingdan" wx:if="{{list.length==0}}">
      <image src="../../../assets/img/dingdan.png" mode="widthFix"></image>
      <text>您还没有相关订单</text>
      <text>再忙，也要记得买点什么犒赏自己～</text>
    </view>
  </view>
  <view class="loading" wx:if="{{loading}}">
    <image src="./../../../assets/img/loading.gif" mode="widthFix"></image>{{content}}
  </view>
</view>