670完成
This commit is contained in:
@ -362,6 +362,7 @@ class BleHelper {
|
||||
success: (args) => {
|
||||
console.log("蓝牙初始化成功:" + JSON.stringify(args));
|
||||
this.data.isOpenBlue = true;
|
||||
this.data.available=true;
|
||||
resolve(true);
|
||||
|
||||
if (this.data.isSubscribe) { //整个App生命周期,只订阅一次
|
||||
@ -939,6 +940,10 @@ class BleHelper {
|
||||
resolve(false);
|
||||
return;
|
||||
}
|
||||
if(!this.data.available){
|
||||
reject(this.getError({code:10001}));
|
||||
return;
|
||||
}
|
||||
console.log("正在连接" + deviceId);
|
||||
uni.createBLEConnection({
|
||||
deviceId: deviceId,
|
||||
|
Reference in New Issue
Block a user