|
|
@@ -1418,6 +1418,14 @@ const store = new Vuex.Store({
|
|
|
getServiceList: (serviceList) => {
|
|
|
//搜索服务失败后
|
|
|
state.BLEGetServices = serviceList;
|
|
|
+ },
|
|
|
+ getFail:()=>{
|
|
|
+ this.commit("B_CloseBLEConnection", {
|
|
|
+ deviceId: item.deviceId
|
|
|
+ })
|
|
|
+ state.cIndex = -1;
|
|
|
+ state.bConnection = false;
|
|
|
+ state.bVerifiedConnection = false;
|
|
|
}
|
|
|
});
|
|
|
|
|
|
@@ -1542,12 +1550,13 @@ const store = new Vuex.Store({
|
|
|
callback: success,
|
|
|
getServiceList: (serviceList) => {
|
|
|
state.BLEGetServices = serviceList;
|
|
|
- }
|
|
|
+ },
|
|
|
+ getFail:()=>{}
|
|
|
})
|
|
|
},
|
|
|
onCloseBLEConnection(state, context) {
|
|
|
|
|
|
- console.log("onCloseBLEConnection");
|
|
|
+ console.log("onCloseBLEConnection", state.BLEConnectDevice);
|
|
|
let {
|
|
|
getSuccess = null,
|
|
|
} = context;
|
|
|
@@ -1933,7 +1942,8 @@ const store = new Vuex.Store({
|
|
|
retryCount,
|
|
|
item,
|
|
|
callback,
|
|
|
- getServiceList
|
|
|
+ getServiceList,
|
|
|
+ getFail,
|
|
|
} = context;
|
|
|
let serviceList = [];
|
|
|
let _self = this;
|
|
|
@@ -1954,7 +1964,9 @@ const store = new Vuex.Store({
|
|
|
},500)
|
|
|
return;
|
|
|
}
|
|
|
-
|
|
|
+ if(getFail){
|
|
|
+ getFail();
|
|
|
+ }
|
|
|
uni.hideToast();
|
|
|
uni.showModal({
|
|
|
title: '提示',
|