Files
Wx_BLWConfigTools_V01_Prod/pages/HostUpgrade/HostUpgrade.wxml
2025-12-11 09:50:45 +08:00

117 lines
5.5 KiB
Plaintext

<view class="cu-item">
<view class="flex align-center bg-gray">
<view class="flex-sub ">
<text >房型:</text>
</view>
<view class="flex-eight " style=" justify-content: center; align-items: center;padding: 5rpx 20rpx;"> <!--padding: 5rpx 30rpx;-->
<picker bindchange="bindPickerChange" class="" mode="selector" range="{{myArray}}" >
<view class="cu-tag line-cyan basis-xl " style="width: 100%;" >
<view class="basis-xxl" style=" text-align: center; ">{{myArray[index]}}</view>
<text class=" cuIcon-triangledownfill"style="padding: 5rpx 30rpx;" ></text>
</view>
</picker>
</view>
<view>
<button style=" font-size: 28rpx;" data-index="0" bindtap="openBluetoothAdapter" class=" flex-sub cu-btn bg-{{showinfo==0?'green':'grey'}} ">搜索蓝牙</button>
</view>
</view>
<view class="flex solid-bottom align-center "style="padding: 8rpx 8rpx;">
<view class="flex-nine " style="padding: 2rpx 0rpx;display: inline-block;">
<view class="flex newcu-tag line-olive" style="padding: 5rpx 5rpx;width: 100%;">
<view class=" flex-sub newcu-tag line-olive">
<text >固件:</text>
</view>
<view class=" flex-five newcu-tag line-olive" style="width: 65%;">
<text>{{hex_filename}}</text>
</view>
<view class=" flex-sub newcu-tag line-olive">
<view class="newcu-tag line-olive"style="padding: 5rpx 5rpx;">
<button class="cu-btn" data-name=".hex" style=" font-size: 24rpx; "bindtap="chooseMessageFile" >···</button>
</view>
<view class="newcu-tag line-olive" style="padding: 5rpx 5rpx;">
<button class="cu-btn"style=" font-size: 24rpx;" >下发</button>
</view>
</view>
</view>
<view class="flex newcu-tag line-blue" style="padding: 5rpx 5rpx;width: 100%;">
<view class=" flex-sub newcu-tag line-blue">
<text >配置:</text>
</view>
<view class=" flex-five newcu-tag line-blue" style="width: 65%;">
<text>{{dat_filename}}</text>
</view>
<view class=" flex-sub newcu-tag line-blue">
<view class="newcu-tag line-blue"style="padding: 5rpx 5rpx;">
<button class="cu-btn" data-name=".dat" style=" font-size: 24rpx; "bindtap="chooseMessageFile" >···</button>
</view>
<view class="newcu-tag line-blue" style="padding: 5rpx 5rpx;">
<button class="cu-btn"style=" font-size: 24rpx;" >下发</button>
</view>
</view>
</view>
</view>
<view hover-class="device_item_hover" class="flex-twice align-center bg-grey " style="padding: 2rpx 0rpx;display: inline-block;">
<view class="flex newcu-tag "style="padding: 5rpx 5rpx;width: 100%;" >获取</view>
<view class="flex newcu-tag " style="padding: 5rpx 5rpx;width: 100%;">文件</view>
<!-- <button class="bg-grey padding-5 margin-5 " style=" font-size: 38rpx; " data-index="0" bindtap="GetshowinfoClick" >获取\r文件</button> -->
</view>
</view>
<view class=" bg-white">
<view class="flex ">
<view class="cu-progress round">
<view class="bg-green" style="width:{{loading?'80%':''}};"></view>
</view>
<text class="margin-left">80%</text>
</view>
</view>
</view>
<view>
<view class="flex align-center ">
<view class="devices_summary">已发现 {{devices.length}} 个外围设备:</view>
<button style=" font-size: 28rpx;" data-index="0" bindtap="openBluetoothAdapter" class=" flex-sub cu-btn bg-{{showinfo==0?'green':'grey'}} ">设置</button>
<button style=" font-size: 28rpx;" data-index="0" bindtap="openBluetoothAdapter" class=" flex-sub cu-btn bg-{{showinfo==0?'green':'grey'}} ">通信日志</button>
</view>
<scroll-view class="device_list" scroll-y scroll-with-animation>
<view wx:for="{{devices}}" wx:key="index"
class="device_item cf padding-sm">
<view data-device-id="{{item.deviceId}}" data-name="{{item.name || item.localName}}" class="fl flex-eight bg-{{devicedisplay==item.deviceId?'green':'white'}}" bindtap="createBLEConnection" hover-class="device_item_hover" >
<view style="font-size: 16px; color: #333;"> {{item.name}}</view>
<view style="font-size: 10px">信号强度: {{item.RSSI}}dBm ({{utils.max(0, item.RSSI + 100)}}%)</view>
<view style="font-size: 10px">UUID: {{item.deviceId}}</view>
<view style="font-size: 10px">Service数量: {{utils.len(item.advertisServiceUUIDs)}}</view>
<!-- <view class="bg-gray margin-xs" style="padding:2rpx;"></view> -->
</view>
<view class="fr flex-twice">
<button class="bg-red padding-lg margin-xs radius " style="font-size: 26rpx; " data-index="0" bindtap="closeBLEConnection" wx:if="{{devicedisplay==item.deviceId}}">断开连接</button>
</view>
</view>
</scroll-view>
<!-- <view class="connected_info" wx:if="{{connected}}">
<view>
<text>已连接到 {{name}}</text>
<view class="operation">
<button wx:if="{{canWrite}}" size="mini" bindtap="writeBLECharacteristicValue1">写数据</button>
<button size="mini" bindtap="closeBLEConnection">断开连接</button>
</view>
</view>
<view wx:for="{{chs}}" wx:key="index" style="font-size: 12px; margin-top: 10px;">
<view>特性UUID: {{item.uuid}}</view>
<view>特性值: {{item.value}}</view>
</view>
</view> -->
</view>