<!-- 滚动菜单 -->
<view class="scroll_menu">
  <scroll-view class="scroll-view_H" scroll-x="true" bindscroll="scroll" style="width: 100%">
    <view id="menu1" catchtap="menuSelect" data-state="index"
      class="scroll-view-item_H {{state=='index'?'scroll_view_select':''}}">全部
    </view>
    <view id="menu2" catchtap="menuSelect" data-state="unpaid"
      class="scroll-view-item_H {{state=='unpaid'?'scroll_view_select':''}}">
      待付款</view>
    <view id="menu3" catchtap="menuSelect" data-state="paid"
      class="scroll-view-item_H {{state=='paid'?'scroll_view_select':''}}">
      待发货</view>
    <view id="menu4" catchtap="menuSelect" data-state="delive"
      class="scroll-view-item_H {{state=='delive'?'scroll_view_select':''}}">
      待收货</view>
    <view id="menu4" catchtap="menuSelect" data-state="refund"
      class="scroll-view-item_H {{state=='refund'?'scroll_view_select':''}}">
      退款/售后</view>
  </scroll-view>
</view>
<!-- 列表 -->
<block wx:if='{{lists.length>0}}'>
  <view class="lists" wx:for='{{lists}}' :key='{{index}}'>
    <view class="top">
      <view class="ctime">{{item.created_at}} <span>{{item.state_text}}</span> </view>
      <view class="content">
        <image src="{{item.items[0].cover}}" mode="aspectFill"></image>
        <view style="margin-left:20rpx;flex:1;">
          <view class="title"><span class="title1">{{item.items[0].title}}</span><span
              class="num">￥{{item.items[0].price}}</span>
          </view>
          <view class="title mt10">{{item.items[0].value}} x {{item.items[0].qty}}</view>
        </view>
      </view>
      <view class="total">
        <view>共<span class="num"> {{item.items[0].qty}} </span>件商品 实付:￥<span class="num"> {{item.items[0].price}}
          </span></view>
        <view class="time">项目结束时间：{{item.crowdfund_end_at}}</view>
      </view>
    </view>
    <view class="bottom">
      <view class="cancel" wx:if="{{item.canCancel == true}}" data-orderid="{{item.orderid}}" bindtap="orderDelete">取消订单
      </view>
      <view class="pay" wx:if="{{item.canPay == true}}"  data-orderid="{{item.orderid}}" bindtap="orderPay">立即付款</view>
      <view class="sign" wx:if="{{item.canSign == true}}" data-orderid="{{item.orderid}}" bindtap="orderSign">立即签收
      </view>
      <navigator class="detail" wx:if='{{state!="refund"}}' hover-class="none" url="./projectDetail/projectDetail?orderId={{item.orderid}}">订单详情</navigator>
      <navigator class="detail" wx:if='{{state=="refund"}}' hover-class="none" url="./projectDetailFunds/projectDetailFunds?refundId={{item.refund_id}}">订单详情(退)</navigator>
      <navigator class="refund" wx:if="{{item.canRefund == true}}" url="/pages/user/companyMine/projectRefund/projectRefund?orderId={{item.orderid}}">申请退款</navigator>
    </view>
  </view>
</block>

<view wx:else class="pack-center pages-hint">
  <image src="/static/images/no_list.png"></image>
  <view>暂无订单</view>
</view>