1 line
14 KiB
JavaScript
1 line
14 KiB
JavaScript
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["pages-projectEnd-betonManage-qualitySpringback-index~pages-projectEnd-qualitySpringback-index"],{"087b":function(e,n,t){"use strict";t.r(n);var i=t("433c"),o=t.n(i);for(var c in i)"default"!==c&&function(e){t.d(n,e,(function(){return i[e]}))}(c);n["default"]=o.a},"0912":function(e,n,t){"use strict";var i=t("7782"),o=t.n(i);o.a},"37fd":function(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var i={name:"loadingGig",data:function(){return{}}};n.default=i},"3b61":function(e,n,t){"use strict";t.r(n);var i=t("f4e2"),o=t("087b");for(var c in o)"default"!==c&&function(e){t.d(n,e,(function(){return o[e]}))}(c);t("0912");var a,r=t("f0c5"),s=Object(r["a"])(o["default"],i["b"],i["c"],!1,null,"461b0680",null,!1,i["a"],a);n["default"]=s.exports},"3dee":function(e,n,t){"use strict";t.r(n);var i=t("37fd"),o=t.n(i);for(var c in i)"default"!==c&&function(e){t.d(n,e,(function(){return i[e]}))}(c);n["default"]=o.a},"433c":function(e,n,t){"use strict";var i=t("4ea4");Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var o=i(t("9931")),c={props:["showBack","themeType"],components:{uniIcons:o.default},data:function(){return{mobileTopHeight:0}},mounted:function(){var e=this;uni.getSystemInfo({success:function(n){e.mobileTopHeight=n.statusBarHeight,uni.setStorageSync("systemInfo",n),console.log(n)}}),console.log("this.mobileTopHeight",this.mobileTopHeight)},methods:{goBackFn:function(){uni.navigateBack({success:function(){}})}}};n.default=c},7782:function(e,n,t){var i=t("c58a");"string"===typeof i&&(i=[[e.i,i,""]]),i.locals&&(e.exports=i.locals);var o=t("4f06").default;o("ee2056aa",i,!0,{sourceMap:!1,shadowMode:!1})},"7ec7":function(e,n,t){"use strict";t.r(n);var i=t("9e8e"),o=t("3dee");for(var c in o)"default"!==c&&function(e){t.d(n,e,(function(){return o[e]}))}(c);t("a064");var a,r=t("f0c5"),s=Object(r["a"])(o["default"],i["b"],i["c"],!1,null,"eddb3992",null,!1,i["a"],a);n["default"]=s.exports},"8fdf":function(e,n,t){var i=t("24fb");n=i(!1),n.push([e.i,".spinner[data-v-eddb3992]{\r\n /* margin: 100px auto; */width:14px;height:14px;position:relative;display:inline-block;vertical-align:middle;margin-right:5px}.container1 > div[data-v-eddb3992], .container2 > div[data-v-eddb3992], .container3 > div[data-v-eddb3992]{width:4px;height:4px;background-color:#007aff;border-radius:100%;position:absolute;-webkit-animation:bouncedelay-data-v-eddb3992 1.2s infinite ease-in-out;animation:bouncedelay-data-v-eddb3992 1.2s infinite ease-in-out;-webkit-animation-fill-mode:both;animation-fill-mode:both}.spinner .spinner-container[data-v-eddb3992]{position:absolute;width:100%;height:100%}.container2[data-v-eddb3992]{-webkit-transform:rotate(45deg);transform:rotate(45deg)}.container3[data-v-eddb3992]{-webkit-transform:rotate(90deg);transform:rotate(90deg)}.circle1[data-v-eddb3992]{top:0;left:0}.circle2[data-v-eddb3992]{top:0;right:0}.circle3[data-v-eddb3992]{right:0;bottom:0}.circle4[data-v-eddb3992]{left:0;bottom:0}.container2 .circle1[data-v-eddb3992]{-webkit-animation-delay:-1.1s;animation-delay:-1.1s}.container3 .circle1[data-v-eddb3992]{-webkit-animation-delay:-1s;animation-delay:-1s}.container1 .circle2[data-v-eddb3992]{-webkit-animation-delay:-.9s;animation-delay:-.9s}.container2 .circle2[data-v-eddb3992]{-webkit-animation-delay:-.8s;animation-delay:-.8s}.container3 .circle2[data-v-eddb3992]{-webkit-animation-delay:-.7s;animation-delay:-.7s}.container1 .circle3[data-v-eddb3992]{-webkit-animation-delay:-.6s;animation-delay:-.6s}.container2 .circle3[data-v-eddb3992]{-webkit-animation-delay:-.5s;animation-delay:-.5s}.container3 .circle3[data-v-eddb3992]{-webkit-animation-delay:-.4s;animation-delay:-.4s}.container1 .circle4[data-v-eddb3992]{-webkit-animation-delay:-.3s;animation-delay:-.3s}.container2 .circle4[data-v-eddb3992]{-webkit-animation-delay:-.2s;animation-delay:-.2s}.container3 .circle4[data-v-eddb3992]{-webkit-animation-delay:-.1s;animation-delay:-.1s}@-webkit-keyframes bouncedelay-data-v-eddb3992{0%, 80%, 100%{-webkit-transform:scale(0)}40%{-webkit-transform:scale(1)}}@keyframes bouncedelay-data-v-eddb3992{0%, 80%, 100%{transform:scale(0);-webkit-transform:scale(0)}40%{transform:scale(1);-webkit-transform:scale(1)}}",""]),e.exports=n},9780:function(e,n,t){var i=t("8fdf");"string"===typeof i&&(i=[[e.i,i,""]]),i.locals&&(e.exports=i.locals);var o=t("4f06").default;o("9ed2fbde",i,!0,{sourceMap:!1,shadowMode:!1})},"9e8e":function(e,n,t){"use strict";var i;t.d(n,"b",(function(){return o})),t.d(n,"c",(function(){return c})),t.d(n,"a",(function(){return i}));var o=function(){var e=this,n=e.$createElement;e._self._c;return e._m(0)},c=[function(){var e=this,n=e.$createElement,t=e._self._c||n;return t("div",{staticClass:"spinner"},[t("div",{staticClass:"spinner-container container1"},[t("div",{staticClass:"circle1"}),t("div",{staticClass:"circle2"}),t("div",{staticClass:"circle3"}),t("div",{staticClass:"circle4"})]),t("div",{staticClass:"spinner-container container2"},[t("div",{staticClass:"circle1"}),t("div",{staticClass:"circle2"}),t("div",{staticClass:"circle3"}),t("div",{staticClass:"circle4"})]),t("div",{staticClass:"spinner-container container3"},[t("div",{staticClass:"circle1"}),t("div",{staticClass:"circle2"}),t("div",{staticClass:"circle3"}),t("div",{staticClass:"circle4"})])])}]},a064:function(e,n,t){"use strict";var i=t("9780"),o=t.n(i);o.a},c58a:function(e,n,t){var i=t("24fb");n=i(!1),n.push([e.i,'@charset "UTF-8";\r\n/**\r\n * 这里是uni-app内置的常用样式变量\r\n *\r\n * uni-app 官方扩展插件及插件市场(https://ext.dcloud.net.cn)上很多三方插件均使用了这些样式变量\r\n * 如果你是插件开发者,建议你使用scss预处理,并在插件代码中直接使用这些变量(无需 import 这个文件),方便用户通过搭积木的方式开发整体风格一致的App\r\n *\r\n */\r\n/**\r\n * 如果你是App开发者(插件使用者),你可以通过修改这些变量来定制自己的插件主题,实现自定义主题功能\r\n *\r\n * 如果你的项目同样使用了scss预处理,你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件\r\n */\r\n/* 颜色变量 */\r\n/* 行为相关颜色 */\r\n/* 文字基本颜色 */\r\n/* 背景颜色 */\r\n/* 边框颜色 */\r\n/* 尺寸变量 */\r\n/* 文字尺寸 */\r\n/* 图片尺寸 */\r\n/* Border Radius */\r\n/* 水平间距 */\r\n/* 垂直间距 */\r\n/* 透明度 */\r\n/* 文章场景相关 */.statusBar[data-v-461b0680]{background-color:#2a2b5b}.whiteHeaderBox .statusBar[data-v-461b0680]{background-color:#2b8df3}',""]),e.exports=n},d875:function(e,n,t){"use strict";t("99af"),t("4160"),t("d81d"),t("fb6a"),t("a434"),t("c19f"),t("ace4"),t("d3b7"),t("e25e"),t("4d63"),t("ac1f"),t("25f0"),t("5319"),t("498a"),t("5cc6"),t("9a8c"),t("a975"),t("735e"),t("c1ac"),t("d139"),t("3a7b"),t("d5d6"),t("82f8"),t("e91f"),t("60bd"),t("5f96"),t("3280"),t("3fcc"),t("ca91"),t("25a1"),t("cd26"),t("2954"),t("649e"),t("219c"),t("b39a"),t("72f7"),t("159b"),Object.defineProperty(n,"__esModule",{value:!0}),n.getBlooth=a,n.DeviceFound=s,n.closeBle=u,n.createBLE=l,n.notify=h,n.watchNotify=b,n.readBLE=m,n.writeBLE=y;var i=[],o=0;function c(e,n,t){for(var i=0;i<e.length;i++)if(e[i][n]===t)return i;return-1}function a(){return i=[],new Promise((function(e,n){uni.openBluetoothAdapter({success:function(t){r().then((function(t){console.log(t,"searchBlooth"),uni.onBluetoothDeviceFound((function(e){console.log(e,"搜索到蓝牙设备"),console.log(e.devices[0]);var n=c(i,"deviceId",e.devices[0].deviceId);console.log(n,"idx"),"-1"==n&&(!e.devices[0].localName||e.devices[0].name&&"未知设备"!=e.devices[0].name?e.devices[0].name&&"未知设备"!=e.devices[0].name&&i.push(e.devices[0]):(e.devices[0].name=e.devices[0].localName,i.push(e.devices[0])))})),setTimeout((function(){s().then((function(n){console.log(n,"DeviceFound"),console.log(i,"BLEList"),f(),e(n)})).catch((function(e){console.log(e,"searchBlooth1"),n(e)}))}),5e3)})).catch((function(e){console.log(e,"DeviceFound1"),n(e)}))},fail:function(e){console.log(e,"openBluetoothAdapter err"),n(e)}})}))}function r(){return new Promise((function(e,n){uni.startBluetoothDevicesDiscovery({success:function(n){console.log(n,"startBluetoothDevicesDiscovery"),e(n)},fail:function(e){n(e)}})}))}function s(){return d(),new Promise((function(e,n){uni.getBluetoothDevices({success:function(n){console.log(n,"蓝牙列表"),console.log(i,"BLEListBLEList"),e({devices:i})},fail:function(e){console.log(e,"错误的"),n(e)}})}))}function d(){uni.stopBluetoothDevicesDiscovery({success:function(e){console.log(e,"蓝牙停止")}})}function u(e,n){return console.log("closeBle"),new Promise((function(t,i){var o=uni.getStorageSync("BLECONNID");console.log(o,"closeBle"),o&&(uni.closeBLEConnection({deviceId:o,success:function(e){console.log("断开蓝牙连接",e),uni.removeStorageSync("RESCODE"),uni.removeStorageSync("BLECONNID")}}),uni.closeBluetoothAdapter({success:function(o){console.log("断开蓝牙模块",o),e&&uni.openBluetoothAdapter({success:function(t){console.log("打开蓝牙模块"),l({deviceId:e},n)},fail:function(e){console.log(e,"openBluetoothAdapter err"),i(e)}}),t(o)},fail:function(e){console.log(e),i(e)}}))}))}function l(e,n){return console.log("开始连接"),new Promise((function(t,i){uni.createBLEConnection({deviceId:e.deviceId,success:function(c){console.log(c,"createBLE success"),o=0,setTimeout((function(){v(e.deviceId,n).then((function(n){console.log("createBLE getAllService"),g(e.deviceId,n.uuid).then((function(e){console.log("createBLE getCharacteristics",e),t(e)})).catch((function(e){uni.hideLoading(),i(e)}))})).catch((function(e){uni.hideLoading(),i(e)}))}),2e3),console.log("create end")},fail:function(e){uni.hideLoading(),i(e)}})}))}function f(){console.log("onBLEConnectionStateChange"),uni.onBLEConnectionStateChange((function(e){console.log("device ".concat(e.deviceId," state has changed, connected: ").concat(e.connected)),e.deviceId&&e.connected&&(uni.setStorageSync("BLECONNID",e.deviceId),uni.setStorageSync("deviceName",name))}))}function v(e,n){return new Promise((function(t,i){uni.getBLEDeviceServices({deviceId:e,success:function(i){console.log("uni.getBLEDeviceServices"),console.log(i,o),0==i.services.length?(o++,o>3?u(e,n):v(e,n)):i.services.forEach((function(i,o){console.log(i,"deviceid"),i.isPrimary&&i.uuid===n&&(uni.setStorageSync("deviceId",e),uni.setStorageSync("serviceId",i.uuid),t(i))}))},fail:function(e){uni.hideLoading(),i(e)}})}))}function g(e,n){return new Promise((function(t,i){uni.getBLEDeviceCharacteristics({deviceId:e,serviceId:n,success:function(o){o.characteristics.forEach((function(c,a){c.properties.notify||c.properties.read||!c.properties.write||(uni.setStorageSync("characteristicId",c.uuid),console.log("characteristicId1",c.uuid)),!c.properties.notify||c.properties.read||c.properties.write?a!=o.characteristics.length-1||c.properties.write||(setTimeout((function(){uni.showToast({title:"该设备不支持读和写",icon:"none"})}),500),i(o)):(console.log("characteristicId2",c.uuid),h(e,n,c.uuid).then((function(e){t(e)})),b())}))},fail:function(e){i(e)}})}))}function h(e,n,t){return new Promise((function(i,o){uni.notifyBLECharacteristicValueChange({state:!0,deviceId:e,serviceId:n,characteristicId:t,success:function(e){i(e)},fail:function(e){o(e)}})}))}function b(e){function n(e){var n=Array.prototype.map.call(new Uint8Array(e),(function(e){return("00"+e.toString(16)).slice(-2)}));return n.join("")}return console.log("开始监听。。。"),new Promise((function(e,t){uni.onBLECharacteristicValueChange((function(e){console.log(e);var t=n(e.value),i=t.toUpperCase();console.log(i,"收到的");var o=p(i);uni.$emit("recvEvent",o)}))}))}function p(e){var n,t=e.trim(),i="0x"===t.substr(0,2).toLowerCase()?t.substr(2):t,o=i.length;if(o%2!==0)return alert("Illegal Format ASCII Code!"),"";for(var c=[],a=0;a<o;a+=2)n=parseInt(i.substr(a,2),16),c.push(String.fromCharCode(n));return c.join("")}function m(e,n,t){uni.readBLECharacteristicValue({deviceId:e,serviceId:n,characteristicId:t,success:function(e){},fail:function(e){}})}function w(e){var n=0;e=e.replace(/\s*/g,"");var t=e.length;if(t%2!=0)return null;t/=2;for(var i=new Array,o=0;o<t;o++){var c=e.substr(n,2),a=parseInt(c,16);i.push(a),n+=2}return i}function y(e){console.log("writeBLE before",e);var n=w(e);console.log(n),console.log("writeBLE after");var t=uni.getStorageSync("deviceId"),i=uni.getStorageSync("serviceId"),o=uni.getStorageSync("characteristicId");return console.log(t,i,o),new Promise((function(e,c){for(var a=0;a<n.length;a+=20){var r=0;if(a+20<n.length){for(var s=n,d=new ArrayBuffer(20),u=new DataView(d),l=a;l<a+20;l++)u.setUint8(l-a,s[l]);uni.writeBLECharacteristicValue({deviceId:t,serviceId:i,characteristicId:o,value:u.buffer,success:function(n){e(n)},fail:function(e){c(e)}}),B(.02)}else{s=n;r=20<n.length?s.length-a:s.length;for(var f=new ArrayBuffer(r),v=new DataView(f),g=a;g<s.length;g++)v.setUint8(g-a,s[g]);console.log("最后一包或第一数据:"),console.log(v.buffer),uni.writeBLECharacteristicValue({deviceId:t,serviceId:i,characteristicId:o,value:v.buffer,success:function(n){e(n)},fail:function(e){c(e)}}),B(.02)}}}))}function B(e){var n=(new Date).getTime();while((new Date).getTime()-n<e);}},f4e2:function(e,n,t){"use strict";t.d(n,"b",(function(){return o})),t.d(n,"c",(function(){return c})),t.d(n,"a",(function(){return i}));var i={uniIcons:t("9931").default},o=function(){var e=this,n=e.$createElement,t=e._self._c||n;return t("v-uni-view",{class:e.themeType?"whiteHeaderBox":""},[t("v-uni-view",{staticClass:"statusBar",style:{height:e.mobileTopHeight+"px"}}),t("v-uni-view",{staticClass:"headerBox"},[t("uni-icons",{directives:[{name:"show",rawName:"v-show",value:e.showBack,expression:"showBack"}],staticClass:"backImg",attrs:{type:"arrowleft",size:"24"},on:{click:function(n){arguments[0]=n=e.$handleEvent(n),e.goBackFn.apply(void 0,arguments)}}}),e._t("default")],2)],1)},c=[]}}]); |