mirror of
https://gitee.com/beecue/fastbee.git
synced 2025-12-18 00:45:55 +08:00
146 lines
6.7 KiB
Plaintext
146 lines
6.7 KiB
Plaintext
<!--miniprogram/pages/myDevice/index.wxml-->
|
|
<view class='body'>
|
|
<view class='top'>
|
|
<view class='top_left'>
|
|
<view class='top_big_info'>
|
|
<text class='temperature'>{{ weather.temperature.data }}℃</text>
|
|
<text class='city'>城市: {{ weather.city.data }}</text>
|
|
</view>
|
|
<view class='top_small_info'>
|
|
<view>
|
|
<text class='humidity'>湿度: {{ weather.humidity.data }}</text>
|
|
<text class='weather'>天气: {{ weather.weather.data }}</text>
|
|
</view>
|
|
<text class='winddirection'>风向: {{ weather.winddirection.data }}</text>
|
|
<text class='windpower'>风力: {{ weather.windpower.data }}</text>
|
|
</view>
|
|
</view>
|
|
<view class='top_right'>
|
|
<view class='start'>
|
|
<image src='/icons/start.png' />
|
|
</view>
|
|
</view>
|
|
</view>
|
|
<view class='devices'>
|
|
<view class='devices_tab'>全部 ({{ DeviceList.length }})</view>
|
|
<van-tabs swipeable animated>
|
|
<van-tab title="WiFi设备({{ DeviceList.length }})">
|
|
<scroll-view scroll-y>
|
|
<view class="devices_list">
|
|
<block wx:if="{{ DeviceList.length !== 0 }}">
|
|
<view wx:for='{{ DeviceList }}' wx:key='index' class='border'>
|
|
<block wx:if="{{ item.isOnline === 2 }}">
|
|
<view class='devices_item' style="background-color:rgba(0,0,0,.05)" bindtap='deviceNone' data-info='{{item}}'>
|
|
<view class="info">
|
|
<view class='img'>
|
|
<image src='/images/room.jpeg' />
|
|
</view>
|
|
<view class="_right">
|
|
<view style="color:#bfbfbf" class="status">未激活</view>
|
|
<view style="font-size:24rpx;color:#666">{{ item.categoryName }}</view>
|
|
</view>
|
|
</view>
|
|
<view class='name'>{{ item.deviceName }}</view>
|
|
</view>
|
|
</block>
|
|
<block wx:if="{{ item.isOnline === 1 }}">
|
|
<view class='devices_item' bindtap='goToDeviceControl' data-info='{{item}}'>
|
|
<view class="info">
|
|
<view class='img'>
|
|
<image src='/images/room.jpeg' />
|
|
</view>
|
|
<view class="_right">
|
|
<view style="color:green" class="status">在线</view>
|
|
<view style="font-size:24rpx;color:#666">{{ item.categoryName }}</view>
|
|
</view>
|
|
</view>
|
|
<view class='name'>{{ item.deviceName }}</view>
|
|
</view>
|
|
</block>
|
|
<block wx:if="{{ item.isOnline === 0 }}">
|
|
<view style="background-color:rgba(0,0,0,.05)" class='devices_item' bindtap='deviceFail' data-info='{{item}}'>
|
|
<view class="info">
|
|
<view class='img'>
|
|
<image src='/images/room.jpeg' />
|
|
</view>
|
|
<view class="_right">
|
|
<view style="color:#ff0000" class="status">离线</view>
|
|
<view style="font-size:24rpx;color:#666">{{ item.categoryName }}</view>
|
|
</view>
|
|
</view>
|
|
<view class='name'>{{ item.deviceName }}</view>
|
|
</view>
|
|
</block>
|
|
</view>
|
|
</block>
|
|
<block wx:elif='{{ DeviceList.length === 0 }}'>
|
|
<view class='noDevice'> 暂无设备,请添加。 </view>
|
|
</block>
|
|
</view>
|
|
</scroll-view>
|
|
</van-tab>
|
|
<van-tab title="4G设备({{ fourGDeviceList.length }})">
|
|
<scroll-view scroll-y>
|
|
<view class="devices_list">
|
|
<block wx:if="{{ fourGDeviceList.length !== 0 }}">
|
|
<view wx:for='{{ fourGDeviceList }}' wx:key='index' class='border'>
|
|
<block wx:if="{{ item.status === 1 }}">
|
|
<view class='devices_item' style="background-color:rgba(0,0,0,.05)" bindtap='deviceNone' data-info='{{item}}'>
|
|
<view class="info">
|
|
<view class='img'>
|
|
<image src='/icons/device.jpg' />
|
|
</view>
|
|
<view class="_right">
|
|
<view style="color:#bfbfbf" class="status">未激活</view>
|
|
<view style="font-size:24rpx;color:#666">{{ item.device_name }}</view>
|
|
</view>
|
|
</view>
|
|
<view class='name'>{{ item.product_name }}</view>
|
|
</view>
|
|
</block>
|
|
<block wx:if="{{ item.status === 2 }}">
|
|
<view class='devices_item' bindtap='goToDeviceControl' data-info='{{item}}'>
|
|
<view class="info">
|
|
<view class='img'>
|
|
<image src='/icons/device.jpg' />
|
|
</view>
|
|
<view class="_right">
|
|
<view style="color:green" class="status">在线</view>
|
|
<view style="font-size:24rpx;color:#666">{{ item.device_name }}</view>
|
|
</view>
|
|
</view>
|
|
<view class='name'>{{ item.product_name }}</view>
|
|
</view>
|
|
</block>
|
|
<block wx:if="{{ item.status === 3 }}">
|
|
<view style="background-color:rgba(0,0,0,.05)" class='devices_item' bindtap='deviceFail' data-info='{{item}}'>
|
|
<view class="info">
|
|
<view class='img'>
|
|
<image src='/icons/device.jpg' />
|
|
</view>
|
|
<view class="_right">
|
|
<view style="color:#ff0000" class="status">离线</view>
|
|
<view style="font-size:24rpx;color:#666">{{ item.device_name }}</view>
|
|
</view>
|
|
</view>
|
|
<view class='name'>{{ item.product_name }}</view>
|
|
</view>
|
|
</block>
|
|
</view>
|
|
</block>
|
|
<block wx:elif='{{ fourGDeviceList.length === 0 }}'>
|
|
<view class='noDevice'> 暂无设备,请添加。 </view>
|
|
</block>
|
|
</view>
|
|
</scroll-view>
|
|
</van-tab>
|
|
</van-tabs>
|
|
</view>
|
|
<!-- <view class='addDevice' catchtap='isShow'>
|
|
<image src="/images/add.png" />
|
|
</view> -->
|
|
<van-action-sheet class='aa' show="{{ show }}" actions="{{ actions }}"
|
|
bind:close="onClose" bind:select="onSelect" cancel-text="取消" bind:cancel='onCancel'
|
|
/>
|
|
</view>
|