(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["pageTwo/devices/B20"],{"173d":function(e,t,i){"use strict";i.r(t);var n=i("8535"),o=i("8843");for(var c in o)["default"].indexOf(c)<0&&function(e){i.d(t,e,(function(){return o[e]}))}(c);i("5526");var s=i("828b"),r=Object(s["a"])(o["default"],n["b"],n["c"],!1,null,"3a951bb4",null,!1,n["a"],void 0);t["default"]=r.exports},"308e":function(e,t,i){"use strict";(function(e){var n=i("47a9");Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=n(i("7ca3")),c=i("8f59");function s(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),i.push.apply(i,n)}return i}function r(e){for(var t=1;t0||"0:0.00"!=toString(c))&&(t.isFinished=!0)),console.log("状态:",i,n,o,c,t.unit,t.isFinished)}))},fail:function(e){console.log("测量失败",e.value)}})},handleIsLing:function(){this.IsLing||(this.writeBLECharacteristicValue("A6020500076A"),this.IsLing=!0)},handleIsNum:function(){this.writeBLECharacteristicValue("A6020400066A")},writeBLECharacteristicValue:function(t){var i=new Uint8Array(t.match(/[\da-f]{2}/gi).map((function(e){return parseInt(e,16)})));console.log("buffer",t,i),e.writeBLECharacteristicValue({deviceId:this.deviceId,serviceId:this.serviceId,characteristicId:this.write,value:i.buffer,success:function(e){console.log("下发指令成功",e.errMsg)},fail:function(e){console.log("下发指令失败",e)}})},handleGetMeasure:function(){var t=this;t.height?t.$model.getmeasurefunit({adc:0,weight:t.weight+t.unit,height:t.height,aud_id:t.userInfo.id,head_data:t.head?t.head:0}).then((function(i){t.isHeight=!1,t.isSave=!1,0==i.code?(t.$store.dispatch("getResult",{aud_id:e.getStorageSync("userid")}),t.$store.dispatch("getUserInfo",{aud_id:e.getStorageSync("userid")}),t.$tools.msg("测量成功")):t.$tools.msg("测量失败"),t.Unload=!0,e.switchTab({url:"/pages/home/home"}),setTimeout((function(){t.closeBLEConnection(),t.closeBluetoothAdapter()}),200)})):this.$tools.msg("请输入身高")},handleBack:function(){var t=this,i=new Uint8Array("A6020500076A".match(/[\da-f]{2}/gi).map((function(e){return parseInt(e,16)})));e.writeBLECharacteristicValue({deviceId:t.deviceId,serviceId:t.serviceId,characteristicId:t.write,value:i.buffer,success:function(i){console.log("下发指令成功",i.errMsg),e.showToast({title:"数据重置中",icon:"none"}),console.log("重置",t.typeInfo,t.weight)},fail:function(e){console.log("下发指令失败",e)}})},stopBluetoothDevicesDiscovery:function(){e.stopBluetoothDevicesDiscovery({success:function(e){console.log("停止搜索蓝牙设备",e)}})},onBLEConnectionStateChange:function(){var t=this;e.onBLEConnectionStateChange((function(e){console.log("监听蓝牙连接状态",e.connected),t.$store.commit("changeConnected",e.connected)}))},closeBluetoothAdapter:function(){e.closeBluetoothAdapter({success:function(e){console.log("蓝牙模块关闭成功")}})},closeBLEConnection:function(){var t=this;e.closeBLEConnection({deviceId:t.deviceId,success:function(e){console.log("断开蓝牙连接成功"),t.$store.commit("changeConnected",!1)}})}}};t.default=a}).call(this,i("df3c")["default"])},5526:function(e,t,i){"use strict";var n=i("797f"),o=i.n(n);o.a},"797f":function(e,t,i){},8535:function(e,t,i){"use strict";i.d(t,"b",(function(){return n})),i.d(t,"c",(function(){return o})),i.d(t,"a",(function(){}));var n=function(){var e=this.$createElement;this._self._c},o=[]},8843:function(e,t,i){"use strict";i.r(t);var n=i("308e"),o=i.n(n);for(var c in n)["default"].indexOf(c)<0&&function(e){i.d(t,e,(function(){return n[e]}))}(c);t["default"]=o.a},"9f0f":function(e,t,i){"use strict";(function(e,t){var n=i("47a9");i("bad8");n(i("3240"));var o=n(i("173d"));e.__webpack_require_UNI_MP_PLUGIN__=i,t(o.default)}).call(this,i("3223")["default"],i("df3c")["createPage"])}},[["9f0f","common/runtime","common/vendor"]]]);