2025-08-18 10:58:58 +08:00
|
|
|
|
(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["pageTwo/devices/F01PRO"],{"5f23":function(e,t,n){"use strict";n.d(t,"b",(function(){return o})),n.d(t,"c",(function(){return i})),n.d(t,"a",(function(){}));var o=function(){var e=this.$createElement;this._self._c},i=[]},"65dc":function(e,t,n){"use strict";n.r(t);var o=n("e9d1"),i=n.n(o);for(var s in o)["default"].indexOf(s)<0&&function(e){n.d(t,e,(function(){return o[e]}))}(s);t["default"]=i.a},ad58:function(e,t,n){"use strict";n.r(t);var o=n("5f23"),i=n("65dc");for(var s in i)["default"].indexOf(s)<0&&function(e){n.d(t,e,(function(){return i[e]}))}(s);var c=n("828b"),r=Object(c["a"])(i["default"],o["b"],o["c"],!1,null,"4c084893",null,!1,o["a"],void 0);t["default"]=r.exports},ccd9:function(e,t,n){"use strict";(function(e,t){var o=n("47a9");n("bad8");o(n("3240"));var i=o(n("ad58"));e.__webpack_require_UNI_MP_PLUGIN__=n,t(i.default)}).call(this,n("3223")["default"],n("df3c")["createPage"])},e9d1:function(e,t,n){"use strict";(function(e){var o=n("47a9");Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=o(n("7eb4")),s=o(n("ee10")),c=o(n("7ca3")),r=n("8f59");function a(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function u(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?a(Object(n),!0).forEach((function(t){(0,c.default)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):a(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var l=requirePlugin("sdkPlugin").AiLink,d={data:function(){return{textW:"",textH:"",textImp:"",height:"",weight:"",imp:0,macAddr:"",deviceId:"",serviceId:"",readId:"",writeId:"",notifyId:"",isSend:!0,Unload:!1,isConnection:0,data01:{},data02:{},BLEResult:{}}},computed:u(u({},(0,r.mapState)(["user","isConnected","isBluetoothTyle"])),{},{userInfo:function(){return this.user}}),onUnload:function(){var e=(0,s.default)(i.default.mark((function e(){var t,n;return i.default.wrap((function(e){while(1)switch(e.prev=e.next){case 0:t=this,t.Unload||(clearTimeout(void 0),t.$store.state.devicesList2=[],t.closeBLEConnection(),t.closeBluetoothAdapter(),1!=t.isConnection&&(n=getCurrentPages(),n[n.length-2].$vm.islink=-1,n[n.length-2].$vm.textLink="开始连接"));case 2:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}(),watch:{isConnected:function(){this.isConnected||(console.log("F01PRO:isConnected-"+this.isConnected),this.handleBack(),this.isConnection=2)},isBluetoothTyle:function(){this.isBluetoothTyle||(console.log("F01PRO:isBluetoothTyle-"+this.isBluetoothTyle),this.handleBack(),this.isConnection=2)}},onLoad:function(t){var n=this;n.textW="",n.textH="",console.log("options",t),t&&t.deviceId&&(n.deviceId=t.deviceId,n.createBLEConnection()),n.onBLEConnectionStateChange(),e.onBluetoothAdapterStateChange((function(e){n.$store.commit("changeBluetooth",e.available)}))},methods:{openBluetoothAdapter:function(){var t=this;t.textW="",t.textH="",t.isSend=!0,t.Unload=!1,e.openBluetoothAdapter({success:function(e){t.isConnection=0,t.startBluetoothDeviceDiscovery(),console.log("初始化蓝牙成功:"+e.errMsg)},fail:function(e){t.isConnection=2,t.$tools.msg("请确定设备是开机状态、手机蓝牙权限已打开!")}})},onBLEConnectionStateChange:function(){var t=this;e.onBLEConnectionStateChange((function(e){console.log("F01PRO:onBLEConnectionStateChange-"+e.connected),e.connected||(t.Unload=!0,t.isConnection=2,clearTimeout(void 0),t.closeBLEConnection(),t.closeBluetoothAdapter()),t.$store.commit("changeConnected",e.connected)}))},startBluetoothDeviceDiscovery:function(){var t=this;e.startBluetoothDevicesDiscovery({allowDuplicatesKey:!1,interval:500,success:function(e){t.isConnection=0,t.onBluetoothDeviceFound()},fail:function(e){t.isConnection=2,t.$tools.msg("请确定设备是开
|