diff --git a/app/build.gradle b/app/build.gradle index e47dc67..5d7624e 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -8,8 +8,8 @@ android { minSdkVersion 21 targetSdkVersion 28 //建议此属性值设为21 io.dcloud.PandoraEntry 作为apk入口时 必须设置 targetSDKVersion>=21 沉浸式才生效 - versionCode 119 - versionName "1.1.9" + versionCode 121 + versionName "1.2.1" multiDexEnabled true ndk { // abiFilters 'x86','armeabi-v7a' diff --git a/app/src/main/assets/apps/__UNI__3B4D40B/www/app-service.js b/app/src/main/assets/apps/__UNI__3B4D40B/www/app-service.js index fdcb96d..5cd1215 100644 --- a/app/src/main/assets/apps/__UNI__3B4D40B/www/app-service.js +++ b/app/src/main/assets/apps/__UNI__3B4D40B/www/app-service.js @@ -1 +1 @@ -if("undefined"==typeof Promise||Promise.prototype.finally||(Promise.prototype.finally=function(e){const t=this.constructor;return this.then((o=>t.resolve(e()).then((()=>o))),(o=>t.resolve(e()).then((()=>{throw o}))))}),"undefined"!=typeof uni&&uni&&uni.requireGlobal){const e=uni.requireGlobal();ArrayBuffer=e.ArrayBuffer,Int8Array=e.Int8Array,Uint8Array=e.Uint8Array,Uint8ClampedArray=e.Uint8ClampedArray,Int16Array=e.Int16Array,Uint16Array=e.Uint16Array,Int32Array=e.Int32Array,Uint32Array=e.Uint32Array,Float32Array=e.Float32Array,Float64Array=e.Float64Array,BigInt64Array=e.BigInt64Array,BigUint64Array=e.BigUint64Array}uni.restoreGlobal&&uni.restoreGlobal(Vue,weex,plus,setTimeout,clearTimeout,setInterval,clearInterval),function(e){"use strict";function t(e){return weex.requireModule(e)}function o(e,t,...o){uni.__log__?uni.__log__(e,t,...o):console[e].apply(console,[...o,t])}const n=(t=>(o,n=e.getCurrentInstance())=>{!e.isInSSRComponentSetup&&e.injectHook(t,o,n)})("onReady"),r=(e,t)=>{const o=e.__vccOpts||e;for(const[n,r]of t)o[n]=r;return o};const a=r({},[["render",function(t,o,n,r,a,i){return e.openBlock(),e.createElementBlock("view",{class:"background"},[e.renderSlot(t.$slots,"default",{},void 0,!0)])}],["__scopeId","data-v-62c1c4f8"]]);const i=r({},[["render",function(t,o,n,r,a,i){return e.openBlock(),e.createElementBlock("view",{class:"logo-box"},[e.createElementVNode("image",{class:"lb-img",mode:"aspectFill",src:"/static/logo@2x.png"})])}],["__scopeId","data-v-4f3439c2"]]),s=r({__name:"form",props:["username","password","brand_id"],emits:["update:username","update:password","update:brand_id"],setup(t,{emit:o}){const n=t;return(t,r)=>(e.openBlock(),e.createElementBlock("view",{class:"form-box"},[e.createElementVNode("view",{class:"login-form"},[e.createElementVNode("view",{class:"lf-item"},[e.createElementVNode("image",{class:"li-icon",mode:"aspectFit",src:"/static/images/person.png"}),e.createElementVNode("input",{class:"li-ipt",type:"number",value:n.brand_id,placeholder:"请输入品牌ID",onInput:r[0]||(r[0]=e=>o("update:brand_id",e.detail.value))},null,40,["value"])]),e.createElementVNode("view",{class:"lf-item"},[e.createElementVNode("image",{class:"li-icon",mode:"aspectFit",src:"/static/images/person.png"}),e.createElementVNode("input",{class:"li-ipt",value:n.username,placeholder:"请输入登录账号",onInput:r[1]||(r[1]=e=>o("update:username",e.detail.value))},null,40,["value"])]),e.createElementVNode("view",{class:"lf-item"},[e.createElementVNode("image",{class:"li-icon",mode:"aspectFit",src:"/static/images/lock.png"}),e.createElementVNode("input",{class:"li-ipt",type:"digit",password:!0,value:n.password,placeholder:"请输入登录密码",onInput:r[2]||(r[2]=e=>o("update:password",e.detail.value))},null,40,["value"])])])]))}},[["__scopeId","data-v-4cc74936"]]);const l=r({},[["render",function(t,o){return e.openBlock(),e.createElementBlock("view",{class:"btn-box"},[e.createElementVNode("button",{class:"login-button",type:"primary"},[e.renderSlot(t.$slots,"default",{},void 0,!0)])])}],["__scopeId","data-v-ff158653"]]);var c,u=u||{};u.Security=u.Security||{},(c=u.Security).maxExactInt=Math.pow(2,53),c.toUtf8ByteArr=function(e){for(var t,o=[],n=0;n>>6),o[o.length]=63&t|128;else if(t<=65535)o[o.length]=224+(t>>>12),o[o.length]=t>>>6&63|128,o[o.length]=63&t|128;else{if(!(t<=1114111))throw"Unicode standart supports code points up-to U+10FFFF";o[o.length]=240+(t>>>18),o[o.length]=t>>>12&63|128,o[o.length]=t>>>6&63|128,o[o.length]=63&t|128}return o},c.toHex32=function(e){2147483648&e&&(e&=2147483647,e+=Math.pow(2,31));for(var t=e.toString(16);t.length<8;)t="0"+t;return t},c.reverseBytes=function(e){var t=0;return t+=e>>>24&255,t+=(e>>>16&255)<<8,t+=(e>>>8&255)<<16,t+=(255&e)<<24},c.leftRotate=function(e,t){return e<>>32-t},c.md5=function(e){for(var t=[7,12,17,22,7,12,17,22,7,12,17,22,7,12,17,22,5,9,14,20,5,9,14,20,5,9,14,20,5,9,14,20,4,11,16,23,4,11,16,23,4,11,16,23,4,11,16,23,6,10,15,21,6,10,15,21,6,10,15,21,6,10,15,21],o=[],n=0;n<=63;n++)o[n]=Math.abs(Math.sin(n+1))*Math.pow(2,32)<<0;var r,a,i=1732584193,s=4023233417,l=2562383102,u=271733878;r=c.toUtf8ByteArr(e),e=null,a=r.length,r.push(128);for(var p=Math.abs(448-8*r.length%512)/8;p--;)r.push(0);for(r.push(8*a&255,8*a>>8&255,8*a>>16&255,8*a>>24&255),n=4;n--;)r.push(0);for(var d=c.leftRotate,f=(n=0,[]);n>>32-s,o);var i,s}function f(e,t,o,n,r,a,i){return d(t&o|~t&n,e,t,r,a,i)}function g(e,t,o,n,r,a,i){return d(t&n|o&~n,e,t,r,a,i)}function y(e,t,o,n,r,a,i){return d(t^o^n,e,t,r,a,i)}function m(e,t,o,n,r,a,i){return d(o^(t|~n),e,t,r,a,i)}function h(e,t){var o=(65535&e)+(65535&t);return(e>>16)+(t>>16)+(o>>16)<<16|65535&o}function v(e,t){var o=e[0],n=e[1],r=e[2],a=e[3];o=w(o,n,r,a,t[0],7,-680876936),a=w(a,o,n,r,t[1],12,-389564586),r=w(r,a,o,n,t[2],17,606105819),n=w(n,r,a,o,t[3],22,-1044525330),o=w(o,n,r,a,t[4],7,-176418897),a=w(a,o,n,r,t[5],12,1200080426),r=w(r,a,o,n,t[6],17,-1473231341),n=w(n,r,a,o,t[7],22,-45705983),o=w(o,n,r,a,t[8],7,1770035416),a=w(a,o,n,r,t[9],12,-1958414417),r=w(r,a,o,n,t[10],17,-42063),n=w(n,r,a,o,t[11],22,-1990404162),o=w(o,n,r,a,t[12],7,1804603682),a=w(a,o,n,r,t[13],12,-40341101),r=w(r,a,o,n,t[14],17,-1502002290),o=_(o,n=w(n,r,a,o,t[15],22,1236535329),r,a,t[1],5,-165796510),a=_(a,o,n,r,t[6],9,-1069501632),r=_(r,a,o,n,t[11],14,643717713),n=_(n,r,a,o,t[0],20,-373897302),o=_(o,n,r,a,t[5],5,-701558691),a=_(a,o,n,r,t[10],9,38016083),r=_(r,a,o,n,t[15],14,-660478335),n=_(n,r,a,o,t[4],20,-405537848),o=_(o,n,r,a,t[9],5,568446438),a=_(a,o,n,r,t[14],9,-1019803690),r=_(r,a,o,n,t[3],14,-187363961),n=_(n,r,a,o,t[8],20,1163531501),o=_(o,n,r,a,t[13],5,-1444681467),a=_(a,o,n,r,t[2],9,-51403784),r=_(r,a,o,n,t[7],14,1735328473),o=k(o,n=_(n,r,a,o,t[12],20,-1926607734),r,a,t[5],4,-378558),a=k(a,o,n,r,t[8],11,-2022574463),r=k(r,a,o,n,t[11],16,1839030562),n=k(n,r,a,o,t[14],23,-35309556),o=k(o,n,r,a,t[1],4,-1530992060),a=k(a,o,n,r,t[4],11,1272893353),r=k(r,a,o,n,t[7],16,-155497632),n=k(n,r,a,o,t[10],23,-1094730640),o=k(o,n,r,a,t[13],4,681279174),a=k(a,o,n,r,t[0],11,-358537222),r=k(r,a,o,n,t[3],16,-722521979),n=k(n,r,a,o,t[6],23,76029189),o=k(o,n,r,a,t[9],4,-640364487),a=k(a,o,n,r,t[12],11,-421815835),r=k(r,a,o,n,t[15],16,530742520),o=x(o,n=k(n,r,a,o,t[2],23,-995338651),r,a,t[0],6,-198630844),a=x(a,o,n,r,t[7],10,1126891415),r=x(r,a,o,n,t[14],15,-1416354905),n=x(n,r,a,o,t[5],21,-57434055),o=x(o,n,r,a,t[12],6,1700485571),a=x(a,o,n,r,t[3],10,-1894986606),r=x(r,a,o,n,t[10],15,-1051523),n=x(n,r,a,o,t[1],21,-2054922799),o=x(o,n,r,a,t[8],6,1873313359),a=x(a,o,n,r,t[15],10,-30611744),r=x(r,a,o,n,t[6],15,-1560198380),n=x(n,r,a,o,t[13],21,1309151649),o=x(o,n,r,a,t[4],6,-145523070),a=x(a,o,n,r,t[11],10,-1120210379),r=x(r,a,o,n,t[2],15,718787259),n=x(n,r,a,o,t[9],21,-343485551),e[0]=C(o,e[0]),e[1]=C(n,e[1]),e[2]=C(r,e[2]),e[3]=C(a,e[3])}function b(e,t,o,n,r,a){return t=C(C(t,e),C(n,a)),C(t<>>32-r,o)}function w(e,t,o,n,r,a,i){return b(t&o|~t&n,e,t,r,a,i)}function _(e,t,o,n,r,a,i){return b(t&n|o&~n,e,t,r,a,i)}function k(e,t,o,n,r,a,i){return b(t^o^n,e,t,r,a,i)}function x(e,t,o,n,r,a,i){return b(o^(t|~n),e,t,r,a,i)}function S(e){var t,o=[];for(t=0;t<64;t+=4)o[t>>2]=e.charCodeAt(t)+(e.charCodeAt(t+1)<<8)+(e.charCodeAt(t+2)<<16)+(e.charCodeAt(t+3)<<24);return o}var E="0123456789abcdef".split("");function N(e){for(var t="",o=0;o<4;o++)t+=E[e>>8*o+4&15]+E[e>>8*o&15];return t}function A(e){return function(e){for(var t=0;t>2]|=e.charCodeAt(t)<<(t%4<<3);if(r[t>>2]|=128<<(t%4<<3),t>55)for(v(n,r),t=0;t<16;t++)r[t]=0;return r[14]=8*o,v(n,r),n}(e))}function C(e,t){return e+t&4294967295}A("hello"),A("hello"),new Array(0,3614090360,3905402710,606105819,3250441966,4118548399,1200080426,2821735955,4249261313,1770035416,2336552879,4294925233,2304563134,1804603682,4254626195,2792965006,1236535329,4129170786,3225465664,643717713,3921069994,3593408605,38016083,3634488961,3889429448,568446438,3275163606,4107603335,1163531501,2850285829,4243563512,1735328473,2368359562,4294588738,2272392833,1839030562,4259657740,2763975236,1272893353,4139469664,3200236656,681279174,3936430074,3572445317,76029189,3654602809,3873151461,530742520,3299628645,4096336452,1126891415,2878612391,4237533241,1700485571,2399980690,4293915773,2240044497,1873313359,4264355552,2734768916,1309151649,4149444226,3174756917,718787259,3951481745);var P=new Array(new Array(0,7,1),new Array(1,12,2),new Array(2,17,3),new Array(3,22,4),new Array(4,7,5),new Array(5,12,6),new Array(6,17,7),new Array(7,22,8),new Array(8,7,9),new Array(9,12,10),new Array(10,17,11),new Array(11,22,12),new Array(12,7,13),new Array(13,12,14),new Array(14,17,15),new Array(15,22,16)),I=new Array(new Array(1,5,17),new Array(6,9,18),new Array(11,14,19),new Array(0,20,20),new Array(5,5,21),new Array(10,9,22),new Array(15,14,23),new Array(4,20,24),new Array(9,5,25),new Array(14,9,26),new Array(3,14,27),new Array(8,20,28),new Array(13,5,29),new Array(2,9,30),new Array(7,14,31),new Array(12,20,32)),L=new Array(new Array(5,4,33),new Array(8,11,34),new Array(11,16,35),new Array(14,23,36),new Array(1,4,37),new Array(4,11,38),new Array(7,16,39),new Array(10,23,40),new Array(13,4,41),new Array(0,11,42),new Array(3,16,43),new Array(6,23,44),new Array(9,4,45),new Array(12,11,46),new Array(15,16,47),new Array(2,23,48)),O=new Array(new Array(0,6,49),new Array(7,10,50),new Array(14,15,51),new Array(5,21,52),new Array(12,6,53),new Array(3,10,54),new Array(10,15,55),new Array(1,21,56),new Array(8,6,57),new Array(15,10,58),new Array(6,15,59),new Array(13,21,60),new Array(4,6,61),new Array(11,10,62),new Array(2,15,63),new Array(9,21,64));new Array(new Array((function(e,t,o){return e&t|~e&o}),P),new Array((function(e,t,o){return e&o|t&~o}),I),new Array((function(e,t,o){return e^t^o}),L),new Array((function(e,t,o){return t^(e|~o)}),O));const V={hex_md5:function(e){return function(e){for(var t,o=p?"0123456789ABCDEF":"0123456789abcdef",n="",r=0;r>>4&15)+o.charAt(15&t);return n}(function(e){return function(e){for(var t="",o=0;o<32*e.length;o+=8)t+=String.fromCharCode(e[o>>5]>>>o%32&255);return t}(function(e,t){e[t>>5]|=128<>>9<<4)]=t;for(var o=1732584193,n=-271733879,r=-1732584194,a=271733878,i=0;i>2),o=0;o>5]|=(255&e.charCodeAt(o/8))<1&&"boolean"!=typeof t)throw new Y('"allowMissing" argument must be a boolean');if(null===he(/^%?[^%]*%?$/,e))throw new z("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var o=function(e){var t=me(e,0,1),o=me(e,-1);if("%"===t&&"%"!==o)throw new z("invalid intrinsic syntax, expected closing `%`");if("%"===o&&"%"!==t)throw new z("invalid intrinsic syntax, expected opening `%`");var n=[];return ye(e,ve,(function(e,t,o,r){n[n.length]=o?ye(r,be,"$1"):t||e})),n}(e),n=o.length>0?o[0]:"",r=we("%"+n+"%",t),a=r.name,i=r.value,s=!1,l=r.alias;l&&(n=l[0],ge(o,fe([0,1],l)));for(var c=1,u=!0;c=o.length){var g=Z(i,p);i=(u=!!g)&&"get"in g&&!("originalValue"in g.get)?g.get:i[p]}else u=de(i,p),i=i[p];u&&!s&&(se[a]=i)}}return i},ke={},xe={get exports(){return ke},set exports(e){ke=e}},Se=_e("%Object.defineProperty%",!0),Ee=function(){if(Se)try{return Se({},"a",{value:1}),!0}catch(kn){return!1}return!1};Ee.hasArrayLengthDefineBug=function(){if(!Ee())return null;try{return 1!==Se([],"length",{value:1}).length}catch(kn){return!0}};var Ne=Ee,Ae=_e("%Object.getOwnPropertyDescriptor%",!0);if(Ae)try{Ae([],"length")}catch(kn){Ae=null}var Ce=Ae,Pe=Ne(),Ie=_e,Le=Pe&&Ie("%Object.defineProperty%",!0);if(Le)try{Le({},"a",{value:1})}catch(kn){Le=!1}var Oe=Ie("%SyntaxError%"),Ve=Ie("%TypeError%"),Be=Ce,De=_e,Te=function(e,t,o){if(!e||"object"!=typeof e&&"function"!=typeof e)throw new Ve("`obj` must be an object or a function`");if("string"!=typeof t&&"symbol"!=typeof t)throw new Ve("`property` must be a string or a symbol`");if(arguments.length>3&&"boolean"!=typeof arguments[3]&&null!==arguments[3])throw new Ve("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&"boolean"!=typeof arguments[4]&&null!==arguments[4])throw new Ve("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&"boolean"!=typeof arguments[5]&&null!==arguments[5])throw new Ve("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&"boolean"!=typeof arguments[6])throw new Ve("`loose`, if provided, must be a boolean");var n=arguments.length>3?arguments[3]:null,r=arguments.length>4?arguments[4]:null,a=arguments.length>5?arguments[5]:null,i=arguments.length>6&&arguments[6],s=!!Be&&Be(e,t);if(Le)Le(e,t,{configurable:null===a&&s?s.configurable:!a,enumerable:null===n&&s?s.enumerable:!n,value:o,writable:null===r&&s?s.writable:!r});else{if(!i&&(n||r||a))throw new Oe("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.");e[t]=o}},je=Ne(),Re=Ce,Me=De("%TypeError%"),Fe=De("%Math.floor%"),Ue=function(e,t){if("function"!=typeof e)throw new Me("`fn` is not a function");if("number"!=typeof t||t<0||t>4294967295||Fe(t)!==t)throw new Me("`length` must be a positive 32-bit integer");var o=arguments.length>2&&!!arguments[2],n=!0,r=!0;if("length"in e&&Re){var a=Re(e,"length");a&&!a.configurable&&(n=!1),a&&!a.writable&&(r=!1)}return(n||r||!o)&&(je?Te(e,"length",t,!0,!0):Te(e,"length",t)),e};!function(e){var t=Q,o=_e,n=Ue,r=o("%TypeError%"),a=o("%Function.prototype.apply%"),i=o("%Function.prototype.call%"),s=o("%Reflect.apply%",!0)||t.call(i,a),l=o("%Object.defineProperty%",!0),c=o("%Math.max%");if(l)try{l({},"a",{value:1})}catch(kn){l=null}e.exports=function(e){if("function"!=typeof e)throw new r("a function is required");var o=s(t,i,arguments);return n(o,1+c(0,e.length-(arguments.length-1)),!0)};var u=function(){return s(t,a,arguments)};l?l(e.exports,"apply",{value:u}):e.exports.apply=u}(xe);var Ge=_e,He=ke,$e=He(Ge("String.prototype.indexOf"));const Qe=D(Object.freeze(Object.defineProperty({__proto__:null,default:{}},Symbol.toStringTag,{value:"Module"})));var qe="function"==typeof Map&&Map.prototype,Ke=Object.getOwnPropertyDescriptor&&qe?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,We=qe&&Ke&&"function"==typeof Ke.get?Ke.get:null,ze=qe&&Map.prototype.forEach,Je="function"==typeof Set&&Set.prototype,Ye=Object.getOwnPropertyDescriptor&&Je?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,Xe=Je&&Ye&&"function"==typeof Ye.get?Ye.get:null,Ze=Je&&Set.prototype.forEach,et="function"==typeof WeakMap&&WeakMap.prototype?WeakMap.prototype.has:null,tt="function"==typeof WeakSet&&WeakSet.prototype?WeakSet.prototype.has:null,ot="function"==typeof WeakRef&&WeakRef.prototype?WeakRef.prototype.deref:null,nt=Boolean.prototype.valueOf,rt=Object.prototype.toString,at=Function.prototype.toString,it=String.prototype.match,st=String.prototype.slice,lt=String.prototype.replace,ct=String.prototype.toUpperCase,ut=String.prototype.toLowerCase,pt=RegExp.prototype.test,dt=Array.prototype.concat,ft=Array.prototype.join,gt=Array.prototype.slice,yt=Math.floor,mt="function"==typeof BigInt?BigInt.prototype.valueOf:null,ht=Object.getOwnPropertySymbols,vt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?Symbol.prototype.toString:null,bt="function"==typeof Symbol&&"object"==typeof Symbol.iterator,wt="function"==typeof Symbol&&Symbol.toStringTag&&(typeof Symbol.toStringTag===bt||"symbol")?Symbol.toStringTag:null,_t=Object.prototype.propertyIsEnumerable,kt=("function"==typeof Reflect?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(e){return e.__proto__}:null);function xt(e,t){if(e===1/0||e===-1/0||e!=e||e&&e>-1e3&&e<1e3||pt.call(/e/,t))return t;var o=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if("number"==typeof e){var n=e<0?-yt(-e):yt(e);if(n!==e){var r=String(n),a=st.call(t,r.length+1);return lt.call(r,o,"$&_")+"."+lt.call(lt.call(a,/([0-9]{3})/g,"$&_"),/_$/,"")}}return lt.call(t,o,"$&_")}var St=Qe,Et=St.custom,Nt=Lt(Et)?Et:null;function At(e,t,o){var n="double"===(o.quoteStyle||t)?'"':"'";return n+e+n}function Ct(e){return lt.call(String(e),/"/g,""")}function Pt(e){return!("[object Array]"!==Bt(e)||wt&&"object"==typeof e&&wt in e)}function It(e){return!("[object RegExp]"!==Bt(e)||wt&&"object"==typeof e&&wt in e)}function Lt(e){if(bt)return e&&"object"==typeof e&&e instanceof Symbol;if("symbol"==typeof e)return!0;if(!e||"object"!=typeof e||!vt)return!1;try{return vt.call(e),!0}catch(kn){}return!1}var Ot=Object.prototype.hasOwnProperty||function(e){return e in this};function Vt(e,t){return Ot.call(e,t)}function Bt(e){return rt.call(e)}function Dt(e,t){if(e.indexOf)return e.indexOf(t);for(var o=0,n=e.length;ot.maxStringLength){var o=e.length-t.maxStringLength,n="... "+o+" more character"+(o>1?"s":"");return Tt(st.call(e,0,t.maxStringLength),t)+n}return At(lt.call(lt.call(e,/(['\\])/g,"\\$1"),/[\x00-\x1f]/g,jt),"single",t)}function jt(e){var t=e.charCodeAt(0),o={8:"b",9:"t",10:"n",12:"f",13:"r"}[t];return o?"\\"+o:"\\x"+(t<16?"0":"")+ct.call(t.toString(16))}function Rt(e){return"Object("+e+")"}function Mt(e){return e+" { ? }"}function Ft(e,t,o,n){return e+" ("+t+") {"+(n?Ut(o,n):ft.call(o,", "))+"}"}function Ut(e,t){if(0===e.length)return"";var o="\n"+t.prev+t.base;return o+ft.call(e,","+o)+"\n"+t.prev}function Gt(e,t){var o=Pt(e),n=[];if(o){n.length=e.length;for(var r=0;r-1?He(o):o},Qt=function e(t,o,n,r){var a=o||{};if(Vt(a,"quoteStyle")&&"single"!==a.quoteStyle&&"double"!==a.quoteStyle)throw new TypeError('option "quoteStyle" must be "single" or "double"');if(Vt(a,"maxStringLength")&&("number"==typeof a.maxStringLength?a.maxStringLength<0&&a.maxStringLength!==1/0:null!==a.maxStringLength))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var i=!Vt(a,"customInspect")||a.customInspect;if("boolean"!=typeof i&&"symbol"!==i)throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(Vt(a,"indent")&&null!==a.indent&&"\t"!==a.indent&&!(parseInt(a.indent,10)===a.indent&&a.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(Vt(a,"numericSeparator")&&"boolean"!=typeof a.numericSeparator)throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var s=a.numericSeparator;if(void 0===t)return"undefined";if(null===t)return"null";if("boolean"==typeof t)return t?"true":"false";if("string"==typeof t)return Tt(t,a);if("number"==typeof t){if(0===t)return 1/0/t>0?"0":"-0";var l=String(t);return s?xt(t,l):l}if("bigint"==typeof t){var c=String(t)+"n";return s?xt(t,c):c}var u=void 0===a.depth?5:a.depth;if(void 0===n&&(n=0),n>=u&&u>0&&"object"==typeof t)return Pt(t)?"[Array]":"[Object]";var p=function(e,t){var o;if("\t"===e.indent)o="\t";else{if(!("number"==typeof e.indent&&e.indent>0))return null;o=ft.call(Array(e.indent+1)," ")}return{base:o,prev:ft.call(Array(t+1),o)}}(a,n);if(void 0===r)r=[];else if(Dt(r,t)>=0)return"[Circular]";function d(t,o,i){if(o&&(r=gt.call(r)).push(o),i){var s={depth:a.depth};return Vt(a,"quoteStyle")&&(s.quoteStyle=a.quoteStyle),e(t,s,n+1,r)}return e(t,a,n+1,r)}if("function"==typeof t&&!It(t)){var f=function(e){if(e.name)return e.name;var t=it.call(at.call(e),/^function\s*([\w$]+)/);if(t)return t[1];return null}(t),g=Gt(t,d);return"[Function"+(f?": "+f:" (anonymous)")+"]"+(g.length>0?" { "+ft.call(g,", ")+" }":"")}if(Lt(t)){var y=bt?lt.call(String(t),/^(Symbol\(.*\))_[^)]*$/,"$1"):vt.call(t);return"object"!=typeof t||bt?y:Rt(y)}if(function(e){if(!e||"object"!=typeof e)return!1;if("undefined"!=typeof HTMLElement&&e instanceof HTMLElement)return!0;return"string"==typeof e.nodeName&&"function"==typeof e.getAttribute}(t)){for(var m="<"+ut.call(String(t.nodeName)),h=t.attributes||[],v=0;v"}if(Pt(t)){if(0===t.length)return"[]";var b=Gt(t,d);return p&&!function(e){for(var t=0;t=0)return!1;return!0}(b)?"["+Ut(b,p)+"]":"[ "+ft.call(b,", ")+" ]"}if(function(e){return!("[object Error]"!==Bt(e)||wt&&"object"==typeof e&&wt in e)}(t)){var w=Gt(t,d);return"cause"in Error.prototype||!("cause"in t)||_t.call(t,"cause")?0===w.length?"["+String(t)+"]":"{ ["+String(t)+"] "+ft.call(w,", ")+" }":"{ ["+String(t)+"] "+ft.call(dt.call("[cause]: "+d(t.cause),w),", ")+" }"}if("object"==typeof t&&i){if(Nt&&"function"==typeof t[Nt]&&St)return St(t,{depth:u-n});if("symbol"!==i&&"function"==typeof t.inspect)return t.inspect()}if(function(e){if(!We||!e||"object"!=typeof e)return!1;try{We.call(e);try{Xe.call(e)}catch(m){return!0}return e instanceof Map}catch(kn){}return!1}(t)){var _=[];return ze&&ze.call(t,(function(e,o){_.push(d(o,t,!0)+" => "+d(e,t))})),Ft("Map",We.call(t),_,p)}if(function(e){if(!Xe||!e||"object"!=typeof e)return!1;try{Xe.call(e);try{We.call(e)}catch(t){return!0}return e instanceof Set}catch(kn){}return!1}(t)){var k=[];return Ze&&Ze.call(t,(function(e){k.push(d(e,t))})),Ft("Set",Xe.call(t),k,p)}if(function(e){if(!et||!e||"object"!=typeof e)return!1;try{et.call(e,et);try{tt.call(e,tt)}catch(m){return!0}return e instanceof WeakMap}catch(kn){}return!1}(t))return Mt("WeakMap");if(function(e){if(!tt||!e||"object"!=typeof e)return!1;try{tt.call(e,tt);try{et.call(e,et)}catch(m){return!0}return e instanceof WeakSet}catch(kn){}return!1}(t))return Mt("WeakSet");if(function(e){if(!ot||!e||"object"!=typeof e)return!1;try{return ot.call(e),!0}catch(kn){}return!1}(t))return Mt("WeakRef");if(function(e){return!("[object Number]"!==Bt(e)||wt&&"object"==typeof e&&wt in e)}(t))return Rt(d(Number(t)));if(function(e){if(!e||"object"!=typeof e||!mt)return!1;try{return mt.call(e),!0}catch(kn){}return!1}(t))return Rt(d(mt.call(t)));if(function(e){return!("[object Boolean]"!==Bt(e)||wt&&"object"==typeof e&&wt in e)}(t))return Rt(nt.call(t));if(function(e){return!("[object String]"!==Bt(e)||wt&&"object"==typeof e&&wt in e)}(t))return Rt(d(String(t)));if("undefined"!=typeof window&&t===window)return"{ [object Window] }";if(t===B)return"{ [object globalThis] }";if(!function(e){return!("[object Date]"!==Bt(e)||wt&&"object"==typeof e&&wt in e)}(t)&&!It(t)){var x=Gt(t,d),S=kt?kt(t)===Object.prototype:t instanceof Object||t.constructor===Object,E=t instanceof Object?"":"null prototype",N=!S&&wt&&Object(t)===t&&wt in t?st.call(Bt(t),8,-1):E?"Object":"",A=(S||"function"!=typeof t.constructor?"":t.constructor.name?t.constructor.name+" ":"")+(N||E?"["+ft.call(dt.call([],N||[],E||[]),": ")+"] ":"");return 0===x.length?A+"{}":p?A+"{"+Ut(x,p)+"}":A+"{ "+ft.call(x,", ")+" }"}return String(t)},qt=Ht("%TypeError%"),Kt=Ht("%WeakMap%",!0),Wt=Ht("%Map%",!0),zt=$t("WeakMap.prototype.get",!0),Jt=$t("WeakMap.prototype.set",!0),Yt=$t("WeakMap.prototype.has",!0),Xt=$t("Map.prototype.get",!0),Zt=$t("Map.prototype.set",!0),eo=$t("Map.prototype.has",!0),to=function(e,t){for(var o,n=e;null!==(o=n.next);n=o)if(o.key===t)return n.next=o.next,o.next=e.next,e.next=o,o},oo=String.prototype.replace,no=/%20/g,ro="RFC3986",ao={default:ro,formatters:{RFC1738:function(e){return oo.call(e,no,"+")},RFC3986:function(e){return String(e)}},RFC1738:"RFC1738",RFC3986:ro},io=ao,so=Object.prototype.hasOwnProperty,lo=Array.isArray,co=function(){for(var e=[],t=0;t<256;++t)e.push("%"+((t<16?"0":"")+t.toString(16)).toUpperCase());return e}(),uo=function(e,t){for(var o=t&&t.plainObjects?Object.create(null):{},n=0;n1;){var t=e.pop(),o=t.obj[t.prop];if(lo(o)){for(var n=[],r=0;r=48&&l<=57||l>=65&&l<=90||l>=97&&l<=122||r===io.RFC1738&&(40===l||41===l)?i+=a.charAt(s):l<128?i+=co[l]:l<2048?i+=co[192|l>>6]+co[128|63&l]:l<55296||l>=57344?i+=co[224|l>>12]+co[128|l>>6&63]+co[128|63&l]:(s+=1,l=65536+((1023&l)<<10|1023&a.charCodeAt(s)),i+=co[240|l>>18]+co[128|l>>12&63]+co[128|l>>6&63]+co[128|63&l])}return i},isBuffer:function(e){return!(!e||"object"!=typeof e)&&!!(e.constructor&&e.constructor.isBuffer&&e.constructor.isBuffer(e))},isRegExp:function(e){return"[object RegExp]"===Object.prototype.toString.call(e)},maybeMap:function(e,t){if(lo(e)){for(var o=[],n=0;n0?v.join(",")||null:void 0}];else if(vo(l))A=l;else{var P=Object.keys(v);A=c?P.sort(c):P}for(var I=r&&vo(v)&&1===v.length?o+"[]":o,L=0;L-1?e.split(","):e},Vo=function(e,t,o,n){if(e){var r=o.allowDots?e.replace(/\.([^.[]+)/g,"[$1]"):e,a=/(\[[^[\]]*])/g,i=o.depth>0&&/(\[[^[\]]*])/.exec(r),s=i?r.slice(0,i.index):r,l=[];if(s){if(!o.plainObjects&&Co.call(Object.prototype,s)&&!o.allowPrototypes)return;l.push(s)}for(var c=0;o.depth>0&&null!==(i=a.exec(r))&&c=0;--a){var i,s=e[a];if("[]"===s&&o.parseArrays)i=[].concat(r);else{i=o.plainObjects?Object.create(null):{};var l="["===s.charAt(0)&&"]"===s.charAt(s.length-1)?s.slice(1,-1):s,c=parseInt(l,10);o.parseArrays||""!==l?!isNaN(c)&&s!==l&&String(c)===l&&c>=0&&o.parseArrays&&c<=o.arrayLimit?(i=[])[c]=r:"__proto__"!==l&&(i[l]=r):i={0:r}}r=i}return r}(l,t,o,n)}},Bo={formats:ao,parse:function(e,t){var o=function(e){if(!e)return Io;if(null!==e.decoder&&void 0!==e.decoder&&"function"!=typeof e.decoder)throw new TypeError("Decoder has to be a function.");if(void 0!==e.charset&&"utf-8"!==e.charset&&"iso-8859-1"!==e.charset)throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var t=void 0===e.charset?Io.charset:e.charset;return{allowDots:void 0===e.allowDots?Io.allowDots:!!e.allowDots,allowPrototypes:"boolean"==typeof e.allowPrototypes?e.allowPrototypes:Io.allowPrototypes,allowSparse:"boolean"==typeof e.allowSparse?e.allowSparse:Io.allowSparse,arrayLimit:"number"==typeof e.arrayLimit?e.arrayLimit:Io.arrayLimit,charset:t,charsetSentinel:"boolean"==typeof e.charsetSentinel?e.charsetSentinel:Io.charsetSentinel,comma:"boolean"==typeof e.comma?e.comma:Io.comma,decoder:"function"==typeof e.decoder?e.decoder:Io.decoder,delimiter:"string"==typeof e.delimiter||Ao.isRegExp(e.delimiter)?e.delimiter:Io.delimiter,depth:"number"==typeof e.depth||!1===e.depth?+e.depth:Io.depth,ignoreQueryPrefix:!0===e.ignoreQueryPrefix,interpretNumericEntities:"boolean"==typeof e.interpretNumericEntities?e.interpretNumericEntities:Io.interpretNumericEntities,parameterLimit:"number"==typeof e.parameterLimit?e.parameterLimit:Io.parameterLimit,parseArrays:!1!==e.parseArrays,plainObjects:"boolean"==typeof e.plainObjects?e.plainObjects:Io.plainObjects,strictNullHandling:"boolean"==typeof e.strictNullHandling?e.strictNullHandling:Io.strictNullHandling}}(t);if(""===e||null==e)return o.plainObjects?Object.create(null):{};for(var n="string"==typeof e?function(e,t){var o,n={},r=t.ignoreQueryPrefix?e.replace(/^\?/,""):e,a=t.parameterLimit===1/0?void 0:t.parameterLimit,i=r.split(t.delimiter,a),s=-1,l=t.charset;if(t.charsetSentinel)for(o=0;o-1&&(u=Po(u)?[u]:u),Co.call(n,c)?n[c]=Ao.combine(n[c],u):n[c]=u}return n}(e,o):e,r=o.plainObjects?Object.create(null):{},a=Object.keys(n),i=0;i0?f+d:""}};const Do="https://testmanager.ouxuanzhineng.cn",To={padLogin:`${Do}/assistant/WechatMiniApplogin`,padList:`${Do}/admin/stadium/list`,getGoodsList:`${Do}/admin/erpRetailGoods/list`,getGoodFromPad:`${Do}/admin/erpRetailGoods/getErpGoodsBySkuOfPad`,getGoodsBySKU:`${Do}/admin/erpRetailOrder/payOfBarcodeScanner`,getGoodsClassify:`${Do}/classifyer/all`,makeOrder:`${Do}/admin/erp/retailByPayOfQrcode`,payOrder:`${Do}/admin/order/pay/online/payByScannedCode`,checkOrder:`${Do}/pay/huishouqian/checkOrder`,version:`${Do}/version`,getDoorList:`${Do}/v3/pad/ListHardwareByStadiumId`,openDoor:`${Do}/v3/pad/GateOpenById`},jo={ORIGIN:Do,API:To},Ro=e=>(e=e.toString())[1]?e:"0"+e,Mo=(e,t)=>{switch(t){case"nT":uni.navigateTo({url:e});break;case"rT":uni.redirectTo({url:e});break;case"rL":uni.reLaunch({url:e});break;case"sT":uni.switchTab({url:e});break;default:uni.navigateBack({delta:1})}};function Fo(e="加载中",t=!0){uni.showLoading({mask:t,title:e})}function Uo(){uni.hideLoading()}function Go({title:e="提示",content:t="",showCancel:o=!1,cancelText:n="取消",confirmText:r="确定",confirmColor:a="#009874",success:i,fail:s,complete:l}){uni.showModal({title:e,content:t,showCancel:o,cancelText:n,confirmColor:a,confirmText:r,success:i,fail:s,complete:l})}function Ho(e,t){let o=new Date(e),n=new Date(t);return o.setHours(0,0,0,0)==n.setHours(0,0,0,0)}function $o(e,t){let o="";for(var n in e)o+=`&${n}=${e[n]}`;return t+"?"+o.slice(1)}const Qo={checkSerialPortMessage:function(e){return e?"aa01ea"==e?"":e:""},formatTime:e=>{const t=e.getFullYear(),o=e.getMonth()+1,n=e.getDate(),r=e.getHours(),a=e.getMinutes(),i=e.getSeconds();return[t,o,n].map(Ro).join("-")+" "+[r,a,i].map(Ro).join(":")},formatNumber:Ro,formatDate:({date:e=new Date,partition:t="-"})=>{let o;o="string"==typeof e&&-1!=e.indexOf("-")?new Date(e.replace(/\-/g,"/")):new Date(e);const n=o.getFullYear(),r=o.getMonth()+1,a=o.getDate();return"zh"==t?`${n}年${r}月${a}日`:[n,r,a].map(Ro).join(t)},routeTo:Mo,showNone:function(e,t=1500){uni.hideToast(),uni.hideLoading(),uni.showToast({mask:!0,title:e,icon:"none",duration:t})},showLoad:Fo,hideLoad:Uo,showModal:Go,showModalMsg:function(e="加载中",t=!0){return new Promise(((n,r)=>{uni.showModal({title:"提示",content:e,showCancel:t,confirmText:"确定",confirmColor:"#009874",success:function(e){e.confirm?(o("log","at utils/util.js:125","用户点击确定"),n(!0)):(o("log","at utils/util.js:128","用户点击取消"),r(!1))},fail:function(e){r(!1)}})}))},showNoneModal:function(e){uni.showModal({title:"提示",content:e,showCancel:!1,confirmText:"确定",confirmColor:"#009874"})},debounce:function(e,t,o){let n,r,a,i,s;const l=function(){const c=+new Date-i;c0?n=setTimeout(l,t-c):(n=null,o||(s=e.apply(a,r),n||(a=r=null)))};return function(...r){a=this,i=+new Date;const c=o&&!n;return n||(n=setTimeout(l,t)),c&&(s=e.apply(a,r),a=r=null),s}},jsonStr:function(e){return encodeURIComponent(JSON.stringify(e))},jsonPar:function(e){return JSON.parse(decodeURIComponent(e))},promisify:e=>(t,...o)=>new Promise(((n,r)=>{e(Object.assign({},t,{success:n,fail:r}),...o)})),previousPageFunction:function({fnName:e,query:t}){return new Promise(((n,r)=>{try{getCurrentPages().length>1?(getCurrentPages()[getCurrentPages().length-2].$vm[e](t),n("success")):(o("error","at utils/util.js:195","当前路由栈为一,无法调取上一页数据"),r("当前路由栈为一,无法调取上一页数据"))}catch(a){o("error","at utils/util.js:199","调用上一页面栈方法失败!",a),r("调用上一页面栈方法失败!")}}))},getNodeMes:function(e,t=null){return new Promise((o=>{(t?uni.createSelectorQuery().in(t):uni.createSelectorQuery()).select(e).boundingClientRect((e=>{o(e)})).exec()}))},failAuthorizeTosetting:function(e="调用失败,请打开检查授权状态"){Go({title:"提示",content:e,showCancel:!0,confirmText:"打开",success:e=>{e.confirm&&uni.openSetting()}})},getSceneQuery:function(e){return(decodeURIComponent(e)||null).split("&").reduce(((e,t)=>{let o=t.split("=");return e[`${o[0]}`]=o[1],e}),{})||null},getUrlQuery:function(e,t){var o=decodeURI(t).split("?a=1").join("");return-1!=o.indexOf(`${e}=`)?o.split(`${e}=`)[1].split("&")[0]:null},getQueryString:function(e){var t=new RegExp("(^|&)"+e+"=([^&]*)(&|$)"),o=window.location.search.substr(1).match(t);return null!=o?o[2]:null},getRandom:function(e,t){return Math.round(Math.random()*(t-e))+e},get_zh_day:function(e){return Ho((new Date).getTime(),new Date(e).getTime())?"今天":["周日","周一","周二","周三","周四","周五","周六"][new Date(e).getDay()]||""},isSameDay:Ho,get_zh_date:function(e=new Date){return`${new Date(e).getMonth()+1}月${new Date(e).getDate()}日`},substrDate:function(e){if(e)return e.substr(0,10)||"-"},requestPayment:function(e={}){Fo(),uni.requestPayment({timeStamp:e.timeStamp||"",nonceStr:e.nonceStr||"",package:e.package||"",signType:e.signType||"",paySign:e.paySign||"",success:function(t){e.success&&e.success(t)},fail:function(t){e.fail&&e.fail(t)},complete:function(t){Uo(),e.complete&&e.complete(t)}})},getQueryStr:function({url:e,name:t}){let o=(e.split("?")[1]||"").split("&")||[];for(let n=0;n{let n=t.split("=");return e[n[0]]=n[1],e}),{})||{}},specialFormatDate:function(e){var t=(new Date).getTime(),o=new Date(t+864e5*e);let n={};return n.y=o.getFullYear(),n.m=o.getMonth()+1,n.d=o.getDate(),n},timeToSec:function(e,t,o){return 1e3*(Number(3600*e)+Number(60*t)+Number(o))},debug:!1,showLog:function(e,t,o){$o(e,t);let n=t.split("?")[0].split("/");n[n.length-1]},getWebURL:$o,getUrlParams:function(e){var t={},o=e.split("?");if(o.length<=1)return t;o=o[1].split("&");for(var n=0;n{uni.getSystemInfo({success:function(t){e(t.windowHeight)},fail:t=>{o("log","at utils/util.js:499","getSystemInfo fail",t,"default to 1000"),e(1e3)}})}))},getNvueRefSize:function(e,t,o){return new Promise(((e,t)=>{}))},getH5RefSize:function(e,t){return new Promise(((e,t)=>{}))},resetHeader:function(e,t,o,n){t=function(e){let t=e.split("?")[0];return t=t.split(jo.ORIGIN),t[t.length-1]}(t);let r=getApp().globalData.timeDifference||0,{S:a,T:i}=function(e){let t="";e.data&&(t=JSON.stringify(e.data));let o=e.url+"?"+Bo.stringify(e.params),n=parseInt((new Date).getTime()/1e3-e.timeDifference),r=t+"|1ba2212f78610369467de90fb1e3d345|"+o+"|4e68cd333457cb297a05ec7f77a9ad978b56cf57|"+n;return{S:V.hex_md5(r),T:n}}({data:o,params:n,url:t,timeDifference:r});return{...e,S:a,T:i}},updateTimeDifference:function(e){let{now_timestamp:t}=e,o="";t&&(o=parseInt((new Date).getTime()/1e3-t)),getApp().globalData.timeDifference=o},searchGoodBySku:function(e){return new Promise(((t,n)=>{"string"==typeof e&&e.trim()||(o("error","at utils/util.js:609","Invalid SKU. Please provide a non-empty string."),n(!1));let r=getApp().globalData.goodsList.list.filter((t=>{let o=t.erp_goods.erp_goods_sku==e,n=t.erp_goods.stock_num>=1;return o&&n}));r.length?t(r):n(!1)}))},getPostParams:function(){let e=getApp(),t=uni.getStorageSync("stadiumInfo");if(!e.globalData.accountInfo||!e.globalData.accountInfo.brand_id||!e.globalData.accountInfo.token)return Mo("/pages/login/index","rL"),!1;let{brand_id:o,token:n}=e.globalData.accountInfo;return{brand_id:o,token:n,stadium_id:t.id}},asyncSetTimeOut:async function(e){return await new Promise((t=>{setTimeout((()=>t("asyncSetTimeOut")),e||1e3)}))},getPageRoute:function(){var e=getCurrentPages();return e[e.length-1].route}};const qo=new class{request(e,t,n,r,a,i){return new Promise((async(s,l)=>{uni.request({url:e,timeout:3e5,sslVerify:!1,data:t,method:n,header:{...r},success:n=>{n.extension&&Qo.updateTimeDifference(n.extension);{o("log","at utils/server.js:24","islog req success----\x3e");let n=function(e,t){let o="";for(var n in e)o+=`&${n}=${e[n]}`;return t+"?"+o.slice(1)}(t,e),r=e.split("?")[0].split("/"),a=r[r.length-1];o("log","at utils/server.js:28","--------------------\x3e> ["+a+"][log]\n请求 Data: \n"+JSON.stringify(t)+"\n URL:\n"+n+"\n <<-------------------- ["+a+"][log] ↑↑↑\n")}if(a){if(""==i)throw Error("默认回调,失败提示不能为空 key -> failMsg");!function({res:e,failMsg:t,resolve:n,reject:r,url:a,data:i}){0==e.data.code?n(e.data.data):(Qo.hideLoad(),Qo.showNone(e.data.message||t||""),401==e.data.code&&uni.showModal({title:"提示",content:e.data.message,success:function(e){e.confirm?(o("log","at utils/server.js:86","用户点击确定"),Qo.routeTo("/pages/login/index","rL")):e.cancel&&o("log","at utils/server.js:89","用户点击取消")}}),r({url:a,res:e,data:i}))}({url:e,data:t,res:n,failMsg:i,resolve:s,reject:l})}else s(n)},fail:r=>{o("log","at utils/server.js:48","req fail----\x3e",{link:e,query:t,method:n,data:r}),Qo.hideLoad(),"string"!=typeof r.errMsg||-1==r.errMsg.indexOf("timeout")&&-1==r.errMsg.indexOf("interrupted")&&-1==r.errMsg.indexOf("请求超时")?"string"==typeof r.errMsg?Qo.showNone(r.errMsg):Qo.showNone("请求数据失败!请检查当前网络状态。"):Qo.showNone("网络超时!"),l(r)},complete(o){Qo.showLog(t,e,o)}})}))}get({url:e,data:t={},header:o={},isDefaultGet:n=!0,failMsg:r=""}){return o=Qo.resetHeader(o,e,t,{}),this.request(e,t,"GET",o,n,r)}post({url:e,data:t={},header:o={},isDefaultGet:n=!0,failMsg:r=""}){return o=Qo.resetHeader(o,e,t,{}),this.request(e,t,"POST",o,n,r)}uploadFile({url:e,filePath:t,onProgressCallBack:o,formData:n={}}){return new Promise(((r,a)=>{wx.uploadFile({url:e,filePath:t,formData:n,name:"file",success:r,fail:a}).onProgressUpdate((e=>o&&o(e)))}))}},Ko={__name:"index",setup(t){n((async()=>{!function(){let e=uni.getStorageSync("userInfo");o("log","at pages/login/index.vue:160","page-onReady autoLogin userInfo: ",e||"none"),e&&(r.value=e.username,c.value=e.password,u.value=e.brand_id,g())}()}));const r=e.ref(""),c=e.ref(""),u=e.ref(""),p=e=>{r.value=e},d=e=>{c.value=e},f=e=>{u.value=e};function g(){Qo.showLoad("登录中...");let e={assistant_client:"pc",brand_id:u.value,username:r.value,password:c.value};qo.post({url:To.padLogin,data:e,isDefaultGet:!0,failMsg:"操作失败!"}).then((e=>{Qo.hideLoad(),o("log","at pages/login/index.vue:104","padLogin suc: ",e);let{token:t,role:n}=e,a=getApp().globalData.autoLogin,i=uni.getStorageSync("stadiumInfo");var s;return s={username:r.value,password:c.value,brand_id:u.value,token:t,role:n},uni.setStorageSync("userInfo",s),getApp().globalData.accountInfo.brand_id=s.brand_id,getApp().globalData.accountInfo.username=s.username,getApp().globalData.accountInfo.password=s.password,getApp().globalData.accountInfo.token=s.token,getApp().globalData.accountInfo.role=s.role,o("log","at pages/login/index.vue:155","存储到本地localStorage "+uni.getStorageSync("userInfo").username),a&&i&&function(e){let t=uni.getStorageSync("stadiumInfo");return e==t.brand_id||(o("log","at pages/login/index.vue:140","登录的品牌不是历史登录设备的品牌, 清空stadiumInfo缓存"),uni.clearStorageSync("stadiumInfo"),!1)}(u.value)?(getApp().globalData.autoLogin=!1,setTimeout((()=>{Qo.routeTo("/pages/index/standby","nT")}),1e3),Qo.showNone("登录成功")):(getApp().globalData.autoLogin=!1,setTimeout((()=>{Qo.routeTo("/pages/login/success","nT")}),1e3),Qo.showNone("登录成功,请先选择门店"))})).finally((()=>{Qo.hideLoad()}))}return(t,o)=>(e.openBlock(),e.createBlock(a,null,{default:e.withCtx((()=>[e.createElementVNode("view",{class:"login-index"},[e.createElementVNode("view",{class:"li-logo"},[e.createVNode(i)]),e.createElementVNode("view",{class:"li-name"},"欢迎使用欧轩智能场馆平板端系统"),e.createElementVNode("view",{class:"li-from"},[e.createVNode(s,{username:r.value,"onUpdate:username":p,password:c.value,"onUpdate:password":d,brand_id:u.value,"onUpdate:brand_id":f},null,8,["username","password","brand_id"])]),e.createElementVNode("view",{class:"li-tip",onClick:o[0]||(o[0]=()=>{})},"*登录账号密码请从pc端后台管理【设备运营管理平板管理】里获取"),e.createElementVNode("view",{class:"li-btn"},[e.createVNode(l,{onClick:g},{default:e.withCtx((()=>[e.createTextVNode("登录")])),_:1})])])])),_:1}))}},Wo=r({__name:"page_standby",setup(t){const n=e.ref(0);var r=e.computed((()=>{let{accountInfo:e,stadiumInfo:t}=getApp().globalData,n=e.username||"用户";return uni.getStorageSync("stadiumInfo")&&(o("log","at components/index/page_standby.vue:39","stadiumInfo: ",uni.getStorageSync("stadiumInfo")),t=uni.getStorageSync("stadiumInfo")),t&&(n=t.venue_name),n}));const a=()=>{Qo.routeTo("/pages/index/index","nT")};function i(){n.value++,o("log","at components/index/page_standby.vue:63","tabChnage: ",n.value),n.value>=10&&(n.value=0,Qo.routeTo("/pages/login/success","nT")),s()}const s=Qo.debounce((function(){n.value=0}),1e3,!1);return(t,o)=>(e.openBlock(),e.createElementBlock("view",{class:"content"},[e.createElementVNode("view",{class:"content_title"},[e.createElementVNode("text",{class:"txt",onClick:i},e.toDisplayString(e.unref(r)),1)]),e.createElementVNode("view",{class:"content_info"},[e.createElementVNode("text",{class:"txt"},"欢迎使用自助收银")]),e.createElementVNode("image",{class:"content_tip",src:"/static/index_tips.png",mode:"scaleToFill"}),e.createElementVNode("image",{class:"content_img",src:"/static/index_person.png",mode:"scaleToFill"}),e.createElementVNode("view",{class:"content_btn",onClick:a},[e.createElementVNode("image",{class:"icon_saoma",src:"/static/images/saoma.png",mode:"scaleToFill"}),e.createElementVNode("text",{class:"txt"},"请扫描商品条形码")]),e.createElementVNode("view",{class:"content_logo"},[e.createElementVNode("text",{class:"txt"},"欧轩智能场馆提供技术支持")])]))}},[["__scopeId","data-v-c0eb5702"]]),zo=e=>{(e.$renderjs||(e.$renderjs=[])).push("keyboard"),(e.$renderjsModules||(e.$renderjsModules={})).keyboard="082c61ac"},Jo={methods:{onEvent(e){this.$emit(e.type,e)}}};zo(Jo);const Yo=r(Jo,[["render",function(t,o,n,r,a,i){return e.openBlock(),e.createElementBlock("view")}]]);const Xo={dict:{8:"backspace",9:"tab",13:"enter",16:"shift",17:"ctrl",18:"alt",19:"pause_break",20:"caps_lock",27:"escape",33:"page_up",34:"page_down",35:"end",36:"home",37:"left_arrow",38:"up_arrow",39:"right_arrow",40:"down_arrow",45:"insert",46:"delete",48:"0",49:"1",50:"2",51:"3",52:"4",53:"5",54:"6",55:"7",56:"8",57:"9",65:"a",66:"b",67:"c",68:"d",69:"e",70:"f",71:"g",72:"h",73:"i",74:"j",75:"k",76:"l",77:"m",78:"n",79:"o",80:"p",81:"q",82:"r",83:"s",84:"t",85:"u",86:"v",87:"w",88:"x",89:"y",90:"z",91:"left_window_key",92:"right_window_key",93:"select_key",96:"numpad_0",97:"numpad_1",98:"numpad_2",99:"numpad_3",100:"numpad_4",101:"numpad_5",102:"numpad_6",103:"numpad_7",104:"numpad_8",105:"numpad_9",106:"multiply",107:"add",109:"subtract",110:"decimal_point",111:"divide",112:"f1",113:"f2",114:"f3",115:"f4",116:"f5",117:"f6",118:"f7",119:"f8",120:"f9",121:"f10",122:"f11",123:"f12",144:"num_lock",145:"scroll_lock",186:"semi_colon",187:"equal_sign",188:"comma",189:"dash",190:"period",191:"forward_slash",192:"grave_accent",219:"open_bracket",220:"back_slash",221:"close_braket",222:"single_quote"},resultScan:async function(e){return e=await function(e,t,n){return new Promise(((r,a)=>{let i=[];try{e.forEach((function(e,o,r){t.forEach((function(t,a,i){e===t&&("shift"==r[o+1]?(r[o+1]="",r[o]=n[a].double):r[o]=n[a].single)}))})),i=e}catch(kn){o("warn","at utils/dictOfKeyboard.js:164","异常:",kn)}r(i)}))}(e,["semi_colon","equal_sign","comma","dash","period","forward_slash","grave_accent","open_bracket","back_slash","close_braket","single_quote","8","7","6","5","4","3","2","1"],[{double:":",single:";"},{double:"+",single:"="},{double:"<",single:","},{double:"_",single:"-"},{double:">",single:"."},{double:"?",single:"/"},{double:"~",single:"`"},{double:"{",single:"["},{double:"|",single:"/"},{double:"}",single:"]"},{double:'"',single:"'"},{double:"*",single:"8"},{double:"&",single:"7"},{double:"^",single:"6"},{double:"%",single:"5"},{double:"$",single:"4"},{double:"#",single:"3"},{double:"@",single:"2"},{double:"!",single:"1"}]),e=await function(e,t,n){return new Promise(((n,r)=>{let a=[];try{e.forEach((function(e,o,n){t.forEach((function(t,r,a){e===t&&"shift"==n[o+1]&&(n[o+1]="",n[o]=n[o].toUpperCase())}))})),a=e}catch(kn){o("warn","at utils/dictOfKeyboard.js:189","异常:",kn)}n(a)}))}(e,["a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z"]),e=await function(e,t,n){return new Promise(((r,a)=>{let i=[];try{e.forEach((function(e,o,r){t.forEach((function(t,a,i){e===t&&(r[o]=n[a])}))})),i=e}catch(kn){o("warn","at utils/dictOfKeyboard.js:210","异常:",kn)}r(i)}))}(e,["multiply","divide","add","subtract","decimal_point"],["*","/","+","-","."]),o("log","at utils/dictOfKeyboard.js:140","result 最后结果: ",e.join("")),e.join("")||""}};const Zo={resetOXPrintInfo:function(e){let t=[],o="-------------------------------\n";t.push(o);for(let n of e.goods_data){let e=n.name+";"+n.nums+";"+n.price+";"+(n.price*n.nums).toFixed(2);t.push(e)}return t.push(o),t.push(`金额合计:${e.amount||"-"}\n`),t.push(`交易时间:${e.time||"-"}\n`),t.push(`订单号:${e.order_no||"-"}\n`),t.push(`门店:${e.venue_name||"-"}\n`),t},testPrintInfo:{goods_data:[{id:31,name:"南瓜1Kg",nums:1,price:.01,unit:"个"},{id:32,name:"乔丹篮球",nums:2,price:.01,unit:"个"}],amount:.03}};let en=getApp();const tn=r({components:{"page-standby":Wo,"keyboard-listener":Yo},watch:{},computed:{shopListTotalPrice(){let e=0;return!this.shopList||this.shopList.length<1?0:(this.shopList.forEach((t=>{e+=t.shopCountPrice})),e)},shopListTotalCount(){let e=0;return!this.shopList||this.shopList.length<1?0:(this.shopList.forEach((t=>{e+=t.shopCount})),e)}},data:()=>({showQRInputBox:!1,showEndPhoneBox:!1,screenHeight:"",footerHeight:"",globalData:"",shopList:[],decryptList:[],strResult:""}),async onLoad(e){o("log","at pages/index/standby.vue:79","onload:",e)},async onReady(){o("log","at pages/index/standby.vue:86","the index page onReady----"+this.screenHeight,uni.getStorage("stadiumInfo")),en=getApp(),setTimeout((async()=>{}),100)},methods:{async setTestSku(){o("log","at pages/index/standby.vue:96","Test set SKU 10000012");let e=await this.searchGoodBySku("10000012");this.shopList=this.shopList.concat(e)},searchGoodBySku:async e=>{let{brand_id:t,stadium_id:n,token:r}=Qo.getPostParams(),a={brand_id:t,token:r,stadium_id:n,sku:e};return o("log","at pages/index/standby.vue:106","searchGoodBySku urlParams:",a),qo.post({url:To.getGoodsBySKU,data:a,isDefaultGet:!0,failMsg:"操作失败!"}).then((e=>(Qo.hideLoad(),o("log","at pages/index/standby.vue:116","searchGoodBySku suc: ",e),(e=[e]).forEach((e=>{e.shopCount=1,e.shopCountPrice=e.user_price})),e)))},combinedList(e,t){if(o("log","at pages/index/standby.vue:129","combinedList",e,t),!t)return Qo.showNone("未找到商品");let n=e;return t.forEach((e=>{let t=n.findIndex((t=>t.id==e.id));-1!=t?(n[t].shopCount+=1,n[t].shopCountPrice=n[t].user_price*n[t].shopCount):n.push(e)})),n},async onKeyup(e){o("log","at pages/index/standby.vue:147","按键松开: ",e);let t=Xo.dict[e.keyCode];if(o("log","at pages/index/standby.vue:150","keyCode from keyboard:",t),this.decryptList.push(t),13!=e.keyCode)return o("log","at pages/index/standby.vue:153","继续接收:",this.decryptList);this.decryptList.pop(),this.strResult=await Xo.resultScan(this.decryptList),o("log","at pages/index/standby.vue:157","扫码结果-step-1:",this.strResult),this.orderQrcode=this.strResult,o("log","at pages/index/standby.vue:159","decryptList-before-splice: ",this.decryptList),this.decryptList.splice(0),o("log","at pages/index/standby.vue:161","decryptList-after-splice: "+this.decryptList),-1!=this.strResult.indexOf("down_arrow")&&(this.strResult=this.strResult.replace("down_arrow","")),o("log","at pages/index/standby.vue:167","扫码结果-step-2:",this.strResult),await this.searchGoodBySku(this.strResult).then((e=>(o("log","at pages/index/standby.vue:170","searchGoodBySku suc: ",e),e))).then((e=>{this.addSkuListToShopList(e)})).catch((e=>{var t;o("log","at pages/index/standby.vue:176","searchGoodBySku err: ",e),Qo.showNone((null==(t=e.res.data)?void 0:t.message)||"未找到商品-s")}))},addSkuListToShopList(e){o("log","at pages/index/standby.vue:187","addSkuListToShopList",e),e=encodeURIComponent(JSON.stringify(e)),uni.reLaunch({url:`/pages/index/index?skulist=${e}`,animationType:"zoom-fade-out",animationDuration:300})},onKeydown(e){},getGoodFromPad:(e,t)=>qo.post({url:To.getGoodFromPad,data:{sku:e,brand_id:t},isDefaultGet:!0}).then((e=>(Qo.hideLoad(),e.data.code,e))),async updateGoodsList(){let e=await this.getGoodsList();o("log","at pages/index/standby.vue:221","app.globaldata: ",en.globalData),en.globalData.goodsList=e},updateShopList(){en.globalData.shopList=this.shopList},getGoodsList(){let{brand_id:e,stadium_id:t,token:n}=Qo.getPostParams(),r={brand_id:e,stadium_id:t,token:n,type_key:"",key:"",page:"1",page_size:"9999",is_sale:"1",is_show_on_assistant:"1"};return qo.post({url:To.getGoodsList,data:r,isDefaultGet:!0,failMsg:"获取商品列表失败"}).then((e=>(Qo.hideLoad(),o("log","at pages/index/standby.vue:252","getGoodsList suc: ",e),e.list&&0!=e.list.length?(e.list.forEach((e=>{e.shopCount=1,e.shopCountPrice=e.user_price})),e):uni.showModal({title:"提示",content:"该门店暂无商品,请尝试更换门店",success:function(e){e.confirm?(o("log","at pages/index/standby.vue:260","用户点击确定"),Qo.routeTo("/pages/login/index","rL")):e.cancel&&o("log","at pages/index/standby.vue:263","用户点击取消")}}))))}}},[["render",function(t,o,n,r,a,i){const s=e.resolveComponent("page-standby"),l=e.resolveComponent("keyboard-listener");return e.openBlock(),e.createElementBlock("view",null,[e.createVNode(s),e.createVNode(l,{style:{height:"1px"},onKeyup:i.onKeyup,onKeydown:i.onKeydown},null,8,["onKeyup","onKeydown"])])}]]),on=r({__name:"view_header",props:{backgroundCustom:{type:String,default:"#F5F7F8"},needBorder:{type:Boolean,default:!0}},emits:["closeUse"],setup(t,{emit:o}){const n=t,r=e.ref(300);let a=e.ref(null);e.onMounted((async e=>{clearInterval(a),a=null,a=setInterval((()=>{r.value--,r.value<=1&&(clearInterval(a),a=null,Qo.routeTo("/pages/index/standby","rL"))}),1e3)})),e.onBeforeUnmount((()=>{clearInterval(a),a=null})),e.onUnmounted((()=>{clearInterval(a),a=null}));const i=e.computed((()=>n.needBorder?"border-bottom: 1rpx solid #F5F7F8;":"border-bottom:none;")),s=()=>{Qo.routeTo("/pages/index/standby","rL")};return(t,o)=>(e.openBlock(),e.createElementBlock("view",{class:"header-box",style:e.normalizeStyle([{background:n.backgroundCustom},e.unref(i)])},[e.createElementVNode("view",{class:"video-tip"},[e.createElementVNode("image",{class:"v-image",src:"/static/index/camera_icon2.png",mode:"widthFix"}),e.createElementVNode("text",{class:"v-text"},"您已进入视频覆盖区")]),e.createElementVNode("view",{class:"cancel-button",onClick:s},[e.createElementVNode("text",{class:"v-text"},e.toDisplayString(r.value)+" 取消交易",1)])],4))}},[["__scopeId","data-v-9163470a"]]),nn=r({__name:"view_footer",props:{maskHeight:{type:Number,default:200},tolCount:{type:Number,default:0},tolPrice:{type:Number,default:0}},emits:["clickQR","clickVIP","clickToPay"],setup(t,{emit:o}){let n=e.ref(!1);e.ref(""),e.ref("");let r=()=>{o("clickQR","")},a=()=>{o("clickToPay","")};return e.onMounted((async e=>{})),(o,i)=>(e.openBlock(),e.createElementBlock("view",{class:"footer-box"},[e.unref(n)?(e.openBlock(),e.createElementBlock("view",{key:0,class:"f-user"},[e.createElementVNode("text",{class:"txt"},"猫星人(18316553589)")])):e.createCommentVNode("",!0),e.unref(n)?(e.openBlock(),e.createElementBlock("view",{key:1,class:"f-line"})):e.createCommentVNode("",!0),e.unref(n)?(e.openBlock(),e.createElementBlock("view",{key:2,class:"f-vip-info"},[e.createElementVNode("view",{class:"f-coupon"},[e.createElementVNode("text",{class:"txt1"},"优惠券:"),e.createElementVNode("text",{class:"txt2"},"-¥"),e.createElementVNode("text",{class:"txt3"},"6.00 "),e.createElementVNode("image",{class:"img",src:"/static/index/orange_arrow_right.png",mode:"scaleToFill"})]),e.createElementVNode("view",{class:"f-score"},[e.createElementVNode("text",{class:"txt1"},"积分:"),e.createElementVNode("text",{class:"txt2"},"-¥"),e.createElementVNode("text",{class:"txt3"},"2.00 "),e.createElementVNode("image",{class:"img",src:"/static/index/orange_arrow_right.png",mode:"scaleToFill"})])])):e.createCommentVNode("",!0),e.createElementVNode("view",{class:"f-buy-info"},[e.createElementVNode("view",{class:"fi-area"},[e.createElementVNode("view",{class:"f-total-price"},[e.createElementVNode("text",{class:"txt1"},"应付:"),e.createElementVNode("text",{class:"txt2"},"¥"),e.createElementVNode("text",{class:"txt3"},e.toDisplayString(t.tolPrice.toFixed(2)||"0.00"),1)]),e.createElementVNode("text",{class:"txt_middle"},"|"),e.createElementVNode("view",{class:"f-total-count"},[e.createElementVNode("text",{class:"txt"},"商品:"),e.createElementVNode("text",{class:"txt"},e.toDisplayString(t.tolCount),1)])]),e.createElementVNode("view",{class:"fi-choose"},[e.createElementVNode("view",{class:"qr-box",onClick:i[0]||(i[0]=(...t)=>e.unref(r)&&e.unref(r)(...t))},[e.createElementVNode("image",{class:"qr-img",src:"/static/index/qr_icon.png",mode:"scaleToFill"}),e.createElementVNode("text",{class:"txt"},"输入条形码")])])]),e.createElementVNode("view",{class:"btn-style",onClick:i[1]||(i[1]=(...t)=>e.unref(a)&&e.unref(a)(...t))},[e.createElementVNode("text",{class:"txt"},"去付款")])]))}},[["__scopeId","data-v-3aed5e99"]]),rn=r({__name:"list_item",props:["mkey","mitem"],emits:["delItem","addItem","minusItem"],setup(t,{emit:o}){const n=t;e.onMounted((async e=>{}));const r=()=>{o("addItem",n.mkey)},a=()=>{o("minusItem",n.mkey)},i=()=>{o("delItem",n.mkey)};return(o,n)=>{var s;return e.openBlock(),e.createElementBlock("view",{class:"buy-item"},[e.createElementVNode("view",{class:"buy-item-left"},[e.createElementVNode("image",{class:"img",src:t.mitem.goods_img||"-",mode:"aspectFill"},null,8,["src"])]),e.createElementVNode("view",{class:"buy-item-right"},[e.createElementVNode("view",{class:"br-top"},[e.createElementVNode("text",{class:"brt-title"},e.toDisplayString(t.mitem.goods_name||"-"),1),e.createElementVNode("image",{class:"img",src:"/static/index/delete_icon.png",mode:"scaleToFill",onClick:i})]),e.createElementVNode("view",{class:"br-bottom"},[e.createElementVNode("view",{class:"brb-left"},[e.createElementVNode("text",{class:"brb-specs"},e.toDisplayString((null==(s=t.mitem.erp_goods)?void 0:s.erp_goods_specs)||"-"),1),e.createElementVNode("view",{class:"brb-price"},[e.createElementVNode("text",{class:"brbp-single-price"},"¥"+e.toDisplayString(t.mitem.user_price||"-"),1),t.mitem.underlined_price_show?(e.openBlock(),e.createElementBlock("text",{key:0,class:"brbp-underline-price"},"¥"+e.toDisplayString(t.mitem.underlined_price||"-"),1)):e.createCommentVNode("",!0)])]),e.createElementVNode("view",{class:"brb-middle"},[e.createElementVNode("image",{class:"img",src:"/static/index/del_icon.png",mode:"scaleToFill",onClick:a}),e.createElementVNode("text",{class:"txt"},e.toDisplayString(t.mitem.shopCount||1),1),e.createElementVNode("image",{class:"img",src:"/static/index/add_icon.png",mode:"scaleToFill",onClick:r})]),e.createElementVNode("view",{class:"brb-right"},[e.createElementVNode("view",{class:"brbr-total-price"},[e.createElementVNode("text",{class:"brbrp-price1"},"¥"),e.createElementVNode("text",{class:"brbrp-price2"},e.toDisplayString(t.mitem.shopCountPrice.toFixed(2)||"-"),1)])])])])])}}},[["__scopeId","data-v-8cfd2fb1"]]),an=r({__name:"view_keyboard",props:{maxInput:{type:Number,default:20}},emits:["inputValueUpdate"],setup(t,{emit:n}){const r=t;let a=e.ref(""),i=e.ref("");e.onMounted((async e=>{}));const s=e=>11==e?"num-btn-last-child":"num-btn",l=e=>e<=9?e:10==e?"0":11==e?"":void 0,c=Qo.debounce((e=>{if(o("log","at components/index/keyboard/view_keyboard.vue:50","clickKeyboard:",e),i.value=e,setTimeout((()=>{i.value=""}),100),11==e)a.value=a.value.substring(0,a.value.length-1);else{if(a.value.length>=r.maxInput)return Qo.showNone(`最多输入${r.maxInput}位`);a.value+=l(e)}n("inputValueUpdate",a.value)}),20,!0);return(t,o)=>(e.openBlock(),e.createElementBlock("view",{class:"i-keyboard"},[(e.openBlock(),e.createElementBlock(e.Fragment,null,e.renderList(11,(t=>e.createElementVNode("view",{class:e.normalizeClass(["num-btn",[s(t),{"active-value":e.unref(i)==t}]]),onClick:o=>e.unref(c)(t)},[t<11?(e.openBlock(),e.createElementBlock("text",{key:0,class:"txt"},e.toDisplayString(l(t)),1)):(e.openBlock(),e.createElementBlock("image",{key:1,class:"img",src:"/static/index/del_btn.png",mode:"widthFix"}))],10,["onClick"]))),64))]))}},[["__scopeId","data-v-29de367a"]]),sn=r({__name:"input_box_QR",props:{maskHeight:{type:Number,default:1200},maxInput:{type:Number,default:20}},emits:["showIt","clickCommit"],setup(t,{emit:n}){const r=t;let a=e.ref(""),i=e.ref(!1);e.onMounted((async e=>{o("log","at components/index/keyboard/input_box_QR.vue:58"," the keyboard_box component is now mounted. ",app.globalData)}));const s=()=>{n("showIt","false")},l=async()=>{o("log","at components/index/keyboard/input_box_QR.vue:65","handle_clickCommit"),await u(a.value).then((e=>{let t=a.value;n("clickCommit",{inputCode:t,goods:e})})).catch((e=>{o("error","at components/index/keyboard/input_box_QR.vue:71","searchGoodBySku err:",e),i.value=!0}))},c=e=>{o("log","at components/index/keyboard/input_box_QR.vue:76","accept_inputValueClick:",e),a.value=e,a.value.length>0&&(i.value=!1)},u=async e=>{let{brand_id:t,stadium_id:n,token:r}=Qo.getPostParams(),a={brand_id:t,token:r,stadium_id:n,sku:e};return o("log","at components/index/keyboard/input_box_QR.vue:105","searchGoodBySku urlParams:",a),qo.post({url:To.getGoodsBySKU,data:a,isDefaultGet:!0,failMsg:"操作失败!"}).then((e=>(Qo.hideLoad(),o("log","at components/index/keyboard/input_box_QR.vue:115","searchGoodBySku suc: ",e),(e=[e]).forEach((e=>{e.shopCount=1,e.shopCountPrice=e.user_price})),e)))};return(t,o)=>(e.openBlock(),e.createElementBlock("view",{class:"keyboard-box",style:e.normalizeStyle({height:r.maskHeight+"px"}),onTouchmove:o[0]||(o[0]=e.withModifiers((()=>{}),["prevent"])),onClick:o[1]||(o[1]=e.withModifiers((()=>{}),["stop"]))},[e.createElementVNode("view",{class:"kb-area"},[e.createElementVNode("image",{class:"del-icon",src:"/static/index/del_icon_big.png",mode:"aspectFit",onClick:s}),e.createElementVNode("text",{class:"txt-title"},"输入条形码"),e.createElementVNode("view",{class:e.normalizeClass(["txt-input",{"err-border":e.unref(i)}])},[e.createElementVNode("text",{class:e.normalizeClass(["txt",""==a.value?"txt-blank":"txt-write"])},e.toDisplayString(e.unref(a)||"请输入条形码"),3)],2),e.unref(i)?(e.openBlock(),e.createElementBlock("text",{key:0,class:"txt-err-tip"},"查询不到该条形码商品信息, 请检查是否有误")):e.createCommentVNode("",!0),e.createElementVNode("view",{class:"input-keyboard"},[e.createVNode(an,{maxInput:r.maxInput,onInputValueUpdate:c,onCheckRes:t.handle_checkRes},null,8,["maxInput","onCheckRes"]),e.createElementVNode("view",{class:"sure-btn",onClick:l},[e.createElementVNode("text",{class:"txt"},"确定")])])])],36))}},[["__scopeId","data-v-f4ed6973"]]),ln=r({__name:"input_box_end_phone",props:{maskHeight:{type:Number,default:1200},maxInput:{type:Number,default:4}},emits:["showIt","clickCommit"],setup(t,{emit:n}){const r=t;let a=e.ref("");e.onMounted((async e=>{o("log","at components/index/keyboard/input_box_end_phone.vue:58","the input_box_end_phone component is now mounted. "+r.maskHeight)}));const i=()=>{n("showIt","false")},s=()=>{n("clickCommit",a.value)},l=e=>{o("log","at components/index/keyboard/input_box_end_phone.vue:68","accept_inputValueClick:",e),a.value=e.split(""),o("log","at components/index/keyboard/input_box_end_phone.vue:70","inputValue:",a.value)};return(t,o)=>(e.openBlock(),e.createElementBlock("view",{class:"keyboard-box",style:e.normalizeStyle({height:r.maskHeight+"px"}),onTouchmove:o[0]||(o[0]=e.withModifiers((()=>{}),["prevent"])),onClick:o[1]||(o[1]=e.withModifiers((()=>{}),["stop"]))},[e.createElementVNode("view",{class:"kb-area"},[e.createElementVNode("image",{class:"del-icon",src:"/static/index/del_icon_big.png",mode:"aspectFit",onClick:i}),e.createElementVNode("text",{class:"txt-title"},"请输入手机尾号后4位数验证"),e.createElementVNode("view",{class:"end-phone-input"},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r.maxInput,(t=>(e.openBlock(),e.createElementBlock("view",{class:"epi-box"},[e.createElementVNode("text",{class:"epi-txt"},e.toDisplayString(e.unref(a)[t-1]),1)])))),256))]),e.createElementVNode("view",{class:"input-keyboard"},[e.createVNode(an,{maxInput:r.maxInput,onInputValueUpdate:l},null,8,["maxInput"]),e.createElementVNode("view",{class:"sure-btn",onClick:s},[e.createElementVNode("text",{class:"txt"},"确定")])])])],36))}},[["__scopeId","data-v-e9eab441"]]);let cn="";const un=r({components:{"page-standby":Wo,"view-header":on,"view-footer":nn,"list-item":rn,"input-qr-box":sn,"input-box-end-phone":ln,"keyboard-listener":Yo},watch:{},computed:{shopListTotalPrice(){let e=0;return!this.shopList||this.shopList.length<1?0:(this.shopList.forEach((t=>{e+=t.shopCountPrice})),e)},shopListTotalCount(){let e=0;return!this.shopList||this.shopList.length<1?0:(this.shopList.forEach((t=>{e+=t.shopCount})),e)}},data:()=>({showQRInputBox:!1,showEndPhoneBox:!1,screenHeight:"",footerHeight:"",globalData:"",shopList:[],decryptList:[],strResult:""}),async onLoad(e){o("log","at pages/index/index.vue:124","onload:",e),this.clearShopList(),e.skulist&&this.acceptSKUList(e.skulist)},async onReady(){this.screenHeight=await Qo.getPageHeight(),o("log","at pages/index/index.vue:136","the index page onReady----"+this.screenHeight),cn=getApp(),setTimeout((async()=>{this.setFooterHeight()}),1e3)},methods:{searchGoodBySku:async e=>{Qo.showLoad();let{brand_id:t,stadium_id:n,token:r}=Qo.getPostParams(),a={brand_id:t,token:r,stadium_id:n,sku:e};return o("log","at pages/index/index.vue:154","searchGoodBySku urlParams:",a),qo.post({url:To.getGoodsBySKU,data:a,isDefaultGet:!0,failMsg:"操作失败!"}).then((e=>(Qo.hideLoad(),o("log","at pages/index/index.vue:164","searchGoodBySku suc: ",e),(e=[e]).forEach((e=>{e.shopCount=1,e.shopCountPrice=e.user_price})),Qo.hideLoad(),e))).finally((()=>{Qo.hideLoad()}))},clearShopList(){o("log","at pages/index/index.vue:179","clearShopList"),this.shopList=[]},acceptSKUList(e){o("log","at pages/index/index.vue:184","acceptSKUList:",e=JSON.parse(decodeURIComponent(e))),e&&e.length>0&&(this.shopList=this.combinedList(this.shopList,e))},acceptSKUListFromGlobalData(){let e=cn.globalData.skulist;o("log","at pages/index/index.vue:189","acceptSKUListFromGlobalData:",e),this.shopList=this.combinedList(this.shopList,e)},async setTestSku(){o("log","at pages/index/index.vue:193","Test set SKU 10000012");let e=await this.searchGoodBySku("6934024512123");this.shopList=this.shopList.concat(e)},async clickToPay(){let e={shopList:this.shopList.map((e=>({id:e.id,name:e.goods_name,price:e.user_price,nums:e.shopCount,unit:e.erp_goods.erp_goods_unit}))),shopListTotalPrice:this.shopListTotalPrice.toFixed(2),shopListTotalCount:this.shopListTotalCount};if(o("log","at pages/index/index.vue:224","clickToPay",e),this.shopListTotalPrice<=0)return Qo.showNone("请先添加商品");Qo.showLoad(),await this.makeOrder(e).then((t=>{Qo.hideLoad(),t.order_no?(e.order_no=t.order_no,Qo.routeTo(`/pages/pay/index?query=${JSON.stringify(e)}`,"rL")):Qo.showNone(t.message||t.msg||"error:生成订单失败"),o("log","at pages/index/index.vue:238",t)})).catch((e=>{Qo.hideLoad(),o("log","at pages/index/index.vue:241",e),Qo.showNone(e)}))},async makeOrder(e){let{brand_id:t,token:n}=getApp().globalData.accountInfo,r=uni.getStorageSync("stadiumInfo").id||"",a={goods_data:e.shopList,amount:e.shopListTotalPrice},{goods_data:i,amount:s}=a;t=parseInt(t),s=parseFloat(s);let l={store_id:r,brand_id:t,token:n,amount:s,goods_data:i,pay_type:7,other_pay_type:"付款码支付",card_no:"",mark:""};return o("log","at pages/index/index.vue:266","makeOrder urlParams:",l),qo.post({url:To.makeOrder,data:l,isDefaultGet:!0,failMsg:"操作失败!"}).then((e=>(Qo.hideLoad(),o("log","at pages/index/index.vue:276","makeOrder suc: ",e),e)))},clickToUse(){Qo.routeTo("/pages/login/success","nT")},handle_closeStandby(e){o("log","at pages/index/index.vue:284","handle_closeSetting",e),this.showPageStandby=!this.showPageStandby},handle_closeQRInputBox(e){o("log","at pages/index/index.vue:288","handle_closeKeyboardBox",e),this.showQRInputBox=!this.showQRInputBox},handle_closeEndPhoneBox(e){o("log","at pages/index/index.vue:292","handle_closeEndPhoneBox",e),this.showEndPhoneBox=!this.showEndPhoneBox},handle_clickQR(){this.showQRInputBox=!this.showQRInputBox},handle_clickCommit_qr(e){o("log","at pages/index/index.vue:300","handle_clickCommit_qr",typeof e.goods,e),o("log","at pages/index/index.vue:302",JSON.stringify(e.goods)),Qo.showNone("添加商品成功,数量:"+e.goods.length+"个"),e.goods&&e.goods.length>0&&(this.shopList=this.combinedList(this.shopList,e.goods)),this.showQRInputBox=!this.showQRInputBox},handle_clickVIP(){Qo.showNone("会员登录"),this.showEndPhoneBox=!this.showEndPhoneBox},combinedList(e,t){if(o("log","at pages/index/index.vue:318","combinedList",e,t),!t)return Qo.showNone("未找到商品");let n=e,r=[],a=[];return t.forEach((e=>{let t=n.findIndex((t=>t.id==e.id));-1!=t?this.checkStock(n[t])?this.handle_add(t):(e.shopCount=1,r.push(e)):a.push(e)})),n.push(...a),o("log","at pages/index/index.vue:341","_list_cannot_add:",r),r.length>0&&Qo.showNone("存在库存不足商品"),n},async setFooterHeight(){o("log","at pages/index/index.vue:348","Auto setFooterHeight")},async onKeyup(e){let t=Xo.dict[e.keyCode];if(this.decryptList.push(t),13!=e.keyCode)return void o("log","at pages/index/index.vue:368","继续接收:",this.decryptList);this.decryptList.pop(),this.strResult=await Xo.resultScan(this.decryptList),this.orderQrcode=this.strResult,this.decryptList.splice(0),-1!=this.strResult.indexOf("down_arrow")&&(this.strResult=this.strResult.replace("down_arrow",""));let n=await this.searchGoodBySku(this.strResult).then((e=>(o("log","at pages/index/index.vue:386","searchGoodBySku suc: ",e),e))).catch((e=>{var t;o("log","at pages/index/index.vue:389","searchGoodBySku err: ",e),Qo.showNone((null==(t=e.res.data)?void 0:t.message)||"未找到商品-i")}));n&&n.length>0&&(this.shopList=this.combinedList(this.shopList,n))},onKeydown(e){},handle_add(e){if(o("log","at pages/index/index.vue:404","handle_add",e),!this.checkStock(this.shopList[e]))return Qo.showNone("该商品库存不足");this.shopList[e].shopCount++,this.shopList[e].shopCountPrice=(this.shopList[e].user_price||0)*this.shopList[e].shopCount},handle_minus(e){o("log","at pages/index/index.vue:411","handle_minus",e),this.shopList[e].shopCount>1?(this.shopList[e].shopCount--,this.shopList[e].shopCountPrice=(this.shopList[e].user_price||0)*this.shopList[e].shopCount):Qo.showNone("商品数量不能小于1")},checkStock:e=>e.erp_goods.stock_num-(e.shopCount||0)>=1,handle_del(e){o("log","at pages/index/index.vue:428","handle_del",e),this.shopList.splice(e,1),Qo.showNone("删除成功")},test(){o("log","at pages/index/index.vue:452","test");let e=Qo.getUrlParams("https://testmanager.ouxuanzhineng.cn/admin/erpRetailGoods/list?brand_id=63&stadium_id=167&type_key=&key=&page=1&page_size=9999&is_sale=1&is_show_on_assistant=1&token=e6cabeae-0c1a-11ee-aa40-5254005df464");return o("log","at pages/index/index.vue:457","urlParams:",e),qo.post({url:To.getGoodsList,data:e,isDefaultGet:!1}).then((e=>(o("log","at pages/index/index.vue:464","test suc: ",e),e)))},getGoodFromPad:(e,t)=>qo.post({url:To.getGoodFromPad,data:{sku:e,brand_id:t},isDefaultGet:!0}).then((e=>(Qo.hideLoad(),e.data.code,e))),async updateGoodsList(){let e=await this.getGoodsList();o("log","at pages/index/index.vue:491","app.globaldata: ",cn.globalData),cn.globalData.goodsList=e},updateShopList(){cn.globalData.shopList=this.shopList},getGoodsList(){let{brand_id:e,stadium_id:t,token:n}=Qo.getPostParams(),r={brand_id:e,stadium_id:t,token:n,type_key:"",key:"",page:"1",page_size:"9999",is_sale:"1",is_show_on_assistant:"1"};return qo.post({url:To.getGoodsList,data:r,isDefaultGet:!0,failMsg:"获取商品列表失败"}).then((e=>(Qo.hideLoad(),o("log","at pages/index/index.vue:528","getGoodsList suc: ",e),e.list.forEach((e=>{e.shopCount=1,e.shopCountPrice=e.user_price})),e)))}}},[["render",function(t,o,n,r,a,i){const s=e.resolveComponent("view-header"),l=e.resolveComponent("list-item"),c=e.resolveComponent("view-footer"),u=e.resolveComponent("input-qr-box"),p=e.resolveComponent("input-box-end-phone"),d=e.resolveComponent("keyboard-listener");return e.openBlock(),e.createElementBlock("view",{class:"main-page"},[e.createElementVNode("view",null,[e.createVNode(s,{class:"mheader",onCloseStandby:i.handle_closeStandby},null,8,["onCloseStandby"]),e.createElementVNode("view",{class:"holdplace",style:{height:"100rpx"}}),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.shopList,((t,o)=>(e.openBlock(),e.createBlock(l,{key:o,mkey:o,mitem:t,onAddItem:i.handle_add,onMinusItem:i.handle_minus,onDelItem:i.handle_del},null,8,["mkey","mitem","onAddItem","onMinusItem","onDelItem"])))),128)),e.createElementVNode("view",{class:"holdplace",style:{height:"340rpx"}}),(e.openBlock(),e.createElementBlock("view",{key:0,ref:"mfooter",class:"mfooter"},[e.createVNode(c,{tolPrice:i.shopListTotalPrice,tolCount:i.shopListTotalCount,onClickQR:i.handle_clickQR,onClickVIP:i.handle_clickVIP,onClickToPay:i.clickToPay},null,8,["tolPrice","tolCount","onClickQR","onClickVIP","onClickToPay"])],512)),a.showQRInputBox?(e.openBlock(),e.createBlock(u,{key:1,maskHeight:a.screenHeight,maxInput:20,onShowIt:i.handle_closeQRInputBox,onClickCommit:i.handle_clickCommit_qr},null,8,["maskHeight","onShowIt","onClickCommit"])):e.createCommentVNode("",!0),a.showEndPhoneBox?(e.openBlock(),e.createBlock(p,{key:2,maskHeight:a.screenHeight,maxInput:4,onShowIt:i.handle_closeEndPhoneBox,onClickCommit:i.handle_clickCommit_qr},null,8,["maskHeight","onShowIt","onClickCommit"])):e.createCommentVNode("",!0)]),e.createVNode(d,{style:{height:"1px"},onKeyup:i.onKeyup,onKeydown:i.onKeydown},null,8,["onKeyup","onKeydown"])])}],["__scopeId","data-v-c029d088"]]),pn=r({__name:"paying",props:{payTotal:{type:Number,default:0}},emits:["clickVipCard"],setup:(t,{emit:o})=>(o,n)=>(e.openBlock(),e.createElementBlock("view",{class:"paying-box"},[e.createElementVNode("text",{class:"p-text"},"支付金额"),e.createElementVNode("text",{class:"p-total"},"¥"+e.toDisplayString(t.payTotal||"0.00"),1),e.createElementVNode("view",{class:"p-zhichi"},[e.createElementVNode("view",{class:"p-line"}),e.createElementVNode("text",{class:"p-words"},"支持以下付款方式"),e.createElementVNode("view",{class:"p-line"})]),e.createElementVNode("view",{class:"p-icons"},[e.createElementVNode("image",{class:"p-image-pay-icon",src:"/static/pay/wx-icon.png",mode:"widthFix"}),e.createElementVNode("image",{class:"p-image-pay-icon",src:"/static/pay/zfb-icon.png",mode:"widthFix"})]),e.createElementVNode("image",{class:"p-image-pay-picture",src:"/static/pay/pay-picture.png",mode:"widthFix"}),e.createElementVNode("text",{class:"p-tips"},"请将付款码对准右下方扫码口"),e.createElementVNode("view",{class:"p-user"})]))},[["__scopeId","data-v-69c546ef"]]),dn=r({__name:"success",props:{paySuccessInfo:{type:Object,default:{amount:0,goods_data:[]}}},emits:["clickToIndex","clickOpenDoor"],setup(t,{emit:n}){const r=t;let a=e.ref(!0);const i=e.ref(30);let s=e.ref(null);e.onMounted((async e=>{clearInterval(s),s=null,s=setInterval((()=>{i.value--,i.value<=1&&(clearInterval(s),s=null,Qo.routeTo("/pages/index/standby","rL"))}),1e3),a.value=uni.getStorageSync("showGateBtn")||!1,o("log","at components/pay/success.vue:106","setDoorBtnStatus",a)})),e.onBeforeUnmount((()=>{clearInterval(s),s=null})),e.onUnmounted((()=>{clearInterval(s),s=null}));let l=e.computed((()=>{if(!r.paySuccessInfo.goods_data)return 0;let e=r.paySuccessInfo.goods_data,t=0;for(let o=0;o{n("clickToIndex",""),Qo.routeTo("/pages/index/standby","rL")},u=()=>{o("log","at components/pay/success.vue:115","handle_clickOpenDoor"),n("clickOpenDoor","")};return(o,n)=>(e.openBlock(),e.createElementBlock("view",{class:"success-box"},[e.createElementVNode("view",{class:"s-bg"}),e.createElementVNode("view",{class:"s-header"},[e.createElementVNode("view",{class:"video-tip"},[e.createElementVNode("image",{class:"v-image",src:"/static/index/camera_icon.png",mode:"widthFix"}),e.createElementVNode("text",{class:"v-text"},"您已进入视频覆盖区")])]),e.createElementVNode("view",{class:"s-content"},[e.createElementVNode("view",{class:"sc-title"},[e.createElementVNode("view",{class:"sc-success"},[e.createElementVNode("image",{class:"sc-check-icon",src:"/static/pay/check-icon.png",mode:"acepectFit"}),e.createElementVNode("view",null,"支付成功")]),e.createElementVNode("view",{class:"sc-total"},"¥"+e.toDisplayString(t.paySuccessInfo.amount||"0.00"),1)]),e.createElementVNode("text",{class:"sc-num"},[e.createTextVNode("共 "),e.createElementVNode("text",null,e.toDisplayString(e.unref(l)||"0"),1),e.createTextVNode(" 件商品")]),e.createElementVNode("text",{class:"sc-tip-1"},"请领取小票,期待下次光临!"),e.createElementVNode("image",{class:"sc-print-img",src:"/static/pay/print-img.png",mode:"acepectFit"}),e.createElementVNode("view",{class:"sc-btn",onClick:c},[e.createElementVNode("text",{class:"scb-txt-1"},"返回首页"),e.createElementVNode("text",{class:"scb-txt-2"},e.toDisplayString(i.value)+"s",1)]),e.unref(a)?(e.openBlock(),e.createElementBlock("view",{key:0,class:"sc-btn sc-btn-active",onClick:u},[e.createElementVNode("text",{class:"scb-txt-1"},"开门"),e.createElementVNode("text",{class:"scb-txt-2"})])):e.createCommentVNode("",!0)])]))}},[["__scopeId","data-v-bff1c04e"]]),fn=t("OX_Pad_Printer");const gn=r({components:{"view-header":on,"input-box-end-phone":ln,paying:pn,"pay-success":dn,"input-qr-box":sn,"keyboard-listener":Yo},computed:{payTotal(){return this.dataQuery.amount||0||"0.00"}},watch:{},data:()=>({showPageStandby:!1,showEndPhoneBox:!1,screenHeight:"1000",footerHeight:"",paySuccessStatus:0,decryptList:[],strResult:"",dataQuery:"",reCheckOrderCount:0,reCheckOrderCountMax:30}),async onLoad(e){o("log","at pages/pay/index.vue:76","pay onload:",e),e&&this.setPayData(e)},async onReady(){await this.setPageHeight()},onUnload(){this.clearMakeOrder()},methods:{testAcceptScanCode(){uni.showModal({title:"模拟扫码",content:"模拟扫码,点确定时执行acceptScanCode",showCancel:!0,confirmText:"确定",success:e=>{e.confirm&&(o("log","at pages/pay/index.vue:100","用户点击确定"),this.acceptScanCode("282659672061313993"))}})},setPayData(e){o("log","at pages/pay/index.vue:107","setPayData:",e),o("log","at pages/pay/index.vue:110","setPayData1:",e=JSON.parse(e.query));let t={goods_data:e.shopList,amount:e.shopListTotalPrice,order_no:e.order_no};o("log","at pages/pay/index.vue:116","setPayData2:",t),this.dataQuery=t},getPayType(e){let t="";return t=0==e.indexOf("10")||0==e.indexOf("11")||0==e.indexOf("12")||0==e.indexOf("13")||0==e.indexOf("14")||0==e.indexOf("15")?"WECHAT_MICROPAY":0==e.indexOf("28")?"ALI_BARCODEPAY":null,t},async preMakeOrder(){var e;if(this.makeInfo=await this.makeOrder(),!(null==(e=this.makeInfo)?void 0:e.order_no))return Qo.showNone("生成订单失败,请重新下单!")},clearMakeOrder(){this.makeInfo=null},async acceptScanCode(e){var t;o("log","at pages/pay/index.vue:140","acceptScanCode:",e),Qo.showLoad("交易处理中...");let n=e,r=this.getPayType(n);if(null==r)return void Qo.showNone("支付类型未知,请重试!");let a=(null==(t=this.dataQuery)?void 0:t.order_no)||"";if(!a)return Qo.showNone("支付失败,请重新下单!01");await this.payOrder({order_no:a,pay_code:n,pay_type:r}).then((e=>(o("log","at pages/pay/index.vue:168","payInfo-result:",e),this.checkOrder(e)))).then((async e=>{o("log","at pages/pay/index.vue:171","最终checkInfo:",e);let{payRes:t,checkRes:n}=e;if("1"==n.pay_order.status)Qo.showNone(n.res.respMsg),this.paySuccessStatus=1,this.printOrder(e);else{n.res.respMsg||n.res.respCode;let{orderStatus:t,requestDate:r,respCode:a,respMsg:i,tradeNo:s,transNo:l}=n.res;"PROCESSING"==t?(o("log","at pages/pay/index.vue:186","等待支付中,需要继续查询支付结果"),uni.showModal({title:"等待支付中...",content:"如您已确认付款成功,请点击确认,继续查询支付结果!",showCancel:!1,confirmText:"确认已支付成功",success:async t=>{t.confirm&&(o("log","at pages/pay/index.vue:194","用户点击确定"),"pages/pay/index"==Qo.getPageRoute()?this.doLoopCheck(e):Qo.showNone("请重新扫码使用"))}})):await this.checkInfoReactive(e)}})).finally((()=>{Qo.hideLoad()}))},async doLoopCheck(e){let t=this.reCheckOrderCountMax;for(let n=0;n<=t;n++){uni.showLoading({title:"支付结果查询中..."+n+"/"+this.reCheckOrderCountMax,mask:!0});let t=await this.checkOrder(e.payRes).then((e=>e)).catch((e=>{o("warn","at pages/pay/index.vue:225","reCheckOrder err:",e),rj(!1)}));o("log","at pages/pay/index.vue:228","recheckInfo--1:",t);let{orderStatus:r,requestDate:a,respCode:i,respMsg:s,tradeNo:l,transNo:c}=t.checkRes.res;if(o("log","at pages/pay/index.vue:231","doLoopCheck recheckInfo:",t),"SUCCESS"==r){let{payRes:o,checkRes:n}=t;"1"==n.pay_order.status&&(Qo.showNone(n.res.respMsg),this.paySuccessStatus=1,this.printOrder(e));break}await Qo.asyncSetTimeOut(2e3)}uni.hideLoading()},async checkInfoReactive(e){return new Promise(((t,n)=>{o("log","at pages/pay/index.vue:252","checkInfoReactive",e);let{payRes:r,checkRes:a}=e,{orderStatus:i,requestDate:s,respCode:l,respMsg:c,tradeNo:u,transNo:p}=a.res,d=a.res.respMsg||"未知原因-"+a.res.respCode+"\n";"1"==a.pay_order.status?(Qo.showNone(a.res.respMsg),this.paySuccessStatus=1,this.printOrder(e),t(!0)):"200021"==l||"200008"==l||"200004"==l?(o("warn","at pages/pay/index.vue:266","需要重新下单"),uni.showModal({title:"支付失败",content:d,showCancel:!1,confirmText:"确定",success:e=>{e.confirm&&(o("log","at pages/pay/index.vue:275","用户点击确定"),Qo.routeTo("/pages/index/standby","rL"),t(!0))}})):"200103"==l||"FAIL"==i?(d="支付失败code:"+a.res.respCode+".请联系管理员!",uni.showModal({title:"支付失败",content:d,showCancel:!1,confirmText:"确定",success:e=>{e.confirm&&(o("log","at pages/pay/index.vue:292","用户点击确定"),Qo.routeTo("/pages/index/standby","rL"),t(!0))}})):"PROCESSING"==i&&0==this.reCheckOrderCount?(o("log","at pages/pay/index.vue:300","等待支付中,需要继续查询支付结果"),uni.showModal({title:"等待支付中...",content:"如您已确认付款成功,请点击确认,继续查询支付结果!",showCancel:!1,confirmText:"确认已支付成功",success:async e=>{e.confirm&&(o("log","at pages/pay/index.vue:308","用户点击确定"),t(!0))}})):"PROCESSING"==i&&this.reCheckOrderCount>0&&n(e)}))},loopReCheckOrder(e){reCheckOrder(e).then((e=>{loopReCheckOrder(e)})).catch((e=>{o("warn","at pages/pay/index.vue:327","loopReCheckOrder err:",e),Qo.showNone("支付结果查询超时,请联系管理员!"+e)}))},async reCheckOrder(e){let t=e.payRes;return new Promise((async(e,n)=>{if(this.reCheckOrderCount++,this.reCheckOrderCount>=this.reCheckOrderCountMax)uni.hideLoading(),Qo.showNone("支付结果查询超时,请联系管理员!"),n(!1);else{o("log","at pages/pay/index.vue:344","reCheckOrder:",t),await this.checkOrder(t).then((e=>(o("log","at pages/pay/index.vue:346","checkInfo:",e),e))).then((e=>{})).catch((e=>{o("warn","at pages/pay/index.vue:351","reCheckOrder err:",e),n(!1)}));let r=await this.checkOrder(t);await this.checkInfoReactive(r).then((t=>{e(t)})).catch((e=>{o("warn","at pages/pay/index.vue:359","reCheckOrder err:",e),n(!1)}))}}))},printOrder(e){o("warn","at pages/pay/index.vue:369","printOrder checkInfo: ",e),getApp().globalData.accountInfo;let t=uni.getStorageSync("stadiumInfo"),{venue_name:n}=t;this.dataQuery;let{finishedDate:r,transNo:a}=e.payRes.res;if(r=this.getTimeFromFinishedDate(r),!e||!a)return;Qo.showNone("小票打印中...");let i={...this.dataQuery,venue_name:n,time:r,order_no:a},s=Zo.resetOXPrintInfo(i);return o("log","at pages/pay/index.vue:390","uni call android OX_Pad_Printer ------begin---!",s),fn.execAPI({api_name:"doPrint",value:s},(e=>{o("log","at pages/pay/index.vue:397","ox_pad_printer doPrint result: "+JSON.stringify(e))}))},getTimeFromFinishedDate:e=>(o("log","at pages/pay/index.vue:405",e),e.substring(0,4)+"-"+e.substring(4,6)+"-"+e.substring(6,8)+" "+e.substring(8,10)+":"+e.substring(10,12)+":"+e.substring(12,14)),getTestPrintData:()=>({payRes:{order_no:"LS20240221105640796608",pay_code:"282659672061313993",pay_type:"ALI_BARCODEPAY",orderAmt:"1",transNo:"LS20240221105640796608",res:{channelOrderNo:"350105100000000000000382731226",finishedDate:"20240221105643",orderAmt:"1",orderStatus:"SUCCESS",payOrderNo:"322024022122001464831442986322",payType:"ALI_BARCODEPAY",respCode:"000000",respMsg:"交易成功",tradeNo:"19010520240221105641100306264795",transNo:"LS20240221105640796608"}},checkRes:{err:null,pay_order:{id:1143536,appid:"",mchId:"ouxuanmchid-2d4af93d5fb4",user:"",out_trade_no:"LS20240221105640796608",transaction_id:"",group:"63",pay_way:"HuiShouQian",call_way:"WeChatMiniApp",total_fee:.01,refund_total_fee:0,Title:"",subject:"零售订单",status:1,refund_status:0,flag:0,tags:null,extension:{brand_id:63,brand_stadium_logo:"https://imgcdn.ouxuanzhineng.cn/upload/63/logo/6b36b6b89557a7b7d90904f1a943a311.png",brand_stadium_name:"Test门店",stadium_id:167,total_fee:.01,transaction_id:""},error_log:"",is_profit_sharing:0,usefulness:"erp_goods_retail",medium:"money",invoice_status:"None",is_enable_expiration:1,expiration_time:"2024-02-21T11:26:40+08:00",payment_time:"",remaining_refund:null},res:{channelOrderNo:"350105100000000000000382731226",finishedDate:"20240221105644",goodsInfo:"LS20240221105640796608",memo:'{"timeExpire":"20240221105746","latitude":"0","spbillCreateIp":"127.0.0.1","longitude":"0"}',orderAmt:"1",orderStatus:"SUCCESS",payOrderNo:"322024022122001464831442986322",payType:"ALI_BARCODEPAY",requestDate:"20240221105641",respCode:"000000",respMsg:"交易成功",tradeNo:"19010520240221105641100306264795",transNo:"LS20240221105640796608"}}}),testPrinter(){o("log","at pages/pay/index.vue:496","OX_Pad_Printer test------begin---!");let e=Zo.resetOXPrintInfo(Zo.testPrintInfo);fn.execAPI({api_name:"doPrint",value:e},(e=>{o("log","at pages/pay/index.vue:502","testPrinter: "+JSON.stringify(e))}))},async makeOrder(){let{brand_id:e,token:t}=getApp().globalData.accountInfo,n=uni.getStorageSync("stadiumInfo").id||"",{goods_data:r,amount:a}=this.dataQuery;e=parseInt(e),a=parseFloat(a);let i={store_id:n,brand_id:e,token:t,amount:a,goods_data:r,pay_type:7,other_pay_type:"付款码支付",card_no:"",mark:""};return o("log","at pages/pay/index.vue:519","makeOrder urlParams:",i),qo.post({url:To.makeOrder,data:i,isDefaultGet:!0,failMsg:"操作失败!"}).then((e=>(Qo.hideLoad(),o("log","at pages/pay/index.vue:529","makeOrder suc: ",e),e)))},payOrder(e){o("log","at pages/pay/index.vue:534","payOrder get param:",e);let{order_no:t,pay_code:n,pay_type:r}=e,{goods_data:a,amount:i}=this.dataQuery,{store_id:s,brand_id:l,token:c}=getApp().globalData.accountInfo,u={order_no:t,pay_code:n,pay_type:r,brand_id:l,token:c,order_amt:i,goods_info:t};return o("log","at pages/pay/index.vue:548","payOrder urlParams:",u),qo.post({url:To.payOrder,data:u,isDefaultGet:!0,failMsg:"payOrder fail"}).then((e=>(o("log","at pages/pay/index.vue:557","payOrder suc: ",e),{order_no:t,pay_code:n,pay_type:r,orderAmt:e.res.orderAmt,transNo:e.res.transNo,res:e.res})))},checkOrder(e){let{store_id:t,brand_id:n,token:r}=getApp().globalData.accountInfo,{transNo:a,orderAmt:i,payCode:s}=e,l={transNo:a,payCode:s,brand_id:n,token:r,orderAmt:i,manual:"yes"};return o("log","at pages/pay/index.vue:577","checkOrder urlParams:",l),qo.post({url:To.checkOrder,data:l,isDefaultGet:!0,failMsg:"checkOrder fail"}).then((t=>(o("log","at pages/pay/index.vue:586","checkOrder suc: ",e),{payRes:e,checkRes:t})))},handle_clickVipCard(){Qo.showNone("储值卡支付未接入"),this.handle_clickVIP()},handle_closeEndPhoneBox(e){o("log","at pages/pay/index.vue:601","handle_closeEndPhoneBox",e),this.showEndPhoneBox=!this.showEndPhoneBox},handle_clickCommit_end_phone(e){o("log","at pages/pay/index.vue:605","handle_clickCommit_end_phone",e),this.showEndPhoneBox=!this.showEndPhoneBox},handle_closeQRInputBox(e){o("log","at pages/pay/index.vue:609","handle_closeQRInputBox",e)},handle_clickCommit_qr(e){o("log","at pages/pay/index.vue:612","handle_clickCommit_qr",e),this.showQRInputBox=!this.showQRInputBox},handle_clickVIP(){this.showEndPhoneBox=!this.showEndPhoneBox},handle_clickOpenDoor(e){o("log","at pages/pay/index.vue:621","执行开门"),this.openDoorReq()},async setPageHeight(){this.screenHeight=await Qo.getPageHeight()},async onKeyup(e){let t=Xo.dict[e.keyCode];if(this.decryptList.push(t),13!=e.keyCode)return o("log","at pages/pay/index.vue:634","this.decryptList1: ",this.decryptList);this.decryptList.pop(),this.strResult=await Xo.resultScan(this.decryptList),this.orderQrcode=this.strResult,this.decryptList.splice(0),-1!=this.strResult.indexOf("down_arrow")&&(this.strResult=this.strResult.replace("down_arrow","")),o("log","at pages/pay/index.vue:646","扫码最终结果--:",this.strResult),this.acceptScanCode(this.strResult)},onKeydown(e){},async openDoorReq(){Qo.showLoad();let{store_id:e,brand_id:t,token:n}=getApp().globalData.accountInfo,r=uni.getStorageSync("picker_door"),a={token:n,gate_id:r.p_obj_arr[r.p_index].id};return o("log","at pages/pay/index.vue:667","openDoor: ",a),qo.post({url:To.openDoor,data:a,isDefaultGet:!0,failMsg:"openDoor fail"}).then((e=>{Qo.hideLoad(),o("log","at pages/pay/index.vue:677","openDoor suc: ",e),Qo.showNone("开启门禁执行中")})).finally((()=>{Qo.hideLoad()}))}}},[["render",function(t,o,n,r,a,i){const s=e.resolveComponent("keyboard-listener"),l=e.resolveComponent("view-header"),c=e.resolveComponent("paying"),u=e.resolveComponent("pay-success"),p=e.resolveComponent("input-box-end-phone");return e.openBlock(),e.createElementBlock("view",{class:"pay-page"},[e.createVNode(s,{style:{width:"1rpx"},onKeyup:i.onKeyup,onKeydown:i.onKeydown},null,8,["onKeyup","onKeydown"]),0==a.paySuccessStatus?(e.openBlock(),e.createElementBlock("view",{key:0},[e.createVNode(l,{class:"mheader",backgroundCustom:"none",needBorder:!1,onCloseUse:o[0]||(o[0]=()=>{})},null,8,["backgroundCustom","needBorder"]),(e.openBlock(),e.createBlock(c,{key:0,payTotal:i.payTotal,onClickVipCard:i.handle_clickVipCard},null,8,["payTotal","onClickVipCard"]))])):(e.openBlock(),e.createBlock(u,{key:1,paySuccessInfo:a.dataQuery,onClickOpenDoor:i.handle_clickOpenDoor},null,8,["paySuccessInfo","onClickOpenDoor"])),a.showEndPhoneBox?(e.openBlock(),e.createBlock(p,{key:2,maskHeight:a.screenHeight,maxInput:4,onShowIt:i.handle_closeEndPhoneBox,onClickCommit:i.handle_clickCommit_end_phone},null,8,["maskHeight","onShowIt","onClickCommit"])):e.createCommentVNode("",!0)])}],["__scopeId","data-v-4fd00304"]]),yn=r({__name:"pads_picker",props:{padList:{type:Array,default:[]},padListOrigin:{type:Array,default:[]}},emits:["pickerChange"],setup(t,{emit:n}){const r=t,a=e.ref("");async function i(e){o("log","at components/login/pads_picker.vue:53","picker发送选择改变,携带值为",e.detail.value);let t=e.detail.value,r=uni.getStorageSync("picker_door");if(r.p_show&&"请选择"!==r.p_show){let e=`检测到当前设备已有绑定门禁:${r.p_obj_arr[r.p_index].hardware_name}, 重新选择将清空绑定, 请确认!`;await Qo.showModalMsg(e,!0).then((()=>{uni.removeStorageSync("picker_door"),uni.removeStorageSync("showGateBtn"),a.value=t,n("pickerChange",t)})).catch((e=>{o("log","at components/login/pads_picker.vue:69","catch111111",e)}))}else uni.removeStorageSync("picker_door"),uni.removeStorageSync("showGateBtn"),a.value=t,n("pickerChange",t)}return e.onMounted((()=>{})),e.watchEffect((()=>{o("log","at components/login/pads_picker.vue:46","watchEffect",r.padListOrigin),r.padListOrigin.length>0&&function(){o("log","at components/login/pads_picker.vue:86","autoShowBackStadium");let e=uni.getStorageSync("stadiumInfo");if(e){let t=r.padListOrigin.findIndex((t=>t.id==e.id));-1!=t&&(a.value=t,o("log","at components/login/pads_picker.vue:94","autoShowBackStadium set index: ",t))}}()})),(o,n)=>(e.openBlock(),e.createElementBlock("view",{class:"pads-picker"},[e.createElementVNode("view",{class:"pp-content"},[e.createElementVNode("view",{class:"pc-text"},"请选择门店"),e.createElementVNode("view",{class:"pc-frame"},[e.createElementVNode("picker",{class:"pt-picker",mode:"selector",range:t.padList,onChange:i},[e.createElementVNode("view",{class:"pp-box"},[e.createElementVNode("view",{class:"pb-text"},e.toDisplayString(t.padList[a.value]||"请选择门店"),1),e.createElementVNode("image",{class:"pt-icon",mode:"aspectFtt",src:"/static/images/triangle.png"})])],40,["range"])])])]))}},[["__scopeId","data-v-eedf08db"]]),mn=r({__name:"setting_mask",emits:["closeSetting"],setup(n,{emit:r}){const a=t("Daemon_Uni");var i=e.ref(""),s=e.ref([]),l=e.ref("请选择"),c=e.ref([]),u=e.ref(!1),p=e.ref(0);e.onMounted((async()=>{o("log","at components/login/setting_mask.vue:99","setting_mask onMounted ->"),N(),p.value=f(),_().catch((e=>{Qo.showNone("无法获取该门店门禁信息")})),A()})),e.onBeforeUnmount((async()=>{o("log","at components/login/setting_mask.vue:109","setting_mask onBeforeUnmount ->"),E()})),e.computed((()=>{var e;return(null==(e=getApp().globalData.goodsList)?void 0:e.total)||"0"}));const d=e.computed((()=>uni.getStorageSync("stadiumInfo")||{})),f=()=>{var e;return(null==(e=getApp().globalData.goodsList.list)?void 0:e.length)||0},g=()=>{r("closeSetting","false")},y=()=>{o("log","at components/login/setting_mask.vue:137","logout"),uni.showModal({title:"提示",content:"确定退出登录?",success:function(e){e.confirm?(o("log","at components/login/setting_mask.vue:144","用户点击确定"),m()):e.cancel&&o("log","at components/login/setting_mask.vue:147","用户点击取消")}})},m=()=>{getApp().globalData.stadiumInfo={},getApp().globalData.accountInfo={},getApp().globalData.goodsList={},uni.removeStorageSync("stadiumInfo"),uni.removeStorageSync("accountInfo"),uni.removeStorageSync("userInfo"),uni.reLaunch({url:"/pages/login/index"})},h=()=>{let e=["开启-进程守护","关闭-进程守护"];uni.showActionSheet({itemList:e,success:async function(t){let n=e[t.tapIndex];o("log","at components/login/setting_mask.vue:174","选中了第"+(t.tapIndex+1)+"个按钮"+n),0==t.tapIndex?a.startWatchDog({api_name:""},(e=>{o("log","at components/login/setting_mask.vue:181",e),Qo.showNone("开启")})):a.closeWatchDog({api_name:""},(e=>{o("log","at components/login/setting_mask.vue:188",e),Qo.showNone("关闭")})),o("log","at components/login/setting_mask.vue:193","daemonRun",n,"")},fail:function(e){o("log","at components/login/setting_mask.vue:196",e.errMsg)}})},v=()=>{Qo.showNone(""),uni.showModal({title:"提示",content:"跳转更新前,请先关闭进程守护",success:function(e){e.confirm?(o("log","at components/login/setting_mask.vue:209","用户点击确定"),plus.runtime.openURL("https://www.pgyer.com/oxcheckoutpad",(function(e){}))):e.cancel&&o("log","at components/login/setting_mask.vue:213","用户点击取消")}})},b=()=>{},w=()=>{let e=["开-支付后显示","关-支付后不显示"];uni.showActionSheet({itemList:e,success:async function(t){let n=e[t.tapIndex];o("log","at components/login/setting_mask.vue:247","选中了第"+(t.tapIndex+1)+"个按钮"+n),0==t.tapIndex?(uni.setStorageSync("showGateBtn",!0),Qo.showNone("显示-支付后开门按钮")):(uni.setStorageSync("showGateBtn",!1),Qo.showNone("关闭-支付后开门按钮")),A()},fail:function(e){o("log","at components/login/setting_mask.vue:258",e.errMsg)}})},_=()=>{let{store_id:e,brand_id:t,token:n}=getApp().globalData.accountInfo,r={token:n,stadium_id:e};return qo.post({url:To.getDoorList,data:r,isDefaultGet:!0,failMsg:"getDoorList fail"}).then((e=>{o("log","at components/login/setting_mask.vue:277","getDoorList suc: ",e),S(e)}))},k=e=>{o("log","at components/login/setting_mask.vue:285",e.detail.value),x(e.detail.value),setTimeout((()=>{E()}),300)},x=e=>{i.value=e,l.value=s.value[e]},S=e=>{c.value=e,s.value=e.map((e=>e.hardware_name))},E=()=>{let e={p_index:i.value,p_array:s.value,p_show:l.value,p_obj_arr:c.value};uni.setStorageSync("picker_door",e)},N=()=>{let e=uni.getStorageSync("picker_door");o("log","at components/login/setting_mask.vue:316","getDoorPickerDataFromStorage: ",e),e&&(i.value=e.p_index,s.value=e.p_array,l.value=e.p_show,c.value=e.p_obj_arr)},A=()=>{let e=uni.getStorageSync("showGateBtn")||!1;u.value=e},C=()=>{let e=uni.getStorageSync("picker_door"),t=`测试门禁 ID: ${e.p_obj_arr[e.p_index].id} | Name: ${e.p_obj_arr[e.p_index].hardware_name}`;uni.showModal({title:"提示",content:t,showCancel:!0,confirmText:"确定",confirmColor:"#009874",success:e=>{e.confirm&&(o("log","at components/login/setting_mask.vue:342","用户点击确定"),P())}})},P=async()=>{let{store_id:e,brand_id:t,token:n}=getApp().globalData.accountInfo,r=uni.getStorageSync("picker_door"),a={token:n,gate_id:r.p_obj_arr[r.p_index].id};return o("log","at components/login/setting_mask.vue:362","openDoor: ",a),qo.post({url:To.openDoor,data:a,isDefaultGet:!0,failMsg:"openDoor fail"}).then((e=>{o("log","at components/login/setting_mask.vue:371","openDoor suc: ",e),Qo.showNone("门禁:开")}))};return(t,o)=>{var n,r;return e.openBlock(),e.createElementBlock("view",{class:"setting-mask"},[e.createElementVNode("view",{class:"sm-content"},[e.createElementVNode("image",{class:"sc-close",mode:"aspectFit",src:"/static/images/close.png",onClick:g}),e.createElementVNode("view",{class:"sc-title"},"平板配置"),e.createElementVNode("view",{class:"sc-container"},[e.createElementVNode("view",{class:"sc-line"},[e.createElementVNode("view",{class:"sl-desc"},"品牌: "+e.toDisplayString(e.unref(d).brand_name),1)]),e.createElementVNode("view",{class:"sc-line"},[e.createElementVNode("view",{class:"sl-desc"},"门店: "+e.toDisplayString(e.unref(d).name),1)]),e.createElementVNode("view",{class:"sc-line"},[e.createElementVNode("view",{class:"sl-desc"},"门店ID: "+e.toDisplayString(e.unref(d).id),1)]),e.createElementVNode("view",{class:"sc-line"},[e.createElementVNode("view",{class:"sl-desc"},"设备账号控制"),e.createElementVNode("button",{class:"sd-btn",onClick:y},"退出登录")]),e.createElementVNode("view",{class:"sc-show-note"},"本机本地配置:"),e.createElementVNode("view",{class:"sc-line"},[e.createElementVNode("view",{class:"sl-desc"},"进程守护切换"),e.createElementVNode("button",{class:"sd-btn",onClick:h},"开/关")]),e.createElementVNode("view",{class:"sc-line"},[e.createElementVNode("view",{class:"sl-desc"},"程序版本更新"),e.createElementVNode("button",{class:"sd-btn",onClick:v},"前往更新")]),e.createElementVNode("view",{class:"sc-line"},[e.createElementVNode("view",{class:"sl-desc"},"开门门禁绑定"),e.createElementVNode("picker",{mode:"selector",onChange:k,value:e.unref(i),range:e.unref(s)},[e.createElementVNode("button",{class:"sd-btn",onClick:b},"选择门禁")],40,["value","range"]),e.createElementVNode("view",{class:"sl-info"},e.toDisplayString(e.unref(l)),1)]),e.unref(i)>=0&&(null==(n=e.unref(c))?void 0:n.length)>0?(e.openBlock(),e.createElementBlock("view",{key:0,class:"sc-line"},[e.createElementVNode("view",{class:"sl-desc"},"开启门禁测试"),e.createElementVNode("button",{class:"sd-btn",onClick:C},"开门")])):e.createCommentVNode("",!0),e.unref(i)>=0&&(null==(r=e.unref(c))?void 0:r.length)>0?(e.openBlock(),e.createElementBlock("view",{key:1,class:"sc-line"},[e.createElementVNode("view",{class:"sl-desc"},"支付成功是否显示开门"),e.createElementVNode("button",{class:"sd-btn",onClick:w},"开/关"),e.createElementVNode("view",{class:"sl-info"},e.toDisplayString(e.unref(u)?"开":"关"),1)])):e.createCommentVNode("",!0)])])])}}},[["__scopeId","data-v-8c106bab"]]),hn={__name:"success",setup(t){let r=e.ref(!1);const s=e.ref([]),c=e.ref(""),u=e.ref([]);n((async()=>{v()}));var p=e.computed((()=>{let{accountInfo:e,stadiumInfo:t}=getApp().globalData,n=e.username||"用户";return uni.getStorageSync("stadiumInfo")&&(o("log","at pages/login/success.vue:53","stadiumInfo: ",uni.getStorageSync("stadiumInfo")),t=uni.getStorageSync("stadiumInfo")),t&&(n=t.brand_name),n}));const d=()=>{let e=uni.getStorageSync("stadiumInfo");if(e){let t=u.value.findIndex((t=>{if(t.id==e.id){return getApp().globalData.accountInfo.store_id=t.id,t}}));return-1!=t&&(c.value=t,o("log","at pages/login/success.vue:73","autoShowBackStadium set index: ",t),!0)}return!1};function f(e){o("log","at pages/login/success.vue:84","handle_closeSetting",e),r.value=!r.value}async function g(e){o("log","at pages/login/success.vue:88","handle_pickerChange",e),uni.getStorageSync("picker_door"),c.value=e,function(e){let t=u.value[e],{id:o}=t;getApp().globalData.accountInfo.store_id=o,getApp().globalData.stadiumInfo=t,uni.setStorageSync("stadiumInfo",t)}(e)}async function y(){getApp(),d()?Qo.routeTo("/pages/index/standby","nT"):Qo.showNone("请选择门店")}function m(){d()?r.value=!r.value:Qo.showNone("请选择门店")}function h(){o("log","at pages/login/success.vue:175","clickUpdatePadList"),v()}function v(){o("log","at pages/login/success.vue:190","updatePadList"),Qo.showLoad("更新门店列表...");let e=Qo.getPostParams();if(!e)return Qo.showNone("获取用户信息失败");let{brand_id:t,token:n}=e,r={brand_id:t,token:n,page:1,page_size:200};qo.post({url:To.padList,data:r,isDefaultGet:!0,failMsg:"更新门店列表失败!"}).then((e=>(Qo.hideLoad(),o("log","at pages/login/success.vue:209","updatePadList suc: ",e),u.value=e.list,s.value=e.list.map((e=>e.venue_name)),e))).finally((()=>{Qo.hideLoad()}))}return(t,o)=>(e.openBlock(),e.createBlock(a,null,{default:e.withCtx((()=>[e.createElementVNode("view",{class:"login-success"},[e.createVNode(i),e.createElementVNode("view",{class:"ls-desc"},[e.createElementVNode("view",{class:"ld-line"},"尊敬的"+e.toDisplayString(e.unref(p)||"用户")+":",1),e.createElementVNode("view",{class:"ld-line"},"欢迎登录欧轩智能场馆平板端系统!")]),e.createElementVNode("view",{class:"ls-pads"},[e.createVNode(yn,{padList:s.value,padListOrigin:u.value,onPickerChange:g},null,8,["padList","padListOrigin"])]),e.createElementVNode("view",{class:"ls-botton"},[e.createVNode(l,{onClick:y},{default:e.withCtx((()=>[e.createTextVNode("进入使用")])),_:1})]),e.createElementVNode("view",{class:"ls-links"},[e.createElementVNode("view",{class:"ll-item",onClick:h},"更新门店"),e.createElementVNode("view",{class:"ll-item",onClick:m},"设置")])]),e.unref(r)?(e.openBlock(),e.createBlock(mn,{key:0,onCloseSetting:f})):e.createCommentVNode("",!0)])),_:1}))}};__definePage("pages/login/index",Ko),__definePage("pages/index/standby",tn),__definePage("pages/index/index",un),__definePage("pages/pay/index",gn),__definePage("pages/login/success",hn);const vn={onLaunch(){o("log","at App.vue:19","App Launch default"),this.globalData.autoLogin=!0,this.reloadUserInfo()},onShow(){o("log","at App.vue:24","App Show default")},onHide(){o("log","at App.vue:27","App Hide default")},globalData:{autoLogin:!1,goodsList:[],shopList:[],accountInfo:{},stadiumInfo:{id:"",brand_id:"",venue_name:""},loginInfo:{phone:"",password:"",token:"",vip:!1},payInfo:{payType:"",paySuccess:!1}},methods:{reloadUserInfo(){let e=uni.getStorageSync("userInfo"),t=getApp();e&&(t.globalData.accountInfo=e)},async updateGoodsList(){return new Promise(((e,t)=>{let{brand_id:n,stadium_id:r,token:a}=Qo.getPostParams(),i={brand_id:n,stadium_id:r,token:a,type_key:"",key:"",page:"1",page_size:"9999",is_sale:"1",is_show_on_assistant:"1"};qo.post({url:To.getGoodsList,data:i,isDefaultGet:!1,failMsg:"获取商品列表失败"}).then((t=>{o("log","at App.vue:84","getGoodsList suc: ",t),(t=t.data.data).list.forEach((e=>{e.shopCount=1,e.shopCountPrice=e.user_price})),this.globalData.goodsList=t.list,e(t)}))}))}}};const{app:bn,Vuex:wn,Pinia:_n}={app:e.createVueApp(vn)};uni.Vuex=wn,uni.Pinia=_n,bn.provide("__globalStyles",__uniConfig.styles),bn._component.mpType="app",bn._component.render=()=>{},bn.mount("#app")}(Vue); +if("undefined"==typeof Promise||Promise.prototype.finally||(Promise.prototype.finally=function(e){const t=this.constructor;return this.then((o=>t.resolve(e()).then((()=>o))),(o=>t.resolve(e()).then((()=>{throw o}))))}),"undefined"!=typeof uni&&uni&&uni.requireGlobal){const e=uni.requireGlobal();ArrayBuffer=e.ArrayBuffer,Int8Array=e.Int8Array,Uint8Array=e.Uint8Array,Uint8ClampedArray=e.Uint8ClampedArray,Int16Array=e.Int16Array,Uint16Array=e.Uint16Array,Int32Array=e.Int32Array,Uint32Array=e.Uint32Array,Float32Array=e.Float32Array,Float64Array=e.Float64Array,BigInt64Array=e.BigInt64Array,BigUint64Array=e.BigUint64Array}uni.restoreGlobal&&uni.restoreGlobal(Vue,weex,plus,setTimeout,clearTimeout,setInterval,clearInterval),function(e){"use strict";function t(e){return weex.requireModule(e)}function o(e,t,...o){uni.__log__?uni.__log__(e,t,...o):console[e].apply(console,[...o,t])}const n=(t=>(o,n=e.getCurrentInstance())=>{!e.isInSSRComponentSetup&&e.injectHook(t,o,n)})("onReady"),r=(e,t)=>{const o=e.__vccOpts||e;for(const[n,r]of t)o[n]=r;return o};const a=r({},[["render",function(t,o,n,r,a,i){return e.openBlock(),e.createElementBlock("view",{class:"background"},[e.renderSlot(t.$slots,"default",{},void 0,!0)])}],["__scopeId","data-v-62c1c4f8"]]);const i=r({},[["render",function(t,o,n,r,a,i){return e.openBlock(),e.createElementBlock("view",{class:"logo-box"},[e.createElementVNode("image",{class:"lb-img",mode:"aspectFill",src:"/static/logo@2x.png"})])}],["__scopeId","data-v-4f3439c2"]]),s=r({__name:"form",props:["username","password","brand_id"],emits:["update:username","update:password","update:brand_id"],setup(t,{emit:o}){const n=t;return(t,r)=>(e.openBlock(),e.createElementBlock("view",{class:"form-box"},[e.createElementVNode("view",{class:"login-form"},[e.createElementVNode("view",{class:"lf-item"},[e.createElementVNode("image",{class:"li-icon",mode:"aspectFit",src:"/static/images/person.png"}),e.createElementVNode("input",{class:"li-ipt",type:"number",value:n.brand_id,placeholder:"请输入品牌ID",onInput:r[0]||(r[0]=e=>o("update:brand_id",e.detail.value))},null,40,["value"])]),e.createElementVNode("view",{class:"lf-item"},[e.createElementVNode("image",{class:"li-icon",mode:"aspectFit",src:"/static/images/person.png"}),e.createElementVNode("input",{class:"li-ipt",value:n.username,placeholder:"请输入登录账号",onInput:r[1]||(r[1]=e=>o("update:username",e.detail.value))},null,40,["value"])]),e.createElementVNode("view",{class:"lf-item"},[e.createElementVNode("image",{class:"li-icon",mode:"aspectFit",src:"/static/images/lock.png"}),e.createElementVNode("input",{class:"li-ipt",type:"digit",password:!0,value:n.password,placeholder:"请输入登录密码",onInput:r[2]||(r[2]=e=>o("update:password",e.detail.value))},null,40,["value"])])])]))}},[["__scopeId","data-v-4cc74936"]]);const l=r({},[["render",function(t,o){return e.openBlock(),e.createElementBlock("view",{class:"btn-box"},[e.createElementVNode("button",{class:"login-button",type:"primary"},[e.renderSlot(t.$slots,"default",{},void 0,!0)])])}],["__scopeId","data-v-ff158653"]]);var c,u=u||{};u.Security=u.Security||{},(c=u.Security).maxExactInt=Math.pow(2,53),c.toUtf8ByteArr=function(e){for(var t,o=[],n=0;n>>6),o[o.length]=63&t|128;else if(t<=65535)o[o.length]=224+(t>>>12),o[o.length]=t>>>6&63|128,o[o.length]=63&t|128;else{if(!(t<=1114111))throw"Unicode standart supports code points up-to U+10FFFF";o[o.length]=240+(t>>>18),o[o.length]=t>>>12&63|128,o[o.length]=t>>>6&63|128,o[o.length]=63&t|128}return o},c.toHex32=function(e){2147483648&e&&(e&=2147483647,e+=Math.pow(2,31));for(var t=e.toString(16);t.length<8;)t="0"+t;return t},c.reverseBytes=function(e){var t=0;return t+=e>>>24&255,t+=(e>>>16&255)<<8,t+=(e>>>8&255)<<16,t+=(255&e)<<24},c.leftRotate=function(e,t){return e<>>32-t},c.md5=function(e){for(var t=[7,12,17,22,7,12,17,22,7,12,17,22,7,12,17,22,5,9,14,20,5,9,14,20,5,9,14,20,5,9,14,20,4,11,16,23,4,11,16,23,4,11,16,23,4,11,16,23,6,10,15,21,6,10,15,21,6,10,15,21,6,10,15,21],o=[],n=0;n<=63;n++)o[n]=Math.abs(Math.sin(n+1))*Math.pow(2,32)<<0;var r,a,i=1732584193,s=4023233417,l=2562383102,u=271733878;r=c.toUtf8ByteArr(e),e=null,a=r.length,r.push(128);for(var p=Math.abs(448-8*r.length%512)/8;p--;)r.push(0);for(r.push(8*a&255,8*a>>8&255,8*a>>16&255,8*a>>24&255),n=4;n--;)r.push(0);for(var d=c.leftRotate,g=(n=0,[]);n>>32-s,o);var i,s}function g(e,t,o,n,r,a,i){return d(t&o|~t&n,e,t,r,a,i)}function f(e,t,o,n,r,a,i){return d(t&n|o&~n,e,t,r,a,i)}function y(e,t,o,n,r,a,i){return d(t^o^n,e,t,r,a,i)}function m(e,t,o,n,r,a,i){return d(o^(t|~n),e,t,r,a,i)}function h(e,t){var o=(65535&e)+(65535&t);return(e>>16)+(t>>16)+(o>>16)<<16|65535&o}function v(e,t){var o=e[0],n=e[1],r=e[2],a=e[3];o=w(o,n,r,a,t[0],7,-680876936),a=w(a,o,n,r,t[1],12,-389564586),r=w(r,a,o,n,t[2],17,606105819),n=w(n,r,a,o,t[3],22,-1044525330),o=w(o,n,r,a,t[4],7,-176418897),a=w(a,o,n,r,t[5],12,1200080426),r=w(r,a,o,n,t[6],17,-1473231341),n=w(n,r,a,o,t[7],22,-45705983),o=w(o,n,r,a,t[8],7,1770035416),a=w(a,o,n,r,t[9],12,-1958414417),r=w(r,a,o,n,t[10],17,-42063),n=w(n,r,a,o,t[11],22,-1990404162),o=w(o,n,r,a,t[12],7,1804603682),a=w(a,o,n,r,t[13],12,-40341101),r=w(r,a,o,n,t[14],17,-1502002290),o=_(o,n=w(n,r,a,o,t[15],22,1236535329),r,a,t[1],5,-165796510),a=_(a,o,n,r,t[6],9,-1069501632),r=_(r,a,o,n,t[11],14,643717713),n=_(n,r,a,o,t[0],20,-373897302),o=_(o,n,r,a,t[5],5,-701558691),a=_(a,o,n,r,t[10],9,38016083),r=_(r,a,o,n,t[15],14,-660478335),n=_(n,r,a,o,t[4],20,-405537848),o=_(o,n,r,a,t[9],5,568446438),a=_(a,o,n,r,t[14],9,-1019803690),r=_(r,a,o,n,t[3],14,-187363961),n=_(n,r,a,o,t[8],20,1163531501),o=_(o,n,r,a,t[13],5,-1444681467),a=_(a,o,n,r,t[2],9,-51403784),r=_(r,a,o,n,t[7],14,1735328473),o=k(o,n=_(n,r,a,o,t[12],20,-1926607734),r,a,t[5],4,-378558),a=k(a,o,n,r,t[8],11,-2022574463),r=k(r,a,o,n,t[11],16,1839030562),n=k(n,r,a,o,t[14],23,-35309556),o=k(o,n,r,a,t[1],4,-1530992060),a=k(a,o,n,r,t[4],11,1272893353),r=k(r,a,o,n,t[7],16,-155497632),n=k(n,r,a,o,t[10],23,-1094730640),o=k(o,n,r,a,t[13],4,681279174),a=k(a,o,n,r,t[0],11,-358537222),r=k(r,a,o,n,t[3],16,-722521979),n=k(n,r,a,o,t[6],23,76029189),o=k(o,n,r,a,t[9],4,-640364487),a=k(a,o,n,r,t[12],11,-421815835),r=k(r,a,o,n,t[15],16,530742520),o=x(o,n=k(n,r,a,o,t[2],23,-995338651),r,a,t[0],6,-198630844),a=x(a,o,n,r,t[7],10,1126891415),r=x(r,a,o,n,t[14],15,-1416354905),n=x(n,r,a,o,t[5],21,-57434055),o=x(o,n,r,a,t[12],6,1700485571),a=x(a,o,n,r,t[3],10,-1894986606),r=x(r,a,o,n,t[10],15,-1051523),n=x(n,r,a,o,t[1],21,-2054922799),o=x(o,n,r,a,t[8],6,1873313359),a=x(a,o,n,r,t[15],10,-30611744),r=x(r,a,o,n,t[6],15,-1560198380),n=x(n,r,a,o,t[13],21,1309151649),o=x(o,n,r,a,t[4],6,-145523070),a=x(a,o,n,r,t[11],10,-1120210379),r=x(r,a,o,n,t[2],15,718787259),n=x(n,r,a,o,t[9],21,-343485551),e[0]=C(o,e[0]),e[1]=C(n,e[1]),e[2]=C(r,e[2]),e[3]=C(a,e[3])}function b(e,t,o,n,r,a){return t=C(C(t,e),C(n,a)),C(t<>>32-r,o)}function w(e,t,o,n,r,a,i){return b(t&o|~t&n,e,t,r,a,i)}function _(e,t,o,n,r,a,i){return b(t&n|o&~n,e,t,r,a,i)}function k(e,t,o,n,r,a,i){return b(t^o^n,e,t,r,a,i)}function x(e,t,o,n,r,a,i){return b(o^(t|~n),e,t,r,a,i)}function S(e){var t,o=[];for(t=0;t<64;t+=4)o[t>>2]=e.charCodeAt(t)+(e.charCodeAt(t+1)<<8)+(e.charCodeAt(t+2)<<16)+(e.charCodeAt(t+3)<<24);return o}var E="0123456789abcdef".split("");function N(e){for(var t="",o=0;o<4;o++)t+=E[e>>8*o+4&15]+E[e>>8*o&15];return t}function A(e){return function(e){for(var t=0;t>2]|=e.charCodeAt(t)<<(t%4<<3);if(r[t>>2]|=128<<(t%4<<3),t>55)for(v(n,r),t=0;t<16;t++)r[t]=0;return r[14]=8*o,v(n,r),n}(e))}function C(e,t){return e+t&4294967295}A("hello"),A("hello"),new Array(0,3614090360,3905402710,606105819,3250441966,4118548399,1200080426,2821735955,4249261313,1770035416,2336552879,4294925233,2304563134,1804603682,4254626195,2792965006,1236535329,4129170786,3225465664,643717713,3921069994,3593408605,38016083,3634488961,3889429448,568446438,3275163606,4107603335,1163531501,2850285829,4243563512,1735328473,2368359562,4294588738,2272392833,1839030562,4259657740,2763975236,1272893353,4139469664,3200236656,681279174,3936430074,3572445317,76029189,3654602809,3873151461,530742520,3299628645,4096336452,1126891415,2878612391,4237533241,1700485571,2399980690,4293915773,2240044497,1873313359,4264355552,2734768916,1309151649,4149444226,3174756917,718787259,3951481745);var P=new Array(new Array(0,7,1),new Array(1,12,2),new Array(2,17,3),new Array(3,22,4),new Array(4,7,5),new Array(5,12,6),new Array(6,17,7),new Array(7,22,8),new Array(8,7,9),new Array(9,12,10),new Array(10,17,11),new Array(11,22,12),new Array(12,7,13),new Array(13,12,14),new Array(14,17,15),new Array(15,22,16)),I=new Array(new Array(1,5,17),new Array(6,9,18),new Array(11,14,19),new Array(0,20,20),new Array(5,5,21),new Array(10,9,22),new Array(15,14,23),new Array(4,20,24),new Array(9,5,25),new Array(14,9,26),new Array(3,14,27),new Array(8,20,28),new Array(13,5,29),new Array(2,9,30),new Array(7,14,31),new Array(12,20,32)),L=new Array(new Array(5,4,33),new Array(8,11,34),new Array(11,16,35),new Array(14,23,36),new Array(1,4,37),new Array(4,11,38),new Array(7,16,39),new Array(10,23,40),new Array(13,4,41),new Array(0,11,42),new Array(3,16,43),new Array(6,23,44),new Array(9,4,45),new Array(12,11,46),new Array(15,16,47),new Array(2,23,48)),O=new Array(new Array(0,6,49),new Array(7,10,50),new Array(14,15,51),new Array(5,21,52),new Array(12,6,53),new Array(3,10,54),new Array(10,15,55),new Array(1,21,56),new Array(8,6,57),new Array(15,10,58),new Array(6,15,59),new Array(13,21,60),new Array(4,6,61),new Array(11,10,62),new Array(2,15,63),new Array(9,21,64));new Array(new Array((function(e,t,o){return e&t|~e&o}),P),new Array((function(e,t,o){return e&o|t&~o}),I),new Array((function(e,t,o){return e^t^o}),L),new Array((function(e,t,o){return t^(e|~o)}),O));const V={hex_md5:function(e){return function(e){for(var t,o=p?"0123456789ABCDEF":"0123456789abcdef",n="",r=0;r>>4&15)+o.charAt(15&t);return n}(function(e){return function(e){for(var t="",o=0;o<32*e.length;o+=8)t+=String.fromCharCode(e[o>>5]>>>o%32&255);return t}(function(e,t){e[t>>5]|=128<>>9<<4)]=t;for(var o=1732584193,n=-271733879,r=-1732584194,a=271733878,i=0;i>2),o=0;o>5]|=(255&e.charCodeAt(o/8))<1&&"boolean"!=typeof t)throw new Y('"allowMissing" argument must be a boolean');if(null===he(/^%?[^%]*%?$/,e))throw new z("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var o=function(e){var t=me(e,0,1),o=me(e,-1);if("%"===t&&"%"!==o)throw new z("invalid intrinsic syntax, expected closing `%`");if("%"===o&&"%"!==t)throw new z("invalid intrinsic syntax, expected opening `%`");var n=[];return ye(e,ve,(function(e,t,o,r){n[n.length]=o?ye(r,be,"$1"):t||e})),n}(e),n=o.length>0?o[0]:"",r=we("%"+n+"%",t),a=r.name,i=r.value,s=!1,l=r.alias;l&&(n=l[0],fe(o,ge([0,1],l)));for(var c=1,u=!0;c=o.length){var f=Z(i,p);i=(u=!!f)&&"get"in f&&!("originalValue"in f.get)?f.get:i[p]}else u=de(i,p),i=i[p];u&&!s&&(se[a]=i)}}return i},ke={},xe={get exports(){return ke},set exports(e){ke=e}},Se=_e("%Object.defineProperty%",!0),Ee=function(){if(Se)try{return Se({},"a",{value:1}),!0}catch(xn){return!1}return!1};Ee.hasArrayLengthDefineBug=function(){if(!Ee())return null;try{return 1!==Se([],"length",{value:1}).length}catch(xn){return!0}};var Ne=Ee,Ae=_e("%Object.getOwnPropertyDescriptor%",!0);if(Ae)try{Ae([],"length")}catch(xn){Ae=null}var Ce=Ae,Pe=Ne(),Ie=_e,Le=Pe&&Ie("%Object.defineProperty%",!0);if(Le)try{Le({},"a",{value:1})}catch(xn){Le=!1}var Oe=Ie("%SyntaxError%"),Ve=Ie("%TypeError%"),De=Ce,Be=_e,Te=function(e,t,o){if(!e||"object"!=typeof e&&"function"!=typeof e)throw new Ve("`obj` must be an object or a function`");if("string"!=typeof t&&"symbol"!=typeof t)throw new Ve("`property` must be a string or a symbol`");if(arguments.length>3&&"boolean"!=typeof arguments[3]&&null!==arguments[3])throw new Ve("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&"boolean"!=typeof arguments[4]&&null!==arguments[4])throw new Ve("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&"boolean"!=typeof arguments[5]&&null!==arguments[5])throw new Ve("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&"boolean"!=typeof arguments[6])throw new Ve("`loose`, if provided, must be a boolean");var n=arguments.length>3?arguments[3]:null,r=arguments.length>4?arguments[4]:null,a=arguments.length>5?arguments[5]:null,i=arguments.length>6&&arguments[6],s=!!De&&De(e,t);if(Le)Le(e,t,{configurable:null===a&&s?s.configurable:!a,enumerable:null===n&&s?s.enumerable:!n,value:o,writable:null===r&&s?s.writable:!r});else{if(!i&&(n||r||a))throw new Oe("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.");e[t]=o}},je=Ne(),Re=Ce,Me=Be("%TypeError%"),Fe=Be("%Math.floor%"),Ue=function(e,t){if("function"!=typeof e)throw new Me("`fn` is not a function");if("number"!=typeof t||t<0||t>4294967295||Fe(t)!==t)throw new Me("`length` must be a positive 32-bit integer");var o=arguments.length>2&&!!arguments[2],n=!0,r=!0;if("length"in e&&Re){var a=Re(e,"length");a&&!a.configurable&&(n=!1),a&&!a.writable&&(r=!1)}return(n||r||!o)&&(je?Te(e,"length",t,!0,!0):Te(e,"length",t)),e};!function(e){var t=Q,o=_e,n=Ue,r=o("%TypeError%"),a=o("%Function.prototype.apply%"),i=o("%Function.prototype.call%"),s=o("%Reflect.apply%",!0)||t.call(i,a),l=o("%Object.defineProperty%",!0),c=o("%Math.max%");if(l)try{l({},"a",{value:1})}catch(xn){l=null}e.exports=function(e){if("function"!=typeof e)throw new r("a function is required");var o=s(t,i,arguments);return n(o,1+c(0,e.length-(arguments.length-1)),!0)};var u=function(){return s(t,a,arguments)};l?l(e.exports,"apply",{value:u}):e.exports.apply=u}(xe);var Ge=_e,He=ke,$e=He(Ge("String.prototype.indexOf"));const Qe=B(Object.freeze(Object.defineProperty({__proto__:null,default:{}},Symbol.toStringTag,{value:"Module"})));var qe="function"==typeof Map&&Map.prototype,Ke=Object.getOwnPropertyDescriptor&&qe?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,We=qe&&Ke&&"function"==typeof Ke.get?Ke.get:null,ze=qe&&Map.prototype.forEach,Je="function"==typeof Set&&Set.prototype,Ye=Object.getOwnPropertyDescriptor&&Je?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,Xe=Je&&Ye&&"function"==typeof Ye.get?Ye.get:null,Ze=Je&&Set.prototype.forEach,et="function"==typeof WeakMap&&WeakMap.prototype?WeakMap.prototype.has:null,tt="function"==typeof WeakSet&&WeakSet.prototype?WeakSet.prototype.has:null,ot="function"==typeof WeakRef&&WeakRef.prototype?WeakRef.prototype.deref:null,nt=Boolean.prototype.valueOf,rt=Object.prototype.toString,at=Function.prototype.toString,it=String.prototype.match,st=String.prototype.slice,lt=String.prototype.replace,ct=String.prototype.toUpperCase,ut=String.prototype.toLowerCase,pt=RegExp.prototype.test,dt=Array.prototype.concat,gt=Array.prototype.join,ft=Array.prototype.slice,yt=Math.floor,mt="function"==typeof BigInt?BigInt.prototype.valueOf:null,ht=Object.getOwnPropertySymbols,vt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?Symbol.prototype.toString:null,bt="function"==typeof Symbol&&"object"==typeof Symbol.iterator,wt="function"==typeof Symbol&&Symbol.toStringTag&&(typeof Symbol.toStringTag===bt||"symbol")?Symbol.toStringTag:null,_t=Object.prototype.propertyIsEnumerable,kt=("function"==typeof Reflect?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(e){return e.__proto__}:null);function xt(e,t){if(e===1/0||e===-1/0||e!=e||e&&e>-1e3&&e<1e3||pt.call(/e/,t))return t;var o=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if("number"==typeof e){var n=e<0?-yt(-e):yt(e);if(n!==e){var r=String(n),a=st.call(t,r.length+1);return lt.call(r,o,"$&_")+"."+lt.call(lt.call(a,/([0-9]{3})/g,"$&_"),/_$/,"")}}return lt.call(t,o,"$&_")}var St=Qe,Et=St.custom,Nt=Lt(Et)?Et:null;function At(e,t,o){var n="double"===(o.quoteStyle||t)?'"':"'";return n+e+n}function Ct(e){return lt.call(String(e),/"/g,""")}function Pt(e){return!("[object Array]"!==Dt(e)||wt&&"object"==typeof e&&wt in e)}function It(e){return!("[object RegExp]"!==Dt(e)||wt&&"object"==typeof e&&wt in e)}function Lt(e){if(bt)return e&&"object"==typeof e&&e instanceof Symbol;if("symbol"==typeof e)return!0;if(!e||"object"!=typeof e||!vt)return!1;try{return vt.call(e),!0}catch(xn){}return!1}var Ot=Object.prototype.hasOwnProperty||function(e){return e in this};function Vt(e,t){return Ot.call(e,t)}function Dt(e){return rt.call(e)}function Bt(e,t){if(e.indexOf)return e.indexOf(t);for(var o=0,n=e.length;ot.maxStringLength){var o=e.length-t.maxStringLength,n="... "+o+" more character"+(o>1?"s":"");return Tt(st.call(e,0,t.maxStringLength),t)+n}return At(lt.call(lt.call(e,/(['\\])/g,"\\$1"),/[\x00-\x1f]/g,jt),"single",t)}function jt(e){var t=e.charCodeAt(0),o={8:"b",9:"t",10:"n",12:"f",13:"r"}[t];return o?"\\"+o:"\\x"+(t<16?"0":"")+ct.call(t.toString(16))}function Rt(e){return"Object("+e+")"}function Mt(e){return e+" { ? }"}function Ft(e,t,o,n){return e+" ("+t+") {"+(n?Ut(o,n):gt.call(o,", "))+"}"}function Ut(e,t){if(0===e.length)return"";var o="\n"+t.prev+t.base;return o+gt.call(e,","+o)+"\n"+t.prev}function Gt(e,t){var o=Pt(e),n=[];if(o){n.length=e.length;for(var r=0;r-1?He(o):o},Qt=function e(t,o,n,r){var a=o||{};if(Vt(a,"quoteStyle")&&"single"!==a.quoteStyle&&"double"!==a.quoteStyle)throw new TypeError('option "quoteStyle" must be "single" or "double"');if(Vt(a,"maxStringLength")&&("number"==typeof a.maxStringLength?a.maxStringLength<0&&a.maxStringLength!==1/0:null!==a.maxStringLength))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var i=!Vt(a,"customInspect")||a.customInspect;if("boolean"!=typeof i&&"symbol"!==i)throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(Vt(a,"indent")&&null!==a.indent&&"\t"!==a.indent&&!(parseInt(a.indent,10)===a.indent&&a.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(Vt(a,"numericSeparator")&&"boolean"!=typeof a.numericSeparator)throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var s=a.numericSeparator;if(void 0===t)return"undefined";if(null===t)return"null";if("boolean"==typeof t)return t?"true":"false";if("string"==typeof t)return Tt(t,a);if("number"==typeof t){if(0===t)return 1/0/t>0?"0":"-0";var l=String(t);return s?xt(t,l):l}if("bigint"==typeof t){var c=String(t)+"n";return s?xt(t,c):c}var u=void 0===a.depth?5:a.depth;if(void 0===n&&(n=0),n>=u&&u>0&&"object"==typeof t)return Pt(t)?"[Array]":"[Object]";var p=function(e,t){var o;if("\t"===e.indent)o="\t";else{if(!("number"==typeof e.indent&&e.indent>0))return null;o=gt.call(Array(e.indent+1)," ")}return{base:o,prev:gt.call(Array(t+1),o)}}(a,n);if(void 0===r)r=[];else if(Bt(r,t)>=0)return"[Circular]";function d(t,o,i){if(o&&(r=ft.call(r)).push(o),i){var s={depth:a.depth};return Vt(a,"quoteStyle")&&(s.quoteStyle=a.quoteStyle),e(t,s,n+1,r)}return e(t,a,n+1,r)}if("function"==typeof t&&!It(t)){var g=function(e){if(e.name)return e.name;var t=it.call(at.call(e),/^function\s*([\w$]+)/);if(t)return t[1];return null}(t),f=Gt(t,d);return"[Function"+(g?": "+g:" (anonymous)")+"]"+(f.length>0?" { "+gt.call(f,", ")+" }":"")}if(Lt(t)){var y=bt?lt.call(String(t),/^(Symbol\(.*\))_[^)]*$/,"$1"):vt.call(t);return"object"!=typeof t||bt?y:Rt(y)}if(function(e){if(!e||"object"!=typeof e)return!1;if("undefined"!=typeof HTMLElement&&e instanceof HTMLElement)return!0;return"string"==typeof e.nodeName&&"function"==typeof e.getAttribute}(t)){for(var m="<"+ut.call(String(t.nodeName)),h=t.attributes||[],v=0;v"}if(Pt(t)){if(0===t.length)return"[]";var b=Gt(t,d);return p&&!function(e){for(var t=0;t=0)return!1;return!0}(b)?"["+Ut(b,p)+"]":"[ "+gt.call(b,", ")+" ]"}if(function(e){return!("[object Error]"!==Dt(e)||wt&&"object"==typeof e&&wt in e)}(t)){var w=Gt(t,d);return"cause"in Error.prototype||!("cause"in t)||_t.call(t,"cause")?0===w.length?"["+String(t)+"]":"{ ["+String(t)+"] "+gt.call(w,", ")+" }":"{ ["+String(t)+"] "+gt.call(dt.call("[cause]: "+d(t.cause),w),", ")+" }"}if("object"==typeof t&&i){if(Nt&&"function"==typeof t[Nt]&&St)return St(t,{depth:u-n});if("symbol"!==i&&"function"==typeof t.inspect)return t.inspect()}if(function(e){if(!We||!e||"object"!=typeof e)return!1;try{We.call(e);try{Xe.call(e)}catch(m){return!0}return e instanceof Map}catch(xn){}return!1}(t)){var _=[];return ze&&ze.call(t,(function(e,o){_.push(d(o,t,!0)+" => "+d(e,t))})),Ft("Map",We.call(t),_,p)}if(function(e){if(!Xe||!e||"object"!=typeof e)return!1;try{Xe.call(e);try{We.call(e)}catch(t){return!0}return e instanceof Set}catch(xn){}return!1}(t)){var k=[];return Ze&&Ze.call(t,(function(e){k.push(d(e,t))})),Ft("Set",Xe.call(t),k,p)}if(function(e){if(!et||!e||"object"!=typeof e)return!1;try{et.call(e,et);try{tt.call(e,tt)}catch(m){return!0}return e instanceof WeakMap}catch(xn){}return!1}(t))return Mt("WeakMap");if(function(e){if(!tt||!e||"object"!=typeof e)return!1;try{tt.call(e,tt);try{et.call(e,et)}catch(m){return!0}return e instanceof WeakSet}catch(xn){}return!1}(t))return Mt("WeakSet");if(function(e){if(!ot||!e||"object"!=typeof e)return!1;try{return ot.call(e),!0}catch(xn){}return!1}(t))return Mt("WeakRef");if(function(e){return!("[object Number]"!==Dt(e)||wt&&"object"==typeof e&&wt in e)}(t))return Rt(d(Number(t)));if(function(e){if(!e||"object"!=typeof e||!mt)return!1;try{return mt.call(e),!0}catch(xn){}return!1}(t))return Rt(d(mt.call(t)));if(function(e){return!("[object Boolean]"!==Dt(e)||wt&&"object"==typeof e&&wt in e)}(t))return Rt(nt.call(t));if(function(e){return!("[object String]"!==Dt(e)||wt&&"object"==typeof e&&wt in e)}(t))return Rt(d(String(t)));if("undefined"!=typeof window&&t===window)return"{ [object Window] }";if(t===D)return"{ [object globalThis] }";if(!function(e){return!("[object Date]"!==Dt(e)||wt&&"object"==typeof e&&wt in e)}(t)&&!It(t)){var x=Gt(t,d),S=kt?kt(t)===Object.prototype:t instanceof Object||t.constructor===Object,E=t instanceof Object?"":"null prototype",N=!S&&wt&&Object(t)===t&&wt in t?st.call(Dt(t),8,-1):E?"Object":"",A=(S||"function"!=typeof t.constructor?"":t.constructor.name?t.constructor.name+" ":"")+(N||E?"["+gt.call(dt.call([],N||[],E||[]),": ")+"] ":"");return 0===x.length?A+"{}":p?A+"{"+Ut(x,p)+"}":A+"{ "+gt.call(x,", ")+" }"}return String(t)},qt=Ht("%TypeError%"),Kt=Ht("%WeakMap%",!0),Wt=Ht("%Map%",!0),zt=$t("WeakMap.prototype.get",!0),Jt=$t("WeakMap.prototype.set",!0),Yt=$t("WeakMap.prototype.has",!0),Xt=$t("Map.prototype.get",!0),Zt=$t("Map.prototype.set",!0),eo=$t("Map.prototype.has",!0),to=function(e,t){for(var o,n=e;null!==(o=n.next);n=o)if(o.key===t)return n.next=o.next,o.next=e.next,e.next=o,o},oo=String.prototype.replace,no=/%20/g,ro="RFC3986",ao={default:ro,formatters:{RFC1738:function(e){return oo.call(e,no,"+")},RFC3986:function(e){return String(e)}},RFC1738:"RFC1738",RFC3986:ro},io=ao,so=Object.prototype.hasOwnProperty,lo=Array.isArray,co=function(){for(var e=[],t=0;t<256;++t)e.push("%"+((t<16?"0":"")+t.toString(16)).toUpperCase());return e}(),uo=function(e,t){for(var o=t&&t.plainObjects?Object.create(null):{},n=0;n1;){var t=e.pop(),o=t.obj[t.prop];if(lo(o)){for(var n=[],r=0;r=48&&l<=57||l>=65&&l<=90||l>=97&&l<=122||r===io.RFC1738&&(40===l||41===l)?i+=a.charAt(s):l<128?i+=co[l]:l<2048?i+=co[192|l>>6]+co[128|63&l]:l<55296||l>=57344?i+=co[224|l>>12]+co[128|l>>6&63]+co[128|63&l]:(s+=1,l=65536+((1023&l)<<10|1023&a.charCodeAt(s)),i+=co[240|l>>18]+co[128|l>>12&63]+co[128|l>>6&63]+co[128|63&l])}return i},isBuffer:function(e){return!(!e||"object"!=typeof e)&&!!(e.constructor&&e.constructor.isBuffer&&e.constructor.isBuffer(e))},isRegExp:function(e){return"[object RegExp]"===Object.prototype.toString.call(e)},maybeMap:function(e,t){if(lo(e)){for(var o=[],n=0;n0?v.join(",")||null:void 0}];else if(vo(l))A=l;else{var P=Object.keys(v);A=c?P.sort(c):P}for(var I=r&&vo(v)&&1===v.length?o+"[]":o,L=0;L-1?e.split(","):e},Vo=function(e,t,o,n){if(e){var r=o.allowDots?e.replace(/\.([^.[]+)/g,"[$1]"):e,a=/(\[[^[\]]*])/g,i=o.depth>0&&/(\[[^[\]]*])/.exec(r),s=i?r.slice(0,i.index):r,l=[];if(s){if(!o.plainObjects&&Co.call(Object.prototype,s)&&!o.allowPrototypes)return;l.push(s)}for(var c=0;o.depth>0&&null!==(i=a.exec(r))&&c=0;--a){var i,s=e[a];if("[]"===s&&o.parseArrays)i=[].concat(r);else{i=o.plainObjects?Object.create(null):{};var l="["===s.charAt(0)&&"]"===s.charAt(s.length-1)?s.slice(1,-1):s,c=parseInt(l,10);o.parseArrays||""!==l?!isNaN(c)&&s!==l&&String(c)===l&&c>=0&&o.parseArrays&&c<=o.arrayLimit?(i=[])[c]=r:"__proto__"!==l&&(i[l]=r):i={0:r}}r=i}return r}(l,t,o,n)}},Do={formats:ao,parse:function(e,t){var o=function(e){if(!e)return Io;if(null!==e.decoder&&void 0!==e.decoder&&"function"!=typeof e.decoder)throw new TypeError("Decoder has to be a function.");if(void 0!==e.charset&&"utf-8"!==e.charset&&"iso-8859-1"!==e.charset)throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var t=void 0===e.charset?Io.charset:e.charset;return{allowDots:void 0===e.allowDots?Io.allowDots:!!e.allowDots,allowPrototypes:"boolean"==typeof e.allowPrototypes?e.allowPrototypes:Io.allowPrototypes,allowSparse:"boolean"==typeof e.allowSparse?e.allowSparse:Io.allowSparse,arrayLimit:"number"==typeof e.arrayLimit?e.arrayLimit:Io.arrayLimit,charset:t,charsetSentinel:"boolean"==typeof e.charsetSentinel?e.charsetSentinel:Io.charsetSentinel,comma:"boolean"==typeof e.comma?e.comma:Io.comma,decoder:"function"==typeof e.decoder?e.decoder:Io.decoder,delimiter:"string"==typeof e.delimiter||Ao.isRegExp(e.delimiter)?e.delimiter:Io.delimiter,depth:"number"==typeof e.depth||!1===e.depth?+e.depth:Io.depth,ignoreQueryPrefix:!0===e.ignoreQueryPrefix,interpretNumericEntities:"boolean"==typeof e.interpretNumericEntities?e.interpretNumericEntities:Io.interpretNumericEntities,parameterLimit:"number"==typeof e.parameterLimit?e.parameterLimit:Io.parameterLimit,parseArrays:!1!==e.parseArrays,plainObjects:"boolean"==typeof e.plainObjects?e.plainObjects:Io.plainObjects,strictNullHandling:"boolean"==typeof e.strictNullHandling?e.strictNullHandling:Io.strictNullHandling}}(t);if(""===e||null==e)return o.plainObjects?Object.create(null):{};for(var n="string"==typeof e?function(e,t){var o,n={},r=t.ignoreQueryPrefix?e.replace(/^\?/,""):e,a=t.parameterLimit===1/0?void 0:t.parameterLimit,i=r.split(t.delimiter,a),s=-1,l=t.charset;if(t.charsetSentinel)for(o=0;o-1&&(u=Po(u)?[u]:u),Co.call(n,c)?n[c]=Ao.combine(n[c],u):n[c]=u}return n}(e,o):e,r=o.plainObjects?Object.create(null):{},a=Object.keys(n),i=0;i0?g+d:""}};const Bo="https://testmanager.ouxuanzhineng.cn",To={padLogin:`${Bo}/assistant/WechatMiniApplogin`,padList:`${Bo}/admin/stadium/list`,getGoodsList:`${Bo}/admin/erpRetailGoods/list`,getGoodFromPad:`${Bo}/admin/erpRetailGoods/getErpGoodsBySkuOfPad`,getGoodsBySKU:`${Bo}/admin/erpRetailOrder/payOfBarcodeScanner`,getGoodsClassify:`${Bo}/classifyer/all`,makeOrder:`${Bo}/admin/erp/retailByPayOfQrcode`,payOrder:`${Bo}/admin/order/pay/online/payByScannedCode`,checkOrder:`${Bo}/pay/huishouqian/checkOrder`,version:`${Bo}/version`,getDoorList:`${Bo}/v3/pad/ListHardwareByStadiumId`,openDoor:`${Bo}/v3/pad/GateOpenById`},jo={ORIGIN:Bo,API:To},Ro=e=>(e=e.toString())[1]?e:"0"+e,Mo=(e,t)=>{switch(t){case"nT":uni.navigateTo({url:e});break;case"rT":uni.redirectTo({url:e});break;case"rL":uni.reLaunch({url:e});break;case"sT":uni.switchTab({url:e});break;default:uni.navigateBack({delta:1})}};function Fo(e="加载中",t=!0){uni.showLoading({mask:t,title:e})}function Uo(){uni.hideLoading()}function Go({title:e="提示",content:t="",showCancel:o=!1,cancelText:n="取消",confirmText:r="确定",confirmColor:a="#009874",success:i,fail:s,complete:l}){uni.showModal({title:e,content:t,showCancel:o,cancelText:n,confirmColor:a,confirmText:r,success:i,fail:s,complete:l})}function Ho(e,t){let o=new Date(e),n=new Date(t);return o.setHours(0,0,0,0)==n.setHours(0,0,0,0)}function $o(e,t){let o="";for(var n in e)o+=`&${n}=${e[n]}`;return t+"?"+o.slice(1)}const Qo={checkSerialPortMessage:function(e){return e?"aa01ea"==e?"":e:""},formatTime:e=>{const t=e.getFullYear(),o=e.getMonth()+1,n=e.getDate(),r=e.getHours(),a=e.getMinutes(),i=e.getSeconds();return[t,o,n].map(Ro).join("-")+" "+[r,a,i].map(Ro).join(":")},formatNumber:Ro,formatDate:({date:e=new Date,partition:t="-"})=>{let o;o="string"==typeof e&&-1!=e.indexOf("-")?new Date(e.replace(/\-/g,"/")):new Date(e);const n=o.getFullYear(),r=o.getMonth()+1,a=o.getDate();return"zh"==t?`${n}年${r}月${a}日`:[n,r,a].map(Ro).join(t)},routeTo:Mo,showNone:function(e,t=1500){uni.hideToast(),uni.hideLoading(),uni.showToast({mask:!0,title:e,icon:"none",duration:t})},showLoad:Fo,hideLoad:Uo,showModal:Go,showModalMsg:function(e="加载中",t=!0){return new Promise(((n,r)=>{uni.showModal({title:"提示",content:e,showCancel:t,confirmText:"确定",confirmColor:"#009874",success:function(e){e.confirm?(o("log","at utils/util.js:125","用户点击确定"),n(!0)):(o("log","at utils/util.js:128","用户点击取消"),r(!1))},fail:function(e){r(!1)}})}))},showNoneModal:function(e){uni.showModal({title:"提示",content:e,showCancel:!1,confirmText:"确定",confirmColor:"#009874"})},debounce:function(e,t,o){let n,r,a,i,s;const l=function(){const c=+new Date-i;c0?n=setTimeout(l,t-c):(n=null,o||(s=e.apply(a,r),n||(a=r=null)))};return function(...r){a=this,i=+new Date;const c=o&&!n;return n||(n=setTimeout(l,t)),c&&(s=e.apply(a,r),a=r=null),s}},jsonStr:function(e){return encodeURIComponent(JSON.stringify(e))},jsonPar:function(e){return JSON.parse(decodeURIComponent(e))},promisify:e=>(t,...o)=>new Promise(((n,r)=>{e(Object.assign({},t,{success:n,fail:r}),...o)})),previousPageFunction:function({fnName:e,query:t}){return new Promise(((n,r)=>{try{getCurrentPages().length>1?(getCurrentPages()[getCurrentPages().length-2].$vm[e](t),n("success")):(o("error","at utils/util.js:195","当前路由栈为一,无法调取上一页数据"),r("当前路由栈为一,无法调取上一页数据"))}catch(a){o("error","at utils/util.js:199","调用上一页面栈方法失败!",a),r("调用上一页面栈方法失败!")}}))},getNodeMes:function(e,t=null){return new Promise((o=>{(t?uni.createSelectorQuery().in(t):uni.createSelectorQuery()).select(e).boundingClientRect((e=>{o(e)})).exec()}))},failAuthorizeTosetting:function(e="调用失败,请打开检查授权状态"){Go({title:"提示",content:e,showCancel:!0,confirmText:"打开",success:e=>{e.confirm&&uni.openSetting()}})},getSceneQuery:function(e){return(decodeURIComponent(e)||null).split("&").reduce(((e,t)=>{let o=t.split("=");return e[`${o[0]}`]=o[1],e}),{})||null},getUrlQuery:function(e,t){var o=decodeURI(t).split("?a=1").join("");return-1!=o.indexOf(`${e}=`)?o.split(`${e}=`)[1].split("&")[0]:null},getQueryString:function(e){var t=new RegExp("(^|&)"+e+"=([^&]*)(&|$)"),o=window.location.search.substr(1).match(t);return null!=o?o[2]:null},getRandom:function(e,t){return Math.round(Math.random()*(t-e))+e},get_zh_day:function(e){return Ho((new Date).getTime(),new Date(e).getTime())?"今天":["周日","周一","周二","周三","周四","周五","周六"][new Date(e).getDay()]||""},isSameDay:Ho,get_zh_date:function(e=new Date){return`${new Date(e).getMonth()+1}月${new Date(e).getDate()}日`},substrDate:function(e){if(e)return e.substr(0,10)||"-"},requestPayment:function(e={}){Fo(),uni.requestPayment({timeStamp:e.timeStamp||"",nonceStr:e.nonceStr||"",package:e.package||"",signType:e.signType||"",paySign:e.paySign||"",success:function(t){e.success&&e.success(t)},fail:function(t){e.fail&&e.fail(t)},complete:function(t){Uo(),e.complete&&e.complete(t)}})},getQueryStr:function({url:e,name:t}){let o=(e.split("?")[1]||"").split("&")||[];for(let n=0;n{let n=t.split("=");return e[n[0]]=n[1],e}),{})||{}},specialFormatDate:function(e){var t=(new Date).getTime(),o=new Date(t+864e5*e);let n={};return n.y=o.getFullYear(),n.m=o.getMonth()+1,n.d=o.getDate(),n},timeToSec:function(e,t,o){return 1e3*(Number(3600*e)+Number(60*t)+Number(o))},debug:!1,showLog:function(e,t,o){$o(e,t);let n=t.split("?")[0].split("/");n[n.length-1]},getWebURL:$o,getUrlParams:function(e){var t={},o=e.split("?");if(o.length<=1)return t;o=o[1].split("&");for(var n=0;n{uni.getSystemInfo({success:function(t){e(t.windowHeight)},fail:t=>{o("log","at utils/util.js:499","getSystemInfo fail",t,"default to 1000"),e(1e3)}})}))},getNvueRefSize:function(e,t,o){return new Promise(((e,t)=>{}))},getH5RefSize:function(e,t){return new Promise(((e,t)=>{}))},resetHeader:function(e,t,o,n){t=function(e){let t=e.split("?")[0];return t=t.split(jo.ORIGIN),t[t.length-1]}(t);let r=getApp().globalData.timeDifference||0,{S:a,T:i}=function(e){let t="";e.data&&(t=JSON.stringify(e.data));let o=e.url+"?"+Do.stringify(e.params),n=parseInt((new Date).getTime()/1e3-e.timeDifference),r=t+"|1ba2212f78610369467de90fb1e3d345|"+o+"|4e68cd333457cb297a05ec7f77a9ad978b56cf57|"+n;return{S:V.hex_md5(r),T:n}}({data:o,params:n,url:t,timeDifference:r});return{...e,S:a,T:i}},updateTimeDifference:function(e){let{now_timestamp:t}=e,o="";t&&(o=parseInt((new Date).getTime()/1e3-t)),getApp().globalData.timeDifference=o},searchGoodBySku:function(e){return new Promise(((t,n)=>{"string"==typeof e&&e.trim()||(o("error","at utils/util.js:609","Invalid SKU. Please provide a non-empty string."),n(!1));let r=getApp().globalData.goodsList.list.filter((t=>{let o=t.erp_goods.erp_goods_sku==e,n=t.erp_goods.stock_num>=1;return o&&n}));r.length?t(r):n(!1)}))},getPostParams:function(){let e=getApp(),t=uni.getStorageSync("stadiumInfo");if(!e.globalData.accountInfo||!e.globalData.accountInfo.brand_id||!e.globalData.accountInfo.token)return Mo("/pages/login/index","rL"),!1;let{brand_id:o,token:n}=e.globalData.accountInfo;return{brand_id:o,token:n,stadium_id:t.id}},asyncSetTimeOut:async function(e){return await new Promise((t=>{setTimeout((()=>t("asyncSetTimeOut")),e||1e3)}))},getPageRoute:function(){var e=getCurrentPages();return e[e.length-1].route}};const qo=new class{request(e,t,n,r,a,i){return new Promise((async(s,l)=>{uni.request({url:e,timeout:3e5,sslVerify:!1,data:t,method:n,header:{...r},success:n=>{n.extension&&Qo.updateTimeDifference(n.extension);{o("log","at utils/server.js:24","islog req success----\x3e");let n=function(e,t){let o="";for(var n in e)o+=`&${n}=${e[n]}`;return t+"?"+o.slice(1)}(t,e),r=e.split("?")[0].split("/"),a=r[r.length-1];o("log","at utils/server.js:28","--------------------\x3e> ["+a+"][log]\n请求 Data: \n"+JSON.stringify(t)+"\n URL:\n"+n+"\n <<-------------------- ["+a+"][log] ↑↑↑\n")}if(a){if(""==i)throw Error("默认回调,失败提示不能为空 key -> failMsg");!function({res:e,failMsg:t,resolve:n,reject:r,url:a,data:i}){0==e.data.code?n(e.data.data):(Qo.hideLoad(),Qo.showNone(e.data.message||t||""),401==e.data.code&&uni.showModal({title:"提示",content:e.data.message,success:function(e){e.confirm?(o("log","at utils/server.js:86","用户点击确定"),Qo.routeTo("/pages/login/index","rL")):e.cancel&&o("log","at utils/server.js:89","用户点击取消")}}),r({url:a,res:e,data:i}))}({url:e,data:t,res:n,failMsg:i,resolve:s,reject:l})}else s(n)},fail:r=>{o("log","at utils/server.js:48","req fail----\x3e",{link:e,query:t,method:n,data:r}),Qo.hideLoad(),"string"!=typeof r.errMsg||-1==r.errMsg.indexOf("timeout")&&-1==r.errMsg.indexOf("interrupted")&&-1==r.errMsg.indexOf("请求超时")?"string"==typeof r.errMsg?Qo.showNone(r.errMsg):Qo.showNone("请求数据失败!请检查当前网络状态。"):Qo.showNone("网络超时!"),l(r)},complete(o){Qo.showLog(t,e,o)}})}))}get({url:e,data:t={},header:o={},isDefaultGet:n=!0,failMsg:r=""}){return o=Qo.resetHeader(o,e,t,{}),this.request(e,t,"GET",o,n,r)}post({url:e,data:t={},header:o={},isDefaultGet:n=!0,failMsg:r=""}){return o=Qo.resetHeader(o,e,t,{}),this.request(e,t,"POST",o,n,r)}uploadFile({url:e,filePath:t,onProgressCallBack:o,formData:n={}}){return new Promise(((r,a)=>{wx.uploadFile({url:e,filePath:t,formData:n,name:"file",success:r,fail:a}).onProgressUpdate((e=>o&&o(e)))}))}},Ko=t("Daemon_Uni");const Wo={__name:"index",setup(t){n((async()=>{!function(){let e=uni.getStorageSync("userInfo");o("log","at pages/login/index.vue:162","page-onReady autoLogin userInfo: ",e||"none"),e&&(p.value=e.username,d.value=e.password,g.value=e.brand_id,h())}()}));const{isDaemonRun:r,selectDaemon:c,daemonRun:u}=function(){const t=e.ref(!1);async function n(e){e?Ko.startWatchDog({api_name:""},(e=>{o("log","at pages/login/mixins/watchDogCompositionAPI.js:41",e),t.value=!0})):Ko.closeWatchDog({api_name:""},(e=>{o("log","at pages/login/mixins/watchDogCompositionAPI.js:48",e),t.value=!1}))}return{isDaemonRun:t,selectDaemon:async function(){const e=["开启-进程守护","关闭-进程守护"];uni.showActionSheet({itemList:e,success:async r=>{const a=e[r.tapIndex];o("log","at pages/login/mixins/watchDogCompositionAPI.js:18","选中了第"+(r.tapIndex+1)+"个按钮"+a),0===r.tapIndex?await n(!0):await n(!1),o("log","at pages/login/mixins/watchDogCompositionAPI.js:26","daemonRun",a,t.value)},fail:e=>{o("log","at pages/login/mixins/watchDogCompositionAPI.js:29",e.errMsg)}})},daemonRun:n}}(),p=e.ref(""),d=e.ref(""),g=e.ref(""),f=e=>{p.value=e},y=e=>{d.value=e},m=e=>{g.value=e};function h(){Qo.showLoad("登录中...");let e={assistant_client:"pc",brand_id:g.value,username:p.value,password:d.value};qo.post({url:To.padLogin,data:e,isDefaultGet:!0,failMsg:"操作失败!"}).then((e=>{Qo.hideLoad(),o("log","at pages/login/index.vue:106","padLogin suc: ",e);let{token:t,role:n}=e,r=getApp().globalData.autoLogin,a=uni.getStorageSync("stadiumInfo");var i;return i={username:p.value,password:d.value,brand_id:g.value,token:t,role:n},uni.setStorageSync("userInfo",i),getApp().globalData.accountInfo.brand_id=i.brand_id,getApp().globalData.accountInfo.username=i.username,getApp().globalData.accountInfo.password=i.password,getApp().globalData.accountInfo.token=i.token,getApp().globalData.accountInfo.role=i.role,o("log","at pages/login/index.vue:157","存储到本地localStorage "+uni.getStorageSync("userInfo").username),r&&a&&function(e){let t=uni.getStorageSync("stadiumInfo");return e==t.brand_id||(o("log","at pages/login/index.vue:142","登录的品牌不是历史登录设备的品牌, 清空stadiumInfo缓存"),uni.clearStorageSync("stadiumInfo"),!1)}(g.value)?(getApp().globalData.autoLogin=!1,setTimeout((()=>{Qo.routeTo("/pages/index/standby","nT")}),1e3),Qo.showNone("登录成功")):(getApp().globalData.autoLogin=!1,setTimeout((()=>{Qo.routeTo("/pages/login/success","nT")}),1e3),Qo.showNone("登录成功,请先选择门店"))})).finally((()=>{Qo.hideLoad()}))}return(t,o)=>(e.openBlock(),e.createBlock(a,null,{default:e.withCtx((()=>[e.createElementVNode("view",{class:"login-index"},[e.createElementVNode("view",{class:"li-logo"},[e.createVNode(i)]),e.createElementVNode("view",{class:"li-name"},"欢迎使用欧轩智能场馆平板端系统"),e.createElementVNode("view",{class:"li-from"},[e.createVNode(s,{username:p.value,"onUpdate:username":f,password:d.value,"onUpdate:password":y,brand_id:g.value,"onUpdate:brand_id":m},null,8,["username","password","brand_id"])]),e.createElementVNode("view",{class:"li-tip",onClick:o[0]||(o[0]=()=>{})},"*登录账号密码请从pc端后台管理【设备运营管理平板管理】里获取"),e.createElementVNode("view",{class:"li-btn"},[e.createVNode(l,{onClick:h},{default:e.withCtx((()=>[e.createTextVNode("登录")])),_:1}),e.createVNode(l,{onClick:e.unref(c),style:{"margin-top":"20rpx"}},{default:e.withCtx((()=>[e.createTextVNode("进程守护设置")])),_:1},8,["onClick"])])])])),_:1}))}},zo=r({__name:"page_standby",setup(t){const n=e.ref(0);var r=e.computed((()=>{let{accountInfo:e,stadiumInfo:t}=getApp().globalData,n=e.username||"用户";return uni.getStorageSync("stadiumInfo")&&(o("log","at components/index/page_standby.vue:39","stadiumInfo: ",uni.getStorageSync("stadiumInfo")),t=uni.getStorageSync("stadiumInfo")),t&&(n=t.venue_name),n}));const a=()=>{Qo.routeTo("/pages/index/index","nT")};function i(){n.value++,o("log","at components/index/page_standby.vue:63","tabChnage: ",n.value),n.value>=10&&(n.value=0,Qo.routeTo("/pages/login/success","nT")),s()}const s=Qo.debounce((function(){n.value=0}),1e3,!1);return(t,o)=>(e.openBlock(),e.createElementBlock("view",{class:"content"},[e.createElementVNode("view",{class:"content_title"},[e.createElementVNode("text",{class:"txt",onClick:i},e.toDisplayString(e.unref(r)),1)]),e.createElementVNode("view",{class:"content_info"},[e.createElementVNode("text",{class:"txt"},"欢迎使用自助收银")]),e.createElementVNode("image",{class:"content_tip",src:"/static/index_tips.png",mode:"scaleToFill"}),e.createElementVNode("image",{class:"content_img",src:"/static/index_person.png",mode:"scaleToFill"}),e.createElementVNode("view",{class:"content_btn",onClick:a},[e.createElementVNode("image",{class:"icon_saoma",src:"/static/images/saoma.png",mode:"scaleToFill"}),e.createElementVNode("text",{class:"txt"},"请扫描商品条形码")]),e.createElementVNode("view",{class:"content_logo"},[e.createElementVNode("text",{class:"txt"},"欧轩智能场馆提供技术支持")])]))}},[["__scopeId","data-v-c0eb5702"]]),Jo=e=>{(e.$renderjs||(e.$renderjs=[])).push("keyboard"),(e.$renderjsModules||(e.$renderjsModules={})).keyboard="082c61ac"},Yo={methods:{onEvent(e){this.$emit(e.type,e)}}};Jo(Yo);const Xo=r(Yo,[["render",function(t,o,n,r,a,i){return e.openBlock(),e.createElementBlock("view")}]]);const Zo={dict:{8:"backspace",9:"tab",13:"enter",16:"shift",17:"ctrl",18:"alt",19:"pause_break",20:"caps_lock",27:"escape",33:"page_up",34:"page_down",35:"end",36:"home",37:"left_arrow",38:"up_arrow",39:"right_arrow",40:"down_arrow",45:"insert",46:"delete",48:"0",49:"1",50:"2",51:"3",52:"4",53:"5",54:"6",55:"7",56:"8",57:"9",65:"a",66:"b",67:"c",68:"d",69:"e",70:"f",71:"g",72:"h",73:"i",74:"j",75:"k",76:"l",77:"m",78:"n",79:"o",80:"p",81:"q",82:"r",83:"s",84:"t",85:"u",86:"v",87:"w",88:"x",89:"y",90:"z",91:"left_window_key",92:"right_window_key",93:"select_key",96:"numpad_0",97:"numpad_1",98:"numpad_2",99:"numpad_3",100:"numpad_4",101:"numpad_5",102:"numpad_6",103:"numpad_7",104:"numpad_8",105:"numpad_9",106:"multiply",107:"add",109:"subtract",110:"decimal_point",111:"divide",112:"f1",113:"f2",114:"f3",115:"f4",116:"f5",117:"f6",118:"f7",119:"f8",120:"f9",121:"f10",122:"f11",123:"f12",144:"num_lock",145:"scroll_lock",186:"semi_colon",187:"equal_sign",188:"comma",189:"dash",190:"period",191:"forward_slash",192:"grave_accent",219:"open_bracket",220:"back_slash",221:"close_braket",222:"single_quote"},resultScan:async function(e){return e=await function(e,t,n){return new Promise(((r,a)=>{let i=[];try{e.forEach((function(e,o,r){t.forEach((function(t,a,i){e===t&&("shift"==r[o+1]?(r[o+1]="",r[o]=n[a].double):r[o]=n[a].single)}))})),i=e}catch(xn){o("warn","at utils/dictOfKeyboard.js:164","异常:",xn)}r(i)}))}(e,["semi_colon","equal_sign","comma","dash","period","forward_slash","grave_accent","open_bracket","back_slash","close_braket","single_quote","8","7","6","5","4","3","2","1"],[{double:":",single:";"},{double:"+",single:"="},{double:"<",single:","},{double:"_",single:"-"},{double:">",single:"."},{double:"?",single:"/"},{double:"~",single:"`"},{double:"{",single:"["},{double:"|",single:"/"},{double:"}",single:"]"},{double:'"',single:"'"},{double:"*",single:"8"},{double:"&",single:"7"},{double:"^",single:"6"},{double:"%",single:"5"},{double:"$",single:"4"},{double:"#",single:"3"},{double:"@",single:"2"},{double:"!",single:"1"}]),e=await function(e,t,n){return new Promise(((n,r)=>{let a=[];try{e.forEach((function(e,o,n){t.forEach((function(t,r,a){e===t&&"shift"==n[o+1]&&(n[o+1]="",n[o]=n[o].toUpperCase())}))})),a=e}catch(xn){o("warn","at utils/dictOfKeyboard.js:189","异常:",xn)}n(a)}))}(e,["a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z"]),e=await function(e,t,n){return new Promise(((r,a)=>{let i=[];try{e.forEach((function(e,o,r){t.forEach((function(t,a,i){e===t&&(r[o]=n[a])}))})),i=e}catch(xn){o("warn","at utils/dictOfKeyboard.js:210","异常:",xn)}r(i)}))}(e,["multiply","divide","add","subtract","decimal_point"],["*","/","+","-","."]),o("log","at utils/dictOfKeyboard.js:140","result 最后结果: ",e.join("")),e.join("")||""}};const en={resetOXPrintInfo:function(e){let t=[],o="-------------------------------\n";t.push(o);for(let n of e.goods_data){let e=n.name+";"+n.nums+";"+n.price+";"+(n.price*n.nums).toFixed(2);t.push(e)}return t.push(o),t.push(`金额合计:${e.amount||"-"}\n`),t.push(`交易时间:${e.time||"-"}\n`),t.push(`订单号:${e.order_no||"-"}\n`),t.push(`门店:${e.venue_name||"-"}\n`),t},testPrintInfo:{goods_data:[{id:31,name:"南瓜1Kg",nums:1,price:.01,unit:"个"},{id:32,name:"乔丹篮球",nums:2,price:.01,unit:"个"}],amount:.03}};let tn=getApp();const on=r({components:{"page-standby":zo,"keyboard-listener":Xo},watch:{},computed:{shopListTotalPrice(){let e=0;return!this.shopList||this.shopList.length<1?0:(this.shopList.forEach((t=>{e+=t.shopCountPrice})),e)},shopListTotalCount(){let e=0;return!this.shopList||this.shopList.length<1?0:(this.shopList.forEach((t=>{e+=t.shopCount})),e)}},data:()=>({showQRInputBox:!1,showEndPhoneBox:!1,screenHeight:"",footerHeight:"",globalData:"",shopList:[],decryptList:[],strResult:""}),async onLoad(e){o("log","at pages/index/standby.vue:79","onload:",e)},async onReady(){o("log","at pages/index/standby.vue:86","the index page onReady----"+this.screenHeight,uni.getStorage("stadiumInfo")),tn=getApp(),setTimeout((async()=>{}),100)},methods:{async setTestSku(){o("log","at pages/index/standby.vue:96","Test set SKU 10000012");let e=await this.searchGoodBySku("10000012");this.shopList=this.shopList.concat(e)},searchGoodBySku:async e=>{let{brand_id:t,stadium_id:n,token:r}=Qo.getPostParams(),a={brand_id:t,token:r,stadium_id:n,sku:e};return o("log","at pages/index/standby.vue:106","searchGoodBySku urlParams:",a),qo.post({url:To.getGoodsBySKU,data:a,isDefaultGet:!0,failMsg:"操作失败!"}).then((e=>(Qo.hideLoad(),o("log","at pages/index/standby.vue:116","searchGoodBySku suc: ",e),(e=[e]).forEach((e=>{e.shopCount=1,e.shopCountPrice=e.user_price})),e)))},combinedList(e,t){if(o("log","at pages/index/standby.vue:129","combinedList",e,t),!t)return Qo.showNone("未找到商品");let n=e;return t.forEach((e=>{let t=n.findIndex((t=>t.id==e.id));-1!=t?(n[t].shopCount+=1,n[t].shopCountPrice=n[t].user_price*n[t].shopCount):n.push(e)})),n},async onKeyup(e){o("log","at pages/index/standby.vue:147","按键松开: ",e);let t=Zo.dict[e.keyCode];if(o("log","at pages/index/standby.vue:150","keyCode from keyboard:",t),this.decryptList.push(t),13!=e.keyCode)return o("log","at pages/index/standby.vue:153","继续接收:",this.decryptList);this.decryptList.pop(),this.strResult=await Zo.resultScan(this.decryptList),o("log","at pages/index/standby.vue:157","扫码结果-step-1:",this.strResult),this.orderQrcode=this.strResult,o("log","at pages/index/standby.vue:159","decryptList-before-splice: ",this.decryptList),this.decryptList.splice(0),o("log","at pages/index/standby.vue:161","decryptList-after-splice: "+this.decryptList),-1!=this.strResult.indexOf("down_arrow")&&(this.strResult=this.strResult.replace("down_arrow","")),o("log","at pages/index/standby.vue:167","扫码结果-step-2:",this.strResult),await this.searchGoodBySku(this.strResult).then((e=>(o("log","at pages/index/standby.vue:170","searchGoodBySku suc: ",e),e))).then((e=>{this.addSkuListToShopList(e)})).catch((e=>{var t;o("log","at pages/index/standby.vue:176","searchGoodBySku err: ",e),Qo.showNone((null==(t=e.res.data)?void 0:t.message)||"未找到商品-s")}))},addSkuListToShopList(e){o("log","at pages/index/standby.vue:187","addSkuListToShopList",e),e=encodeURIComponent(JSON.stringify(e)),uni.reLaunch({url:`/pages/index/index?skulist=${e}`,animationType:"zoom-fade-out",animationDuration:300})},onKeydown(e){},getGoodFromPad:(e,t)=>qo.post({url:To.getGoodFromPad,data:{sku:e,brand_id:t},isDefaultGet:!0}).then((e=>(Qo.hideLoad(),e.data.code,e))),async updateGoodsList(){let e=await this.getGoodsList();o("log","at pages/index/standby.vue:221","app.globaldata: ",tn.globalData),tn.globalData.goodsList=e},updateShopList(){tn.globalData.shopList=this.shopList},getGoodsList(){let{brand_id:e,stadium_id:t,token:n}=Qo.getPostParams(),r={brand_id:e,stadium_id:t,token:n,type_key:"",key:"",page:"1",page_size:"9999",is_sale:"1",is_show_on_assistant:"1"};return qo.post({url:To.getGoodsList,data:r,isDefaultGet:!0,failMsg:"获取商品列表失败"}).then((e=>(Qo.hideLoad(),o("log","at pages/index/standby.vue:252","getGoodsList suc: ",e),e.list&&0!=e.list.length?(e.list.forEach((e=>{e.shopCount=1,e.shopCountPrice=e.user_price})),e):uni.showModal({title:"提示",content:"该门店暂无商品,请尝试更换门店",success:function(e){e.confirm?(o("log","at pages/index/standby.vue:260","用户点击确定"),Qo.routeTo("/pages/login/index","rL")):e.cancel&&o("log","at pages/index/standby.vue:263","用户点击取消")}}))))}}},[["render",function(t,o,n,r,a,i){const s=e.resolveComponent("page-standby"),l=e.resolveComponent("keyboard-listener");return e.openBlock(),e.createElementBlock("view",null,[e.createVNode(s),e.createVNode(l,{style:{height:"1px"},onKeyup:i.onKeyup,onKeydown:i.onKeydown},null,8,["onKeyup","onKeydown"])])}]]),nn=r({__name:"view_header",props:{backgroundCustom:{type:String,default:"#F5F7F8"},needBorder:{type:Boolean,default:!0}},emits:["closeUse"],setup(t,{emit:o}){const n=t,r=e.ref(300);let a=e.ref(null);e.onMounted((async e=>{clearInterval(a),a=null,a=setInterval((()=>{r.value--,r.value<=1&&(clearInterval(a),a=null,Qo.routeTo("/pages/index/standby","rL"))}),1e3)})),e.onBeforeUnmount((()=>{clearInterval(a),a=null})),e.onUnmounted((()=>{clearInterval(a),a=null}));const i=e.computed((()=>n.needBorder?"border-bottom: 1rpx solid #F5F7F8;":"border-bottom:none;")),s=()=>{Qo.routeTo("/pages/index/standby","rL")};return(t,o)=>(e.openBlock(),e.createElementBlock("view",{class:"header-box",style:e.normalizeStyle([{background:n.backgroundCustom},e.unref(i)])},[e.createElementVNode("view",{class:"video-tip"},[e.createElementVNode("image",{class:"v-image",src:"/static/index/camera_icon2.png",mode:"widthFix"}),e.createElementVNode("text",{class:"v-text"},"您已进入视频覆盖区")]),e.createElementVNode("view",{class:"cancel-button",onClick:s},[e.createElementVNode("text",{class:"v-text"},e.toDisplayString(r.value)+" 取消交易",1)])],4))}},[["__scopeId","data-v-9163470a"]]),rn=r({__name:"view_footer",props:{maskHeight:{type:Number,default:200},tolCount:{type:Number,default:0},tolPrice:{type:Number,default:0}},emits:["clickQR","clickVIP","clickToPay"],setup(t,{emit:o}){let n=e.ref(!1);e.ref(""),e.ref("");let r=()=>{o("clickQR","")},a=()=>{o("clickToPay","")};return e.onMounted((async e=>{})),(o,i)=>(e.openBlock(),e.createElementBlock("view",{class:"footer-box"},[e.unref(n)?(e.openBlock(),e.createElementBlock("view",{key:0,class:"f-user"},[e.createElementVNode("text",{class:"txt"},"猫星人(18316553589)")])):e.createCommentVNode("",!0),e.unref(n)?(e.openBlock(),e.createElementBlock("view",{key:1,class:"f-line"})):e.createCommentVNode("",!0),e.unref(n)?(e.openBlock(),e.createElementBlock("view",{key:2,class:"f-vip-info"},[e.createElementVNode("view",{class:"f-coupon"},[e.createElementVNode("text",{class:"txt1"},"优惠券:"),e.createElementVNode("text",{class:"txt2"},"-¥"),e.createElementVNode("text",{class:"txt3"},"6.00 "),e.createElementVNode("image",{class:"img",src:"/static/index/orange_arrow_right.png",mode:"scaleToFill"})]),e.createElementVNode("view",{class:"f-score"},[e.createElementVNode("text",{class:"txt1"},"积分:"),e.createElementVNode("text",{class:"txt2"},"-¥"),e.createElementVNode("text",{class:"txt3"},"2.00 "),e.createElementVNode("image",{class:"img",src:"/static/index/orange_arrow_right.png",mode:"scaleToFill"})])])):e.createCommentVNode("",!0),e.createElementVNode("view",{class:"f-buy-info"},[e.createElementVNode("view",{class:"fi-area"},[e.createElementVNode("view",{class:"f-total-price"},[e.createElementVNode("text",{class:"txt1"},"应付:"),e.createElementVNode("text",{class:"txt2"},"¥"),e.createElementVNode("text",{class:"txt3"},e.toDisplayString(t.tolPrice.toFixed(2)||"0.00"),1)]),e.createElementVNode("text",{class:"txt_middle"},"|"),e.createElementVNode("view",{class:"f-total-count"},[e.createElementVNode("text",{class:"txt"},"商品:"),e.createElementVNode("text",{class:"txt"},e.toDisplayString(t.tolCount),1)])]),e.createElementVNode("view",{class:"fi-choose"},[e.createElementVNode("view",{class:"qr-box",onClick:i[0]||(i[0]=(...t)=>e.unref(r)&&e.unref(r)(...t))},[e.createElementVNode("image",{class:"qr-img",src:"/static/index/qr_icon.png",mode:"scaleToFill"}),e.createElementVNode("text",{class:"txt"},"输入条形码")])])]),e.createElementVNode("view",{class:"btn-style",onClick:i[1]||(i[1]=(...t)=>e.unref(a)&&e.unref(a)(...t))},[e.createElementVNode("text",{class:"txt"},"去付款")])]))}},[["__scopeId","data-v-3aed5e99"]]),an=r({__name:"list_item",props:["mkey","mitem"],emits:["delItem","addItem","minusItem"],setup(t,{emit:o}){const n=t;e.onMounted((async e=>{}));const r=()=>{o("addItem",n.mkey)},a=()=>{o("minusItem",n.mkey)},i=()=>{o("delItem",n.mkey)};return(o,n)=>{var s;return e.openBlock(),e.createElementBlock("view",{class:"buy-item"},[e.createElementVNode("view",{class:"buy-item-left"},[e.createElementVNode("image",{class:"img",src:t.mitem.goods_img||"-",mode:"aspectFill"},null,8,["src"])]),e.createElementVNode("view",{class:"buy-item-right"},[e.createElementVNode("view",{class:"br-top"},[e.createElementVNode("text",{class:"brt-title"},e.toDisplayString(t.mitem.goods_name||"-"),1),e.createElementVNode("image",{class:"img",src:"/static/index/delete_icon.png",mode:"scaleToFill",onClick:i})]),e.createElementVNode("view",{class:"br-bottom"},[e.createElementVNode("view",{class:"brb-left"},[e.createElementVNode("text",{class:"brb-specs"},e.toDisplayString((null==(s=t.mitem.erp_goods)?void 0:s.erp_goods_specs)||"-"),1),e.createElementVNode("view",{class:"brb-price"},[e.createElementVNode("text",{class:"brbp-single-price"},"¥"+e.toDisplayString(t.mitem.user_price||"-"),1),t.mitem.underlined_price_show?(e.openBlock(),e.createElementBlock("text",{key:0,class:"brbp-underline-price"},"¥"+e.toDisplayString(t.mitem.underlined_price||"-"),1)):e.createCommentVNode("",!0)])]),e.createElementVNode("view",{class:"brb-middle"},[e.createElementVNode("image",{class:"img",src:"/static/index/del_icon.png",mode:"scaleToFill",onClick:a}),e.createElementVNode("text",{class:"txt"},e.toDisplayString(t.mitem.shopCount||1),1),e.createElementVNode("image",{class:"img",src:"/static/index/add_icon.png",mode:"scaleToFill",onClick:r})]),e.createElementVNode("view",{class:"brb-right"},[e.createElementVNode("view",{class:"brbr-total-price"},[e.createElementVNode("text",{class:"brbrp-price1"},"¥"),e.createElementVNode("text",{class:"brbrp-price2"},e.toDisplayString(t.mitem.shopCountPrice.toFixed(2)||"-"),1)])])])])])}}},[["__scopeId","data-v-8cfd2fb1"]]),sn=r({__name:"view_keyboard",props:{maxInput:{type:Number,default:20}},emits:["inputValueUpdate"],setup(t,{emit:n}){const r=t;let a=e.ref(""),i=e.ref("");e.onMounted((async e=>{}));const s=e=>11==e?"num-btn-last-child":"num-btn",l=e=>e<=9?e:10==e?"0":11==e?"":void 0,c=Qo.debounce((e=>{if(o("log","at components/index/keyboard/view_keyboard.vue:50","clickKeyboard:",e),i.value=e,setTimeout((()=>{i.value=""}),100),11==e)a.value=a.value.substring(0,a.value.length-1);else{if(a.value.length>=r.maxInput)return Qo.showNone(`最多输入${r.maxInput}位`);a.value+=l(e)}n("inputValueUpdate",a.value)}),20,!0);return(t,o)=>(e.openBlock(),e.createElementBlock("view",{class:"i-keyboard"},[(e.openBlock(),e.createElementBlock(e.Fragment,null,e.renderList(11,(t=>e.createElementVNode("view",{class:e.normalizeClass(["num-btn",[s(t),{"active-value":e.unref(i)==t}]]),onClick:o=>e.unref(c)(t)},[t<11?(e.openBlock(),e.createElementBlock("text",{key:0,class:"txt"},e.toDisplayString(l(t)),1)):(e.openBlock(),e.createElementBlock("image",{key:1,class:"img",src:"/static/index/del_btn.png",mode:"widthFix"}))],10,["onClick"]))),64))]))}},[["__scopeId","data-v-29de367a"]]),ln=r({__name:"input_box_QR",props:{maskHeight:{type:Number,default:1200},maxInput:{type:Number,default:20}},emits:["showIt","clickCommit"],setup(t,{emit:n}){const r=t;let a=e.ref(""),i=e.ref(!1);e.onMounted((async e=>{o("log","at components/index/keyboard/input_box_QR.vue:58"," the keyboard_box component is now mounted. ",app.globalData)}));const s=()=>{n("showIt","false")},l=async()=>{o("log","at components/index/keyboard/input_box_QR.vue:65","handle_clickCommit"),await u(a.value).then((e=>{let t=a.value;n("clickCommit",{inputCode:t,goods:e})})).catch((e=>{o("error","at components/index/keyboard/input_box_QR.vue:71","searchGoodBySku err:",e),i.value=!0}))},c=e=>{o("log","at components/index/keyboard/input_box_QR.vue:76","accept_inputValueClick:",e),a.value=e,a.value.length>0&&(i.value=!1)},u=async e=>{let{brand_id:t,stadium_id:n,token:r}=Qo.getPostParams(),a={brand_id:t,token:r,stadium_id:n,sku:e};return o("log","at components/index/keyboard/input_box_QR.vue:105","searchGoodBySku urlParams:",a),qo.post({url:To.getGoodsBySKU,data:a,isDefaultGet:!0,failMsg:"操作失败!"}).then((e=>(Qo.hideLoad(),o("log","at components/index/keyboard/input_box_QR.vue:115","searchGoodBySku suc: ",e),(e=[e]).forEach((e=>{e.shopCount=1,e.shopCountPrice=e.user_price})),e)))};return(t,o)=>(e.openBlock(),e.createElementBlock("view",{class:"keyboard-box",style:e.normalizeStyle({height:r.maskHeight+"px"}),onTouchmove:o[0]||(o[0]=e.withModifiers((()=>{}),["prevent"])),onClick:o[1]||(o[1]=e.withModifiers((()=>{}),["stop"]))},[e.createElementVNode("view",{class:"kb-area"},[e.createElementVNode("image",{class:"del-icon",src:"/static/index/del_icon_big.png",mode:"aspectFit",onClick:s}),e.createElementVNode("text",{class:"txt-title"},"输入条形码"),e.createElementVNode("view",{class:e.normalizeClass(["txt-input",{"err-border":e.unref(i)}])},[e.createElementVNode("text",{class:e.normalizeClass(["txt",""==a.value?"txt-blank":"txt-write"])},e.toDisplayString(e.unref(a)||"请输入条形码"),3)],2),e.unref(i)?(e.openBlock(),e.createElementBlock("text",{key:0,class:"txt-err-tip"},"查询不到该条形码商品信息, 请检查是否有误")):e.createCommentVNode("",!0),e.createElementVNode("view",{class:"input-keyboard"},[e.createVNode(sn,{maxInput:r.maxInput,onInputValueUpdate:c,onCheckRes:t.handle_checkRes},null,8,["maxInput","onCheckRes"]),e.createElementVNode("view",{class:"sure-btn",onClick:l},[e.createElementVNode("text",{class:"txt"},"确定")])])])],36))}},[["__scopeId","data-v-f4ed6973"]]),cn=r({__name:"input_box_end_phone",props:{maskHeight:{type:Number,default:1200},maxInput:{type:Number,default:4}},emits:["showIt","clickCommit"],setup(t,{emit:n}){const r=t;let a=e.ref("");e.onMounted((async e=>{o("log","at components/index/keyboard/input_box_end_phone.vue:58","the input_box_end_phone component is now mounted. "+r.maskHeight)}));const i=()=>{n("showIt","false")},s=()=>{n("clickCommit",a.value)},l=e=>{o("log","at components/index/keyboard/input_box_end_phone.vue:68","accept_inputValueClick:",e),a.value=e.split(""),o("log","at components/index/keyboard/input_box_end_phone.vue:70","inputValue:",a.value)};return(t,o)=>(e.openBlock(),e.createElementBlock("view",{class:"keyboard-box",style:e.normalizeStyle({height:r.maskHeight+"px"}),onTouchmove:o[0]||(o[0]=e.withModifiers((()=>{}),["prevent"])),onClick:o[1]||(o[1]=e.withModifiers((()=>{}),["stop"]))},[e.createElementVNode("view",{class:"kb-area"},[e.createElementVNode("image",{class:"del-icon",src:"/static/index/del_icon_big.png",mode:"aspectFit",onClick:i}),e.createElementVNode("text",{class:"txt-title"},"请输入手机尾号后4位数验证"),e.createElementVNode("view",{class:"end-phone-input"},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r.maxInput,(t=>(e.openBlock(),e.createElementBlock("view",{class:"epi-box"},[e.createElementVNode("text",{class:"epi-txt"},e.toDisplayString(e.unref(a)[t-1]),1)])))),256))]),e.createElementVNode("view",{class:"input-keyboard"},[e.createVNode(sn,{maxInput:r.maxInput,onInputValueUpdate:l},null,8,["maxInput"]),e.createElementVNode("view",{class:"sure-btn",onClick:s},[e.createElementVNode("text",{class:"txt"},"确定")])])])],36))}},[["__scopeId","data-v-e9eab441"]]);let un="";const pn=r({components:{"page-standby":zo,"view-header":nn,"view-footer":rn,"list-item":an,"input-qr-box":ln,"input-box-end-phone":cn,"keyboard-listener":Xo},watch:{},computed:{shopListTotalPrice(){let e=0;return!this.shopList||this.shopList.length<1?0:(this.shopList.forEach((t=>{e+=t.shopCountPrice})),e)},shopListTotalCount(){let e=0;return!this.shopList||this.shopList.length<1?0:(this.shopList.forEach((t=>{e+=t.shopCount})),e)}},data:()=>({showQRInputBox:!1,showEndPhoneBox:!1,screenHeight:"",footerHeight:"",globalData:"",shopList:[],decryptList:[],strResult:""}),async onLoad(e){o("log","at pages/index/index.vue:124","onload:",e),this.clearShopList(),e.skulist&&this.acceptSKUList(e.skulist)},async onReady(){this.screenHeight=await Qo.getPageHeight(),o("log","at pages/index/index.vue:136","the index page onReady----"+this.screenHeight),un=getApp(),setTimeout((async()=>{this.setFooterHeight()}),1e3)},methods:{searchGoodBySku:async e=>{Qo.showLoad();let{brand_id:t,stadium_id:n,token:r}=Qo.getPostParams(),a={brand_id:t,token:r,stadium_id:n,sku:e};return o("log","at pages/index/index.vue:154","searchGoodBySku urlParams:",a),qo.post({url:To.getGoodsBySKU,data:a,isDefaultGet:!0,failMsg:"操作失败!"}).then((e=>(Qo.hideLoad(),o("log","at pages/index/index.vue:164","searchGoodBySku suc: ",e),(e=[e]).forEach((e=>{e.shopCount=1,e.shopCountPrice=e.user_price})),Qo.hideLoad(),e))).finally((()=>{Qo.hideLoad()}))},clearShopList(){o("log","at pages/index/index.vue:179","clearShopList"),this.shopList=[]},acceptSKUList(e){o("log","at pages/index/index.vue:184","acceptSKUList:",e=JSON.parse(decodeURIComponent(e))),e&&e.length>0&&(this.shopList=this.combinedList(this.shopList,e))},acceptSKUListFromGlobalData(){let e=un.globalData.skulist;o("log","at pages/index/index.vue:189","acceptSKUListFromGlobalData:",e),this.shopList=this.combinedList(this.shopList,e)},async setTestSku(){o("log","at pages/index/index.vue:193","Test set SKU 10000012");let e=await this.searchGoodBySku("6934024512123");this.shopList=this.shopList.concat(e)},async clickToPay(){let e={shopList:this.shopList.map((e=>({id:e.id,name:e.goods_name,price:e.user_price,nums:e.shopCount,unit:e.erp_goods.erp_goods_unit}))),shopListTotalPrice:this.shopListTotalPrice.toFixed(2),shopListTotalCount:this.shopListTotalCount};if(o("log","at pages/index/index.vue:224","clickToPay",e),this.shopListTotalPrice<=0)return Qo.showNone("请先添加商品");Qo.showLoad(),await this.makeOrder(e).then((t=>{Qo.hideLoad(),t.order_no?(e.order_no=t.order_no,Qo.routeTo(`/pages/pay/index?query=${JSON.stringify(e)}`,"rL")):Qo.showNone(t.message||t.msg||"error:生成订单失败"),o("log","at pages/index/index.vue:238",t)})).catch((e=>{Qo.hideLoad(),o("log","at pages/index/index.vue:241",e),Qo.showNone(e)}))},async makeOrder(e){let{brand_id:t,token:n}=getApp().globalData.accountInfo,r=uni.getStorageSync("stadiumInfo").id||"",a={goods_data:e.shopList,amount:e.shopListTotalPrice},{goods_data:i,amount:s}=a;t=parseInt(t),s=parseFloat(s);let l={store_id:r,brand_id:t,token:n,amount:s,goods_data:i,pay_type:7,other_pay_type:"付款码支付",card_no:"",mark:""};return o("log","at pages/index/index.vue:266","makeOrder urlParams:",l),qo.post({url:To.makeOrder,data:l,isDefaultGet:!0,failMsg:"操作失败!"}).then((e=>(Qo.hideLoad(),o("log","at pages/index/index.vue:276","makeOrder suc: ",e),e)))},clickToUse(){Qo.routeTo("/pages/login/success","nT")},handle_closeStandby(e){o("log","at pages/index/index.vue:284","handle_closeSetting",e),this.showPageStandby=!this.showPageStandby},handle_closeQRInputBox(e){o("log","at pages/index/index.vue:288","handle_closeKeyboardBox",e),this.showQRInputBox=!this.showQRInputBox},handle_closeEndPhoneBox(e){o("log","at pages/index/index.vue:292","handle_closeEndPhoneBox",e),this.showEndPhoneBox=!this.showEndPhoneBox},handle_clickQR(){this.showQRInputBox=!this.showQRInputBox},handle_clickCommit_qr(e){o("log","at pages/index/index.vue:300","handle_clickCommit_qr",typeof e.goods,e),o("log","at pages/index/index.vue:302",JSON.stringify(e.goods)),Qo.showNone("添加商品成功,数量:"+e.goods.length+"个"),e.goods&&e.goods.length>0&&(this.shopList=this.combinedList(this.shopList,e.goods)),this.showQRInputBox=!this.showQRInputBox},handle_clickVIP(){Qo.showNone("会员登录"),this.showEndPhoneBox=!this.showEndPhoneBox},combinedList(e,t){if(o("log","at pages/index/index.vue:318","combinedList",e,t),!t)return Qo.showNone("未找到商品");let n=e,r=[],a=[];return t.forEach((e=>{let t=n.findIndex((t=>t.id==e.id));-1!=t?this.checkStock(n[t])?this.handle_add(t):(e.shopCount=1,r.push(e)):a.push(e)})),n.push(...a),o("log","at pages/index/index.vue:341","_list_cannot_add:",r),r.length>0&&Qo.showNone("存在库存不足商品"),n},async setFooterHeight(){o("log","at pages/index/index.vue:348","Auto setFooterHeight")},async onKeyup(e){let t=Zo.dict[e.keyCode];if(this.decryptList.push(t),13!=e.keyCode)return void o("log","at pages/index/index.vue:368","继续接收:",this.decryptList);this.decryptList.pop(),this.strResult=await Zo.resultScan(this.decryptList),this.orderQrcode=this.strResult,this.decryptList.splice(0),-1!=this.strResult.indexOf("down_arrow")&&(this.strResult=this.strResult.replace("down_arrow",""));let n=await this.searchGoodBySku(this.strResult).then((e=>(o("log","at pages/index/index.vue:386","searchGoodBySku suc: ",e),e))).catch((e=>{var t;o("log","at pages/index/index.vue:389","searchGoodBySku err: ",e),Qo.showNone((null==(t=e.res.data)?void 0:t.message)||"未找到商品-i")}));n&&n.length>0&&(this.shopList=this.combinedList(this.shopList,n))},onKeydown(e){},handle_add(e){if(o("log","at pages/index/index.vue:404","handle_add",e),!this.checkStock(this.shopList[e]))return Qo.showNone("该商品库存不足");this.shopList[e].shopCount++,this.shopList[e].shopCountPrice=(this.shopList[e].user_price||0)*this.shopList[e].shopCount},handle_minus(e){o("log","at pages/index/index.vue:411","handle_minus",e),this.shopList[e].shopCount>1?(this.shopList[e].shopCount--,this.shopList[e].shopCountPrice=(this.shopList[e].user_price||0)*this.shopList[e].shopCount):Qo.showNone("商品数量不能小于1")},checkStock:e=>e.erp_goods.stock_num-(e.shopCount||0)>=1,handle_del(e){o("log","at pages/index/index.vue:428","handle_del",e),this.shopList.splice(e,1),Qo.showNone("删除成功")},test(){o("log","at pages/index/index.vue:452","test");let e=Qo.getUrlParams("https://testmanager.ouxuanzhineng.cn/admin/erpRetailGoods/list?brand_id=63&stadium_id=167&type_key=&key=&page=1&page_size=9999&is_sale=1&is_show_on_assistant=1&token=e6cabeae-0c1a-11ee-aa40-5254005df464");return o("log","at pages/index/index.vue:457","urlParams:",e),qo.post({url:To.getGoodsList,data:e,isDefaultGet:!1}).then((e=>(o("log","at pages/index/index.vue:464","test suc: ",e),e)))},getGoodFromPad:(e,t)=>qo.post({url:To.getGoodFromPad,data:{sku:e,brand_id:t},isDefaultGet:!0}).then((e=>(Qo.hideLoad(),e.data.code,e))),async updateGoodsList(){let e=await this.getGoodsList();o("log","at pages/index/index.vue:491","app.globaldata: ",un.globalData),un.globalData.goodsList=e},updateShopList(){un.globalData.shopList=this.shopList},getGoodsList(){let{brand_id:e,stadium_id:t,token:n}=Qo.getPostParams(),r={brand_id:e,stadium_id:t,token:n,type_key:"",key:"",page:"1",page_size:"9999",is_sale:"1",is_show_on_assistant:"1"};return qo.post({url:To.getGoodsList,data:r,isDefaultGet:!0,failMsg:"获取商品列表失败"}).then((e=>(Qo.hideLoad(),o("log","at pages/index/index.vue:528","getGoodsList suc: ",e),e.list.forEach((e=>{e.shopCount=1,e.shopCountPrice=e.user_price})),e)))}}},[["render",function(t,o,n,r,a,i){const s=e.resolveComponent("view-header"),l=e.resolveComponent("list-item"),c=e.resolveComponent("view-footer"),u=e.resolveComponent("input-qr-box"),p=e.resolveComponent("input-box-end-phone"),d=e.resolveComponent("keyboard-listener");return e.openBlock(),e.createElementBlock("view",{class:"main-page"},[e.createElementVNode("view",null,[e.createVNode(s,{class:"mheader",onCloseStandby:i.handle_closeStandby},null,8,["onCloseStandby"]),e.createElementVNode("view",{class:"holdplace",style:{height:"100rpx"}}),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.shopList,((t,o)=>(e.openBlock(),e.createBlock(l,{key:o,mkey:o,mitem:t,onAddItem:i.handle_add,onMinusItem:i.handle_minus,onDelItem:i.handle_del},null,8,["mkey","mitem","onAddItem","onMinusItem","onDelItem"])))),128)),e.createElementVNode("view",{class:"holdplace",style:{height:"340rpx"}}),(e.openBlock(),e.createElementBlock("view",{key:0,ref:"mfooter",class:"mfooter"},[e.createVNode(c,{tolPrice:i.shopListTotalPrice,tolCount:i.shopListTotalCount,onClickQR:i.handle_clickQR,onClickVIP:i.handle_clickVIP,onClickToPay:i.clickToPay},null,8,["tolPrice","tolCount","onClickQR","onClickVIP","onClickToPay"])],512)),a.showQRInputBox?(e.openBlock(),e.createBlock(u,{key:1,maskHeight:a.screenHeight,maxInput:20,onShowIt:i.handle_closeQRInputBox,onClickCommit:i.handle_clickCommit_qr},null,8,["maskHeight","onShowIt","onClickCommit"])):e.createCommentVNode("",!0),a.showEndPhoneBox?(e.openBlock(),e.createBlock(p,{key:2,maskHeight:a.screenHeight,maxInput:4,onShowIt:i.handle_closeEndPhoneBox,onClickCommit:i.handle_clickCommit_qr},null,8,["maskHeight","onShowIt","onClickCommit"])):e.createCommentVNode("",!0)]),e.createVNode(d,{style:{height:"1px"},onKeyup:i.onKeyup,onKeydown:i.onKeydown},null,8,["onKeyup","onKeydown"])])}],["__scopeId","data-v-c029d088"]]),dn=r({__name:"paying",props:{payTotal:{type:Number,default:0}},emits:["clickVipCard"],setup:(t,{emit:o})=>(o,n)=>(e.openBlock(),e.createElementBlock("view",{class:"paying-box"},[e.createElementVNode("text",{class:"p-text"},"支付金额"),e.createElementVNode("text",{class:"p-total"},"¥"+e.toDisplayString(t.payTotal||"0.00"),1),e.createElementVNode("view",{class:"p-zhichi"},[e.createElementVNode("view",{class:"p-line"}),e.createElementVNode("text",{class:"p-words"},"支持以下付款方式"),e.createElementVNode("view",{class:"p-line"})]),e.createElementVNode("view",{class:"p-icons"},[e.createElementVNode("image",{class:"p-image-pay-icon",src:"/static/pay/wx-icon.png",mode:"widthFix"}),e.createElementVNode("image",{class:"p-image-pay-icon",src:"/static/pay/zfb-icon.png",mode:"widthFix"})]),e.createElementVNode("image",{class:"p-image-pay-picture",src:"/static/pay/pay-picture.png",mode:"widthFix"}),e.createElementVNode("text",{class:"p-tips"},"请将付款码对准右下方扫码口"),e.createElementVNode("view",{class:"p-user"})]))},[["__scopeId","data-v-69c546ef"]]),gn=r({__name:"success",props:{paySuccessInfo:{type:Object,default:{amount:0,goods_data:[]}}},emits:["clickToIndex","clickOpenDoor"],setup(t,{emit:n}){const r=t;let a=e.ref(!0);const i=e.ref(30);let s=e.ref(null);e.onMounted((async e=>{clearInterval(s),s=null,s=setInterval((()=>{i.value--,i.value<=1&&(clearInterval(s),s=null,Qo.routeTo("/pages/index/standby","rL"))}),1e3),a.value=uni.getStorageSync("showGateBtn")||!1,o("log","at components/pay/success.vue:106","setDoorBtnStatus",a)})),e.onBeforeUnmount((()=>{clearInterval(s),s=null})),e.onUnmounted((()=>{clearInterval(s),s=null}));let l=e.computed((()=>{if(!r.paySuccessInfo.goods_data)return 0;let e=r.paySuccessInfo.goods_data,t=0;for(let o=0;o{n("clickToIndex",""),Qo.routeTo("/pages/index/standby","rL")},u=()=>{o("log","at components/pay/success.vue:115","handle_clickOpenDoor"),n("clickOpenDoor","")};return(o,n)=>(e.openBlock(),e.createElementBlock("view",{class:"success-box"},[e.createElementVNode("view",{class:"s-bg"}),e.createElementVNode("view",{class:"s-header"},[e.createElementVNode("view",{class:"video-tip"},[e.createElementVNode("image",{class:"v-image",src:"/static/index/camera_icon.png",mode:"widthFix"}),e.createElementVNode("text",{class:"v-text"},"您已进入视频覆盖区")])]),e.createElementVNode("view",{class:"s-content"},[e.createElementVNode("view",{class:"sc-title"},[e.createElementVNode("view",{class:"sc-success"},[e.createElementVNode("image",{class:"sc-check-icon",src:"/static/pay/check-icon.png",mode:"acepectFit"}),e.createElementVNode("view",null,"支付成功")]),e.createElementVNode("view",{class:"sc-total"},"¥"+e.toDisplayString(t.paySuccessInfo.amount||"0.00"),1)]),e.createElementVNode("text",{class:"sc-num"},[e.createTextVNode("共 "),e.createElementVNode("text",null,e.toDisplayString(e.unref(l)||"0"),1),e.createTextVNode(" 件商品")]),e.createElementVNode("text",{class:"sc-tip-1"},"请领取小票,期待下次光临!"),e.createElementVNode("image",{class:"sc-print-img",src:"/static/pay/print-img.png",mode:"acepectFit"}),e.createElementVNode("view",{class:"sc-btn",onClick:c},[e.createElementVNode("text",{class:"scb-txt-1"},"返回首页"),e.createElementVNode("text",{class:"scb-txt-2"},e.toDisplayString(i.value)+"s",1)]),e.unref(a)?(e.openBlock(),e.createElementBlock("view",{key:0,class:"sc-btn sc-btn-active",onClick:u},[e.createElementVNode("text",{class:"scb-txt-1"},"开门"),e.createElementVNode("text",{class:"scb-txt-2"})])):e.createCommentVNode("",!0)])]))}},[["__scopeId","data-v-bff1c04e"]]),fn=t("OX_Pad_Printer");const yn=r({components:{"view-header":nn,"input-box-end-phone":cn,paying:dn,"pay-success":gn,"input-qr-box":ln,"keyboard-listener":Xo},computed:{payTotal(){return this.dataQuery.amount||0||"0.00"}},watch:{},data:()=>({showPageStandby:!1,showEndPhoneBox:!1,screenHeight:"1000",footerHeight:"",paySuccessStatus:0,decryptList:[],strResult:"",dataQuery:"",reCheckOrderCount:0,reCheckOrderCountMax:30}),async onLoad(e){o("log","at pages/pay/index.vue:76","pay onload:",e),e&&this.setPayData(e)},async onReady(){await this.setPageHeight()},onUnload(){this.clearMakeOrder()},methods:{testAcceptScanCode(){uni.showModal({title:"模拟扫码",content:"模拟扫码,点确定时执行acceptScanCode",showCancel:!0,confirmText:"确定",success:e=>{e.confirm&&(o("log","at pages/pay/index.vue:100","用户点击确定"),this.acceptScanCode("282659672061313993"))}})},setPayData(e){o("log","at pages/pay/index.vue:107","setPayData:",e),o("log","at pages/pay/index.vue:110","setPayData1:",e=JSON.parse(e.query));let t={goods_data:e.shopList,amount:e.shopListTotalPrice,order_no:e.order_no};o("log","at pages/pay/index.vue:116","setPayData2:",t),this.dataQuery=t},getPayType(e){let t="";return t=0==e.indexOf("10")||0==e.indexOf("11")||0==e.indexOf("12")||0==e.indexOf("13")||0==e.indexOf("14")||0==e.indexOf("15")?"WECHAT_MICROPAY":0==e.indexOf("28")?"ALI_BARCODEPAY":null,t},async preMakeOrder(){var e;if(this.makeInfo=await this.makeOrder(),!(null==(e=this.makeInfo)?void 0:e.order_no))return Qo.showNone("生成订单失败,请重新下单!")},clearMakeOrder(){this.makeInfo=null},async acceptScanCode(e){var t;o("log","at pages/pay/index.vue:140","acceptScanCode:",e),Qo.showLoad("交易处理中...");let n=e,r=this.getPayType(n);if(null==r)return void Qo.showNone("支付类型未知,请重试!");let a=(null==(t=this.dataQuery)?void 0:t.order_no)||"";if(!a)return Qo.showNone("支付失败,请重新下单!01");await this.payOrder({order_no:a,pay_code:n,pay_type:r}).then((e=>(o("log","at pages/pay/index.vue:168","payInfo-result:",e),this.checkOrder(e)))).then((async e=>{o("log","at pages/pay/index.vue:171","最终checkInfo:",e);let{payRes:t,checkRes:n}=e;if("1"==n.pay_order.status)Qo.showNone(n.res.respMsg),this.paySuccessStatus=1,this.printOrder(e);else{n.res.respMsg||n.res.respCode;let{orderStatus:t,requestDate:r,respCode:a,respMsg:i,tradeNo:s,transNo:l}=n.res;"PROCESSING"==t?(o("log","at pages/pay/index.vue:186","等待支付中,需要继续查询支付结果"),uni.showModal({title:"等待支付中...",content:"如您已确认付款成功,请点击确认,继续查询支付结果!",showCancel:!1,confirmText:"确认已支付成功",success:async t=>{t.confirm&&(o("log","at pages/pay/index.vue:194","用户点击确定"),"pages/pay/index"==Qo.getPageRoute()?this.doLoopCheck(e):Qo.showNone("请重新扫码使用"))}})):await this.checkInfoReactive(e)}})).finally((()=>{Qo.hideLoad()}))},async doLoopCheck(e){let t=this.reCheckOrderCountMax;for(let n=0;n<=t;n++){uni.showLoading({title:"支付结果查询中..."+n+"/"+this.reCheckOrderCountMax,mask:!0});let t=await this.checkOrder(e.payRes).then((e=>e)).catch((e=>{o("warn","at pages/pay/index.vue:225","reCheckOrder err:",e),rj(!1)}));o("log","at pages/pay/index.vue:228","recheckInfo--1:",t);let{orderStatus:r,requestDate:a,respCode:i,respMsg:s,tradeNo:l,transNo:c}=t.checkRes.res;if(o("log","at pages/pay/index.vue:231","doLoopCheck recheckInfo:",t),"SUCCESS"==r){let{payRes:o,checkRes:n}=t;"1"==n.pay_order.status&&(Qo.showNone(n.res.respMsg),this.paySuccessStatus=1,this.printOrder(e));break}await Qo.asyncSetTimeOut(2e3)}uni.hideLoading()},async checkInfoReactive(e){return new Promise(((t,n)=>{o("log","at pages/pay/index.vue:252","checkInfoReactive",e);let{payRes:r,checkRes:a}=e,{orderStatus:i,requestDate:s,respCode:l,respMsg:c,tradeNo:u,transNo:p}=a.res,d=a.res.respMsg||"未知原因-"+a.res.respCode+"\n";"1"==a.pay_order.status?(Qo.showNone(a.res.respMsg),this.paySuccessStatus=1,this.printOrder(e),t(!0)):"200021"==l||"200008"==l||"200004"==l?(o("warn","at pages/pay/index.vue:266","需要重新下单"),uni.showModal({title:"支付失败",content:d,showCancel:!1,confirmText:"确定",success:e=>{e.confirm&&(o("log","at pages/pay/index.vue:275","用户点击确定"),Qo.routeTo("/pages/index/standby","rL"),t(!0))}})):"200103"==l||"FAIL"==i?(d="支付失败code:"+a.res.respCode+".请联系管理员!",uni.showModal({title:"支付失败",content:d,showCancel:!1,confirmText:"确定",success:e=>{e.confirm&&(o("log","at pages/pay/index.vue:292","用户点击确定"),Qo.routeTo("/pages/index/standby","rL"),t(!0))}})):"PROCESSING"==i&&0==this.reCheckOrderCount?(o("log","at pages/pay/index.vue:300","等待支付中,需要继续查询支付结果"),uni.showModal({title:"等待支付中...",content:"如您已确认付款成功,请点击确认,继续查询支付结果!",showCancel:!1,confirmText:"确认已支付成功",success:async e=>{e.confirm&&(o("log","at pages/pay/index.vue:308","用户点击确定"),t(!0))}})):"PROCESSING"==i&&this.reCheckOrderCount>0&&n(e)}))},loopReCheckOrder(e){reCheckOrder(e).then((e=>{loopReCheckOrder(e)})).catch((e=>{o("warn","at pages/pay/index.vue:327","loopReCheckOrder err:",e),Qo.showNone("支付结果查询超时,请联系管理员!"+e)}))},async reCheckOrder(e){let t=e.payRes;return new Promise((async(e,n)=>{if(this.reCheckOrderCount++,this.reCheckOrderCount>=this.reCheckOrderCountMax)uni.hideLoading(),Qo.showNone("支付结果查询超时,请联系管理员!"),n(!1);else{o("log","at pages/pay/index.vue:344","reCheckOrder:",t),await this.checkOrder(t).then((e=>(o("log","at pages/pay/index.vue:346","checkInfo:",e),e))).then((e=>{})).catch((e=>{o("warn","at pages/pay/index.vue:351","reCheckOrder err:",e),n(!1)}));let r=await this.checkOrder(t);await this.checkInfoReactive(r).then((t=>{e(t)})).catch((e=>{o("warn","at pages/pay/index.vue:359","reCheckOrder err:",e),n(!1)}))}}))},printOrder(e){o("warn","at pages/pay/index.vue:369","printOrder checkInfo: ",e),getApp().globalData.accountInfo;let t=uni.getStorageSync("stadiumInfo"),{venue_name:n}=t;this.dataQuery;let{finishedDate:r,transNo:a}=e.payRes.res;if(r=this.getTimeFromFinishedDate(r),!e||!a)return;Qo.showNone("小票打印中...");let i={...this.dataQuery,venue_name:n,time:r,order_no:a},s=en.resetOXPrintInfo(i);return o("log","at pages/pay/index.vue:390","uni call android OX_Pad_Printer ------begin---!",s),fn.execAPI({api_name:"doPrint",value:s},(e=>{o("log","at pages/pay/index.vue:397","ox_pad_printer doPrint result: "+JSON.stringify(e))}))},getTimeFromFinishedDate:e=>(o("log","at pages/pay/index.vue:405",e),e.substring(0,4)+"-"+e.substring(4,6)+"-"+e.substring(6,8)+" "+e.substring(8,10)+":"+e.substring(10,12)+":"+e.substring(12,14)),getTestPrintData:()=>({payRes:{order_no:"LS20240221105640796608",pay_code:"282659672061313993",pay_type:"ALI_BARCODEPAY",orderAmt:"1",transNo:"LS20240221105640796608",res:{channelOrderNo:"350105100000000000000382731226",finishedDate:"20240221105643",orderAmt:"1",orderStatus:"SUCCESS",payOrderNo:"322024022122001464831442986322",payType:"ALI_BARCODEPAY",respCode:"000000",respMsg:"交易成功",tradeNo:"19010520240221105641100306264795",transNo:"LS20240221105640796608"}},checkRes:{err:null,pay_order:{id:1143536,appid:"",mchId:"ouxuanmchid-2d4af93d5fb4",user:"",out_trade_no:"LS20240221105640796608",transaction_id:"",group:"63",pay_way:"HuiShouQian",call_way:"WeChatMiniApp",total_fee:.01,refund_total_fee:0,Title:"",subject:"零售订单",status:1,refund_status:0,flag:0,tags:null,extension:{brand_id:63,brand_stadium_logo:"https://imgcdn.ouxuanzhineng.cn/upload/63/logo/6b36b6b89557a7b7d90904f1a943a311.png",brand_stadium_name:"Test门店",stadium_id:167,total_fee:.01,transaction_id:""},error_log:"",is_profit_sharing:0,usefulness:"erp_goods_retail",medium:"money",invoice_status:"None",is_enable_expiration:1,expiration_time:"2024-02-21T11:26:40+08:00",payment_time:"",remaining_refund:null},res:{channelOrderNo:"350105100000000000000382731226",finishedDate:"20240221105644",goodsInfo:"LS20240221105640796608",memo:'{"timeExpire":"20240221105746","latitude":"0","spbillCreateIp":"127.0.0.1","longitude":"0"}',orderAmt:"1",orderStatus:"SUCCESS",payOrderNo:"322024022122001464831442986322",payType:"ALI_BARCODEPAY",requestDate:"20240221105641",respCode:"000000",respMsg:"交易成功",tradeNo:"19010520240221105641100306264795",transNo:"LS20240221105640796608"}}}),testPrinter(){o("log","at pages/pay/index.vue:496","OX_Pad_Printer test------begin---!");let e=en.resetOXPrintInfo(en.testPrintInfo);fn.execAPI({api_name:"doPrint",value:e},(e=>{o("log","at pages/pay/index.vue:502","testPrinter: "+JSON.stringify(e))}))},async makeOrder(){let{brand_id:e,token:t}=getApp().globalData.accountInfo,n=uni.getStorageSync("stadiumInfo").id||"",{goods_data:r,amount:a}=this.dataQuery;e=parseInt(e),a=parseFloat(a);let i={store_id:n,brand_id:e,token:t,amount:a,goods_data:r,pay_type:7,other_pay_type:"付款码支付",card_no:"",mark:""};return o("log","at pages/pay/index.vue:519","makeOrder urlParams:",i),qo.post({url:To.makeOrder,data:i,isDefaultGet:!0,failMsg:"操作失败!"}).then((e=>(Qo.hideLoad(),o("log","at pages/pay/index.vue:529","makeOrder suc: ",e),e)))},payOrder(e){o("log","at pages/pay/index.vue:534","payOrder get param:",e);let{order_no:t,pay_code:n,pay_type:r}=e,{goods_data:a,amount:i}=this.dataQuery,{store_id:s,brand_id:l,token:c}=getApp().globalData.accountInfo,u={order_no:t,pay_code:n,pay_type:r,brand_id:l,token:c,order_amt:i,goods_info:t};return o("log","at pages/pay/index.vue:548","payOrder urlParams:",u),qo.post({url:To.payOrder,data:u,isDefaultGet:!0,failMsg:"payOrder fail"}).then((e=>(o("log","at pages/pay/index.vue:557","payOrder suc: ",e),{order_no:t,pay_code:n,pay_type:r,orderAmt:e.res.orderAmt,transNo:e.res.transNo,res:e.res})))},checkOrder(e){let{store_id:t,brand_id:n,token:r}=getApp().globalData.accountInfo,{transNo:a,orderAmt:i,payCode:s}=e,l={transNo:a,payCode:s,brand_id:n,token:r,orderAmt:i,manual:"yes"};return o("log","at pages/pay/index.vue:577","checkOrder urlParams:",l),qo.post({url:To.checkOrder,data:l,isDefaultGet:!0,failMsg:"checkOrder fail"}).then((t=>(o("log","at pages/pay/index.vue:586","checkOrder suc: ",e),{payRes:e,checkRes:t})))},handle_clickVipCard(){Qo.showNone("储值卡支付未接入"),this.handle_clickVIP()},handle_closeEndPhoneBox(e){o("log","at pages/pay/index.vue:601","handle_closeEndPhoneBox",e),this.showEndPhoneBox=!this.showEndPhoneBox},handle_clickCommit_end_phone(e){o("log","at pages/pay/index.vue:605","handle_clickCommit_end_phone",e),this.showEndPhoneBox=!this.showEndPhoneBox},handle_closeQRInputBox(e){o("log","at pages/pay/index.vue:609","handle_closeQRInputBox",e)},handle_clickCommit_qr(e){o("log","at pages/pay/index.vue:612","handle_clickCommit_qr",e),this.showQRInputBox=!this.showQRInputBox},handle_clickVIP(){this.showEndPhoneBox=!this.showEndPhoneBox},handle_clickOpenDoor(e){o("log","at pages/pay/index.vue:621","执行开门"),this.openDoorReq()},async setPageHeight(){this.screenHeight=await Qo.getPageHeight()},async onKeyup(e){let t=Zo.dict[e.keyCode];if(this.decryptList.push(t),13!=e.keyCode)return o("log","at pages/pay/index.vue:634","this.decryptList1: ",this.decryptList);this.decryptList.pop(),this.strResult=await Zo.resultScan(this.decryptList),this.orderQrcode=this.strResult,this.decryptList.splice(0),-1!=this.strResult.indexOf("down_arrow")&&(this.strResult=this.strResult.replace("down_arrow","")),o("log","at pages/pay/index.vue:646","扫码最终结果--:",this.strResult),this.acceptScanCode(this.strResult)},onKeydown(e){},async openDoorReq(){Qo.showLoad();let{store_id:e,brand_id:t,token:n}=getApp().globalData.accountInfo,r=uni.getStorageSync("picker_door"),a={token:n,gate_id:r.p_obj_arr[r.p_index].id};return o("log","at pages/pay/index.vue:667","openDoor: ",a),qo.post({url:To.openDoor,data:a,isDefaultGet:!0,failMsg:"openDoor fail"}).then((e=>{Qo.hideLoad(),o("log","at pages/pay/index.vue:677","openDoor suc: ",e),Qo.showNone("开启门禁执行中")})).finally((()=>{Qo.hideLoad()}))}}},[["render",function(t,o,n,r,a,i){const s=e.resolveComponent("keyboard-listener"),l=e.resolveComponent("view-header"),c=e.resolveComponent("paying"),u=e.resolveComponent("pay-success"),p=e.resolveComponent("input-box-end-phone");return e.openBlock(),e.createElementBlock("view",{class:"pay-page"},[e.createVNode(s,{style:{width:"1rpx"},onKeyup:i.onKeyup,onKeydown:i.onKeydown},null,8,["onKeyup","onKeydown"]),0==a.paySuccessStatus?(e.openBlock(),e.createElementBlock("view",{key:0},[e.createVNode(l,{class:"mheader",backgroundCustom:"none",needBorder:!1,onCloseUse:o[0]||(o[0]=()=>{})},null,8,["backgroundCustom","needBorder"]),(e.openBlock(),e.createBlock(c,{key:0,payTotal:i.payTotal,onClickVipCard:i.handle_clickVipCard},null,8,["payTotal","onClickVipCard"]))])):(e.openBlock(),e.createBlock(u,{key:1,paySuccessInfo:a.dataQuery,onClickOpenDoor:i.handle_clickOpenDoor},null,8,["paySuccessInfo","onClickOpenDoor"])),a.showEndPhoneBox?(e.openBlock(),e.createBlock(p,{key:2,maskHeight:a.screenHeight,maxInput:4,onShowIt:i.handle_closeEndPhoneBox,onClickCommit:i.handle_clickCommit_end_phone},null,8,["maskHeight","onShowIt","onClickCommit"])):e.createCommentVNode("",!0)])}],["__scopeId","data-v-4fd00304"]]),mn=r({__name:"pads_picker",props:{padList:{type:Array,default:[]},padListOrigin:{type:Array,default:[]}},emits:["pickerChange"],setup(t,{emit:n}){const r=t,a=e.ref("");async function i(e){o("log","at components/login/pads_picker.vue:53","picker发送选择改变,携带值为",e.detail.value);let t=e.detail.value,r=uni.getStorageSync("picker_door");if(r.p_show&&"请选择"!==r.p_show){let e=`检测到当前设备已有绑定门禁:${r.p_obj_arr[r.p_index].hardware_name}, 重新选择将清空绑定, 请确认!`;await Qo.showModalMsg(e,!0).then((()=>{uni.removeStorageSync("picker_door"),uni.removeStorageSync("showGateBtn"),a.value=t,n("pickerChange",t)})).catch((e=>{o("log","at components/login/pads_picker.vue:69","catch111111",e)}))}else uni.removeStorageSync("picker_door"),uni.removeStorageSync("showGateBtn"),a.value=t,n("pickerChange",t)}return e.onMounted((()=>{})),e.watchEffect((()=>{o("log","at components/login/pads_picker.vue:46","watchEffect",r.padListOrigin),r.padListOrigin.length>0&&function(){o("log","at components/login/pads_picker.vue:86","autoShowBackStadium");let e=uni.getStorageSync("stadiumInfo");if(e){let t=r.padListOrigin.findIndex((t=>t.id==e.id));-1!=t&&(a.value=t,o("log","at components/login/pads_picker.vue:94","autoShowBackStadium set index: ",t))}}()})),(o,n)=>(e.openBlock(),e.createElementBlock("view",{class:"pads-picker"},[e.createElementVNode("view",{class:"pp-content"},[e.createElementVNode("view",{class:"pc-text"},"请选择门店"),e.createElementVNode("view",{class:"pc-frame"},[e.createElementVNode("picker",{class:"pt-picker",mode:"selector",range:t.padList,onChange:i},[e.createElementVNode("view",{class:"pp-box"},[e.createElementVNode("view",{class:"pb-text"},e.toDisplayString(t.padList[a.value]||"请选择门店"),1),e.createElementVNode("image",{class:"pt-icon",mode:"aspectFtt",src:"/static/images/triangle.png"})])],40,["range"])])])]))}},[["__scopeId","data-v-eedf08db"]]),hn=r({__name:"setting_mask",emits:["closeSetting"],setup(n,{emit:r}){const a=t("Daemon_Uni");var i=e.ref(""),s=e.ref([]),l=e.ref("请选择"),c=e.ref([]),u=e.ref(!1),p=e.ref(0);e.onMounted((async()=>{o("log","at components/login/setting_mask.vue:99","setting_mask onMounted ->"),N(),p.value=g(),_().catch((e=>{Qo.showNone("无法获取该门店门禁信息")})),A()})),e.onBeforeUnmount((async()=>{o("log","at components/login/setting_mask.vue:109","setting_mask onBeforeUnmount ->"),E()})),e.computed((()=>{var e;return(null==(e=getApp().globalData.goodsList)?void 0:e.total)||"0"}));const d=e.computed((()=>uni.getStorageSync("stadiumInfo")||{})),g=()=>{var e;return(null==(e=getApp().globalData.goodsList.list)?void 0:e.length)||0},f=()=>{r("closeSetting","false")},y=()=>{o("log","at components/login/setting_mask.vue:137","logout"),uni.showModal({title:"提示",content:"确定退出登录?",success:function(e){e.confirm?(o("log","at components/login/setting_mask.vue:144","用户点击确定"),m()):e.cancel&&o("log","at components/login/setting_mask.vue:147","用户点击取消")}})},m=()=>{getApp().globalData.stadiumInfo={},getApp().globalData.accountInfo={},getApp().globalData.goodsList={},uni.removeStorageSync("stadiumInfo"),uni.removeStorageSync("accountInfo"),uni.removeStorageSync("userInfo"),uni.reLaunch({url:"/pages/login/index"})},h=()=>{let e=["开启-进程守护","关闭-进程守护"];uni.showActionSheet({itemList:e,success:async function(t){let n=e[t.tapIndex];o("log","at components/login/setting_mask.vue:174","选中了第"+(t.tapIndex+1)+"个按钮"+n),0==t.tapIndex?a.startWatchDog({api_name:""},(e=>{o("log","at components/login/setting_mask.vue:181",e),Qo.showNone("开启")})):a.closeWatchDog({api_name:""},(e=>{o("log","at components/login/setting_mask.vue:188",e),Qo.showNone("关闭")})),o("log","at components/login/setting_mask.vue:193","daemonRun",n,"")},fail:function(e){o("log","at components/login/setting_mask.vue:196",e.errMsg)}})},v=()=>{Qo.showNone(""),uni.showModal({title:"提示",content:"跳转更新前,请先关闭进程守护",success:function(e){e.confirm?(o("log","at components/login/setting_mask.vue:209","用户点击确定"),plus.runtime.openURL("https://www.pgyer.com/oxcheckoutpad",(function(e){}))):e.cancel&&o("log","at components/login/setting_mask.vue:213","用户点击取消")}})},b=()=>{},w=()=>{let e=["开-支付后显示","关-支付后不显示"];uni.showActionSheet({itemList:e,success:async function(t){let n=e[t.tapIndex];o("log","at components/login/setting_mask.vue:247","选中了第"+(t.tapIndex+1)+"个按钮"+n),0==t.tapIndex?(uni.setStorageSync("showGateBtn",!0),Qo.showNone("显示-支付后开门按钮")):(uni.setStorageSync("showGateBtn",!1),Qo.showNone("关闭-支付后开门按钮")),A()},fail:function(e){o("log","at components/login/setting_mask.vue:258",e.errMsg)}})},_=()=>{let{store_id:e,brand_id:t,token:n}=getApp().globalData.accountInfo,r={token:n,stadium_id:e};return qo.post({url:To.getDoorList,data:r,isDefaultGet:!0,failMsg:"getDoorList fail"}).then((e=>{o("log","at components/login/setting_mask.vue:277","getDoorList suc: ",e),S(e)}))},k=e=>{o("log","at components/login/setting_mask.vue:285",e.detail.value),x(e.detail.value),setTimeout((()=>{E()}),300)},x=e=>{i.value=e,l.value=s.value[e]},S=e=>{c.value=e,s.value=e.map((e=>e.hardware_name))},E=()=>{let e={p_index:i.value,p_array:s.value,p_show:l.value,p_obj_arr:c.value};uni.setStorageSync("picker_door",e)},N=()=>{let e=uni.getStorageSync("picker_door");o("log","at components/login/setting_mask.vue:316","getDoorPickerDataFromStorage: ",e),e&&(i.value=e.p_index,s.value=e.p_array,l.value=e.p_show,c.value=e.p_obj_arr)},A=()=>{let e=uni.getStorageSync("showGateBtn")||!1;u.value=e},C=()=>{let e=uni.getStorageSync("picker_door"),t=`测试门禁 ID: ${e.p_obj_arr[e.p_index].id} | Name: ${e.p_obj_arr[e.p_index].hardware_name}`;uni.showModal({title:"提示",content:t,showCancel:!0,confirmText:"确定",confirmColor:"#009874",success:e=>{e.confirm&&(o("log","at components/login/setting_mask.vue:342","用户点击确定"),P())}})},P=async()=>{let{store_id:e,brand_id:t,token:n}=getApp().globalData.accountInfo,r=uni.getStorageSync("picker_door"),a={token:n,gate_id:r.p_obj_arr[r.p_index].id};return o("log","at components/login/setting_mask.vue:362","openDoor: ",a),qo.post({url:To.openDoor,data:a,isDefaultGet:!0,failMsg:"openDoor fail"}).then((e=>{o("log","at components/login/setting_mask.vue:371","openDoor suc: ",e),Qo.showNone("门禁:开")}))};return(t,o)=>{var n,r;return e.openBlock(),e.createElementBlock("view",{class:"setting-mask"},[e.createElementVNode("view",{class:"sm-content"},[e.createElementVNode("image",{class:"sc-close",mode:"aspectFit",src:"/static/images/close.png",onClick:f}),e.createElementVNode("view",{class:"sc-title"},"平板配置"),e.createElementVNode("view",{class:"sc-container"},[e.createElementVNode("view",{class:"sc-line"},[e.createElementVNode("view",{class:"sl-desc"},"品牌: "+e.toDisplayString(e.unref(d).brand_name),1)]),e.createElementVNode("view",{class:"sc-line"},[e.createElementVNode("view",{class:"sl-desc"},"门店: "+e.toDisplayString(e.unref(d).name),1)]),e.createElementVNode("view",{class:"sc-line"},[e.createElementVNode("view",{class:"sl-desc"},"门店ID: "+e.toDisplayString(e.unref(d).id),1)]),e.createElementVNode("view",{class:"sc-line"},[e.createElementVNode("view",{class:"sl-desc"},"设备账号控制"),e.createElementVNode("button",{class:"sd-btn",onClick:y},"退出登录")]),e.createElementVNode("view",{class:"sc-show-note"},"本机本地配置:"),e.createElementVNode("view",{class:"sc-line"},[e.createElementVNode("view",{class:"sl-desc"},"进程守护切换"),e.createElementVNode("button",{class:"sd-btn",onClick:h},"开/关")]),e.createElementVNode("view",{class:"sc-line"},[e.createElementVNode("view",{class:"sl-desc"},"程序版本更新"),e.createElementVNode("button",{class:"sd-btn",onClick:v},"前往更新")]),e.createElementVNode("view",{class:"sc-line"},[e.createElementVNode("view",{class:"sl-desc"},"开门门禁绑定"),e.createElementVNode("picker",{mode:"selector",onChange:k,value:e.unref(i),range:e.unref(s)},[e.createElementVNode("button",{class:"sd-btn",onClick:b},"选择门禁")],40,["value","range"]),e.createElementVNode("view",{class:"sl-info"},e.toDisplayString(e.unref(l)),1)]),e.unref(i)>=0&&(null==(n=e.unref(c))?void 0:n.length)>0?(e.openBlock(),e.createElementBlock("view",{key:0,class:"sc-line"},[e.createElementVNode("view",{class:"sl-desc"},"开启门禁测试"),e.createElementVNode("button",{class:"sd-btn",onClick:C},"开门")])):e.createCommentVNode("",!0),e.unref(i)>=0&&(null==(r=e.unref(c))?void 0:r.length)>0?(e.openBlock(),e.createElementBlock("view",{key:1,class:"sc-line"},[e.createElementVNode("view",{class:"sl-desc"},"支付成功是否显示开门"),e.createElementVNode("button",{class:"sd-btn",onClick:w},"开/关"),e.createElementVNode("view",{class:"sl-info"},e.toDisplayString(e.unref(u)?"开":"关"),1)])):e.createCommentVNode("",!0)])])])}}},[["__scopeId","data-v-8c106bab"]]),vn={__name:"success",setup(t){let r=e.ref(!1);const s=e.ref([]),c=e.ref(""),u=e.ref([]);n((async()=>{v()}));var p=e.computed((()=>{let{accountInfo:e,stadiumInfo:t}=getApp().globalData,n=e.username||"用户";return uni.getStorageSync("stadiumInfo")&&(o("log","at pages/login/success.vue:53","stadiumInfo: ",uni.getStorageSync("stadiumInfo")),t=uni.getStorageSync("stadiumInfo")),t&&(n=t.brand_name),n}));const d=()=>{let e=uni.getStorageSync("stadiumInfo");if(e){let t=u.value.findIndex((t=>{if(t.id==e.id){return getApp().globalData.accountInfo.store_id=t.id,t}}));return-1!=t&&(c.value=t,o("log","at pages/login/success.vue:73","autoShowBackStadium set index: ",t),!0)}return!1};function g(e){o("log","at pages/login/success.vue:84","handle_closeSetting",e),r.value=!r.value}async function f(e){o("log","at pages/login/success.vue:88","handle_pickerChange",e),uni.getStorageSync("picker_door"),c.value=e,function(e){let t=u.value[e],{id:o}=t;getApp().globalData.accountInfo.store_id=o,getApp().globalData.stadiumInfo=t,uni.setStorageSync("stadiumInfo",t)}(e)}async function y(){getApp(),d()?Qo.routeTo("/pages/index/standby","nT"):Qo.showNone("请选择门店")}function m(){d()?r.value=!r.value:Qo.showNone("请选择门店")}function h(){o("log","at pages/login/success.vue:175","clickUpdatePadList"),v()}function v(){o("log","at pages/login/success.vue:190","updatePadList"),Qo.showLoad("更新门店列表...");let e=Qo.getPostParams();if(!e)return Qo.showNone("获取用户信息失败");let{brand_id:t,token:n}=e,r={brand_id:t,token:n,page:1,page_size:200};qo.post({url:To.padList,data:r,isDefaultGet:!0,failMsg:"更新门店列表失败!"}).then((e=>(Qo.hideLoad(),o("log","at pages/login/success.vue:209","updatePadList suc: ",e),u.value=e.list,s.value=e.list.map((e=>e.venue_name)),e))).finally((()=>{Qo.hideLoad()}))}return(t,o)=>(e.openBlock(),e.createBlock(a,null,{default:e.withCtx((()=>[e.createElementVNode("view",{class:"login-success"},[e.createVNode(i),e.createElementVNode("view",{class:"ls-desc"},[e.createElementVNode("view",{class:"ld-line"},"尊敬的"+e.toDisplayString(e.unref(p)||"用户")+":",1),e.createElementVNode("view",{class:"ld-line"},"欢迎登录欧轩智能场馆平板端系统!")]),e.createElementVNode("view",{class:"ls-pads"},[e.createVNode(mn,{padList:s.value,padListOrigin:u.value,onPickerChange:f},null,8,["padList","padListOrigin"])]),e.createElementVNode("view",{class:"ls-botton"},[e.createVNode(l,{onClick:y},{default:e.withCtx((()=>[e.createTextVNode("进入使用")])),_:1})]),e.createElementVNode("view",{class:"ls-links"},[e.createElementVNode("view",{class:"ll-item",onClick:h},"更新门店"),e.createElementVNode("view",{class:"ll-item",onClick:m},"设置")])]),e.unref(r)?(e.openBlock(),e.createBlock(hn,{key:0,onCloseSetting:g})):e.createCommentVNode("",!0)])),_:1}))}};__definePage("pages/login/index",Wo),__definePage("pages/index/standby",on),__definePage("pages/index/index",pn),__definePage("pages/pay/index",yn),__definePage("pages/login/success",vn);const bn={onLaunch(){o("log","at App.vue:19","App Launch default"),this.globalData.autoLogin=!0,this.reloadUserInfo()},onShow(){o("log","at App.vue:24","App Show default")},onHide(){o("log","at App.vue:27","App Hide default")},globalData:{autoLogin:!1,goodsList:[],shopList:[],accountInfo:{},stadiumInfo:{id:"",brand_id:"",venue_name:""},loginInfo:{phone:"",password:"",token:"",vip:!1},payInfo:{payType:"",paySuccess:!1}},methods:{reloadUserInfo(){let e=uni.getStorageSync("userInfo"),t=getApp();e&&(t.globalData.accountInfo=e)},async updateGoodsList(){return new Promise(((e,t)=>{let{brand_id:n,stadium_id:r,token:a}=Qo.getPostParams(),i={brand_id:n,stadium_id:r,token:a,type_key:"",key:"",page:"1",page_size:"9999",is_sale:"1",is_show_on_assistant:"1"};qo.post({url:To.getGoodsList,data:i,isDefaultGet:!1,failMsg:"获取商品列表失败"}).then((t=>{o("log","at App.vue:84","getGoodsList suc: ",t),(t=t.data.data).list.forEach((e=>{e.shopCount=1,e.shopCountPrice=e.user_price})),this.globalData.goodsList=t.list,e(t)}))}))}}};const{app:wn,Vuex:_n,Pinia:kn}={app:e.createVueApp(bn)};uni.Vuex=_n,uni.Pinia=kn,wn.provide("__globalStyles",__uniConfig.styles),wn._component.mpType="app",wn._component.render=()=>{},wn.mount("#app")}(Vue); diff --git a/daemonlibrary/src/main/java/com/shihoo/daemon/Daemon_Uni.java b/daemonlibrary/src/main/java/com/shihoo/daemon/Daemon_Uni.java index c0a6ec2..ccef561 100644 --- a/daemonlibrary/src/main/java/com/shihoo/daemon/Daemon_Uni.java +++ b/daemonlibrary/src/main/java/com/shihoo/daemon/Daemon_Uni.java @@ -34,7 +34,7 @@ public class Daemon_Uni extends UniModule { * */ @UniJSMethod(uiThread = true) public void startWatchDog(JSONObject options, UniJSCallback callback) {// - Daemon_UniAppProxy.daemonHelper.startWatchDogUni(); + Daemon_UniAppProxy.daemonHelper.startWatchDog(); JSONObject data = new JSONObject(); Boolean isOn = Daemon_UniAppProxy.daemonHelper.isRestartApp(); data.put("code", isOn); diff --git a/daemonlibrary/src/main/java/com/shihoo/daemon/watchdog/DaemonHelper.java b/daemonlibrary/src/main/java/com/shihoo/daemon/watchdog/DaemonHelper.java index 7fc34c2..126093d 100644 --- a/daemonlibrary/src/main/java/com/shihoo/daemon/watchdog/DaemonHelper.java +++ b/daemonlibrary/src/main/java/com/shihoo/daemon/watchdog/DaemonHelper.java @@ -53,8 +53,19 @@ public class DaemonHelper { /** * 在uniapp启动守护进程 */ - public void startWatchDogUni(){ - startWatchDog(my_application); + public void startWatchDog(){ +// startWatchDog(my_application); + Log.d(TAG, "startWatchDog: 开启守护进程"); + startRestartApp(); + } + /** + * 关闭守护进程 + */ + public void closeWatchDog() { + Log.d(TAG, "closeWatchDog: 关闭守护进程"); +// stopDaemonEnv(); +// cancelDaemonEnvJob(); + stopRestartApp(); } /** @@ -115,15 +126,7 @@ public class DaemonHelper { buildNotify(application); } - /** - * 关闭守护进程 - */ - public void closeWatchDog() { - Log.d(TAG, "closeWatchDog: 关闭守护进程"); -// stopDaemonEnv(); -// cancelDaemonEnvJob(); - stopRestartApp(); - } + /** * 停止在守护进程中重启APP @@ -133,6 +136,10 @@ public class DaemonHelper { mainWorkService.isNeedRestartApp = false; } + private void startRestartApp(){ + mainWorkService.isNeedRestartApp = true; + } + /** * 调用MainWorkService的stopWork方法 * diff --git a/uniapp_project_code/src/pages/login/index.vue b/uniapp_project_code/src/pages/login/index.vue index 8641a09..a1dc22d 100644 --- a/uniapp_project_code/src/pages/login/index.vue +++ b/uniapp_project_code/src/pages/login/index.vue @@ -17,6 +17,7 @@ 登录 + 进程守护设置 @@ -48,12 +49,13 @@ } from 'vue' import { onLoad,onReady } from '@dcloudio/uni-app'; import md5 from '@/utils/md5.js' + import {useWatchDog} from './mixins/watchDogCompositionAPI.js'; onReady(async () => { autoLogin() - }); // import { uni } from '@dcloudio/uni-h5'; + const { isDaemonRun, selectDaemon, daemonRun } = useWatchDog();//进程守护API const username = ref(''); const password = ref(''); diff --git a/uniapp_project_code/src/pages/login/mixins/watchDogCompositionAPI.js b/uniapp_project_code/src/pages/login/mixins/watchDogCompositionAPI.js new file mode 100644 index 0000000..fda3399 --- /dev/null +++ b/uniapp_project_code/src/pages/login/mixins/watchDogCompositionAPI.js @@ -0,0 +1,62 @@ +// useWatchDog.js +import { ref } from 'vue'; + +// #ifdef APP-PLUS +const Daemon_Uni = uni.requireNativePlugin('Daemon_Uni'); +// #endif + +export function useWatchDog() { + const isDaemonRun = ref(false); // 进程守护状态 + + // 异步函数来开启或关闭守护进程 + async function selectDaemon() { + const _arr = ["开启-进程守护", "关闭-进程守护"]; + uni.showActionSheet({ + itemList: _arr, + success: async (res) => { + const _sel = _arr[res.tapIndex]; + console.log('选中了第' + (res.tapIndex + 1) + '个按钮' + _sel); + + if (res.tapIndex === 0) { + await daemonRun(true); + } else { + await daemonRun(false); + } + + console.log("daemonRun", _sel, isDaemonRun.value); + }, + fail: (res) => { + console.log(res.errMsg); + } + }); + } + + // 开启与关闭守护进程 + async function daemonRun(run) { + // #ifdef APP-PLUS + if (run) { + Daemon_Uni.startWatchDog({ + "api_name": "", + }, (ret) => { + console.log(ret); + isDaemonRun.value = true; // 假设总是成功开启 + }); + } else { + Daemon_Uni.closeWatchDog({ + "api_name": "", + }, (ret) => { + console.log(ret); + // 同上,假设关闭总是成功 + isDaemonRun.value = false; + }); + } + // #endif + } + + // 返回响应式数据和函数 + return { + isDaemonRun, + selectDaemon, + daemonRun, + }; +} \ No newline at end of file diff --git a/uniapp_project_code/src/pages/login/mixins/watchDogOptionsAPI.js b/uniapp_project_code/src/pages/login/mixins/watchDogOptionsAPI.js new file mode 100644 index 0000000..511299b --- /dev/null +++ b/uniapp_project_code/src/pages/login/mixins/watchDogOptionsAPI.js @@ -0,0 +1,74 @@ +// mixins/watchDog.js + +// 离线人脸识别 +// #ifdef APP-PLUS +const Daemon_Uni = uni.requireNativePlugin('Daemon_Uni'); +// #endif + +import util from '@/utils/util'; + +export default { + data() { + return { + is_daemon_run: false, //进程守护状态 + } + }, + created() { + console.warn('Mixin watchDog.js!'); + }, + methods: { + + // 选择进程守护 开/关. 该函数为附带交互的进程守护开关选择 + async selectDaemon(){ + let that = this + let _arr = ["开启-进程守护","关闭-进程守护"]; + uni.showActionSheet({ + itemList:_arr, + success: async function (res) { + let _sel = _arr[res.tapIndex] + let _val = "" + console.log('选中了第' + (res.tapIndex + 1) + '个按钮' +_sel); + + if(res.tapIndex==0){ + let daemon_res = await that.daemonRun(true) + that.$nextTick(()=>{ + // that.globalData.localConfig.is_daemon_run = daemon_res + that.is_daemon_run = daemon_res + }); + }else{ + let daemon_res = await that.daemonRun(false) + that.$nextTick(()=>{ + // that.globalData.localConfig.is_daemon_run = daemon_res + that.is_daemon_run = daemon_res + }); + } + console.log("daemonRun",_sel,_val,that.is_daemon_run) + }, + fail: function (res) { + console.log(res.errMsg); + } + }) + }, + //开启与关闭保活 + daemonRun(run){ + // #ifdef APP-PLUS + if(run){ + Daemon_Uni.startWatchDog({ + "api_name":"", + }, + (ret) => { + console.log(ret) + }) + }else{ + Daemon_Uni.closeWatchDog({ + "api_name":"", + }, + (ret) => { + console.log(ret) + }) + } + // #endif + }, + + } +} \ No newline at end of file