<!--packageE/memberorder/memberorder.wxml-->
<view class="html-box component-wrapper"
      style="background-color: {{datas.preview_color.color}};background-image: url({{datas.preview_color.isColor == 2 ? datas.preview_color.image : ''}});">
  <view wx:if="{{datas.list <= 0}}" style="font-weight: bold;font-size: 18px;line-height:50px;text-align: center">
    请添加订单列表
  </view>

  <view id="orderlist">
    <view class="ordertltie" wx:if="{{datas.list.length == 1 && datas.show_tab}}" style=" background-color:{{datas.tab_bg_color}};"  catchtap="goAllOrderlist">
      <view class="spare" style=" background-color:{{datas.tab_active_color}};"></view>
      <view class="ordername" style=" color: {{datas.tab_color}};">{{datas.list[0].name || datas.list[0].component}}
      </view>
      <view style="flex: 1;text-align: right;">
        <icon class="iconfont icon-advertise-next"></icon>
      </view>
    </view>

    <ul class="tab_list" wx:if="{{datas.list.length > 1 && datas.show_tab}}">
      <van-tabs active="{{active}}"
                swipeable ellipsis="{{false}}"
                bind:click="bindTags"
                title-active-color="{{datas.tab_active_color}}"
                color="{{datas.tab_active_color}}"
                title-inactive-color="{{datas.tab_color}}"
                tab-class="tag"
                id="tab">
        <van-tab title="{{item.name || item.component}}"
                 title-style="background: {{datas.tab_bg_color}};color:{{active==index?datas.tab_active_color:datas.tab_color}};padding-right:12px;"
                 wx:for="{{datas.list}}" wx:key="i"
                 wx:for-index="i"
                 name="{{i}}" key="{{i}}"
                 class="tabChild"></van-tab>
      </van-tabs>
    </ul>

    <block wx:for="{{datas.list}}" wx:for-item="order" wx:key="index" wx:if="{{active == index}}">
      <!--普通订单-->
      <view class="order_all" wx:if="{{order.uikey === 'U_memberorder' && active == index}}">
        <view class="order_pub" style="color:{{datas.text_color}};" wx:for="{{order.datas.list.value}}" wx:for-index="i"  wx:key="i" catchtap="goorderlist" data-status="{{item.id}}">
          <view class="badge" wx:if="{{U_memberorder[(item.id-1)] && U_memberorder[(item.id-1)].value != 0}}">{{U_memberorder[(item.id-1)].value}}</view>
          <image class="order_img" src="{{item.image || emptyImage}}" mode='aspectFit'></image>
          <text>{{item.text}}</text>
        </view>
      </view>
      <!--酒店订单-->
      <view class="order_all" wx:if="{{order.uikey === 'U_memberorderhotel' && active == index}}">
        <view class="order_pub" style="color:{{datas.text_color}};" wx:for="{{order.datas.list.value}}" wx:for-index="i"  wx:key="i" catchtap="gohotelOrderlist" data-status="{{item.id}}">
          <view class="badge" wx:if="{{U_memberorderhotel[(item.id-1)]&&U_memberorderhotel[(item.id-1)].value != 0}}">{{U_memberorderhotel[(item.id-1)].value}}</view>
          <image class="order_img" src="{{item.image || emptyImage}}" mode='aspectFit'></image>
          <text>{{item.text}}</text>
        </view>
      </view>
      <!--租赁订单-->
      <view class="order_all" wx:if="{{order.uikey === 'U_memberorderrelease' && active == index}}">
        <view class="order_pub" style="color:{{datas.text_color}};" wx:for="{{order.datas.list.value}}" wx:for-index="i"  wx:key="i" catchtap="goleaseOrderlist" data-status="{{item.id}}">
          <view class="badge" wx:if="{{U_memberorderrelease[(item.id-1)]&&U_memberorderrelease[(item.id-1)].value != 0}}">{{U_memberorderrelease[(item.id-1)].value}}</view>
          <image class="order_img" src="{{item.image || emptyImage}}" mode='aspectFit'></image>
          <text>{{item.text}}</text>
        </view>
      </view>
      <!--拼团订单-->
      <view class="order_all" wx:if="{{order.uikey === 'U_memberordergroup' && active == index}}">
        <view class="order_pub" style="color:{{datas.text_color}};" wx:for="{{order.datas.list.value}}" wx:for-index="i"  wx:key="i" catchtap="gogroupOrderlist" data-status="{{item.id}}">
          <view class="badge" wx:if="{{U_memberordergroup[(item.id-1)] && U_memberordergroup[(item.id-1)].value != 0}}">{{U_memberordergroup[(item.id-1)].value}}</view>
          <image class="order_img" src="{{item.image || emptyImage}}" mode='aspectFit'></image>
          <text>{{item.text}}</text>
        </view>
      </view>
      <!--抢团订单-->
      <view class="order_all" wx:if="{{order.uikey === 'U_memberordergrab' && active == index}}">
        <view class="order_pub" style="color:{{datas.text_color}};" wx:for="{{order.datas.list.value}}" wx:for-index="i"  wx:key="i" catchtap="gograbOrderlist" data-status="{{item.id}}">
          <view class="badge" wx:if="{{U_memberordergrab[(item.id-1)] && U_memberordergrab[(item.id-1)].value != 0}}">{{U_memberordergrab[(item.id-1)].value}}</view>
          <image class="order_img" src="{{item.image || emptyImage}}" mode='aspectFit'></image>
          <text>{{item.text}}</text>
        </view>
      </view>

      <!--上门安装订单-->
      <view class="order_all" wx:if="{{order.uikey === 'U_memberorderlive_install' && active == index}}">
        <view class="order_pub" style="color:{{datas.text_color}};" wx:for="{{order.datas.list.value}}" wx:for-index="i"  wx:key="i" catchtap="golive_installOrderlist" data-status="{{item.id}}">
          <view class="badge" wx:if="{{U_memberorderlive_install[(item.id-1)] && U_memberorderlive_install[(item.id-1)].value != 0}}">{{U_memberorderlive_install[(item.id-1)].value}}</view>
          <image class="order_img" src="{{item.image || emptyImage}}" mode='aspectFit'></image>
          <text>{{item.text}}</text>
        </view>
      </view>

      <!--上门安装师傅订单-->
      <view class="order_all" wx:if="{{order.uikey === 'U_memberorderlive_install_worker' && active == index}}">
        <view class="order_pub" style="color:{{datas.text_color}};" wx:for="{{order.datas.list.value}}" wx:for-index="i"  wx:key="i" catchtap="golive_install_workOrderlist" data-status="{{item.id}}">
          <view class="badge" wx:if="{{U_memberorderlive_install_worker[(item.id)] && U_memberorderlive_install_worker[(item.id)].value != 0}}">{{U_memberorderlive_install_worker[(item.id)].value}}</view>
          <image class="order_img" src="{{item.image || emptyImage}}" mode='aspectFit'></image>
          <text>{{item.text}}</text>
        </view>
      </view>

      <!--CPS订单-->
      <view class="order_all" wx:if="{{order.uikey === 'U_memberordercps' && active == index}}">
        <view class="order_pub" style="color:{{datas.text_color}};" wx:for="{{order.datas.list.value}}" wx:for-index="i"  wx:key="i" catchtap="gocpsOrderlist" data-status="{{item.id}}">
          <view class="badge" wx:if="{{U_memberordercps[(item.id+1)] && U_memberordercps[(item.id+1)].value != 0}}">{{U_memberordercps[(item.id+1)].value}}</view>
          <image class="order_img" src="{{item.image || emptyImage}}" mode='aspectFit'></image>
          <text>{{item.text}}</text>
        </view>
      </view>

      <!--0.1元拼订单-->
      <view class="order_all" wx:if="{{order.uikey === 'U_memberordernew_group' && active == index}}">
        <view class="order_pub" style="color:{{datas.text_color}};" wx:for="{{order.datas.list.value}}" wx:for-index="i"  wx:key="i" catchtap="goGroupWorkorderlist" data-status="{{item.id}}">
          <view class="badge" wx:if="{{U_memberordernew_group[(item.id-1)] && U_memberordernew_group[(item.id-1)].value != 0}}">{{U_memberordernew_group[(item.id-1)].value}}</view>
          <image class="order_img" src="{{item.image || emptyImage}}" mode='aspectFit'></image>
          <text>{{item.text}}</text>
        </view>
      </view>

    </block>

  </view>

</view>
