search.wxml 1.9 KB

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