examTeamApp/unpackage/dist/build/mp-weixin/pages/skiping/skip.js

1 line
10 KiB
JavaScript
Raw Normal View History

(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["pages/skiping/skip"],{"0fe6":function(e,t,i){"use strict";var o=i("3fcc"),n=i.n(o);n.a},"115c":function(e,t,i){"use strict";i.r(t);var o=i("4b9c"),n=i("6a7a");for(var s in n)["default"].indexOf(s)<0&&function(e){i.d(t,e,(function(){return n[e]}))}(s);i("0fe6");var c=i("828b"),r=Object(c["a"])(n["default"],o["b"],o["c"],!1,null,"5b0d9194",null,!1,o["a"],void 0);t["default"]=r.exports},"3fcc":function(e,t,i){},"46f7":function(e,t,i){"use strict";(function(e,t){var o=i("47a9");i("30b7");o(i("3240"));var n=o(i("115c"));e.__webpack_require_UNI_MP_PLUGIN__=i,t(n.default)}).call(this,i("3223")["default"],i("df3c")["createPage"])},"49a5":function(e,t,i){"use strict";(function(e){var o=i("47a9");Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n,s=o(i("7ca3")),c=i("8f59");function r(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),i.push.apply(i,o)}return i}function a(e){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?r(Object(i),!0).forEach((function(t){(0,s.default)(e,t,i[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):r(Object(i)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))}))}return e}var u={data:function(){return{active:1,acd_id:6,weight:50,disabled:!1,isDevice:0,isConnection:!1,time_m:"",time_s:"",timeList:[],timesTndex:[1,0],deviceId:"",serviceId:"",write:"",notify:"",islink:0}},components:{record:function(){i.e("element/manuallyAdd/record").then(function(){return resolve(i("e472"))}.bind(null,i)).catch(i.oe)}},computed:a(a({},(0,c.mapState)(["user","MeasureSkip","isConnected","isBluetoothTyle","devicesList"])),{},{info:function(){return this.MeasureSkip}}),mounted:function(){this.timeList=this.$tools.gethms(),this.time_m=this.timeList[0][1].substring(0,2),this.time_s=this.timeList[1][0].substring(0,2)},onLoad:function(t){var i=this;console.log("options",t),t&&t.acd_id&&(i.acd_id=t.acd_id,i.isDevice=t.device,setTimeout((function(){i.handleisSdevice()}),1e3)),i.$store.dispatch("getSkipResult",{aud_id:e.getStorageSync("userid")}),i.isConnection=i.isConnected,i.$Bluetooth.onBLEConnectionStateChange(),e.onBluetoothAdapterStateChange((function(e){i.$store.commit("changeBluetooth",e.available)}))},onPullDownRefresh:function(){setTimeout((function(){e.stopPullDownRefresh()}),1e3)},onShow:function(){var t=this;e.$on("updateData",(function(i){var o=JSON.parse(i);t.acd_id=o.acd_id,t.isDevice=o.device,t.active=o.active,t.deviceId=o.deviceId,t.serviceId=o.serviceId,t.write=o.write,t.notify=o.notify,t.islink=t.isConnected?1:-1,t.isConnection=t.isConnected,t.notifyBLECharacteristicValue(),o.isSuccessful&&t.$store.dispatch("getSkipResult",{aud_id:e.getStorageSync("userid")}),t.$Bluetooth.onBLEConnectionStateChange(),e.onBluetoothAdapterStateChange((function(e){t.$store.commit("changeBluetooth",e.available)})),console.log("监听到事件来自 updateData",o)}))},onUnload:function(){clearTimeout(n),this.islink=-1,this.isConnection=!1,this.$Bluetooth.closeBluetoothAdapter(),this.$Bluetooth.closeBLEConnection(this.deviceId),this.$Bluetooth.stopBluetoothDevicesDiscovery(),this.$store.commit("changeBluetooth",!1),this.$store.commit("changeConnected",!1),e.$off("updateData"),setTimeout((function(){e.switchTab({url:"/pages/home/home"})}),300),console.log("返回首页onUnload")},watch:{devicesList:function(){this.devicesList.length&&(clearTimeout(n),this.$Bluetooth.stopBluetoothDevicesDiscovery(),this.deviceId=this.devicesList[0].deviceId,this.createBLEConnection()),console.log("devicesList",this.devicesList)},isConnected:function(){this.isConnected||(this.islink=-1),this.isConnection=this.isConnected,console.log("蓝牙是否连接",this.isConnected)},isBluetoothTyle:function(){this.isBluetoothTyle||(this.isConnection=!1,this.islink=-1),console.log("蓝牙是否打开",this.isBluetoothTyle)}},methods:{ha