<!--pages/customermanage/customermanage.wxml-->
<view class="container customer-manage">
  <block wx:if="{{!loading && !pagesList.length}}">
    <image class="nocustomer-tip" src="/static/img/img_no_customer.png"></image>
  </block>
  <block wx:else>
    <scroll-view class="customer-list" scroll-y="true" scroll-with-animation="true" lower-threshold="1"
      bindscrolltolower="scrollBottom">
      <view class="item {{item.isDefault ? 'default' : ''}}" wx:for="{{pagesList}}" wx:key="id" data-id="{{item.id}}">
        <text>户名：{{item.username || '--'}}</text>
        <text>户号：{{item.userNumber || '--'}}</text>
        <text>地址：{{item.address || '--'}}</text>
        <text>手机：{{item.mobilePhone || '--'}}</text>
        <text>标签：{{item.label || '--'}}</text>
        <view class="check clearfix" data-item="{{item}}" bindtap="setDefault">
          <image class="fl-left" src="/static/img/{{item.isDefault ? 'icon_selected' : 'icon_unSelect'}}.png"></image>
          <text class="fl-left">设为默认</text>
        </view>
        <image class="bg-default" wx:if="{{item.isDefault}}" src="/static/img/bg_card@2x.png"></image>
        <!-- <view class="btn-unbind" data-item="{{item}}" bindtap="unbindDevice">解绑</view> -->
      </view>
    </scroll-view>
  </block>
  <!-- <button class="btn-big" bindtap="addCustomer">绑定户号</button> -->
  <popup id="popup" extClass="customer-popup" bind:cancelEvent="cancelEvent" bind:confirmEvent="confirmEvent"></popup>
</view>