<view class='v-page'>
  <i-tabs current="status-{{status}}" bindchange="handleChange" i-class='margin-bottom'>
    <i-tab key="status-1" title="进行中" data-status="1"></i-tab>
    <i-tab key="status-2" title="待评价" data-status="1"></i-tab>
    <i-tab key="status-3" title="已完成" data-status="1"></i-tab>
  </i-tabs>

  <view class='order-box'>
    <view class='order-item' wx:for="{{orders}}" wx:for-index="idx" wx:for-item="item" wx:key="item.id">
      <i-row>
        <i-col span="24" offset='2' i-class="col-class text">
          <text>{{item.created_at}}</text>
        </i-col>
        <i-col span="20" offset='2' i-class="col-class text order-content">
          <i-row>
            <view catchtap="handleProjectClick" data-pid="{{item.pid}}">
              <i-col span="8" offset='1' i-class='order-info'>
                <image class='order-image' src='{{item.project.poster}}'></image>
              </i-col>
              <i-col span="9" offset='1' i-class='order-info'>
                <view>{{item.title}}</view>
                <view>￥{{item.total_fee}}</view>
              </i-col>
              <i-col span="2" offset='2' i-class='order-info'>
                <image class='order-right' src='/images/icon_right.png'></image>
              </i-col>
            </view>
          </i-row>
        </i-col>
        <i-col span="5" offset='17' i-class="col-class text order-button">
          <button class='button {{item.is_refund!="0"?"button-gray":"button-orange"}} {{item.is_comment!="0"?"button-gray":"button-orange"}}' catchtap='handleBtnClick' data-isrefund="{{item.is_refund}}" data-iscomment="{{item.is_comment}}" data-oid="{{item.id}}">{{item.status_text}}</button>
        </i-col>
      </i-row>
    </view>
  </view>

  <comment wx:if="{{commentModal}}" course-id="{{cur_oid}}" bind:confirm="commentConfirm" bind:cancel="commentCancel" />

  <more hasMore="{{hasMore}}" loading="{{loading}}" page="{{currentPage}}" />
</view>

<i-toast id="toast" />