(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["BLEPages/child/H01pro"],{"1abe":function(e,t,o){"use strict";var i;o.d(t,"b",(function(){return n})),o.d(t,"c",(function(){return c})),o.d(t,"a",(function(){return i}));var n=function(){var e=this,t=e.$createElement;e._self._c},c=[]},"60a0":function(e,t,o){"use strict";o.r(t);var i=o("1abe"),n=o("e563");for(var c in n)"default"!==c&&function(e){o.d(t,e,(function(){return n[e]}))}(c);var s,a=o("f0c5"),r=Object(a["a"])(n["default"],i["b"],i["c"],!1,null,"86c31068",null,!1,i["a"],s);t["default"]=r.exports},"9aea":function(e,t,o){"use strict";(function(e){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i,n,c=o("26cb");function s(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),o.push.apply(o,i)}return o}function a(e){for(var t=1;t应用——>微信里的蓝牙权限!"),setTimeout((function(){e.navigateBack({delta:1})}),500)}})},onBLEConnectionStateChange:function(){var t=this;e.onBLEConnectionStateChange((function(e){console.log("蓝牙连接状态",JSON.stringify(e)),t.$store.commit("changeConnected",e.connected)}))},startBluetoothDeviceDiscovery:function(){var t=this;e.startBluetoothDevicesDiscovery({allowDuplicatesKey:!0,interval:1e3,success:function(e){t.onBluetoothDeviceFound()},fail:function(t){setTimeout((function(){e.navigateBack({delta:1})}),500)}})},onBluetoothDeviceFound:function(){var t=this;e.onBluetoothDeviceFound((function(e){console.log("开始监听寻找到新设备的事件",e),e.devices.forEach((function(e){if((e.name||e.localName)&&-1!=e.name.indexOf("My")){console.log("deviceId",e),clearTimeout(n),t.stopBluetoothDevicesDiscovery();var o=e.advertisData.slice(-6);e.mac=new Uint8Array(o);var i=Array.from(e.mac);return e.macAddr=t.$tools.ab2hex(i,":").toUpperCase(),t.deviceId=e.macAddr,void t.createBLEConnection()}}))})),t.handleMyTime()},handleMyTime:function(){var t=this;n=setTimeout((function(){t.deviceId||(clearTimeout(n),t.stopBluetoothDevicesDiscovery(),e.showModal({title:"提示",content:"请确定蓝牙和手机位置信息已打开!请确定设备已开机;ios系统需打开设置——>应用——>微信里的蓝牙权限!是否继续?",cancelText:"取消",confirmText:"继续",success:function(o){o.confirm?(console.log("连接设备重新测量"),t.startBluetoothDeviceDiscovery()):(t.Unload=!0,e.navigateBack({delta:1}))}}))}),3e4)},stopBluetoothDevicesDiscovery:function(){e.stopBluetoothDevicesDiscovery({success:function(e){console.log("停止搜索蓝牙设备",e)}})},createBLEConnection:function(){var t=this;e.createBLEConnection({deviceId:t.deviceId,success:function(e){console.log("设备连接成功,获取设备的services",e),t.isConnection=!0,t.getBLEDeviceServices()},fail:function(e){t.isConnection=!1,console.log("设备连接失败,请重新连接",e)}})},getBLEDeviceServices:function(){var t=[],o=this;e.getBLEDeviceServices({deviceId:o.deviceId,success:function(e){console.log("获取设备的UUID成功",e),o.type=3,t=e.services;for(var i=0;i