1 line
2.6 KiB
Plaintext
1 line
2.6 KiB
Plaintext
<view><page-head wx:if="{{a}}" u-i="45a9d702-0" bind:__l="__l" u-p="{{a}}"></page-head><view class="uni-padding-wrap uni-common-mt"><view> 本蓝牙协议只支持低功耗蓝牙协议ble。如果想连接非ble蓝牙设备,请在社区搜索 Native.js 蓝牙。 </view><view class="uni-btn-v"><button type="primary" disabled="{{b}}" bindtap="{{c}}"> 初始化蓝牙模块 </button><view wx:if="{{d}}">{{e}}</view><button type="primary" loading="{{f}}" disabled="{{g}}" bindtap="{{h}}"> 开始搜索蓝牙设备 </button><button type="primary" disabled="{{i}}" bindtap="{{j}}"> 停止搜索蓝牙设备 </button><button type="primary" loading="{{k}}" disabled="{{l}}" bindtap="{{m}}"> 选择设备 </button><view wx:if="{{n}}">{{o}}</view><button type="primary" disabled="{{p}}" bindtap="{{q}}"> 连接蓝牙设备 </button><button type="primary" disabled="{{r}}" bindtap="{{s}}"> 选择设备服务 </button><view wx:if="{{t}}">已选服务uuid:{{v}}</view><button type="primary" disabled="{{w}}" bindtap="{{x}}"> 获取服务的特征值 </button><view wx:if="{{y}}"><view class="uni-list_name">uuid:{{z}}</view><view class="uni-list_item"> 是否支持 read 操作:{{A}}</view><view class="uni-list_item"> 是否支持 write 操作:{{B}}</view><view class="uni-list_item"> 是否支持 notify 操作:{{C}}</view><view class="uni-list_item"> 是否支持 indicate 操作:{{D}}</view></view><button type="primary" disabled="{{E}}" bindtap="{{F}}"> 断开蓝牙设备 </button><button type="primary" disabled="{{G}}" bindtap="{{H}}"> 关闭蓝牙模块 </button></view></view><view wx:if="{{I}}" class="uni-mask" catchtouchmove="{{R}}" bindtap="{{S}}"><scroll-view class="uni-scroll_box" scroll-y catchtouchmove="{{P}}" catchtap="{{Q}}"><view class="uni-title"> 已经发现{{J}}{{K}}: </view><view wx:for="{{L}}" wx:for-item="item" wx:key="l" class="uni-list-box" bindtap="{{item.m}}"><view wx:if="{{M}}"><view class="uni-list_name">{{item.a}}</view><view class="uni-list_item">信号强度:{{item.b}}dBm</view><view class="uni-list_item">UUID:{{item.c}}</view></view><view wx:if="{{N}}"><view class="uni-list_item" style="line-height:2.2"> UUID: {{item.d}} <text wx:if="{{item.e}}">{{item.f}}</text></view></view><view wx:if="{{O}}"><view class="uni-list_name">uuid:{{item.g}}</view><view class="uni-list_item">是否支持 read 操作:{{item.h}}</view><view class="uni-list_item"> 是否支持 write 操作:{{item.i}}</view><view class="uni-list_item"> 是否支持 notify 操作:{{item.j}}</view><view class="uni-list_item"> 是否支持 indicate 操作:{{item.k}}</view></view></view></scroll-view></view></view> |