<!--pages/mine/shop/choose.wxml-->
<cu-custom isBack="{{true}}">
  <view slot="content">行业选择</view>
</cu-custom>
<van-collapse value="{{ activeNames }}" bind:change="onChange">
  <van-collapse-item name="1">
    <view slot="title"> <text class='cuIcon-titles text-orange '></text> 当前选择
      <van-icon name="question-o" />
    </view>
    <view class="flex flex-wrap">
      <view class="padding-xs" wx:for="{{selectItems}}" wx:key="index">
        <view class="cu-tag bg-blue">{{item.name}}</view>
      </view>
    </view>
  </van-collapse-item>
</van-collapse>
<scroll-view style="margin-bottom:64rpx;margin-top:10rpx">
  <!-- 第一级 -->
  <view class="hint-title">
    <image src="../../../../images/title-bg.png" mode="scaleToFill"></image>
    <text>行业类型(一级)</text>
  </view>
  <view class="cu-card">
    <view class="cu-item" wx:if="{{tradeList.length>0}}">
      <view class="padding-sm flex flex-wrap">
        <view class="padding-xs" wx:for="{{tradeList}}" wx:key="index">
          <view class="cu-capsule radius">
            <view class="cu-tag {{item.isSel ? 'bg-red':'bg-grey'}}">
              <text class="{{item.isSel ? 'cuIcon-apps':'cuIcon-apps'}}" data-item="{{item}}" data-type="1"
                bindtap="selectItem"></text>
            </view>
            <view class="cu-tag {{item.isSel? 'line-red':'line-gray'}}" data-i="{{item}}" data-type="1"
              bindtap="chooseItem">
              {{item.name}}
            </view>
          </view>
        </view>
      </view>
    </view>
    <van-empty description="暂无数据" wx:else />
  </view>
  <!-- 第二级 -->
  <view class="hint-title">
    <image src="../../../../images/title-bg.png" mode="scaleToFill"></image>
    <text>行业类型(二级)</text>
  </view>
  <view class="cu-card" wx:if="{{tradeTwoList.length>0}}">
    <view class="cu-item">
      <view class="padding-sm flex flex-wrap">
        <view class="padding-xs" wx:for="{{tradeTwoList}}" wx:key="index">
          <view class="cu-capsule radius">
            <view class="cu-tag {{item.isSel ? 'bg-red':'bg-grey'}}">
              <text class="{{item.isSel ? 'cuIcon-apps':'cuIcon-apps'}}" data-item="{{item}}" data-type="2"
                bindtap="selectItem"></text>
            </view>
            <view class="cu-tag {{item.isSel? 'line-red':'line-gray'}}" data-i="{{item}}" data-type="2"
              bindtap="chooseItem">
              {{item.name}}
            </view>
          </view>
        </view>
      </view>
    </view>
  </view>
  <van-empty description="暂无数据" wx:else />
  <!-- 第三级 -->
  <view class="hint-title">
    <image src="../../../../images/title-bg.png" mode="scaleToFill"></image>
    <text>行业类型(三级)</text>
  </view>
  <view class="cu-card" wx:if="{{tradeThirdList.length>0}}">
    <view class="cu-item">
      <view class="padding-sm flex flex-wrap">
        <view class="padding-xs" wx:for="{{tradeThirdList}}" wx:key="index">
          <view class="cu-capsule radius">
            <view class="cu-tag {{item.isSel ? 'bg-red':'bg-grey'}}">
              <text class="{{item.isSel ? 'cuIcon-apps':'cuIcon-apps'}}" data-item="{{item}}" data-type="3"
                bindtap="selectItem"></text>
            </view>
            <view class="cu-tag {{item.isSel? 'line-red':'line-gray'}}" data-i="{{item}}" data-type="3"
              bindtap="chooseItem">
              {{item.name}}
            </view>
          </view>
        </view>
      </view>
    </view>
  </view>
  <van-empty description="暂无数据" wx:else />
</scroll-view>
<view class="padding-xs foot bg-white">
  <button class="cu-btn bg-blue" style="width:100%" bindtap="selected">确定</button>
</view>