小程序
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 

74 lines
4.2 KiB

<!--index.wxml-->
<view class="container1">
<button class = "s-button" type="primary" bindtap="startSearch">开始扫描</button>
<text class="device-notice">请确保OBD设备已经连接汽车OBD接口,并未与其它手机连接</text>
<!-- <view class="gradient-view" style="display: flex; flex-direction: row; align-items: center; margin-top: 20rpx; height: 150rpx;margin-left: 20rpx; margin-right: 20rpx; position: relative;" bindtap="goToMain">
<image src="/utils/image/ic_blue_remote.png" mode="aspectFill" style="width: 80rpx; height: 50rpx; margin-left: 10rpx; margin-right: 10rpx;padding: 10rpx;"></image>
<view style="display: flex; flex-direction: column;">
<text class="textContent" style="display: flex; font-size: 35rpx; color: rgb(26, 231, 231); ">NISSAN_OBD</text>
<text class="textContent" style="display: flex; font-size: 22rpx; color: rgb(88, 92, 92);">C8:C8:C8:C8:C8:C8</text>
</view>
<view style="display: flex; flex-direction: row; align-items: center;position: relative; width: 100%;justify-content: flex-end; padding: 20rpx; ">
<text class="device-rssi" style="font-size: 25rpx; ">-56</text>
<image src="/utils/image/rss_line.png" mode="aspectFill" style="width: 40rpx; height: 40rpx; margin-left: 10rpx; "></image>
<button class="device-name" style="width: 160rpx; ">连接</button>
</view> -->
</view>
<!-- <view class="x-view" style="display: flex; flex-direction: row; align-items: center; margin-top: 20rpx; height: 150rpx;margin-left: 20rpx; margin-right: 20rpx; position: relative;" bindtap="goToMain">
<image src="/utils/image/ic_blue_remote.png" mode="aspectFill" style="width: 80rpx; height: 50rpx; margin-left: 10rpx; margin-right: 10rpx;padding: 10rpx;"></image>
<view style="display: flex; flex-direction: column;">
<text class="textContent" style="display: flex; font-size: 35rpx; color: rgb(26, 231, 231); ">NISSAN_OBD</text>
<text class="textContent" style="display: flex; font-size: 22rpx; color: rgb(88, 92, 92);">C8:C8:C8:C8:C8:C8</text>
</view>
<view style="display: flex; flex-direction: row; align-items: center;position: relative; width: 100%;justify-content: flex-end; padding: 20rpx; ">
<text class="device-rssi" style="font-size: 25rpx; ">-56</text>
<image src="/utils/image/rss_line.png" mode="aspectFill" style="width: 40rpx; height: 40rpx; margin-left: 10rpx; "></image>
<button class="device-name" style="width: 160rpx; ">连接</button>
</view>
</view> -->
<view class="device-list">
<!-- <view
wx:for="{{deviceList}}"
wx:key="deviceId"
class="device-item"
bindtap="connectDevice"
data-deviceid="{{item.deviceId}}"
data-blename="{{item.name}}"
>
<text class="device-name">{{item.name || '未知设备'}}</text>
<text class="device-rssi">信号强度: {{item.RSSI}}dBm</text>
<text class="device-rssi">MAC: {{item.deviceId}}</text>
<button class="device-name" >连接</button>
</view> -->
<view class="gradient-view" style="display: flex; flex-direction: row; align-items: center; margin-top: 20rpx; height: 150rpx;margin-left: 20rpx; margin-right: 20rpx; position: relative;" wx:for="{{deviceList}}"
wx:key="deviceId"
bindtap="connectDevice"
data-deviceid="{{item.deviceId}}"
data-blename="{{item.name}}">
<image src="/utils/image/ic_blue_remote.png" mode="aspectFill" style="width: 80rpx; height: 50rpx; margin-left: 10rpx; margin-right: 10rpx;padding: 10rpx;"></image>
<view style="display: flex; flex-direction: column;">
<text class="textContent" style="display: flex; font-size: 35rpx; color: rgb(26, 231, 231); ">{{item.name || '未知设备'}}</text>
<text class="textContent" style="display: flex; font-size: 22rpx; color: rgb(88, 92, 92);">{{item.deviceId}}</text>
</view>
<view style="display: flex; flex-direction: row; align-items: center;position: relative; width: 100%;justify-content: flex-end; padding: 20rpx; ">
<text class="device-rssi" style="font-size: 25rpx; ">{{item.RSSI}}</text>
<image src="/utils/image/rss_line.png" mode="aspectFill" style="width: 40rpx; height: 40rpx; margin-left: 10rpx; "></image>
<button class="device-name" style="width: 160rpx; ">连接</button>
</view>
</view>
</view>