<!--index.wxml-->
<view class="content">
  <!-- <van-search value="{{ searchValue }}" placeholder="请输入搜索关键词" /> -->
  <van-search value="{{ searchValue }}" placeholder="请输入搜索关键词" use-action-slot bind:change="onChange" bind:search="onSearch">
    <view slot="action" bind:tap="onClick">搜索</view>
  </van-search>
  <view class="Statistics">
    <view class="qrcode" bindtap="qrcodefun" wx:if="{{userInfo.type < 2}}">
      <view class="qrimg">
        <image src="../../static/images/qrcode.png" mode="widthFix"></image>
      </view>
      <view class="text">
        <view class="title">扫一扫</view>
        <view class="content">扫描二维码 查看绑定门锁</view>
      </view>
    </view>
  </view>
  <view class="selectRoom" wx:if="{{userInfo.type < 2}}">
      <view class="picker" bindtap="bindroom">
        {{selectRoomName}}<view class="jt">▼</view>
      </view>
  </view>
  <view class="roomlist">
    <view class="cu-item mb-4" bindtap="godetail" data-item="{{item}}" wx:for="{{list}}" wx:for-index="{{index}}" wx:for-item="item">
      <view class="d-flex justify-content-between pa-2 b-line align-center">
        <view class="d-flex align-center  w-100"><view class="iconfont icon-fangjianliebiao text-orange d-line {{item.deviceNum?'':'colorRed'}}"></view><view class="d-line ml-1 font-size-16 w-80 text-ellipsis">{{item.roomName}}</view></view>        
        <!-- <view><van-button round type="info" size="mini" data-select="{{item}}" catchtap="bluetoothUnlockingMethods">蓝牙开锁</van-button></view>      -->
      </view>
      <view class="content pa-2 d-flex justify-content-between">
        <view class="font-size-14 text-bold w-50 text-ellipsis">设备号：{{item.deviceNum?item.deviceNum:'无'}}</view>
        <view class="font-size-14 text-bold w-50  text-ellipsis">电量：<text class="{{item.battery<20?'color-red':item.battery<80?'color-orange':item.battery>80?'color-green':''}}">{{item.battery?item.battery:'无'}}</text></view>
        <view class="font-size-14 text-bold w-50  text-ellipsis">信号：<text class="{{item.rssi<15?'color-red':item.rssi<20?'color-orange':item.rssi>20?'color-green':''}}">{{item.rssi?item.rssi:'无'}}</text></view>
        <view class="font-size-14 colorhui w-50  text-ellipsis">联网：<text class="{{item.isOnline==0?'color-red':item.isOnline==1?'color-green':item.isOnline==2?'color-orange':''}}">{{item.isOnline===0?'离线':item.isOnline==1?'在线':item.isOnline==2?'异常':'无'}}</text></view>
        <!-- <view class="font-size-14 colorhui w-50  text-ellipsis" wx:if="item.count">入住人数：{{item.count}}</view> -->
      </view>
    </view>
  </view>
  <!-- <view class="roomlist">
    <view class="cu-item" bindtap="godetail" data-item="{{item}}" wx:for="{{list}}" wx:for-index="{{index}}" wx:for-item="item">
      <view class="cu-avatar text-orange textimg iconfont icon-jiebangjilu" wx:if="{{item.imei}}"></view>
      <view class="cu-avatar text-green textimg iconfont icon-bangdingjilu" wx:else></view>
      <view class="content">
        <view class="text-gray text-sm flex">
          <view class="text-cut">
            <view class="margin-right-xs text-bold">{{item.roomName}}</view>
          </view>
        </view>
      </view>
    </view>
  </view> -->
	<view class="formbutton">
    <!-- <image src="/static/images/loginOut.svg"></image> -->
    <view  bindtap="loginOut">退出</view>
    <view class="color-ff976a" bindtap="changePassword">修改登录密码</view>
  </view>

</view>