You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
9 lines
72 KiB
9 lines
72 KiB
|
7 months ago
|
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["pages-printSet-printSet"],{"02e8":function(t,e,n){"use strict";n.d(e,"b",(function(){return r})),n.d(e,"c",(function(){return i})),n.d(e,"a",(function(){}));var r=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("v-uni-view",{staticClass:"content"},[n("v-uni-button",{attrs:{size:"mini",type:"primary"},on:{click:function(e){arguments[0]=e=t.$handleEvent(e),t.startBluetoothDeviceDiscovery.apply(void 0,arguments)}}},[t._v("搜索周边设备")]),n("v-uni-button",{attrs:{size:"mini",type:"warn"},on:{click:function(e){arguments[0]=e=t.$handleEvent(e),t.stopBluetoothDevicesDiscovery.apply(void 0,arguments)}}},[t._v("停止搜索")]),n("v-uni-button",{attrs:{type:"primary"},on:{click:function(e){arguments[0]=e=t.$handleEvent(e),t.pickUpOnce.apply(void 0,arguments)}}},[t._v("测试打印")]),n("v-uni-scroll-view",{staticClass:"device_list",attrs:{"scroll-y":"true","show-scrollbar":"true"}},[n("v-uni-radio-group",t._l(t.devicesList,(function(e,r){return e.name.length>0?n("v-uni-view",{key:r,staticClass:"device_item"},[n("v-uni-view",{staticStyle:{"font-size":"32rpx",color:"#333"}},[n("v-uni-radio",{attrs:{value:e.deviceId},on:{click:function(n){arguments[0]=n=t.$handleEvent(n),t.select_deviceId(e)}}}),t._v(t._s(e.name))],1),n("v-uni-view",{staticStyle:{"font-size":"20rpx"}},[t._v("信号强度: "+t._s(e.RSSI)+"dBm ("+t._s(Math.max(100+e.RSSI,0))+"%)")]),n("v-uni-view",{staticStyle:{"font-size":"20rpx"}},[t._v("deviceId: "+t._s(e.deviceId))]),n("v-uni-view",{staticStyle:{"font-size":"20rpx"}},[t._v("Service数量: "+t._s(e.advertisServiceUUIDs.length||0))]),t.deviceId===e.deviceId?n("v-uni-radio-group",t._l(t.serviceList,(function(e,r){return n("v-uni-view",{key:r,staticStyle:{"font-size":"20rpx"}},[n("v-uni-radio",{staticStyle:{transform:"scale(0.7)"},attrs:{value:e.uuid},on:{click:function(n){arguments[0]=n=t.$handleEvent(n),t.select_service(e)}}}),t._v(t._s(e.uuid))],1)})),1):t._e()],1):t._e()})),1)],1),n("v-uni-canvas",{staticStyle:{width:"240px",height:"240px"},attrs:{"canvas-id":"shareCanvas"}})],1)},i=[]},"0d0d":function(t,e,n){"use strict";var r=n("b0d1"),i=n.n(r);i.a},1145:function(t,e,n){n("fd3c"),n("c9b5"),n("bf0f"),n("ab80"),n("aa9c"),n("c223"),n("4db2"),n("c976"),n("4d8f"),n("7b97"),n("668a"),n("c5b7"),n("8ff5"),n("2378"),n("641a"),n("64e0"),n("cce3"),n("efba"),n("d009"),n("bd7d"),n("7edd"),n("d798"),n("f547"),n("5e54"),n("b60a"),n("8c18"),n("12973"),n("f991"),n("198e"),n("8557"),n("63b1"),n("1954"),n("1cf1");var r=function(t){return t=t.toString(),t[1]?t:"0"+t};function i(t){for(var e=[],n=0;n<t.length;n++)if(n%4==0){var r=.299*t[n]+.587*t[n+1]+.114*t[n+2];t[n]=r>200?0:1,e.push(t[n])}return e}function o(t){for(var e=[],n=0;n<t.length;n+=8){var r=128*t[n]+64*t[n+1]+32*t[n+2]+16*t[n+3]+8*t[n+4]+4*t[n+5]+2*t[n+6]+1*t[n+7];e.push(r)}return e}t.exports={formatTime:function(t){var e=t.getFullYear(),n=t.getMonth()+1,i=t.getDate(),o=t.getHours(),a=t.getMinutes(),u=t.getSeconds();return[e,n,i].map(r).join("/")+" "+[o,a,u].map(r).join(":")},toArrayBuffer:function(t){var e=i(t.data),n=o(e),r=[].concat([27,97,1],[29,118,48,0,30,0,240,0],n,[27,74,3],[27,64]);return new Uint8Array(r).buffer},zip_image:function(t){var e=i(t.data),n=o(e);return n}}},1851:function(t,e,n){"use strict";var r=n("8bdb"),i=n("84d6"),o=n("1cb5");r({target:"Array",proto:!0},{fill:i}),o("fill")},2634:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(){
|
||
|
|
/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */
|
||
|
|
e.default=function(){return t};var t={},n=Object.prototype,i=n.hasOwnProperty,o=Object.defineProperty||function(t,e,n){t[e]=n.value},a="function"==typeof Symbol?Symbol:{},u=a.iterator||"@@iterator",c=a.asyncIterator||"@@asyncIterator",s=a.toStringTag||"@@toStringTag";function f(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{f({},"")}catch(err){f=function(t,e,n){return t[e]=n}}function l(t,e,n,r){var i=e&&e.prototype instanceof v?e:v,a=Object.create(i.prototype),u=new D(r||[]);return o(a,"_invoke",{value:C(t,n,u)}),a}function d(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(err){return{type:"throw",arg:err}}}t.wrap=l;var h={};function v(){}function g(){}function p(){}var _={};f(_,u,(function(){return this}));var T=Object.getPrototypeOf,y=T&&T(T(S([])));y&&y!==n&&i.call(y,u)&&(_=y);var m=p.prototype=v.prototype=Object.create(_);function E(t){["next","throw","return"].forEach((function(e){f(t,e,(function(t){return this._invoke(e,t)}))}))}function A(t,e){var n;o(this,"_invoke",{value:function(o,a){function u(){return new e((function(n,u){(function n(o,a,u,c){var s=d(t[o],t,a);if("throw"!==s.type){var f=s.arg,l=f.value;return l&&"object"==(0,r.default)(l)&&i.call(l,"__await")?e.resolve(l.__await).then((function(t){n("next",t,u,c)}),(function(t){n("throw",t,u,c)})):e.resolve(l).then((function(t){f.value=t,u(f)}),(function(t){return n("throw",t,u,c)}))}c(s.arg)})(o,a,n,u)}))}return n=n?n.then(u,u):u()}})}function C(t,e,n){var r="suspendedStart";return function(i,o){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===i)throw o;return B()}for(n.method=i,n.arg=o;;){var a=n.delegate;if(a){var u=b(a,n);if(u){if(u===h)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var c=d(t,e,n);if("normal"===c.type){if(r=n.done?"completed":"suspendedYield",c.arg===h)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(r="completed",n.method="throw",n.arg=c.arg)}}}function b(t,e){var n=e.method,r=t.iterator[n];if(void 0===r)return e.delegate=null,"throw"===n&&t.iterator["return"]&&(e.method="return",e.arg=void 0,b(t,e),"throw"===e.method)||"return"!==n&&(e.method="throw",e.arg=new TypeError("The iterator does not provide a '"+n+"' method")),h;var i=d(r,t.iterator,e.arg);if("throw"===i.type)return e.method="throw",e.arg=i.arg,e.delegate=null,h;var o=i.arg;return o?o.done?(e[t.resultName]=o.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,h):o:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,h)}function w(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function L(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function D(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(w,this),this.reset(!0)}function S(t){if(t){var e=t[u];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var n=-1,r=function e(){for(;++n<t.length;)if(i.call(t,n))return e.value=t[n],e.done=!1,e;return e.value=void 0,e.done=!0,e};return r.next=r}}return{next:B}}function B(){return{value:void 0,done:!0}}return g.prototype=p,o(m,"constructor",{value:p,configurable:!0}),o(p,"constructor",{value:g,configurable:!0}),g.displayName=f(p,s,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===g||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,p):(t.__proto__=p,f(t,s,"GeneratorFunction")),t.prototype=Object.create(m),t},t.awrap=function(t){return{__await:t}},E(A.prototype),f(A.prototype,c,(function(){return this})),t.AsyncIterator=A,t.async=function(e,n,r,i,o){void 0===o&&(o=Promise);var a=new A(l(e,n,r,i),o);return t.isGeneratorFunction(n)?a:a.next().then((function(t){retur
|
||
|
|
/*!
|
||
|
|
* gbk.js v0.3.0
|
||
|
|
* Homepage https://github.com/cnwhy/GBK.js
|
||
|
|
* License MIT
|
||
|
|
*/
|
||
|
|
function(a,u){"object"===o(e)&&"undefined"!==typeof t?t.exports=u():(r=u,i="function"===typeof r?r.call(e,n,e,t):r,void 0===i||(t.exports=i))}(0,(function(){"use strict";var t=function(t){var e={decode:function(e){for(var n="",r=0,i=e.length;r<i;r++){var o=255&e[r];if(o>128&&r+1<i){var a=255&e[r+1];a>=64&&(o=t[(o<<8|a)-33088],r++)}n+=String.fromCharCode(o)}return n},encode:function(e){e+="";for(var n=[],r="?".charCodeAt(0),i=0;i<e.length;i++){var o=e.charCodeAt(i);if(o<128)n.push(o);else{var a=t.indexOf(o);~a?(a+=33088,n.push(255&a>>8,255&a)):n.push(r)}}return n}};return e},e=function(t){function e(e){e.split("").sort();return{encode:function(n){return(n+"").replace(/./g,(function(n){if(function(t){return~e.indexOf(t)||/[0-9a-zA-Z]/.test(t)}(n))return n;for(var r=t.encode(n),i=0;i<r.length;i++)r[i]="%"+("0"+r[i].toString(16)).substr(-2).toUpperCase();return r.join("")}))},decode:function(e){e=String(e);for(var n="",r=0;r<e.length;r++){var i=e.charAt(r);if("%"===i&&r+2<e.length){var o=parseInt(e.substr(r+1,2),16);if(!isNaN(o)){var a,u=r+2;if(!(o>128)){r+=2,n+=String.fromCharCode(o);continue}if("%"===e.charAt(u+1)?(a=parseInt(e.substr(u+2,2),16),u+=3):(a=e.charCodeAt(u+1),u+=1),a>=64){r=u,n+=t.decode([o,a]);continue}}}n+=i}return n}}}var n=e("!'()*-._~"),r=e("!'()*-._~#$&+,/:;=?@");return{encodeURI:r.encode,decodeURI:r.decode,encodeURIComponent:n.encode,decodeURIComponent:n.decode}},n=function(n){var r=t(n);return r.URI=e(r),r},r=function(){for(var t=0,e=arguments[0],n=0,r=e.length;n<r;n++){var i=e.charCodeAt(n);if(i<38||i>126)return NaN;t+=(i-38)*Math.pow(89,r-n-1)}return t};var i=function(){var t=function(t){for(var e=[],n=129,i=0;n<=254;n++){e.length>0&&(e.length+=65);for(var o=64;o<=254;o++)if(127==o||161<=n&&n<=167&&o<=160||170<=n&&n<=175&&o>=161||248<=n&&o>=161)e.push(void 0);else{var a=t[i++],u=r(a);e.push(u||void 0)}}return e}(function(){return arguments[0].replace(/\x23(\d+)\x24/g,(function(t,e){return Array(+e+4).join("#")})).replace(/[\x26-\x7e]\x25[\x26-\x7e]/g,(function(t){var e=t.substr(0,1).charCodeAt(0),n=t.substr(2).charCodeAt(0),r=String.fromCharCode(e);while(e++<n)r+=String.fromCharCode(e);return r})).replace(/\x23/g,"###").replace(/([\x26-\x7e]{2})\x21([\x26-\x7e\x23]+)(?:\x20|$)/g,(function(t,e,n){return n.replace(/./g,(function(t){return"#"!=t?e+t:t}))})).match(/.../g)}("(T!HJ%LUX]e%gilotuwy{} (U!)-%/137>BDGHO%RTUW%\\_a%jl%rtw} (V!*+-0%27>C%EHJ%MP%R\\`cdfn%ptvz{} (W!()*,/3%579;=%CFGM%QWX\\^cdg%ilnprtvy%} (X!&')%.468CDHJLMOPSTWY%\\_b%dg%ilnprtuwxz%|~ (Y!'(*+-469%=?%GI%KO%RT%V[%_bdikmnptuy{}~ (Z!&')+%-/%;>@ACE%GKMNPR%TW[_%ikmo%rt%vy%{} ([!'(%+-%024%;=%BD%LO%QSTX%[]^`%ce%y{} (\\!()+%/1%7:%LN%SU%WY%cf%im%prt%xz%~ (]!&'%*-%/1%68%EG%cgloqs%uwx|%~ (^!')%-/02356;>FJKOPRSVWZ%]_`dfi%kmor%vy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