This commit is contained in:
fengerli
2026-03-17 18:03:43 +08:00
parent 7512b7211c
commit 141267b25f

View File

@ -37,13 +37,25 @@
<text class="value">{{ deviceInfo.deviceName }}</text>
</view>
<view class="item">
<text class="lbl">IMEI</text>
<text class="lbl">设备IMEI</text>
<text class="value">{{ deviceInfo.deviceImei }}</text>
</view>
<view class="item">
<text class="lbl">Mac地址</text>
<text class="value">{{device.deviceMac}}</text>
</view>
<view class="item">
<text class="lbl">蓝牙名称</text>
<text class="value valueFont">{{device.bluetoothName}}</text>
</view>
<view class="item" @click.top="bleStatuToggle">
<text class="lbl">蓝牙状态</text>
<text class="value" :class="formData.bleStatu?'green':'red'">{{device.getbleStatu}}</text>
</view>
<view class="item">
<text class="lbl">设备状态</text>
<text class="value">{{ deviceInfo.onlineStatus === 0 ? '离线' : deviceInfo.onlineStatus
=== 2 ? '故障' : '在线' }}</text>
<text class="value"
:class="deviceInfo.onlineStatus===0?'red':'green'">{{ deviceInfo.onlineStatus === 0 ? '离线': '在线' }}</text>
</view>
<view class="info-row">
<text class="info-label" style="display: flex; align-items: center;">定位信息</text>
@ -592,7 +604,18 @@
console.log(this.activePermissions, 'this.activePermissions');
these.fetchDeviceDetail(data.data.deviceId)
}
// 尝试连接蓝牙
if (data.data.deviceMac) {
// 假设 deviceMac 是蓝牙的 deviceId
bleTool.LinkBlue(data.data.deviceMac).then(() => {
console.log("100J 蓝牙连接成功");
this.bleStateRecovry({
deviceId: data.data.deviceMac
});
}).catch(err => {
console.log("100J 蓝牙连接失败将使用4G", err);
});
}
});
this.createThrottledFunctions();
@ -603,16 +626,7 @@
bleTool.addStateBreakCallback(this.bleStateBreak, "HBY100J");
bleTool.addStateRecoveryCallback(this.bleStateRecovry, "HBY100J");
// 尝试连接蓝牙
if (data.data.deviceMac) {
// 假设 deviceMac 是蓝牙的 deviceId
bleTool.LinkBlue(data.data.deviceMac).then(() => {
console.log("100J 蓝牙连接成功");
this.bleStateRecovry({deviceId: data.data.deviceMac});
}).catch(err => {
console.log("100J 蓝牙连接失败将使用4G", err);
});
}
},
onHide: function() {