| 12345678910111213141516171819202122232425262728 |
- <view class="container">
- <text style="font-size:larger;margin-top:10px">蓝牙诊断工具</text>
- <text style="font-size:medium;margin-top:10px">在此输入要连接的蓝牙mac地址(字母使用小写)</text>
- <input class="input" value="{{inputText}}" placeholder="在此输入mac地址 "bindinput="MacInput" maxlength="12"/>
- <scroll-view scroll-y style="width:690rpx;height:{{list_height}}rpx">
- <block wx:for="{{devicesList}}" wx:key="deviceId">
- <view class="list-item" id="{{item.deviceId}}" bindtap="ConnectClick">
- <view style="display:flex;flex-direction:column;width:80%">
- <text style="font-size:medium;word-break:break-all">设备名称: {{item.name}}</text>
- <text style="font-size:x-small;color:gray;word-break:break-all">设备ID: {{item.deviceId}}</text>
- <text style="font-size:x-small;color:gray;word-break:break-all">广播: {{item.advertisData}}</text>
- <text style="font-size:x-small;color:gray;word-break:break-all">信号强度RSSI: {{item.RSSI}}</text>
- </view>
- <image style="width:36px;height:36px" mode="aspectFit" src="/images/bluetooth.png"></image>
- </view>
- </block>
- </scroll-view>
-
- <!-- 按钮 -->
- <button type="primary" class="button" bindtap="ScanQR">{{"扫描二维码"}}</button>
- <button type="primary" class="button" bindtap="ConnectMacBle">{{"连接上述mac地址蓝牙"}}</button>
- <button type="primary" class="button" loading="{{searching}}" bindtap="SearchClick">{{searching?"搜索中...":"搜索蓝牙设备"}}</button>
- <!-- <button type="primary" class="button" bindtap="RequestTest">{{"网络请求测试"}}</button> -->
- <!-- <button type="primary" class="button" bindtap="WebsocketConnButton">{{"websocket建立连接"}}</button>
- <button type="primary" class="button" bindtap="WebsocketSendButton">{{"websocket发送"}}</button> -->
- </view>
|