Files
mht.js/unpackage/dist/app-plus/app-service.js
2025-10-22 07:50:31 +08:00

1 line
18 KiB
JavaScript

(this["webpackJsonp"]=this["webpackJsonp"]||[]).push([["app-service"],{"0de9":function(e,t,n){"use strict";function o(e){var t=Object.prototype.toString.call(e);return t.substring(8,t.length-1)}function i(){return"string"===typeof __channelId__&&__channelId__}function s(e,t){switch(o(t)){case"Function":return"function() { [native code] }";default:return t}}function a(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),o=1;o<t;o++)n[o-1]=arguments[o];console[e].apply(console,n)}function r(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var a=t.shift();if(i())return t.push(t.pop().replace("at ","uni-app:///")),console[a].apply(console,t);var r=t.map((function(e){var t=Object.prototype.toString.call(e).toLowerCase();if("[object object]"===t||"[object array]"===t)try{e="---BEGIN:JSON---"+JSON.stringify(e,s)+"---END:JSON---"}catch(i){e=t}else if(null===e)e="---NULL---";else if(void 0===e)e="---UNDEFINED---";else{var n=o(e).toUpperCase();e="NUMBER"===n||"BOOLEAN"===n?"---BEGIN:"+n+"---"+e+"---END:"+n+"---":String(e)}return e})),c="";if(r.length>1){var u=r.pop();c=r.join("---COMMA---"),0===u.indexOf(" at ")?c+=u:c+="---COMMA---"+u}else c=r[0];console[a](c)}n.r(t),n.d(t,"log",(function(){return a})),n.d(t,"default",(function(){return r}))},"137c":function(e,t,n){"use strict";var o;n.d(t,"b",(function(){return i})),n.d(t,"c",(function(){return s})),n.d(t,"a",(function(){return o}));var i=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("view",{staticClass:e._$s(0,"sc","content"),attrs:{_i:0}},[n("input",{directives:[{name:"model",rawName:"v-model",value:e.ip,expression:"ip"}],attrs:{_i:1},domProps:{value:e._$s(1,"v-model",e.ip)},on:{input:function(t){t.target.composing||(e.ip=t.target.value)}}}),n("input",{directives:[{name:"model",rawName:"v-model",value:e.port,expression:"port"}],attrs:{_i:2},domProps:{value:e._$s(2,"v-model",e.port)},on:{input:function(t){t.target.composing||(e.port=t.target.value)}}}),n("input",{directives:[{name:"model",rawName:"v-model",value:e.localPort,expression:"localPort"}],attrs:{_i:3},domProps:{value:e._$s(3,"v-model",e.localPort)},on:{input:function(t){t.target.composing||(e.localPort=t.target.value)}}}),n("input",{directives:[{name:"model",rawName:"v-model",value:e.message,expression:"message"}],attrs:{_i:4},domProps:{value:e._$s(4,"v-model",e.message)},on:{input:function(t){t.target.composing||(e.message=t.target.value)}}}),n("text"),n("button",{attrs:{_i:6},on:{click:function(t){return e.connectUDP()}}}),n("button",{attrs:{_i:7},on:{click:function(t){return e.sendMsg()}}}),n("button",{attrs:{_i:8},on:{click:function(t){return e.sendHexMsg()}}}),n("button",{attrs:{_i:9},on:{click:function(t){return e.disconnectUDP()}}}),n("text"),n("button",{attrs:{_i:11},on:{click:function(t){return e.sendBroadMsg()}}}),n("button",{attrs:{_i:12},on:{click:function(t){return e.sendHexBroadMsg()}}}),n("button",{attrs:{_i:13},on:{click:function(t){return e.bindBroadcast()}}}),n("button",{attrs:{_i:14},on:{click:function(t){return e.closeBroadcast()}}}),n("button",{attrs:{_i:15},on:{click:function(t){return e.exchange()}}})])},s=[]},"15ac":function(e,t,n){"use strict";(function(e){var n;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=uni.requireNativePlugin("Aimer-UDPPlugin"),i={data:function(){return{ip:"192.168.18.105",port:"7777",message:"",listBytes:["53","53","01","c0","00","A9","09","10","11","12","19","20","ff","ff","4E","4E"],titleNumber:"",titleNumber2:"",callLog:null,title:"",title1:"",title2:"",title3:"",title4:"",title5:"",title6:"",title7:""}},onLoad:function(){n=this},onShow:function(){},methods:{connectUDP:function(){e("log","ip",n.ip," at pages/index/indexOld.vue:53"),e("log","port",n.port," at pages/index/indexOld.vue:54"),o.connect({ip:n.ip,port:n.port},(function(t){if("0"==t.status?e("log","UDP\u8fde\u63a5\u6210\u529f"," at pages/index/indexOld.vue:68"):"1"==t.status&&e("log","UDP\u65ad\u5f00\u8fde\u63a5"," at pages/index/indexOld.vue:71"),t.receivedMsg&&e("log",t.receivedMsg," at pages/index/indexOld.vue:75"),t.receivedHexMsg){e("log",t.receivedHexMsg," at pages/index/indexOld.vue:79");for(var n=t.receivedHexMsg,o=n.length/2,i=[],s=0;s<o;s++){var a=n.substring(2*s,2*s+2);i.push(a)}e("log",i," at pages/index/indexOld.vue:87"),uni.showToast({title:t.receivedHexMsg,icon:"none"})}}))},disconnectUDP:function(){o.disconnect()},sendMsg:function(){e("log","sendMsg"," at pages/index/indexOld.vue:100"),o.send({charsetname:"GBK",message:"\u963f\u79cb\u5e05\u5446\u4e86,\u54c8\u54c8!"})},sendHexMsg:function(){e("log","sendHexMsg"," at pages/index/indexOld.vue:107"),o.sendBytes({bytesMessage:JSON.stringify(n.listBytes)})},sendBroadMsg:function(){o.sendBroadcast({charsetname:"GBK",message:"\u963f\u79cb\u5e05\u5446\u4e86,\u54c8\u54c8!",ip:n.ip,port:n.port})},sendHexBroadMsg:function(){o.sendBytesBroadcast({bytesMessage:JSON.stringify(n.listBytes),ip:n.ip,port:n.port})},bindBroadcast:function(){e("log","ip",n.ip," at pages/index/indexOld.vue:128"),e("log","port",n.port," at pages/index/indexOld.vue:129"),o.bindBroadcast({port:n.port,charsetname:"GBK"},(function(t){if("0"==t.status?e("log","UDP\u5f00\u542f\u5e7f\u64ad\u63a5\u6536"," at pages/index/indexOld.vue:143"):"1"==t.status&&e("log","UDP\u5173\u95ed\u5e7f\u64ad\u63a5\u6536"," at pages/index/indexOld.vue:146"),t.recBroadMsg&&(e("log",t.recBroadMsg," at pages/index/indexOld.vue:150"),e("log",t.recBroadAddress," at pages/index/indexOld.vue:151")),t.recBroadHexMsg){e("log",t.recBroadHexMsg," at pages/index/indexOld.vue:155"),e("log",t.recBroadAddress," at pages/index/indexOld.vue:156");for(var n=t.recBroadHexMsg,o=n.length/2,i=[],s=0;s<o;s++){var a=n.substring(2*s,2*s+2);i.push(a)}e("log",i," at pages/index/indexOld.vue:164"),uni.showToast({title:t.recBroadHexMsg,icon:"none"})}}))},closeBroadcast:function(){o.closeBroadcast()},testPermisson:function(){o.show({position:"bottom",title:"\u63d0\u793a\u4fe1\u606f",titleColor:"#FF0000",content:"<a href='https://uniapp.dcloud.io/' value='Hello uni-app'>uni-app</a> \u662f\u4e00\u4e2a\u4f7f\u7528 Vue.js \u5f00\u53d1\u8de8\u5e73\u53f0\u5e94\u7528\u7684\u524d\u7aef\u6846\u67b6!\n\u514d\u8d39\u7684\n\u514d\u8d39\u7684\n\u514d\u8d39\u7684\n\u91cd\u8981\u7684\u4e8b\u60c5\u8bf4\u4e09\u904d",contentAlign:"left",checkBox:{title:"\u4e0d\u518d\u63d0\u793a",isSelected:!0},buttons:[{title:"\u53d6\u6d88"},{title:"\u5426"},{title:"\u786e\u8ba4",color:"#3F51B5"}]},(function(t){switch(t.type){case"button":e("log","callback---button--"+t.index," at pages/index/indexOld.vue:207");break;case"checkBox":e("log","callback---checkBox--"+t.isSelected," at pages/index/indexOld.vue:210");break;case"a":e("log","callback---a--"+JSON.stringify(t)," at pages/index/indexOld.vue:213");break;case"backCancel":e("log","callback---backCancel--"," at pages/index/indexOld.vue:216");break}}))}}};t.default=i}).call(this,n("0de9")["default"])},2650:function(e,t,n){"use strict";n.r(t);var o=n("ed77"),i=n("acf3");for(var s in i)"default"!==s&&function(e){n.d(t,e,(function(){return i[e]}))}(s);var a,r=n("f0c5"),c=Object(r["a"])(i["default"],o["b"],o["c"],!1,null,null,null,!1,o["a"],a);t["default"]=c.exports},"3ecb":function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o={UDPSocket:null,receivedStatus:function(){},receivedMsgCallBack:function(){},receivedHexMsgCallBack:function(){},recBroadcastStatus:function(){},recBroadcastMsgCallBack:function(){},recBroadcastHexMsgCallBack:function(){},init:function(e,t,n){o.UDPSocket=uni.requireNativePlugin("Aimer-UDPPlugin"),o.connect(e,t,n)},connect:function(e,t,n){o.UDPSocket.connect({charsetname:n,ip:e,port:t},(function(e){e.status&&o.receivedStatus(e.status),e.receivedMsg&&o.receivedMsgCallBack(e.receivedMsg),e.receivedHexMsg&&o.receivedHexMsgCallBack(e.receivedHexMsg)}))},send:function(e,t){o.UDPSocket.send({charsetname:t,message:e})},sendBytes:function(e){o.UDPSocket.sendBytes({bytesMessage:e})},disconnect:function(){o.UDPSocket.disconnect()},sendBroadcast:function(e,t,n,i,s){o.UDPSocket=uni.requireNativePlugin("Aimer-UDPPlugin"),o.UDPSocket.sendBroadcast({charsetname:s,message:e,localPort:i,ip:t,port:n})},sendBytesBroadcast:function(e,t,n,i){o.UDPSocket=uni.requireNativePlugin("Aimer-UDPPlugin"),o.UDPSocket.sendBytesBroadcast({bytesMessage:e,localPort:i,ip:t,port:n})},bindBroadcast:function(e,t){o.UDPSocket=uni.requireNativePlugin("Aimer-UDPPlugin"),o.UDPSocket.bindBroadcast({charsetname:t,port:e},(function(e){e.status&&o.recBroadcastStatus(e.status),e.recBroadMsg&&o.recBroadcastMsgCallBack(e.recBroadMsg,e.recBroadAddress),e.recBroadHexMsg&&o.recBroadcastHexMsgCallBack(e.recBroadHexMsg,e.recBroadAddress)}))},closeBroadcast:function(){o.UDPSocket=uni.requireNativePlugin("Aimer-UDPPlugin"),o.UDPSocket.closeBroadcast()}},i=o;t.default=i},"421f":function(e,t,n){"use strict";var o;n.d(t,"b",(function(){return i})),n.d(t,"c",(function(){return s})),n.d(t,"a",(function(){return o}));var i=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("view",{staticClass:e._$s(0,"sc","content"),attrs:{_i:0}},[n("text"),n("input",{directives:[{name:"model",rawName:"v-model",value:e.message,expression:"message"}],attrs:{_i:2},domProps:{value:e._$s(2,"v-model",e.message)},on:{input:function(t){t.target.composing||(e.message=t.target.value)}}}),n("button",{attrs:{_i:3},on:{click:function(t){return e.sendMsg()}}}),n("button",{attrs:{_i:4},on:{click:function(t){return e.sendHexMsg()}}})])},s=[]},"61b3":function(e,t,n){"use strict";n.r(t);var o=n("d85c");for(var i in o)"default"!==i&&function(e){n.d(t,e,(function(){return o[e]}))}(i);var s,a,r,c,u=n("f0c5"),d=Object(u["a"])(o["default"],s,a,!1,null,null,null,!1,r,c);t["default"]=d.exports},"8bbf":function(e,t){e.exports=Vue},9541:function(e,t,n){"use strict";n("de2d");var o=a(n("8bbf")),i=a(n("61b3")),s=a(n("3ecb"));function a(e){return e&&e.__esModule?e:{default:e}}function r(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 c(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?r(Object(n),!0).forEach((function(t){u(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):r(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function u(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}o.default.prototype.$socket=s.default,o.default.config.productionTip=!1,i.default.mpType="app";var d=new o.default(c({},i.default));d.$mount()},a67f:function(e,t,n){"use strict";n.r(t);var o=n("421f"),i=n("b944");for(var s in i)"default"!==s&&function(e){n.d(t,e,(function(){return i[e]}))}(s);var a,r=n("f0c5"),c=Object(r["a"])(i["default"],o["b"],o["c"],!1,null,null,null,!1,o["a"],a);t["default"]=c.exports},a9f3:function(e,t,n){"use strict";n.r(t);var o=n("d38c"),i=n.n(o);for(var s in o)"default"!==s&&function(e){n.d(t,e,(function(){return o[e]}))}(s);t["default"]=i.a},acf3:function(e,t,n){"use strict";n.r(t);var o=n("15ac"),i=n.n(o);for(var s in o)"default"!==s&&function(e){n.d(t,e,(function(){return o[e]}))}(s);t["default"]=i.a},ae87:function(e,t,n){"use strict";(function(e){var n;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o={data:function(){return{message:"\u6211\u5f88\u597d",listBytes:["23","23","01","c0","00","A9","09","10","11","12","19","20","ff","ff","4F","4F"]}},onLoad:function(){n=this},onShow:function(){},methods:{sendMsg:function(){e("log","sendMsg"," at pages/index/bIndex.vue:26"),this.$socket.send(n.message)},sendHexMsg:function(){e("log","sendHexMsg"," at pages/index/bIndex.vue:30"),this.$socket.sendBytes(JSON.stringify(n.listBytes))}}};t.default=o}).call(this,n("0de9")["default"])},b944:function(e,t,n){"use strict";n.r(t);var o=n("ae87"),i=n.n(o);for(var s in o)"default"!==s&&function(e){n.d(t,e,(function(){return o[e]}))}(s);t["default"]=i.a},d38c:function(e,t,n){"use strict";(function(e){var n;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o={data:function(){return{ip:"192.168.18.105",port:"7777",localPort:"9527",message:"\u4f60\u597d\u554a",listBytes:["53","53","01","c0","00","A9","09","10","11","12","19","20","ff","ff","4E","4E"]}},onLoad:function(){n=this},methods:{connectUDP:function(){this.$socket.init(n.ip,n.port,"GBK"),this.$socket.receivedStatus=function(t){e("log",t," at pages/index/index.vue:46"),"0"==t?e("log","\u8fde\u63a5\u6210\u529f"," at pages/index/index.vue:49"):"1"==t&&e("log","\u65ad\u5f00\u8fde\u63a5"," at pages/index/index.vue:52")},this.$socket.receivedMsgCallBack=function(t){e("log",t," at pages/index/index.vue:57")},this.$socket.receivedHexMsgCallBack=function(t){e("log",t," at pages/index/index.vue:61");for(var n=t,o=n.length/2,i=[],s=0;s<o;s++){var a=n.substring(2*s,2*s+2);i.push(a)}e("log",i," at pages/index/index.vue:69")}},sendMsg:function(){e("log","sendMsg-aqiu"," at pages/index/index.vue:76"),this.$socket.send(n.message)},sendHexMsg:function(){e("log","sendHexMsg"," at pages/index/index.vue:84"),this.$socket.sendBytes(JSON.stringify(n.listBytes))},disconnectUDP:function(){this.$socket.disconnect()},sendBroadMsg:function(){this.$socket.sendBroadcast(n.message,n.ip,n.port,n.localPort)},sendHexBroadMsg:function(){this.$socket.sendBytesBroadcast(JSON.stringify(n.listBytes),n.ip,n.port,n.localPort)},bindBroadcast:function(){this.$socket.bindBroadcast("7777"),this.$socket.recBroadcastStatus=function(t){e("log",t," at pages/index/index.vue:113"),"0"==t?e("log","UDP\u5f00\u542f\u5e7f\u64ad\u63a5\u6536"," at pages/index/index.vue:116"):"1"==t&&e("log","UDP\u5173\u95ed\u5e7f\u64ad\u63a5\u6536"," at pages/index/index.vue:119")},this.$socket.recBroadcastMsgCallBack=function(t,n){uni.showToast({title:t+":"+n,icon:"none"}),e("log",t,n," at pages/index/index.vue:128")},this.$socket.recBroadcastHexMsgCallBack=function(t,n){e("log",t,n," at pages/index/index.vue:132");for(var o=t,i=o.length/2,s=[],a=0;a<i;a++){var r=o.substring(2*a,2*a+2);s.push(r)}e("log",s," at pages/index/index.vue:140")}},closeBroadcast:function(){this.$socket.closeBroadcast()},exchange:function(){uni.navigateTo({url:"bIndex",animationType:"pop-in",animationDuration:300})}}};t.default=o}).call(this,n("0de9")["default"])},d85c:function(e,t,n){"use strict";n.r(t);var o=n("ff58"),i=n.n(o);for(var s in o)"default"!==s&&function(e){n.d(t,e,(function(){return o[e]}))}(s);t["default"]=i.a},de2d:function(e,t,n){"undefined"===typeof Promise||Promise.prototype.finally||(Promise.prototype.finally=function(e){var t=this.constructor;return this.then((function(n){return t.resolve(e()).then((function(){return n}))}),(function(n){return t.resolve(e()).then((function(){throw n}))}))}),uni.restoreGlobal&&uni.restoreGlobal(weex,plus,setTimeout,clearTimeout,setInterval,clearInterval),__definePage("pages/index/index",(function(){return Vue.extend(n("ebc1").default)})),__definePage("pages/index/indexOld",(function(){return Vue.extend(n("2650").default)})),__definePage("pages/index/bIndex",(function(){return Vue.extend(n("a67f").default)}))},ebc1:function(e,t,n){"use strict";n.r(t);var o=n("137c"),i=n("a9f3");for(var s in i)"default"!==s&&function(e){n.d(t,e,(function(){return i[e]}))}(s);var a,r=n("f0c5"),c=Object(r["a"])(i["default"],o["b"],o["c"],!1,null,null,null,!1,o["a"],a);t["default"]=c.exports},ed77:function(e,t,n){"use strict";var o;n.d(t,"b",(function(){return i})),n.d(t,"c",(function(){return s})),n.d(t,"a",(function(){return o}));var i=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("view",{staticClass:e._$s(0,"sc","content"),attrs:{_i:0}},[n("input",{directives:[{name:"model",rawName:"v-model",value:e.ip,expression:"ip"}],attrs:{_i:1},domProps:{value:e._$s(1,"v-model",e.ip)},on:{input:function(t){t.target.composing||(e.ip=t.target.value)}}}),n("input",{directives:[{name:"model",rawName:"v-model",value:e.port,expression:"port"}],attrs:{_i:2},domProps:{value:e._$s(2,"v-model",e.port)},on:{input:function(t){t.target.composing||(e.port=t.target.value)}}}),n("input",{directives:[{name:"model",rawName:"v-model",value:e.message,expression:"message"}],attrs:{_i:3},domProps:{value:e._$s(3,"v-model",e.message)},on:{input:function(t){t.target.composing||(e.message=t.target.value)}}}),n("input",{directives:[{name:"model",rawName:"v-model",value:e.bindPort,expression:"bindPort"}],attrs:{_i:4},domProps:{value:e._$s(4,"v-model",e.bindPort)},on:{input:function(t){t.target.composing||(e.bindPort=t.target.value)}}}),n("button",{attrs:{_i:5},on:{click:function(t){return e.testPermisson()}}}),n("button",{attrs:{_i:6},on:{click:function(t){return e.connectUDP()}}}),n("button",{attrs:{_i:7},on:{click:function(t){return e.disconnectUDP()}}}),n("button",{attrs:{_i:8},on:{click:function(t){return e.sendMsg()}}}),n("button",{attrs:{_i:9},on:{click:function(t){return e.sendHexMsg()}}}),n("button",{attrs:{_i:10},on:{click:function(t){return e.sendBroadMsg()}}}),n("button",{attrs:{_i:11},on:{click:function(t){return e.sendHexBroadMsg()}}}),n("button",{attrs:{_i:12},on:{click:function(t){return e.bindBroadcast()}}}),n("button",{attrs:{_i:13},on:{click:function(t){return e.closeBroadcast()}}})])},s=[]},f0c5:function(e,t,n){"use strict";function o(e,t,n,o,i,s,a,r,c,u){var d,l="function"===typeof e?e.options:e;if(c){l.components||(l.components={});var f=Object.prototype.hasOwnProperty;for(var p in c)f.call(c,p)&&!f.call(l.components,p)&&(l.components[p]=c[p])}if(u&&((u.beforeCreate||(u.beforeCreate=[])).unshift((function(){this[u.__module]=this})),(l.mixins||(l.mixins=[])).push(u)),t&&(l.render=t,l.staticRenderFns=n,l._compiled=!0),o&&(l.functional=!0),s&&(l._scopeId="data-v-"+s),a?(d=function(e){e=e||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext,e||"undefined"===typeof __VUE_SSR_CONTEXT__||(e=__VUE_SSR_CONTEXT__),i&&i.call(this,e),e&&e._registeredComponents&&e._registeredComponents.add(a)},l._ssrRegister=d):i&&(d=r?function(){i.call(this,this.$root.$options.shadowRoot)}:i),d)if(l.functional){l._injectStyles=d;var g=l.render;l.render=function(e,t){return d.call(t),g(e,t)}}else{var v=l.beforeCreate;l.beforeCreate=v?[].concat(v,d):[d]}return{exports:e,options:l}}n.d(t,"a",(function(){return o}))},ff58:function(e,t,n){"use strict";(function(e){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n={onLaunch:function(){e("log","App Launch"," at App.vue:4")},onShow:function(){e("log","App Show"," at App.vue:7")},onHide:function(){e("log","App Hide"," at App.vue:10")}};t.default=n}).call(this,n("0de9")["default"])}},[["9541","app-config"]]]);