From 75900d12e19e653445d2117bc18ca4725c962346 Mon Sep 17 00:00:00 2001 From: "3075067877@qq.com" <3075067877@qq.com> Date: Thu, 30 May 2024 10:11:31 +0800 Subject: [PATCH] update for pay --- app/build.gradle | 4 +-- .../assets/apps/__UNI__3B4D40B/www/app-service.js | 2 +- .../assets/apps/__UNI__3B4D40B/www/manifest.json | 2 +- uniapp_project_code/src/manifest.json | 30 +++++++++--------- uniapp_project_code/src/pages/pay/index.vue | 36 +++++++++++++++++----- 5 files changed, 47 insertions(+), 27 deletions(-) diff --git a/app/build.gradle b/app/build.gradle index 8e24925..ff9453a 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 113 - versionName "1.1.3" + versionCode 114 + versionName "1.1.4" 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 a7d094b..4e9858f 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((n=>t.resolve(e()).then((()=>n))),(n=>t.resolve(e()).then((()=>{throw n}))))}),"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 n(e,t,...n){uni.__log__?uni.__log__(e,t,...n):console[e].apply(console,[...n,t])}const o=(t=>(n,o=e.getCurrentInstance())=>{!e.isInSSRComponentSetup&&e.injectHook(t,n,o)})("onReady"),r=(e,t)=>{const n=e.__vccOpts||e;for(const[o,r]of t)n[o]=r;return n};const a=r({},[["render",function(t,n,o,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,n,o,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:n}){const o=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:o.brand_id,placeholder:"请输入品牌ID",onInput:r[0]||(r[0]=e=>n("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:o.username,placeholder:"请输入登录账号",onInput:r[1]||(r[1]=e=>n("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:o.password,placeholder:"请输入登录密码",onInput:r[2]||(r[2]=e=>n("update:password",e.detail.value))},null,40,["value"])])])]))}},[["__scopeId","data-v-4cc74936"]]);const l=r({},[["render",function(t,n){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,n=[],o=0;o>>6),n[n.length]=63&t|128;else if(t<=65535)n[n.length]=224+(t>>>12),n[n.length]=t>>>6&63|128,n[n.length]=63&t|128;else{if(!(t<=1114111))throw"Unicode standart supports code points up-to U+10FFFF";n[n.length]=240+(t>>>18),n[n.length]=t>>>12&63|128,n[n.length]=t>>>6&63|128,n[n.length]=63&t|128}return n},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],n=[],o=0;o<=63;o++)n[o]=Math.abs(Math.sin(o+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),o=4;o--;)r.push(0);for(var d=c.leftRotate,f=(o=0,[]);o>>32-s,n);var i,s}function f(e,t,n,o,r,a,i){return d(t&n|~t&o,e,t,r,a,i)}function g(e,t,n,o,r,a,i){return d(t&o|n&~o,e,t,r,a,i)}function y(e,t,n,o,r,a,i){return d(t^n^o,e,t,r,a,i)}function m(e,t,n,o,r,a,i){return d(n^(t|~o),e,t,r,a,i)}function h(e,t){var n=(65535&e)+(65535&t);return(e>>16)+(t>>16)+(n>>16)<<16|65535&n}function v(e,t){var n=e[0],o=e[1],r=e[2],a=e[3];n=w(n,o,r,a,t[0],7,-680876936),a=w(a,n,o,r,t[1],12,-389564586),r=w(r,a,n,o,t[2],17,606105819),o=w(o,r,a,n,t[3],22,-1044525330),n=w(n,o,r,a,t[4],7,-176418897),a=w(a,n,o,r,t[5],12,1200080426),r=w(r,a,n,o,t[6],17,-1473231341),o=w(o,r,a,n,t[7],22,-45705983),n=w(n,o,r,a,t[8],7,1770035416),a=w(a,n,o,r,t[9],12,-1958414417),r=w(r,a,n,o,t[10],17,-42063),o=w(o,r,a,n,t[11],22,-1990404162),n=w(n,o,r,a,t[12],7,1804603682),a=w(a,n,o,r,t[13],12,-40341101),r=w(r,a,n,o,t[14],17,-1502002290),n=_(n,o=w(o,r,a,n,t[15],22,1236535329),r,a,t[1],5,-165796510),a=_(a,n,o,r,t[6],9,-1069501632),r=_(r,a,n,o,t[11],14,643717713),o=_(o,r,a,n,t[0],20,-373897302),n=_(n,o,r,a,t[5],5,-701558691),a=_(a,n,o,r,t[10],9,38016083),r=_(r,a,n,o,t[15],14,-660478335),o=_(o,r,a,n,t[4],20,-405537848),n=_(n,o,r,a,t[9],5,568446438),a=_(a,n,o,r,t[14],9,-1019803690),r=_(r,a,n,o,t[3],14,-187363961),o=_(o,r,a,n,t[8],20,1163531501),n=_(n,o,r,a,t[13],5,-1444681467),a=_(a,n,o,r,t[2],9,-51403784),r=_(r,a,n,o,t[7],14,1735328473),n=k(n,o=_(o,r,a,n,t[12],20,-1926607734),r,a,t[5],4,-378558),a=k(a,n,o,r,t[8],11,-2022574463),r=k(r,a,n,o,t[11],16,1839030562),o=k(o,r,a,n,t[14],23,-35309556),n=k(n,o,r,a,t[1],4,-1530992060),a=k(a,n,o,r,t[4],11,1272893353),r=k(r,a,n,o,t[7],16,-155497632),o=k(o,r,a,n,t[10],23,-1094730640),n=k(n,o,r,a,t[13],4,681279174),a=k(a,n,o,r,t[0],11,-358537222),r=k(r,a,n,o,t[3],16,-722521979),o=k(o,r,a,n,t[6],23,76029189),n=k(n,o,r,a,t[9],4,-640364487),a=k(a,n,o,r,t[12],11,-421815835),r=k(r,a,n,o,t[15],16,530742520),n=x(n,o=k(o,r,a,n,t[2],23,-995338651),r,a,t[0],6,-198630844),a=x(a,n,o,r,t[7],10,1126891415),r=x(r,a,n,o,t[14],15,-1416354905),o=x(o,r,a,n,t[5],21,-57434055),n=x(n,o,r,a,t[12],6,1700485571),a=x(a,n,o,r,t[3],10,-1894986606),r=x(r,a,n,o,t[10],15,-1051523),o=x(o,r,a,n,t[1],21,-2054922799),n=x(n,o,r,a,t[8],6,1873313359),a=x(a,n,o,r,t[15],10,-30611744),r=x(r,a,n,o,t[6],15,-1560198380),o=x(o,r,a,n,t[13],21,1309151649),n=x(n,o,r,a,t[4],6,-145523070),a=x(a,n,o,r,t[11],10,-1120210379),r=x(r,a,n,o,t[2],15,718787259),o=x(o,r,a,n,t[9],21,-343485551),e[0]=C(n,e[0]),e[1]=C(o,e[1]),e[2]=C(r,e[2]),e[3]=C(a,e[3])}function b(e,t,n,o,r,a){return t=C(C(t,e),C(o,a)),C(t<>>32-r,n)}function w(e,t,n,o,r,a,i){return b(t&n|~t&o,e,t,r,a,i)}function _(e,t,n,o,r,a,i){return b(t&o|n&~o,e,t,r,a,i)}function k(e,t,n,o,r,a,i){return b(t^n^o,e,t,r,a,i)}function x(e,t,n,o,r,a,i){return b(n^(t|~o),e,t,r,a,i)}function S(e){var t,n=[];for(t=0;t<64;t+=4)n[t>>2]=e.charCodeAt(t)+(e.charCodeAt(t+1)<<8)+(e.charCodeAt(t+2)<<16)+(e.charCodeAt(t+3)<<24);return n}var E="0123456789abcdef".split("");function N(e){for(var t="",n=0;n<4;n++)t+=E[e>>8*n+4&15]+E[e>>8*n&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(o,r),t=0;t<16;t++)r[t]=0;return r[14]=8*n,v(o,r),o}(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,n){return e&t|~e&n}),P),new Array((function(e,t,n){return e&n|t&~n}),I),new Array((function(e,t,n){return e^t^n}),L),new Array((function(e,t,n){return t^(e|~n)}),O));const V={hex_md5:function(e){return function(e){for(var t,n=p?"0123456789ABCDEF":"0123456789abcdef",o="",r=0;r>>4&15)+n.charAt(15&t);return o}(function(e){return function(e){for(var t="",n=0;n<32*e.length;n+=8)t+=String.fromCharCode(e[n>>5]>>>n%32&255);return t}(function(e,t){e[t>>5]|=128<>>9<<4)]=t;for(var n=1732584193,o=-271733879,r=-1732584194,a=271733878,i=0;i>2),n=0;n>5]|=(255&e.charCodeAt(n/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 n=function(e){var t=me(e,0,1),n=me(e,-1);if("%"===t&&"%"!==n)throw new z("invalid intrinsic syntax, expected closing `%`");if("%"===n&&"%"!==t)throw new z("invalid intrinsic syntax, expected opening `%`");var o=[];return ye(e,ve,(function(e,t,n,r){o[o.length]=n?ye(r,be,"$1"):t||e})),o}(e),o=n.length>0?n[0]:"",r=we("%"+o+"%",t),a=r.name,i=r.value,s=!1,l=r.alias;l&&(o=l[0],ge(n,fe([0,1],l)));for(var c=1,u=!0;c=n.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(ko){return!1}return!1};Ee.hasArrayLengthDefineBug=function(){if(!Ee())return null;try{return 1!==Se([],"length",{value:1}).length}catch(ko){return!0}};var Ne=Ee,Ae=_e("%Object.getOwnPropertyDescriptor%",!0);if(Ae)try{Ae([],"length")}catch(ko){Ae=null}var Ce=Ae,Pe=Ne(),Ie=_e,Le=Pe&&Ie("%Object.defineProperty%",!0);if(Le)try{Le({},"a",{value:1})}catch(ko){Le=!1}var Oe=Ie("%SyntaxError%"),Ve=Ie("%TypeError%"),Be=Ce,De=_e,Te=function(e,t,n){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 o=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===o&&s?s.enumerable:!o,value:n,writable:null===r&&s?s.writable:!r});else{if(!i&&(o||r||a))throw new Oe("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.");e[t]=n}},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 n=arguments.length>2&&!!arguments[2],o=!0,r=!0;if("length"in e&&Re){var a=Re(e,"length");a&&!a.configurable&&(o=!1),a&&!a.writable&&(r=!1)}return(o||r||!n)&&(je?Te(e,"length",t,!0,!0):Te(e,"length",t)),e};!function(e){var t=Q,n=_e,o=Ue,r=n("%TypeError%"),a=n("%Function.prototype.apply%"),i=n("%Function.prototype.call%"),s=n("%Reflect.apply%",!0)||t.call(i,a),l=n("%Object.defineProperty%",!0),c=n("%Math.max%");if(l)try{l({},"a",{value:1})}catch(ko){l=null}e.exports=function(e){if("function"!=typeof e)throw new r("a function is required");var n=s(t,i,arguments);return o(n,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,nt="function"==typeof WeakRef&&WeakRef.prototype?WeakRef.prototype.deref:null,ot=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 n=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if("number"==typeof e){var o=e<0?-yt(-e):yt(e);if(o!==e){var r=String(o),a=st.call(t,r.length+1);return lt.call(r,n,"$&_")+"."+lt.call(lt.call(a,/([0-9]{3})/g,"$&_"),/_$/,"")}}return lt.call(t,n,"$&_")}var St=Qe,Et=St.custom,Nt=Lt(Et)?Et:null;function At(e,t,n){var o="double"===(n.quoteStyle||t)?'"':"'";return o+e+o}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(ko){}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 n=0,o=e.length;nt.maxStringLength){var n=e.length-t.maxStringLength,o="... "+n+" more character"+(n>1?"s":"");return Tt(st.call(e,0,t.maxStringLength),t)+o}return At(lt.call(lt.call(e,/(['\\])/g,"\\$1"),/[\x00-\x1f]/g,jt),"single",t)}function jt(e){var t=e.charCodeAt(0),n={8:"b",9:"t",10:"n",12:"f",13:"r"}[t];return n?"\\"+n:"\\x"+(t<16?"0":"")+ct.call(t.toString(16))}function Rt(e){return"Object("+e+")"}function Mt(e){return e+" { ? }"}function Ft(e,t,n,o){return e+" ("+t+") {"+(o?Ut(n,o):ft.call(n,", "))+"}"}function Ut(e,t){if(0===e.length)return"";var n="\n"+t.prev+t.base;return n+ft.call(e,","+n)+"\n"+t.prev}function Gt(e,t){var n=Pt(e),o=[];if(n){o.length=e.length;for(var r=0;r-1?He(n):n},Qt=function e(t,n,o,r){var a=n||{};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===o&&(o=0),o>=u&&u>0&&"object"==typeof t)return Pt(t)?"[Array]":"[Object]";var p=function(e,t){var n;if("\t"===e.indent)n="\t";else{if(!("number"==typeof e.indent&&e.indent>0))return null;n=ft.call(Array(e.indent+1)," ")}return{base:n,prev:ft.call(Array(t+1),n)}}(a,o);if(void 0===r)r=[];else if(Dt(r,t)>=0)return"[Circular]";function d(t,n,i){if(n&&(r=gt.call(r)).push(n),i){var s={depth:a.depth};return Vt(a,"quoteStyle")&&(s.quoteStyle=a.quoteStyle),e(t,s,o+1,r)}return e(t,a,o+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-o});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(ko){}return!1}(t)){var _=[];return ze&&ze.call(t,(function(e,n){_.push(d(n,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(ko){}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(ko){}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(ko){}return!1}(t))return Mt("WeakSet");if(function(e){if(!nt||!e||"object"!=typeof e)return!1;try{return nt.call(e),!0}catch(ko){}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(ko){}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(ot.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),en=$t("Map.prototype.has",!0),tn=function(e,t){for(var n,o=e;null!==(n=o.next);o=n)if(n.key===t)return o.next=n.next,n.next=e.next,e.next=n,n},nn=String.prototype.replace,on=/%20/g,rn="RFC3986",an={default:rn,formatters:{RFC1738:function(e){return nn.call(e,on,"+")},RFC3986:function(e){return String(e)}},RFC1738:"RFC1738",RFC3986:rn},sn=an,ln=Object.prototype.hasOwnProperty,cn=Array.isArray,un=function(){for(var e=[],t=0;t<256;++t)e.push("%"+((t<16?"0":"")+t.toString(16)).toUpperCase());return e}(),pn=function(e,t){for(var n=t&&t.plainObjects?Object.create(null):{},o=0;o1;){var t=e.pop(),n=t.obj[t.prop];if(cn(n)){for(var o=[],r=0;r=48&&l<=57||l>=65&&l<=90||l>=97&&l<=122||r===sn.RFC1738&&(40===l||41===l)?i+=a.charAt(s):l<128?i+=un[l]:l<2048?i+=un[192|l>>6]+un[128|63&l]:l<55296||l>=57344?i+=un[224|l>>12]+un[128|l>>6&63]+un[128|63&l]:(s+=1,l=65536+((1023&l)<<10|1023&a.charCodeAt(s)),i+=un[240|l>>18]+un[128|l>>12&63]+un[128|l>>6&63]+un[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(cn(e)){for(var n=[],o=0;o0?v.join(",")||null:void 0}];else if(vn(l))A=l;else{var P=Object.keys(v);A=c?P.sort(c):P}for(var I=r&&vn(v)&&1===v.length?n+"[]":n,L=0;L-1?e.split(","):e},Vn=function(e,t,n,o){if(e){var r=n.allowDots?e.replace(/\.([^.[]+)/g,"[$1]"):e,a=/(\[[^[\]]*])/g,i=n.depth>0&&/(\[[^[\]]*])/.exec(r),s=i?r.slice(0,i.index):r,l=[];if(s){if(!n.plainObjects&&Cn.call(Object.prototype,s)&&!n.allowPrototypes)return;l.push(s)}for(var c=0;n.depth>0&&null!==(i=a.exec(r))&&c=0;--a){var i,s=e[a];if("[]"===s&&n.parseArrays)i=[].concat(r);else{i=n.plainObjects?Object.create(null):{};var l="["===s.charAt(0)&&"]"===s.charAt(s.length-1)?s.slice(1,-1):s,c=parseInt(l,10);n.parseArrays||""!==l?!isNaN(c)&&s!==l&&String(c)===l&&c>=0&&n.parseArrays&&c<=n.arrayLimit?(i=[])[c]=r:"__proto__"!==l&&(i[l]=r):i={0:r}}r=i}return r}(l,t,n,o)}},Bn={formats:an,parse:function(e,t){var n=function(e){if(!e)return In;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?In.charset:e.charset;return{allowDots:void 0===e.allowDots?In.allowDots:!!e.allowDots,allowPrototypes:"boolean"==typeof e.allowPrototypes?e.allowPrototypes:In.allowPrototypes,allowSparse:"boolean"==typeof e.allowSparse?e.allowSparse:In.allowSparse,arrayLimit:"number"==typeof e.arrayLimit?e.arrayLimit:In.arrayLimit,charset:t,charsetSentinel:"boolean"==typeof e.charsetSentinel?e.charsetSentinel:In.charsetSentinel,comma:"boolean"==typeof e.comma?e.comma:In.comma,decoder:"function"==typeof e.decoder?e.decoder:In.decoder,delimiter:"string"==typeof e.delimiter||An.isRegExp(e.delimiter)?e.delimiter:In.delimiter,depth:"number"==typeof e.depth||!1===e.depth?+e.depth:In.depth,ignoreQueryPrefix:!0===e.ignoreQueryPrefix,interpretNumericEntities:"boolean"==typeof e.interpretNumericEntities?e.interpretNumericEntities:In.interpretNumericEntities,parameterLimit:"number"==typeof e.parameterLimit?e.parameterLimit:In.parameterLimit,parseArrays:!1!==e.parseArrays,plainObjects:"boolean"==typeof e.plainObjects?e.plainObjects:In.plainObjects,strictNullHandling:"boolean"==typeof e.strictNullHandling?e.strictNullHandling:In.strictNullHandling}}(t);if(""===e||null==e)return n.plainObjects?Object.create(null):{};for(var o="string"==typeof e?function(e,t){var n,o={},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(n=0;n-1&&(u=Pn(u)?[u]:u),Cn.call(o,c)?o[c]=An.combine(o[c],u):o[c]=u}return o}(e,n):e,r=n.plainObjects?Object.create(null):{},a=Object.keys(o),i=0;i0?f+d:""}};const Dn="https://testmanager.ouxuanzhineng.cn",Tn={padLogin:`${Dn}/assistant/WechatMiniApplogin`,padList:`${Dn}/admin/stadium/list`,getGoodsList:`${Dn}/admin/erpRetailGoods/list`,getGoodFromPad:`${Dn}/admin/erpRetailGoods/getErpGoodsBySkuOfPad`,getGoodsBySKU:`${Dn}/admin/erpRetailOrder/payOfBarcodeScanner`,getGoodsClassify:`${Dn}/classifyer/all`,makeOrder:`${Dn}/admin/erp/retailByPayOfQrcode`,payOrder:`${Dn}/admin/order/pay/online/payByScannedCode`,checkOrder:`${Dn}/pay/huishouqian/checkOrder`,version:`${Dn}/version`,getDoorList:`${Dn}/v3/pad/ListHardwareByStadiumId`,openDoor:`${Dn}/v3/pad/GateOpenById`},jn={ORIGIN:Dn,API:Tn},Rn=e=>(e=e.toString())[1]?e:"0"+e,Mn=(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 Fn(e="加载中",t=!0){uni.showLoading({mask:t,title:e})}function Un(){uni.hideLoading()}function Gn({title:e="提示",content:t="",showCancel:n=!1,cancelText:o="取消",confirmText:r="确定",confirmColor:a="#009874",success:i,fail:s,complete:l}){uni.showModal({title:e,content:t,showCancel:n,cancelText:o,confirmColor:a,confirmText:r,success:i,fail:s,complete:l})}function Hn(e,t){let n=new Date(e),o=new Date(t);return n.setHours(0,0,0,0)==o.setHours(0,0,0,0)}function $n(e,t){let n="";for(var o in e)n+=`&${o}=${e[o]}`;return t+"?"+n.slice(1)}const Qn={checkSerialPortMessage:function(e){return e?"aa01ea"==e?"":e:""},formatTime:e=>{const t=e.getFullYear(),n=e.getMonth()+1,o=e.getDate(),r=e.getHours(),a=e.getMinutes(),i=e.getSeconds();return[t,n,o].map(Rn).join("-")+" "+[r,a,i].map(Rn).join(":")},formatNumber:Rn,formatDate:({date:e=new Date,partition:t="-"})=>{let n;n="string"==typeof e&&-1!=e.indexOf("-")?new Date(e.replace(/\-/g,"/")):new Date(e);const o=n.getFullYear(),r=n.getMonth()+1,a=n.getDate();return"zh"==t?`${o}年${r}月${a}日`:[o,r,a].map(Rn).join(t)},routeTo:Mn,showNone:function(e,t=1500){uni.hideToast(),uni.hideLoading(),uni.showToast({mask:!0,title:e,icon:"none",duration:t})},showLoad:Fn,hideLoad:Un,showModal:Gn,showModalMsg:function(e="加载中",t=!0){return new Promise(((o,r)=>{uni.showModal({title:"提示",content:e,showCancel:t,confirmText:"确定",confirmColor:"#009874",success:function(e){e.confirm?(n("log","at utils/util.js:125","用户点击确定"),o(!0)):(n("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,n){let o,r,a,i,s;const l=function(){const c=+new Date-i;c0?o=setTimeout(l,t-c):(o=null,n||(s=e.apply(a,r),o||(a=r=null)))};return function(...r){a=this,i=+new Date;const c=n&&!o;return o||(o=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,...n)=>new Promise(((o,r)=>{e(Object.assign({},t,{success:o,fail:r}),...n)})),previousPageFunction:function({fnName:e,query:t}){return new Promise(((o,r)=>{try{getCurrentPages().length>1?(getCurrentPages()[getCurrentPages().length-2].$vm[e](t),o("success")):(n("error","at utils/util.js:195","当前路由栈为一,无法调取上一页数据"),r("当前路由栈为一,无法调取上一页数据"))}catch(a){n("error","at utils/util.js:199","调用上一页面栈方法失败!",a),r("调用上一页面栈方法失败!")}}))},getNodeMes:function(e,t=null){return new Promise((n=>{(t?uni.createSelectorQuery().in(t):uni.createSelectorQuery()).select(e).boundingClientRect((e=>{n(e)})).exec()}))},failAuthorizeTosetting:function(e="调用失败,请打开检查授权状态"){Gn({title:"提示",content:e,showCancel:!0,confirmText:"打开",success:e=>{e.confirm&&uni.openSetting()}})},getSceneQuery:function(e){return(decodeURIComponent(e)||null).split("&").reduce(((e,t)=>{let n=t.split("=");return e[`${n[0]}`]=n[1],e}),{})||null},getUrlQuery:function(e,t){var n=decodeURI(t).split("?a=1").join("");return-1!=n.indexOf(`${e}=`)?n.split(`${e}=`)[1].split("&")[0]:null},getQueryString:function(e){var t=new RegExp("(^|&)"+e+"=([^&]*)(&|$)"),n=window.location.search.substr(1).match(t);return null!=n?n[2]:null},getRandom:function(e,t){return Math.round(Math.random()*(t-e))+e},get_zh_day:function(e){return Hn((new Date).getTime(),new Date(e).getTime())?"今天":["周日","周一","周二","周三","周四","周五","周六"][new Date(e).getDay()]||""},isSameDay:Hn,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={}){Fn(),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){Un(),e.complete&&e.complete(t)}})},getQueryStr:function({url:e,name:t}){let n=(e.split("?")[1]||"").split("&")||[];for(let o=0;o{let o=t.split("=");return e[o[0]]=o[1],e}),{})||{}},specialFormatDate:function(e){var t=(new Date).getTime(),n=new Date(t+864e5*e);let o={};return o.y=n.getFullYear(),o.m=n.getMonth()+1,o.d=n.getDate(),o},timeToSec:function(e,t,n){return 1e3*(Number(3600*e)+Number(60*t)+Number(n))},debug:!1,showLog:function(e,t,n){$n(e,t);let o=t.split("?")[0].split("/");o[o.length-1]},getWebURL:$n,getUrlParams:function(e){var t={},n=e.split("?");if(n.length<=1)return t;n=n[1].split("&");for(var o=0;o{uni.getSystemInfo({success:function(t){e(t.windowHeight)},fail:t=>{n("log","at utils/util.js:499","getSystemInfo fail",t,"default to 1000"),e(1e3)}})}))},getNvueRefSize:function(e,t,n){return new Promise(((e,t)=>{}))},getH5RefSize:function(e,t){return new Promise(((e,t)=>{}))},resetHeader:function(e,t,n,o){t=function(e){let t=e.split("?")[0];return t=t.split(jn.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 n=e.url+"?"+Bn.stringify(e.params),o=parseInt((new Date).getTime()/1e3-e.timeDifference),r=t+"|1ba2212f78610369467de90fb1e3d345|"+n+"|4e68cd333457cb297a05ec7f77a9ad978b56cf57|"+o;return{S:V.hex_md5(r),T:o}}({data:n,params:o,url:t,timeDifference:r});return{...e,S:a,T:i}},updateTimeDifference:function(e){let{now_timestamp:t}=e,n="";t&&(n=parseInt((new Date).getTime()/1e3-t)),getApp().globalData.timeDifference=n},searchGoodBySku:function(e){return new Promise(((t,o)=>{"string"==typeof e&&e.trim()||(n("error","at utils/util.js:609","Invalid SKU. Please provide a non-empty string."),o(!1));let r=getApp().globalData.goodsList.list.filter((t=>{let n=t.erp_goods.erp_goods_sku==e,o=t.erp_goods.stock_num>=1;return n&&o}));r.length?t(r):o(!1)}))},getPostParams:function(){let e=getApp(),t=uni.getStorageSync("stadiumInfo");if(!e.globalData.accountInfo||!e.globalData.accountInfo.brand_id||!e.globalData.accountInfo.token)return Mn("/pages/login/index","rL"),!1;let{brand_id:n,token:o}=e.globalData.accountInfo;return{brand_id:n,token:o,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 qn=new class{request(e,t,o,r,a,i){return new Promise((async(s,l)=>{uni.request({url:e,timeout:3e5,sslVerify:!1,data:t,method:o,header:{...r},success:o=>{o.extension&&Qn.updateTimeDifference(o.extension);{n("log","at utils/server.js:24","islog req success----\x3e");let o=function(e,t){let n="";for(var o in e)n+=`&${o}=${e[o]}`;return t+"?"+n.slice(1)}(t,e),r=e.split("?")[0].split("/"),a=r[r.length-1];n("log","at utils/server.js:28","--------------------\x3e> ["+a+"][log]\n请求 Data: \n"+JSON.stringify(t)+"\n URL:\n"+o+"\n <<-------------------- ["+a+"][log] ↑↑↑\n")}if(a){if(""==i)throw Error("默认回调,失败提示不能为空 key -> failMsg");!function({res:e,failMsg:t,resolve:o,reject:r,url:a,data:i}){0==e.data.code?o(e.data.data):(Qn.hideLoad(),Qn.showNone(e.data.message||t||""),401==e.data.code&&uni.showModal({title:"提示",content:e.data.message,success:function(e){e.confirm?(n("log","at utils/server.js:86","用户点击确定"),Qn.routeTo("/pages/login/index","rL")):e.cancel&&n("log","at utils/server.js:89","用户点击取消")}}),r({url:a,res:e,data:i}))}({url:e,data:t,res:o,failMsg:i,resolve:s,reject:l})}else s(o)},fail:r=>{n("log","at utils/server.js:48","req fail----\x3e",{link:e,query:t,method:o,data:r}),Qn.hideLoad(),"string"!=typeof r.errMsg||-1==r.errMsg.indexOf("timeout")&&-1==r.errMsg.indexOf("interrupted")&&-1==r.errMsg.indexOf("请求超时")?"string"==typeof r.errMsg?Qn.showNone(r.errMsg):Qn.showNone("请求数据失败!请检查当前网络状态。"):Qn.showNone("网络超时!"),l(r)},complete(n){Qn.showLog(t,e,n)}})}))}get({url:e,data:t={},header:n={},isDefaultGet:o=!0,failMsg:r=""}){return n=Qn.resetHeader(n,e,t,{}),this.request(e,t,"GET",n,o,r)}post({url:e,data:t={},header:n={},isDefaultGet:o=!0,failMsg:r=""}){return n=Qn.resetHeader(n,e,t,{}),this.request(e,t,"POST",n,o,r)}uploadFile({url:e,filePath:t,onProgressCallBack:n,formData:o={}}){return new Promise(((r,a)=>{wx.uploadFile({url:e,filePath:t,formData:o,name:"file",success:r,fail:a}).onProgressUpdate((e=>n&&n(e)))}))}},Kn={__name:"index",setup(t){o((async()=>{!function(){let e=uni.getStorageSync("userInfo");n("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(){Qn.showLoad("登录中...");let e={assistant_client:"pc",brand_id:u.value,username:r.value,password:c.value};qn.post({url:Tn.padLogin,data:e,isDefaultGet:!0,failMsg:"操作失败!"}).then((e=>{Qn.hideLoad(),n("log","at pages/login/index.vue:104","padLogin suc: ",e);let{token:t,role:o}=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:o},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,n("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||(n("log","at pages/login/index.vue:140","登录的品牌不是历史登录设备的品牌, 清空stadiumInfo缓存"),uni.clearStorageSync("stadiumInfo"),!1)}(u.value)?(getApp().globalData.autoLogin=!1,setTimeout((()=>{Qn.routeTo("/pages/index/standby","nT")}),1e3),Qn.showNone("登录成功")):(getApp().globalData.autoLogin=!1,setTimeout((()=>{Qn.routeTo("/pages/login/success","nT")}),1e3),Qn.showNone("登录成功,请先选择门店"))})).finally((()=>{Qn.hideLoad()}))}return(t,n)=>(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:n[0]||(n[0]=()=>{})},"*登录账号密码请从pc端后台管理【设备运营管理平板管理】里获取"),e.createElementVNode("view",{class:"li-btn"},[e.createVNode(l,{onClick:g},{default:e.withCtx((()=>[e.createTextVNode("登录")])),_:1})])])])),_:1}))}},Wn=r({__name:"page_standby",setup(t){const o=e.ref(0);var r=e.computed((()=>{let{accountInfo:e,stadiumInfo:t}=getApp().globalData,o=e.username||"用户";return uni.getStorageSync("stadiumInfo")&&(n("log","at components/index/page_standby.vue:39","stadiumInfo: ",uni.getStorageSync("stadiumInfo")),t=uni.getStorageSync("stadiumInfo")),t&&(o=t.venue_name),o}));const a=()=>{Qn.routeTo("/pages/index/index","nT")};function i(){o.value++,n("log","at components/index/page_standby.vue:63","tabChnage: ",o.value),o.value>=10&&(o.value=0,Qn.routeTo("/pages/login/success","nT")),s()}const s=Qn.debounce((function(){o.value=0}),1e3,!1);return(t,n)=>(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"]]),zn=e=>{(e.$renderjs||(e.$renderjs=[])).push("keyboard"),(e.$renderjsModules||(e.$renderjsModules={})).keyboard="082c61ac"},Jn={methods:{onEvent(e){this.$emit(e.type,e)}}};zn(Jn);const Yn=r(Jn,[["render",function(t,n,o,r,a,i){return e.openBlock(),e.createElementBlock("view")}]]);const Xn={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,o){return new Promise(((r,a)=>{let i=[];try{e.forEach((function(e,n,r){t.forEach((function(t,a,i){e===t&&("shift"==r[n+1]?(r[n+1]="",r[n]=o[a].double):r[n]=o[a].single)}))})),i=e}catch(ko){n("warn","at utils/dictOfKeyboard.js:164","异常:",ko)}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,o){return new Promise(((o,r)=>{let a=[];try{e.forEach((function(e,n,o){t.forEach((function(t,r,a){e===t&&"shift"==o[n+1]&&(o[n+1]="",o[n]=o[n].toUpperCase())}))})),a=e}catch(ko){n("warn","at utils/dictOfKeyboard.js:189","异常:",ko)}o(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,o){return new Promise(((r,a)=>{let i=[];try{e.forEach((function(e,n,r){t.forEach((function(t,a,i){e===t&&(r[n]=o[a])}))})),i=e}catch(ko){n("warn","at utils/dictOfKeyboard.js:210","异常:",ko)}r(i)}))}(e,["multiply","divide","add","subtract","decimal_point"],["*","/","+","-","."]),n("log","at utils/dictOfKeyboard.js:140","result 最后结果: ",e.join("")),e.join("")||""}};const Zn={resetOXPrintInfo:function(e){let t=[],n="-------------------------------\n";t.push(n);for(let o of e.goods_data){let e=o.name+";"+o.nums+";"+o.price+";"+(o.price*o.nums).toFixed(2);t.push(e)}return t.push(n),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 eo=getApp();const to=r({components:{"page-standby":Wn,"keyboard-listener":Yn},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){n("log","at pages/index/standby.vue:79","onload:",e)},async onReady(){n("log","at pages/index/standby.vue:86","the index page onReady----"+this.screenHeight),eo=getApp(),setTimeout((async()=>{}),100)},methods:{async setTestSku(){n("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:o,token:r}=Qn.getPostParams(),a={brand_id:t,token:r,sku:e};return n("log","at pages/index/standby.vue:106","searchGoodBySku urlParams:",a),qn.post({url:Tn.getGoodsBySKU,data:a,isDefaultGet:!0,failMsg:"操作失败!"}).then((e=>(Qn.hideLoad(),n("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(n("log","at pages/index/standby.vue:129","combinedList",e,t),!t)return Qn.showNone("未找到商品");let o=e;return t.forEach((e=>{let t=o.findIndex((t=>t.id==e.id));-1!=t?(o[t].shopCount+=1,o[t].shopCountPrice=o[t].user_price*o[t].shopCount):o.push(e)})),o},async onKeyup(e){n("log","at pages/index/standby.vue:147","按键松开: ",e);let t=Xn.dict[e.keyCode];if(n("log","at pages/index/standby.vue:150","keyCode from keyboard:",t),this.decryptList.push(t),13!=e.keyCode)return n("log","at pages/index/standby.vue:153","继续接收:",this.decryptList);this.decryptList.pop(),this.strResult=await Xn.resultScan(this.decryptList),n("log","at pages/index/standby.vue:157","扫码结果-step-1:",this.strResult),this.orderQrcode=this.strResult,n("log","at pages/index/standby.vue:159","decryptList-before-splice: ",this.decryptList),this.decryptList.splice(0),n("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","")),n("log","at pages/index/standby.vue:167","扫码结果-step-2:",this.strResult),await this.searchGoodBySku(this.strResult).then((e=>(n("log","at pages/index/standby.vue:170","searchGoodBySku suc: ",e),e))).then((e=>{this.addSkuListToShopList(e)})).catch((e=>{n("log","at pages/index/standby.vue:176","searchGoodBySku err: ",e),Qn.showNone("未找到商品")}))},addSkuListToShopList(e){n("log","at pages/index/standby.vue:186","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)=>qn.post({url:Tn.getGoodFromPad,data:{sku:e,brand_id:t},isDefaultGet:!0}).then((e=>(Qn.hideLoad(),e.data.code,e))),async updateGoodsList(){let e=await this.getGoodsList();n("log","at pages/index/standby.vue:220","app.globaldata: ",eo.globalData),eo.globalData.goodsList=e},updateShopList(){eo.globalData.shopList=this.shopList},getGoodsList(){let{brand_id:e,stadium_id:t,token:o}=Qn.getPostParams(),r={brand_id:e,stadium_id:t,token:o,type_key:"",key:"",page:"1",page_size:"9999",is_sale:"1",is_show_on_assistant:"1"};return qn.post({url:Tn.getGoodsList,data:r,isDefaultGet:!0,failMsg:"获取商品列表失败"}).then((e=>(Qn.hideLoad(),n("log","at pages/index/standby.vue:251","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?(n("log","at pages/index/standby.vue:259","用户点击确定"),Qn.routeTo("/pages/login/index","rL")):e.cancel&&n("log","at pages/index/standby.vue:262","用户点击取消")}}))))}}},[["render",function(t,n,o,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"])])}]]),no=r({__name:"view_header",props:{backgroundCustom:{type:String,default:"#F5F7F8"},needBorder:{type:Boolean,default:!0}},emits:["closeUse"],setup(t,{emit:n}){const o=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,Qn.routeTo("/pages/index/standby","rL"))}),1e3)})),e.onBeforeUnmount((()=>{clearInterval(a),a=null})),e.onUnmounted((()=>{clearInterval(a),a=null}));const i=e.computed((()=>o.needBorder?"border-bottom: 1rpx solid #F5F7F8;":"border-bottom:none;")),s=()=>{Qn.routeTo("/pages/index/standby","rL")};return(t,n)=>(e.openBlock(),e.createElementBlock("view",{class:"header-box",style:e.normalizeStyle([{background:o.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"]]),oo=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:n}){let o=e.ref(!1);e.ref(""),e.ref("");let r=()=>{n("clickQR","")},a=()=>{n("clickToPay","")};return e.onMounted((async e=>{})),(n,i)=>(e.openBlock(),e.createElementBlock("view",{class:"footer-box"},[e.unref(o)?(e.openBlock(),e.createElementBlock("view",{key:0,class:"f-user"},[e.createElementVNode("text",{class:"txt"},"猫星人(18316553589)")])):e.createCommentVNode("",!0),e.unref(o)?(e.openBlock(),e.createElementBlock("view",{key:1,class:"f-line"})):e.createCommentVNode("",!0),e.unref(o)?(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"]]),ro=r({__name:"list_item",props:["mkey","mitem"],emits:["delItem","addItem","minusItem"],setup(t,{emit:n}){const o=t;e.onMounted((async e=>{}));const r=()=>{n("addItem",o.mkey)},a=()=>{n("minusItem",o.mkey)},i=()=>{n("delItem",o.mkey)};return(n,o)=>{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"]]),ao=r({__name:"view_keyboard",props:{maxInput:{type:Number,default:20}},emits:["inputValueUpdate"],setup(t,{emit:o}){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=Qn.debounce((e=>{if(n("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 Qn.showNone(`最多输入${r.maxInput}位`);a.value+=l(e)}o("inputValueUpdate",a.value)}),20,!0);return(t,n)=>(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:n=>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"]]),io=r({__name:"input_box_QR",props:{maskHeight:{type:Number,default:1200},maxInput:{type:Number,default:20}},emits:["showIt","clickCommit"],setup(t,{emit:o}){const r=t;let a=e.ref(""),i=e.ref(!1);e.onMounted((async e=>{n("log","at components/index/keyboard/input_box_QR.vue:58"," the keyboard_box component is now mounted. ",app.globalData)}));const s=()=>{o("showIt","false")},l=async()=>{n("log","at components/index/keyboard/input_box_QR.vue:65","handle_clickCommit"),await u(a.value).then((e=>{let t=a.value;o("clickCommit",{inputCode:t,goods:e})})).catch((e=>{n("error","at components/index/keyboard/input_box_QR.vue:71","searchGoodBySku err:",e),i.value=!0}))},c=e=>{n("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:o,token:r}=Qn.getPostParams(),a={brand_id:t,token:r,sku:e};return n("log","at components/index/keyboard/input_box_QR.vue:105","searchGoodBySku urlParams:",a),qn.post({url:Tn.getGoodsBySKU,data:a,isDefaultGet:!0,failMsg:"操作失败!"}).then((e=>(Qn.hideLoad(),n("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,n)=>(e.openBlock(),e.createElementBlock("view",{class:"keyboard-box",style:e.normalizeStyle({height:r.maskHeight+"px"}),onTouchmove:n[0]||(n[0]=e.withModifiers((()=>{}),["prevent"])),onClick:n[1]||(n[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(ao,{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-8745b40b"]]),so=r({__name:"input_box_end_phone",props:{maskHeight:{type:Number,default:1200},maxInput:{type:Number,default:4}},emits:["showIt","clickCommit"],setup(t,{emit:o}){const r=t;let a=e.ref("");e.onMounted((async e=>{n("log","at components/index/keyboard/input_box_end_phone.vue:58","the input_box_end_phone component is now mounted. "+r.maskHeight)}));const i=()=>{o("showIt","false")},s=()=>{o("clickCommit",a.value)},l=e=>{n("log","at components/index/keyboard/input_box_end_phone.vue:68","accept_inputValueClick:",e),a.value=e.split(""),n("log","at components/index/keyboard/input_box_end_phone.vue:70","inputValue:",a.value)};return(t,n)=>(e.openBlock(),e.createElementBlock("view",{class:"keyboard-box",style:e.normalizeStyle({height:r.maskHeight+"px"}),onTouchmove:n[0]||(n[0]=e.withModifiers((()=>{}),["prevent"])),onClick:n[1]||(n[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(ao,{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 lo="";const co=r({components:{"page-standby":Wn,"view-header":no,"view-footer":oo,"list-item":ro,"input-qr-box":io,"input-box-end-phone":so,"keyboard-listener":Yn},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){n("log","at pages/index/index.vue:124","onload:",e),this.clearShopList(),e.skulist&&this.acceptSKUList(e.skulist)},async onReady(){this.screenHeight=await Qn.getPageHeight(),n("log","at pages/index/index.vue:136","the index page onReady----"+this.screenHeight),lo=getApp(),setTimeout((async()=>{this.setFooterHeight()}),1e3)},methods:{searchGoodBySku:async e=>{Qn.showLoad();let{brand_id:t,stadium_id:o,token:r}=Qn.getPostParams(),a={brand_id:t,token:r,sku:e};return n("log","at pages/index/index.vue:153","searchGoodBySku urlParams:",a),qn.post({url:Tn.getGoodsBySKU,data:a,isDefaultGet:!0,failMsg:"操作失败!"}).then((e=>(Qn.hideLoad(),n("log","at pages/index/index.vue:163","searchGoodBySku suc: ",e),(e=[e]).forEach((e=>{e.shopCount=1,e.shopCountPrice=e.user_price})),Qn.hideLoad(),e))).finally((()=>{Qn.hideLoad()}))},clearShopList(){n("log","at pages/index/index.vue:178","clearShopList"),this.shopList=[]},acceptSKUList(e){n("log","at pages/index/index.vue:183","acceptSKUList:",e=JSON.parse(decodeURIComponent(e))),e&&e.length>0&&(this.shopList=this.combinedList(this.shopList,e))},acceptSKUListFromGlobalData(){let e=lo.globalData.skulist;n("log","at pages/index/index.vue:188","acceptSKUListFromGlobalData:",e),this.shopList=this.combinedList(this.shopList,e)},async setTestSku(){n("log","at pages/index/index.vue:192","Test set SKU 10000012");let e=await this.searchGoodBySku("10000012");this.shopList=this.shopList.concat(e)},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(n("log","at pages/index/index.vue:223","clickToPay",e),this.shopListTotalPrice<=0)return Qn.showNone("请先添加商品");Qn.routeTo(`/pages/pay/index?query=${JSON.stringify(e)}`,"rL")},clickToUse(){Qn.routeTo("/pages/login/success","nT")},handle_closeStandby(e){n("log","at pages/index/index.vue:233","handle_closeSetting",e),this.showPageStandby=!this.showPageStandby},handle_closeQRInputBox(e){n("log","at pages/index/index.vue:237","handle_closeKeyboardBox",e),this.showQRInputBox=!this.showQRInputBox},handle_closeEndPhoneBox(e){n("log","at pages/index/index.vue:241","handle_closeEndPhoneBox",e),this.showEndPhoneBox=!this.showEndPhoneBox},handle_clickQR(){this.showQRInputBox=!this.showQRInputBox},handle_clickCommit_qr(e){n("log","at pages/index/index.vue:249","handle_clickCommit_qr",typeof e.goods,e),n("log","at pages/index/index.vue:251",JSON.stringify(e.goods)),Qn.showNone("添加商品成功,数量:"+e.goods.length+"个"),e.goods&&e.goods.length>0&&(this.shopList=this.combinedList(this.shopList,e.goods)),this.showQRInputBox=!this.showQRInputBox},handle_clickVIP(){Qn.showNone("会员登录"),this.showEndPhoneBox=!this.showEndPhoneBox},combinedList(e,t){if(n("log","at pages/index/index.vue:267","combinedList",e,t),!t)return Qn.showNone("未找到商品");let o=e,r=[],a=[];return t.forEach((e=>{let t=o.findIndex((t=>t.id==e.id));-1!=t?this.checkStock(o[t])?this.handle_add(t):(e.shopCount=1,r.push(e)):a.push(e)})),o.push(...a),n("log","at pages/index/index.vue:290","_list_cannot_add:",r),r.length>0&&Qn.showNone("存在库存不足商品"),o},async setFooterHeight(){n("log","at pages/index/index.vue:297","Auto setFooterHeight")},async onKeyup(e){let t=Xn.dict[e.keyCode];if(this.decryptList.push(t),13!=e.keyCode)return void n("log","at pages/index/index.vue:317","继续接收:",this.decryptList);this.decryptList.pop(),this.strResult=await Xn.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 o=await this.searchGoodBySku(this.strResult).then((e=>(n("log","at pages/index/index.vue:335","searchGoodBySku suc: ",e),e))).catch((e=>{n("log","at pages/index/index.vue:338","searchGoodBySku err: ",e),Qn.showNone("未找到商品")}));o&&o.length>0&&(this.shopList=this.combinedList(this.shopList,o))},onKeydown(e){},handle_add(e){if(n("log","at pages/index/index.vue:353","handle_add",e),!this.checkStock(this.shopList[e]))return Qn.showNone("该商品库存不足");this.shopList[e].shopCount++,this.shopList[e].shopCountPrice=(this.shopList[e].user_price||0)*this.shopList[e].shopCount},handle_minus(e){n("log","at pages/index/index.vue:360","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):Qn.showNone("商品数量不能小于1")},checkStock:e=>e.erp_goods.stock_num-(e.shopCount||0)>=1,handle_del(e){n("log","at pages/index/index.vue:377","handle_del",e),this.shopList.splice(e,1),Qn.showNone("删除成功")},test(){n("log","at pages/index/index.vue:401","test");let e=Qn.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 n("log","at pages/index/index.vue:406","urlParams:",e),qn.post({url:Tn.getGoodsList,data:e,isDefaultGet:!1}).then((e=>(n("log","at pages/index/index.vue:413","test suc: ",e),e)))},getGoodFromPad:(e,t)=>qn.post({url:Tn.getGoodFromPad,data:{sku:e,brand_id:t},isDefaultGet:!0}).then((e=>(Qn.hideLoad(),e.data.code,e))),async updateGoodsList(){let e=await this.getGoodsList();n("log","at pages/index/index.vue:440","app.globaldata: ",lo.globalData),lo.globalData.goodsList=e},updateShopList(){lo.globalData.shopList=this.shopList},getGoodsList(){let{brand_id:e,stadium_id:t,token:o}=Qn.getPostParams(),r={brand_id:e,stadium_id:t,token:o,type_key:"",key:"",page:"1",page_size:"9999",is_sale:"1",is_show_on_assistant:"1"};return qn.post({url:Tn.getGoodsList,data:r,isDefaultGet:!0,failMsg:"获取商品列表失败"}).then((e=>(Qn.hideLoad(),n("log","at pages/index/index.vue:477","getGoodsList suc: ",e),e.list.forEach((e=>{e.shopCount=1,e.shopCountPrice=e.user_price})),e)))}}},[["render",function(t,n,o,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,n)=>(e.openBlock(),e.createBlock(l,{key:n,mkey:n,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-e76ef15e"]]),uo=r({__name:"paying",props:{payTotal:{type:Number,default:0}},emits:["clickVipCard"],setup:(t,{emit:n})=>(n,o)=>(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"]]),po=r({__name:"success",props:{paySuccessInfo:{type:Object,default:{amount:0,goods_data:[]}}},emits:["clickToIndex","clickOpenDoor"],setup(t,{emit:o}){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,Qn.routeTo("/pages/index/standby","rL"))}),1e3),a.value=uni.getStorageSync("showGateBtn")||!1,n("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 n=0;n{o("clickToIndex",""),Qn.routeTo("/pages/index/standby","rL")},u=()=>{n("log","at components/pay/success.vue:115","handle_clickOpenDoor"),o("clickOpenDoor","")};return(n,o)=>(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"]]),fo=t("OX_Pad_Printer");const go=r({components:{"view-header":no,"input-box-end-phone":so,paying:uo,"pay-success":po,"input-qr-box":io,"keyboard-listener":Yn},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){n("log","at pages/pay/index.vue:76","pay onload:",e),e&&this.setPayData(e)},async onReady(){await this.setPageHeight()},methods:{testAcceptScanCode(){uni.showModal({title:"模拟扫码",content:"模拟扫码,点确定时执行acceptScanCode",showCancel:!0,confirmText:"确定",success:e=>{e.confirm&&(n("log","at pages/pay/index.vue:96","用户点击确定"),this.acceptScanCode("282659672061313993"))}})},setPayData(e){n("log","at pages/pay/index.vue:103","setPayData:",e),n("log","at pages/pay/index.vue:106","setPayData1:",e=JSON.parse(e.query));let t={goods_data:e.shopList,amount:e.shopListTotalPrice};n("log","at pages/pay/index.vue:111","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 acceptScanCode(e){n("log","at pages/pay/index.vue:128","acceptScanCode:",e),Qn.showLoad("交易处理中...");let t=e,o=this.getPayType(t);null!=o?await this.makeOrder((e=>{n("log","at pages/pay/index.vue:140","makeInfo-result",e)})).then((e=>(n("log","at pages/pay/index.vue:142","orderInfo-result",e),this.payOrder({order_no:e.order_no,pay_code:t,pay_type:o})))).then((e=>(n("log","at pages/pay/index.vue:148","payInfo-result:",e),this.checkOrder(e)))).then((async e=>{n("log","at pages/pay/index.vue:151","最终checkInfo:",e);let{payRes:t,checkRes:o}=e;if("1"==o.pay_order.status)Qn.showNone(o.res.respMsg),this.paySuccessStatus=1,this.printOrder(e);else{o.res.respMsg||o.res.respCode;let{orderStatus:t,requestDate:r,respCode:a,respMsg:i,tradeNo:s,transNo:l}=o.res;"PROCESSING"==t?(n("log","at pages/pay/index.vue:166","等待支付中,需要继续查询支付结果"),uni.showModal({title:"等待支付中...",content:"如您已确认付款成功,请点击确认,继续查询支付结果!",showCancel:!1,confirmText:"确认已支付成功",success:async t=>{t.confirm&&(n("log","at pages/pay/index.vue:174","用户点击确定"),"pages/pay/index"==Qn.getPageRoute()?this.doLoopCheck(e):Qn.showNone("请重新扫码使用"))}})):await this.checkInfoReactive(e)}})).finally((()=>{Qn.hideLoad()})):Qn.showNone("支付类型未知,请重试!")},async doLoopCheck(e){let t=this.reCheckOrderCountMax;for(let o=0;o<=t;o++){uni.showLoading({title:"支付结果查询中..."+o+"/"+this.reCheckOrderCountMax,mask:!0});let t=await this.checkOrder(e.payRes).then((e=>e)).catch((e=>{n("warn","at pages/pay/index.vue:205","reCheckOrder err:",e),rj(!1)}));n("log","at pages/pay/index.vue:208","recheckInfo--1:",t);let{orderStatus:r,requestDate:a,respCode:i,respMsg:s,tradeNo:l,transNo:c}=t.checkRes.res;if(n("log","at pages/pay/index.vue:211","doLoopCheck recheckInfo:",t),"SUCCESS"==r){let{payRes:n,checkRes:o}=t;"1"==o.pay_order.status&&(Qn.showNone(o.res.respMsg),this.paySuccessStatus=1,this.printOrder(e));break}await Qn.asyncSetTimeOut(2e3)}uni.hideLoading()},async checkInfoReactive(e){return new Promise(((t,o)=>{n("log","at pages/pay/index.vue:232","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?(Qn.showNone(a.res.respMsg),this.paySuccessStatus=1,this.printOrder(e),t(!0)):"200021"==l||"200008"==l||"200004"==l?(n("warn","at pages/pay/index.vue:246","需要重新下单"),uni.showModal({title:"支付失败",content:d,showCancel:!1,confirmText:"确定",success:e=>{e.confirm&&(n("log","at pages/pay/index.vue:255","用户点击确定"),Qn.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&&(n("log","at pages/pay/index.vue:272","用户点击确定"),Qn.routeTo("/pages/index/standby","rL"),t(!0))}})):"PROCESSING"==i&&0==this.reCheckOrderCount?(n("log","at pages/pay/index.vue:280","等待支付中,需要继续查询支付结果"),uni.showModal({title:"等待支付中...",content:"如您已确认付款成功,请点击确认,继续查询支付结果!",showCancel:!1,confirmText:"确认已支付成功",success:async e=>{e.confirm&&(n("log","at pages/pay/index.vue:288","用户点击确定"),t(!0))}})):"PROCESSING"==i&&this.reCheckOrderCount>0&&o(e)}))},loopReCheckOrder(e){reCheckOrder(e).then((e=>{loopReCheckOrder(e)})).catch((e=>{n("warn","at pages/pay/index.vue:307","loopReCheckOrder err:",e),Qn.showNone("支付结果查询超时,请联系管理员!"+e)}))},async reCheckOrder(e){let t=e.payRes;return new Promise((async(e,o)=>{if(this.reCheckOrderCount++,this.reCheckOrderCount>=this.reCheckOrderCountMax)uni.hideLoading(),Qn.showNone("支付结果查询超时,请联系管理员!"),o(!1);else{n("log","at pages/pay/index.vue:324","reCheckOrder:",t),await this.checkOrder(t).then((e=>(n("log","at pages/pay/index.vue:326","checkInfo:",e),e))).then((e=>{})).catch((e=>{n("warn","at pages/pay/index.vue:331","reCheckOrder err:",e),o(!1)}));let r=await this.checkOrder(t);await this.checkInfoReactive(r).then((t=>{e(t)})).catch((e=>{n("warn","at pages/pay/index.vue:339","reCheckOrder err:",e),o(!1)}))}}))},printOrder(e){n("warn","at pages/pay/index.vue:349","printOrder checkInfo: ",e),Qn.showNone("小票打印中..."),getApp().globalData.accountInfo;let t=uni.getStorageSync("stadiumInfo"),{venue_name:o}=t;this.dataQuery;let{finishedDate:r,transNo:a}=e.payRes.res;r=this.getTimeFromFinishedDate(r);let i={...this.dataQuery,venue_name:o,time:r,order_no:a},s=Zn.resetOXPrintInfo(i);return n("log","at pages/pay/index.vue:367","uni call android OX_Pad_Printer ------begin---!",s),fo.execAPI({api_name:"doPrint",value:s},(e=>{n("log","at pages/pay/index.vue:374","ox_pad_printer doPrint result: "+JSON.stringify(e))}))},getTimeFromFinishedDate:e=>(n("log","at pages/pay/index.vue:382",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(){n("log","at pages/pay/index.vue:473","OX_Pad_Printer test------begin---!");let e=Zn.resetOXPrintInfo(Zn.testPrintInfo);fo.execAPI({api_name:"doPrint",value:e},(e=>{n("log","at pages/pay/index.vue:479","testPrinter: "+JSON.stringify(e))}))},async makeOrder(){let{brand_id:e,token:t}=getApp().globalData.accountInfo,o=uni.getStorageSync("stadiumInfo").id||"",{goods_data:r,amount:a}=this.dataQuery;e=parseInt(e),a=parseFloat(a);let i={store_id:o,brand_id:e,token:t,amount:a,goods_data:r,pay_type:7,other_pay_type:"付款码支付",card_no:"",mark:""};return n("log","at pages/pay/index.vue:496","makeOrder urlParams:",i),qn.post({url:Tn.makeOrder,data:i,isDefaultGet:!0,failMsg:"操作失败!"}).then((e=>(Qn.hideLoad(),n("log","at pages/pay/index.vue:506","makeOrder suc: ",e),e)))},payOrder(e){n("log","at pages/pay/index.vue:511","payOrder get param:",e);let{order_no:t,pay_code:o,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:o,pay_type:r,brand_id:l,token:c,order_amt:i,goods_info:t};return n("log","at pages/pay/index.vue:525","payOrder urlParams:",u),qn.post({url:Tn.payOrder,data:u,isDefaultGet:!0,failMsg:"payOrder fail"}).then((e=>(n("log","at pages/pay/index.vue:534","payOrder suc: ",e),{order_no:t,pay_code:o,pay_type:r,orderAmt:e.res.orderAmt,transNo:e.res.transNo,res:e.res})))},checkOrder(e){let{store_id:t,brand_id:o,token:r}=getApp().globalData.accountInfo,{transNo:a,orderAmt:i,payCode:s}=e,l={transNo:a,payCode:s,brand_id:o,token:r,orderAmt:i,manual:"yes"};return n("log","at pages/pay/index.vue:554","checkOrder urlParams:",l),qn.post({url:Tn.checkOrder,data:l,isDefaultGet:!0,failMsg:"checkOrder fail"}).then((t=>(n("log","at pages/pay/index.vue:563","checkOrder suc: ",e),{payRes:e,checkRes:t})))},handle_clickVipCard(){Qn.showNone("储值卡支付未接入"),this.handle_clickVIP()},handle_closeEndPhoneBox(e){n("log","at pages/pay/index.vue:578","handle_closeEndPhoneBox",e),this.showEndPhoneBox=!this.showEndPhoneBox},handle_clickCommit_end_phone(e){n("log","at pages/pay/index.vue:582","handle_clickCommit_end_phone",e),this.showEndPhoneBox=!this.showEndPhoneBox},handle_closeQRInputBox(e){n("log","at pages/pay/index.vue:586","handle_closeQRInputBox",e)},handle_clickCommit_qr(e){n("log","at pages/pay/index.vue:589","handle_clickCommit_qr",e),this.showQRInputBox=!this.showQRInputBox},handle_clickVIP(){this.showEndPhoneBox=!this.showEndPhoneBox},handle_clickOpenDoor(e){n("log","at pages/pay/index.vue:598","执行开门"),this.openDoorReq()},async setPageHeight(){this.screenHeight=await Qn.getPageHeight()},async onKeyup(e){let t=Xn.dict[e.keyCode];if(this.decryptList.push(t),13!=e.keyCode)return n("log","at pages/pay/index.vue:611","this.decryptList1: ",this.decryptList);this.decryptList.pop(),this.strResult=await Xn.resultScan(this.decryptList),this.orderQrcode=this.strResult,this.decryptList.splice(0),-1!=this.strResult.indexOf("down_arrow")&&(this.strResult=this.strResult.replace("down_arrow","")),n("log","at pages/pay/index.vue:623","扫码最终结果--:",this.strResult),this.acceptScanCode(this.strResult)},onKeydown(e){},async openDoorReq(){Qn.showLoad();let{store_id:e,brand_id:t,token:o}=getApp().globalData.accountInfo,r=uni.getStorageSync("picker_door"),a={token:o,gate_id:r.p_obj_arr[r.p_index].id};return n("log","at pages/pay/index.vue:644","openDoor: ",a),qn.post({url:Tn.openDoor,data:a,isDefaultGet:!0,failMsg:"openDoor fail"}).then((e=>{Qn.hideLoad(),n("log","at pages/pay/index.vue:654","openDoor suc: ",e),Qn.showModalMsg("开启门禁执行后, 请耐心等待门禁开启. 请不要重复发起开门指令.",!0)})).finally((()=>{Qn.hideLoad()}))}}},[["render",function(t,n,o,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:n[0]||(n[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-ab034b21"]]),yo=r({__name:"pads_picker",props:{padList:{type:Array,default:[]},padListOrigin:{type:Array,default:[]}},emits:["pickerChange"],setup(t,{emit:o}){const r=t,a=e.ref("");async function i(e){n("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 Qn.showModalMsg(e,!0).then((()=>{uni.removeStorageSync("picker_door"),uni.removeStorageSync("showGateBtn"),a.value=t,o("pickerChange",t)})).catch((e=>{n("log","at components/login/pads_picker.vue:69","catch111111",e)}))}else uni.removeStorageSync("picker_door"),uni.removeStorageSync("showGateBtn"),a.value=t,o("pickerChange",t)}return e.onMounted((()=>{})),e.watchEffect((()=>{n("log","at components/login/pads_picker.vue:46","watchEffect",r.padListOrigin),r.padListOrigin.length>0&&function(){n("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,n("log","at components/login/pads_picker.vue:94","autoShowBackStadium set index: ",t))}}()})),(n,o)=>(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"]]),mo=r({__name:"setting_mask",emits:["closeSetting"],setup(o,{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()=>{n("log","at components/login/setting_mask.vue:99","setting_mask onMounted ->"),N(),p.value=f(),_().catch((e=>{Qn.showNone("无法获取该门店门禁信息")})),A()})),e.onBeforeUnmount((async()=>{n("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=()=>{n("log","at components/login/setting_mask.vue:137","logout"),uni.showModal({title:"提示",content:"确定退出登录?",success:function(e){e.confirm?(n("log","at components/login/setting_mask.vue:144","用户点击确定"),m()):e.cancel&&n("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 o=e[t.tapIndex];n("log","at components/login/setting_mask.vue:174","选中了第"+(t.tapIndex+1)+"个按钮"+o),0==t.tapIndex?a.startWatchDog({api_name:""},(e=>{n("log","at components/login/setting_mask.vue:181",e),Qn.showNone("开启")})):a.closeWatchDog({api_name:""},(e=>{n("log","at components/login/setting_mask.vue:188",e),Qn.showNone("关闭")})),n("log","at components/login/setting_mask.vue:193","daemonRun",o,"")},fail:function(e){n("log","at components/login/setting_mask.vue:196",e.errMsg)}})},v=()=>{Qn.showNone(""),uni.showModal({title:"提示",content:"跳转更新前,请先关闭进程守护",success:function(e){e.confirm?(n("log","at components/login/setting_mask.vue:209","用户点击确定"),plus.runtime.openURL("https://www.pgyer.com/oxcheckoutpad",(function(e){}))):e.cancel&&n("log","at components/login/setting_mask.vue:213","用户点击取消")}})},b=()=>{},w=()=>{let e=["开-支付后显示","关-支付后不显示"];uni.showActionSheet({itemList:e,success:async function(t){let o=e[t.tapIndex];n("log","at components/login/setting_mask.vue:247","选中了第"+(t.tapIndex+1)+"个按钮"+o),0==t.tapIndex?(uni.setStorageSync("showGateBtn",!0),Qn.showNone("显示-支付后开门按钮")):(uni.setStorageSync("showGateBtn",!1),Qn.showNone("关闭-支付后开门按钮")),A()},fail:function(e){n("log","at components/login/setting_mask.vue:258",e.errMsg)}})},_=()=>{let{store_id:e,brand_id:t,token:o}=getApp().globalData.accountInfo,r={token:o,stadium_id:e};return qn.post({url:Tn.getDoorList,data:r,isDefaultGet:!0,failMsg:"getDoorList fail"}).then((e=>{n("log","at components/login/setting_mask.vue:277","getDoorList suc: ",e),S(e)}))},k=e=>{n("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");n("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&&(n("log","at components/login/setting_mask.vue:342","用户点击确定"),P())}})},P=async()=>{let{store_id:e,brand_id:t,token:o}=getApp().globalData.accountInfo,r=uni.getStorageSync("picker_door"),a={token:o,gate_id:r.p_obj_arr[r.p_index].id};return n("log","at components/login/setting_mask.vue:362","openDoor: ",a),qn.post({url:Tn.openDoor,data:a,isDefaultGet:!0,failMsg:"openDoor fail"}).then((e=>{n("log","at components/login/setting_mask.vue:371","openDoor suc: ",e),Qn.showNone("门禁:开")}))};return(t,n)=>{var o,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==(o=e.unref(c))?void 0:o.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"]]),ho={__name:"success",setup(t){let r=e.ref(!1);const s=e.ref([]),c=e.ref(""),u=e.ref([]);o((async()=>{v()}));var p=e.computed((()=>{let{accountInfo:e,stadiumInfo:t}=getApp().globalData,o=e.username||"用户";return uni.getStorageSync("stadiumInfo")&&(n("log","at pages/login/success.vue:53","stadiumInfo: ",uni.getStorageSync("stadiumInfo")),t=uni.getStorageSync("stadiumInfo")),t&&(o=t.brand_name),o}));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,n("log","at pages/login/success.vue:73","autoShowBackStadium set index: ",t),!0)}return!1};function f(e){n("log","at pages/login/success.vue:84","handle_closeSetting",e),r.value=!r.value}async function g(e){n("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:n}=t;getApp().globalData.accountInfo.store_id=n,getApp().globalData.stadiumInfo=t,uni.setStorageSync("stadiumInfo",t)}(e)}async function y(){getApp(),d()?Qn.routeTo("/pages/index/standby","nT"):Qn.showNone("请选择门店")}function m(){d()?r.value=!r.value:Qn.showNone("请选择门店")}function h(){n("log","at pages/login/success.vue:175","clickUpdatePadList"),v()}function v(){n("log","at pages/login/success.vue:190","updatePadList"),Qn.showLoad("更新门店列表...");let e=Qn.getPostParams();if(!e)return Qn.showNone("获取用户信息失败");let{brand_id:t,token:o}=e,r={brand_id:t,token:o,page:1,page_size:200};qn.post({url:Tn.padList,data:r,isDefaultGet:!0,failMsg:"更新门店列表失败!"}).then((e=>(Qn.hideLoad(),n("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((()=>{Qn.hideLoad()}))}return(t,n)=>(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(yo,{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(mo,{key:0,onCloseSetting:f})):e.createCommentVNode("",!0)])),_:1}))}};__definePage("pages/login/index",Kn),__definePage("pages/index/standby",to),__definePage("pages/index/index",co),__definePage("pages/pay/index",go),__definePage("pages/login/success",ho);const vo={onLaunch(){n("log","at App.vue:19","App Launch default"),this.globalData.autoLogin=!0,this.reloadUserInfo()},onShow(){n("log","at App.vue:24","App Show default")},onHide(){n("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:o,stadium_id:r,token:a}=Qn.getPostParams(),i={brand_id:o,stadium_id:r,token:a,type_key:"",key:"",page:"1",page_size:"9999",is_sale:"1",is_show_on_assistant:"1"};qn.post({url:Tn.getGoodsList,data:i,isDefaultGet:!1,failMsg:"获取商品列表失败"}).then((t=>{n("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:bo,Vuex:wo,Pinia:_o}={app:e.createVueApp(vo)};uni.Vuex=wo,uni.Pinia=_o,bo.provide("__globalStyles",__uniConfig.styles),bo._component.mpType="app",bo._component.render=()=>{},bo.mount("#app")}(Vue); +if("undefined"==typeof Promise||Promise.prototype.finally||(Promise.prototype.finally=function(e){const t=this.constructor;return this.then((n=>t.resolve(e()).then((()=>n))),(n=>t.resolve(e()).then((()=>{throw n}))))}),"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 n(e,t,...n){uni.__log__?uni.__log__(e,t,...n):console[e].apply(console,[...n,t])}const o=(t=>(n,o=e.getCurrentInstance())=>{!e.isInSSRComponentSetup&&e.injectHook(t,n,o)})("onReady"),r=(e,t)=>{const n=e.__vccOpts||e;for(const[o,r]of t)n[o]=r;return n};const a=r({},[["render",function(t,n,o,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,n,o,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:n}){const o=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:o.brand_id,placeholder:"请输入品牌ID",onInput:r[0]||(r[0]=e=>n("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:o.username,placeholder:"请输入登录账号",onInput:r[1]||(r[1]=e=>n("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:o.password,placeholder:"请输入登录密码",onInput:r[2]||(r[2]=e=>n("update:password",e.detail.value))},null,40,["value"])])])]))}},[["__scopeId","data-v-4cc74936"]]);const l=r({},[["render",function(t,n){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,n=[],o=0;o>>6),n[n.length]=63&t|128;else if(t<=65535)n[n.length]=224+(t>>>12),n[n.length]=t>>>6&63|128,n[n.length]=63&t|128;else{if(!(t<=1114111))throw"Unicode standart supports code points up-to U+10FFFF";n[n.length]=240+(t>>>18),n[n.length]=t>>>12&63|128,n[n.length]=t>>>6&63|128,n[n.length]=63&t|128}return n},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],n=[],o=0;o<=63;o++)n[o]=Math.abs(Math.sin(o+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),o=4;o--;)r.push(0);for(var d=c.leftRotate,f=(o=0,[]);o>>32-s,n);var i,s}function f(e,t,n,o,r,a,i){return d(t&n|~t&o,e,t,r,a,i)}function g(e,t,n,o,r,a,i){return d(t&o|n&~o,e,t,r,a,i)}function y(e,t,n,o,r,a,i){return d(t^n^o,e,t,r,a,i)}function m(e,t,n,o,r,a,i){return d(n^(t|~o),e,t,r,a,i)}function h(e,t){var n=(65535&e)+(65535&t);return(e>>16)+(t>>16)+(n>>16)<<16|65535&n}function v(e,t){var n=e[0],o=e[1],r=e[2],a=e[3];n=w(n,o,r,a,t[0],7,-680876936),a=w(a,n,o,r,t[1],12,-389564586),r=w(r,a,n,o,t[2],17,606105819),o=w(o,r,a,n,t[3],22,-1044525330),n=w(n,o,r,a,t[4],7,-176418897),a=w(a,n,o,r,t[5],12,1200080426),r=w(r,a,n,o,t[6],17,-1473231341),o=w(o,r,a,n,t[7],22,-45705983),n=w(n,o,r,a,t[8],7,1770035416),a=w(a,n,o,r,t[9],12,-1958414417),r=w(r,a,n,o,t[10],17,-42063),o=w(o,r,a,n,t[11],22,-1990404162),n=w(n,o,r,a,t[12],7,1804603682),a=w(a,n,o,r,t[13],12,-40341101),r=w(r,a,n,o,t[14],17,-1502002290),n=_(n,o=w(o,r,a,n,t[15],22,1236535329),r,a,t[1],5,-165796510),a=_(a,n,o,r,t[6],9,-1069501632),r=_(r,a,n,o,t[11],14,643717713),o=_(o,r,a,n,t[0],20,-373897302),n=_(n,o,r,a,t[5],5,-701558691),a=_(a,n,o,r,t[10],9,38016083),r=_(r,a,n,o,t[15],14,-660478335),o=_(o,r,a,n,t[4],20,-405537848),n=_(n,o,r,a,t[9],5,568446438),a=_(a,n,o,r,t[14],9,-1019803690),r=_(r,a,n,o,t[3],14,-187363961),o=_(o,r,a,n,t[8],20,1163531501),n=_(n,o,r,a,t[13],5,-1444681467),a=_(a,n,o,r,t[2],9,-51403784),r=_(r,a,n,o,t[7],14,1735328473),n=k(n,o=_(o,r,a,n,t[12],20,-1926607734),r,a,t[5],4,-378558),a=k(a,n,o,r,t[8],11,-2022574463),r=k(r,a,n,o,t[11],16,1839030562),o=k(o,r,a,n,t[14],23,-35309556),n=k(n,o,r,a,t[1],4,-1530992060),a=k(a,n,o,r,t[4],11,1272893353),r=k(r,a,n,o,t[7],16,-155497632),o=k(o,r,a,n,t[10],23,-1094730640),n=k(n,o,r,a,t[13],4,681279174),a=k(a,n,o,r,t[0],11,-358537222),r=k(r,a,n,o,t[3],16,-722521979),o=k(o,r,a,n,t[6],23,76029189),n=k(n,o,r,a,t[9],4,-640364487),a=k(a,n,o,r,t[12],11,-421815835),r=k(r,a,n,o,t[15],16,530742520),n=x(n,o=k(o,r,a,n,t[2],23,-995338651),r,a,t[0],6,-198630844),a=x(a,n,o,r,t[7],10,1126891415),r=x(r,a,n,o,t[14],15,-1416354905),o=x(o,r,a,n,t[5],21,-57434055),n=x(n,o,r,a,t[12],6,1700485571),a=x(a,n,o,r,t[3],10,-1894986606),r=x(r,a,n,o,t[10],15,-1051523),o=x(o,r,a,n,t[1],21,-2054922799),n=x(n,o,r,a,t[8],6,1873313359),a=x(a,n,o,r,t[15],10,-30611744),r=x(r,a,n,o,t[6],15,-1560198380),o=x(o,r,a,n,t[13],21,1309151649),n=x(n,o,r,a,t[4],6,-145523070),a=x(a,n,o,r,t[11],10,-1120210379),r=x(r,a,n,o,t[2],15,718787259),o=x(o,r,a,n,t[9],21,-343485551),e[0]=C(n,e[0]),e[1]=C(o,e[1]),e[2]=C(r,e[2]),e[3]=C(a,e[3])}function b(e,t,n,o,r,a){return t=C(C(t,e),C(o,a)),C(t<>>32-r,n)}function w(e,t,n,o,r,a,i){return b(t&n|~t&o,e,t,r,a,i)}function _(e,t,n,o,r,a,i){return b(t&o|n&~o,e,t,r,a,i)}function k(e,t,n,o,r,a,i){return b(t^n^o,e,t,r,a,i)}function x(e,t,n,o,r,a,i){return b(n^(t|~o),e,t,r,a,i)}function S(e){var t,n=[];for(t=0;t<64;t+=4)n[t>>2]=e.charCodeAt(t)+(e.charCodeAt(t+1)<<8)+(e.charCodeAt(t+2)<<16)+(e.charCodeAt(t+3)<<24);return n}var E="0123456789abcdef".split("");function N(e){for(var t="",n=0;n<4;n++)t+=E[e>>8*n+4&15]+E[e>>8*n&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(o,r),t=0;t<16;t++)r[t]=0;return r[14]=8*n,v(o,r),o}(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,n){return e&t|~e&n}),P),new Array((function(e,t,n){return e&n|t&~n}),I),new Array((function(e,t,n){return e^t^n}),L),new Array((function(e,t,n){return t^(e|~n)}),O));const V={hex_md5:function(e){return function(e){for(var t,n=p?"0123456789ABCDEF":"0123456789abcdef",o="",r=0;r>>4&15)+n.charAt(15&t);return o}(function(e){return function(e){for(var t="",n=0;n<32*e.length;n+=8)t+=String.fromCharCode(e[n>>5]>>>n%32&255);return t}(function(e,t){e[t>>5]|=128<>>9<<4)]=t;for(var n=1732584193,o=-271733879,r=-1732584194,a=271733878,i=0;i>2),n=0;n>5]|=(255&e.charCodeAt(n/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 n=function(e){var t=me(e,0,1),n=me(e,-1);if("%"===t&&"%"!==n)throw new z("invalid intrinsic syntax, expected closing `%`");if("%"===n&&"%"!==t)throw new z("invalid intrinsic syntax, expected opening `%`");var o=[];return ye(e,ve,(function(e,t,n,r){o[o.length]=n?ye(r,be,"$1"):t||e})),o}(e),o=n.length>0?n[0]:"",r=we("%"+o+"%",t),a=r.name,i=r.value,s=!1,l=r.alias;l&&(o=l[0],ge(n,fe([0,1],l)));for(var c=1,u=!0;c=n.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(ko){return!1}return!1};Ee.hasArrayLengthDefineBug=function(){if(!Ee())return null;try{return 1!==Se([],"length",{value:1}).length}catch(ko){return!0}};var Ne=Ee,Ae=_e("%Object.getOwnPropertyDescriptor%",!0);if(Ae)try{Ae([],"length")}catch(ko){Ae=null}var Ce=Ae,Pe=Ne(),Ie=_e,Le=Pe&&Ie("%Object.defineProperty%",!0);if(Le)try{Le({},"a",{value:1})}catch(ko){Le=!1}var Oe=Ie("%SyntaxError%"),Ve=Ie("%TypeError%"),Be=Ce,De=_e,Te=function(e,t,n){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 o=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===o&&s?s.enumerable:!o,value:n,writable:null===r&&s?s.writable:!r});else{if(!i&&(o||r||a))throw new Oe("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.");e[t]=n}},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 n=arguments.length>2&&!!arguments[2],o=!0,r=!0;if("length"in e&&Re){var a=Re(e,"length");a&&!a.configurable&&(o=!1),a&&!a.writable&&(r=!1)}return(o||r||!n)&&(je?Te(e,"length",t,!0,!0):Te(e,"length",t)),e};!function(e){var t=Q,n=_e,o=Ue,r=n("%TypeError%"),a=n("%Function.prototype.apply%"),i=n("%Function.prototype.call%"),s=n("%Reflect.apply%",!0)||t.call(i,a),l=n("%Object.defineProperty%",!0),c=n("%Math.max%");if(l)try{l({},"a",{value:1})}catch(ko){l=null}e.exports=function(e){if("function"!=typeof e)throw new r("a function is required");var n=s(t,i,arguments);return o(n,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,nt="function"==typeof WeakRef&&WeakRef.prototype?WeakRef.prototype.deref:null,ot=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 n=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if("number"==typeof e){var o=e<0?-yt(-e):yt(e);if(o!==e){var r=String(o),a=st.call(t,r.length+1);return lt.call(r,n,"$&_")+"."+lt.call(lt.call(a,/([0-9]{3})/g,"$&_"),/_$/,"")}}return lt.call(t,n,"$&_")}var St=Qe,Et=St.custom,Nt=Lt(Et)?Et:null;function At(e,t,n){var o="double"===(n.quoteStyle||t)?'"':"'";return o+e+o}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(ko){}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 n=0,o=e.length;nt.maxStringLength){var n=e.length-t.maxStringLength,o="... "+n+" more character"+(n>1?"s":"");return Tt(st.call(e,0,t.maxStringLength),t)+o}return At(lt.call(lt.call(e,/(['\\])/g,"\\$1"),/[\x00-\x1f]/g,jt),"single",t)}function jt(e){var t=e.charCodeAt(0),n={8:"b",9:"t",10:"n",12:"f",13:"r"}[t];return n?"\\"+n:"\\x"+(t<16?"0":"")+ct.call(t.toString(16))}function Rt(e){return"Object("+e+")"}function Mt(e){return e+" { ? }"}function Ft(e,t,n,o){return e+" ("+t+") {"+(o?Ut(n,o):ft.call(n,", "))+"}"}function Ut(e,t){if(0===e.length)return"";var n="\n"+t.prev+t.base;return n+ft.call(e,","+n)+"\n"+t.prev}function Gt(e,t){var n=Pt(e),o=[];if(n){o.length=e.length;for(var r=0;r-1?He(n):n},Qt=function e(t,n,o,r){var a=n||{};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===o&&(o=0),o>=u&&u>0&&"object"==typeof t)return Pt(t)?"[Array]":"[Object]";var p=function(e,t){var n;if("\t"===e.indent)n="\t";else{if(!("number"==typeof e.indent&&e.indent>0))return null;n=ft.call(Array(e.indent+1)," ")}return{base:n,prev:ft.call(Array(t+1),n)}}(a,o);if(void 0===r)r=[];else if(Dt(r,t)>=0)return"[Circular]";function d(t,n,i){if(n&&(r=gt.call(r)).push(n),i){var s={depth:a.depth};return Vt(a,"quoteStyle")&&(s.quoteStyle=a.quoteStyle),e(t,s,o+1,r)}return e(t,a,o+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-o});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(ko){}return!1}(t)){var _=[];return ze&&ze.call(t,(function(e,n){_.push(d(n,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(ko){}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(ko){}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(ko){}return!1}(t))return Mt("WeakSet");if(function(e){if(!nt||!e||"object"!=typeof e)return!1;try{return nt.call(e),!0}catch(ko){}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(ko){}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(ot.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),en=$t("Map.prototype.has",!0),tn=function(e,t){for(var n,o=e;null!==(n=o.next);o=n)if(n.key===t)return o.next=n.next,n.next=e.next,e.next=n,n},nn=String.prototype.replace,on=/%20/g,rn="RFC3986",an={default:rn,formatters:{RFC1738:function(e){return nn.call(e,on,"+")},RFC3986:function(e){return String(e)}},RFC1738:"RFC1738",RFC3986:rn},sn=an,ln=Object.prototype.hasOwnProperty,cn=Array.isArray,un=function(){for(var e=[],t=0;t<256;++t)e.push("%"+((t<16?"0":"")+t.toString(16)).toUpperCase());return e}(),pn=function(e,t){for(var n=t&&t.plainObjects?Object.create(null):{},o=0;o1;){var t=e.pop(),n=t.obj[t.prop];if(cn(n)){for(var o=[],r=0;r=48&&l<=57||l>=65&&l<=90||l>=97&&l<=122||r===sn.RFC1738&&(40===l||41===l)?i+=a.charAt(s):l<128?i+=un[l]:l<2048?i+=un[192|l>>6]+un[128|63&l]:l<55296||l>=57344?i+=un[224|l>>12]+un[128|l>>6&63]+un[128|63&l]:(s+=1,l=65536+((1023&l)<<10|1023&a.charCodeAt(s)),i+=un[240|l>>18]+un[128|l>>12&63]+un[128|l>>6&63]+un[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(cn(e)){for(var n=[],o=0;o0?v.join(",")||null:void 0}];else if(vn(l))A=l;else{var P=Object.keys(v);A=c?P.sort(c):P}for(var I=r&&vn(v)&&1===v.length?n+"[]":n,L=0;L-1?e.split(","):e},Vn=function(e,t,n,o){if(e){var r=n.allowDots?e.replace(/\.([^.[]+)/g,"[$1]"):e,a=/(\[[^[\]]*])/g,i=n.depth>0&&/(\[[^[\]]*])/.exec(r),s=i?r.slice(0,i.index):r,l=[];if(s){if(!n.plainObjects&&Cn.call(Object.prototype,s)&&!n.allowPrototypes)return;l.push(s)}for(var c=0;n.depth>0&&null!==(i=a.exec(r))&&c=0;--a){var i,s=e[a];if("[]"===s&&n.parseArrays)i=[].concat(r);else{i=n.plainObjects?Object.create(null):{};var l="["===s.charAt(0)&&"]"===s.charAt(s.length-1)?s.slice(1,-1):s,c=parseInt(l,10);n.parseArrays||""!==l?!isNaN(c)&&s!==l&&String(c)===l&&c>=0&&n.parseArrays&&c<=n.arrayLimit?(i=[])[c]=r:"__proto__"!==l&&(i[l]=r):i={0:r}}r=i}return r}(l,t,n,o)}},Bn={formats:an,parse:function(e,t){var n=function(e){if(!e)return In;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?In.charset:e.charset;return{allowDots:void 0===e.allowDots?In.allowDots:!!e.allowDots,allowPrototypes:"boolean"==typeof e.allowPrototypes?e.allowPrototypes:In.allowPrototypes,allowSparse:"boolean"==typeof e.allowSparse?e.allowSparse:In.allowSparse,arrayLimit:"number"==typeof e.arrayLimit?e.arrayLimit:In.arrayLimit,charset:t,charsetSentinel:"boolean"==typeof e.charsetSentinel?e.charsetSentinel:In.charsetSentinel,comma:"boolean"==typeof e.comma?e.comma:In.comma,decoder:"function"==typeof e.decoder?e.decoder:In.decoder,delimiter:"string"==typeof e.delimiter||An.isRegExp(e.delimiter)?e.delimiter:In.delimiter,depth:"number"==typeof e.depth||!1===e.depth?+e.depth:In.depth,ignoreQueryPrefix:!0===e.ignoreQueryPrefix,interpretNumericEntities:"boolean"==typeof e.interpretNumericEntities?e.interpretNumericEntities:In.interpretNumericEntities,parameterLimit:"number"==typeof e.parameterLimit?e.parameterLimit:In.parameterLimit,parseArrays:!1!==e.parseArrays,plainObjects:"boolean"==typeof e.plainObjects?e.plainObjects:In.plainObjects,strictNullHandling:"boolean"==typeof e.strictNullHandling?e.strictNullHandling:In.strictNullHandling}}(t);if(""===e||null==e)return n.plainObjects?Object.create(null):{};for(var o="string"==typeof e?function(e,t){var n,o={},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(n=0;n-1&&(u=Pn(u)?[u]:u),Cn.call(o,c)?o[c]=An.combine(o[c],u):o[c]=u}return o}(e,n):e,r=n.plainObjects?Object.create(null):{},a=Object.keys(o),i=0;i0?f+d:""}};const Dn="http://ouxuanmaganer.ouxuanzhineng.cn",Tn={padLogin:`${Dn}/assistant/WechatMiniApplogin`,padList:`${Dn}/admin/stadium/list`,getGoodsList:`${Dn}/admin/erpRetailGoods/list`,getGoodFromPad:`${Dn}/admin/erpRetailGoods/getErpGoodsBySkuOfPad`,getGoodsBySKU:`${Dn}/admin/erpRetailOrder/payOfBarcodeScanner`,getGoodsClassify:`${Dn}/classifyer/all`,makeOrder:`${Dn}/admin/erp/retailByPayOfQrcode`,payOrder:`${Dn}/admin/order/pay/online/payByScannedCode`,checkOrder:`${Dn}/pay/huishouqian/checkOrder`,version:`${Dn}/version`,getDoorList:`${Dn}/v3/pad/ListHardwareByStadiumId`,openDoor:`${Dn}/v3/pad/GateOpenById`},jn={ORIGIN:Dn,API:Tn},Rn=e=>(e=e.toString())[1]?e:"0"+e,Mn=(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 Fn(e="加载中",t=!0){uni.showLoading({mask:t,title:e})}function Un(){uni.hideLoading()}function Gn({title:e="提示",content:t="",showCancel:n=!1,cancelText:o="取消",confirmText:r="确定",confirmColor:a="#009874",success:i,fail:s,complete:l}){uni.showModal({title:e,content:t,showCancel:n,cancelText:o,confirmColor:a,confirmText:r,success:i,fail:s,complete:l})}function Hn(e,t){let n=new Date(e),o=new Date(t);return n.setHours(0,0,0,0)==o.setHours(0,0,0,0)}function $n(e,t){let n="";for(var o in e)n+=`&${o}=${e[o]}`;return t+"?"+n.slice(1)}const Qn={checkSerialPortMessage:function(e){return e?"aa01ea"==e?"":e:""},formatTime:e=>{const t=e.getFullYear(),n=e.getMonth()+1,o=e.getDate(),r=e.getHours(),a=e.getMinutes(),i=e.getSeconds();return[t,n,o].map(Rn).join("-")+" "+[r,a,i].map(Rn).join(":")},formatNumber:Rn,formatDate:({date:e=new Date,partition:t="-"})=>{let n;n="string"==typeof e&&-1!=e.indexOf("-")?new Date(e.replace(/\-/g,"/")):new Date(e);const o=n.getFullYear(),r=n.getMonth()+1,a=n.getDate();return"zh"==t?`${o}年${r}月${a}日`:[o,r,a].map(Rn).join(t)},routeTo:Mn,showNone:function(e,t=1500){uni.hideToast(),uni.hideLoading(),uni.showToast({mask:!0,title:e,icon:"none",duration:t})},showLoad:Fn,hideLoad:Un,showModal:Gn,showModalMsg:function(e="加载中",t=!0){return new Promise(((o,r)=>{uni.showModal({title:"提示",content:e,showCancel:t,confirmText:"确定",confirmColor:"#009874",success:function(e){e.confirm?(n("log","at utils/util.js:125","用户点击确定"),o(!0)):(n("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,n){let o,r,a,i,s;const l=function(){const c=+new Date-i;c0?o=setTimeout(l,t-c):(o=null,n||(s=e.apply(a,r),o||(a=r=null)))};return function(...r){a=this,i=+new Date;const c=n&&!o;return o||(o=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,...n)=>new Promise(((o,r)=>{e(Object.assign({},t,{success:o,fail:r}),...n)})),previousPageFunction:function({fnName:e,query:t}){return new Promise(((o,r)=>{try{getCurrentPages().length>1?(getCurrentPages()[getCurrentPages().length-2].$vm[e](t),o("success")):(n("error","at utils/util.js:195","当前路由栈为一,无法调取上一页数据"),r("当前路由栈为一,无法调取上一页数据"))}catch(a){n("error","at utils/util.js:199","调用上一页面栈方法失败!",a),r("调用上一页面栈方法失败!")}}))},getNodeMes:function(e,t=null){return new Promise((n=>{(t?uni.createSelectorQuery().in(t):uni.createSelectorQuery()).select(e).boundingClientRect((e=>{n(e)})).exec()}))},failAuthorizeTosetting:function(e="调用失败,请打开检查授权状态"){Gn({title:"提示",content:e,showCancel:!0,confirmText:"打开",success:e=>{e.confirm&&uni.openSetting()}})},getSceneQuery:function(e){return(decodeURIComponent(e)||null).split("&").reduce(((e,t)=>{let n=t.split("=");return e[`${n[0]}`]=n[1],e}),{})||null},getUrlQuery:function(e,t){var n=decodeURI(t).split("?a=1").join("");return-1!=n.indexOf(`${e}=`)?n.split(`${e}=`)[1].split("&")[0]:null},getQueryString:function(e){var t=new RegExp("(^|&)"+e+"=([^&]*)(&|$)"),n=window.location.search.substr(1).match(t);return null!=n?n[2]:null},getRandom:function(e,t){return Math.round(Math.random()*(t-e))+e},get_zh_day:function(e){return Hn((new Date).getTime(),new Date(e).getTime())?"今天":["周日","周一","周二","周三","周四","周五","周六"][new Date(e).getDay()]||""},isSameDay:Hn,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={}){Fn(),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){Un(),e.complete&&e.complete(t)}})},getQueryStr:function({url:e,name:t}){let n=(e.split("?")[1]||"").split("&")||[];for(let o=0;o{let o=t.split("=");return e[o[0]]=o[1],e}),{})||{}},specialFormatDate:function(e){var t=(new Date).getTime(),n=new Date(t+864e5*e);let o={};return o.y=n.getFullYear(),o.m=n.getMonth()+1,o.d=n.getDate(),o},timeToSec:function(e,t,n){return 1e3*(Number(3600*e)+Number(60*t)+Number(n))},debug:!1,showLog:function(e,t,n){$n(e,t);let o=t.split("?")[0].split("/");o[o.length-1]},getWebURL:$n,getUrlParams:function(e){var t={},n=e.split("?");if(n.length<=1)return t;n=n[1].split("&");for(var o=0;o{uni.getSystemInfo({success:function(t){e(t.windowHeight)},fail:t=>{n("log","at utils/util.js:499","getSystemInfo fail",t,"default to 1000"),e(1e3)}})}))},getNvueRefSize:function(e,t,n){return new Promise(((e,t)=>{}))},getH5RefSize:function(e,t){return new Promise(((e,t)=>{}))},resetHeader:function(e,t,n,o){t=function(e){let t=e.split("?")[0];return t=t.split(jn.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 n=e.url+"?"+Bn.stringify(e.params),o=parseInt((new Date).getTime()/1e3-e.timeDifference),r=t+"|1ba2212f78610369467de90fb1e3d345|"+n+"|4e68cd333457cb297a05ec7f77a9ad978b56cf57|"+o;return{S:V.hex_md5(r),T:o}}({data:n,params:o,url:t,timeDifference:r});return{...e,S:a,T:i}},updateTimeDifference:function(e){let{now_timestamp:t}=e,n="";t&&(n=parseInt((new Date).getTime()/1e3-t)),getApp().globalData.timeDifference=n},searchGoodBySku:function(e){return new Promise(((t,o)=>{"string"==typeof e&&e.trim()||(n("error","at utils/util.js:609","Invalid SKU. Please provide a non-empty string."),o(!1));let r=getApp().globalData.goodsList.list.filter((t=>{let n=t.erp_goods.erp_goods_sku==e,o=t.erp_goods.stock_num>=1;return n&&o}));r.length?t(r):o(!1)}))},getPostParams:function(){let e=getApp(),t=uni.getStorageSync("stadiumInfo");if(!e.globalData.accountInfo||!e.globalData.accountInfo.brand_id||!e.globalData.accountInfo.token)return Mn("/pages/login/index","rL"),!1;let{brand_id:n,token:o}=e.globalData.accountInfo;return{brand_id:n,token:o,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 qn=new class{request(e,t,o,r,a,i){return new Promise((async(s,l)=>{uni.request({url:e,timeout:3e5,sslVerify:!1,data:t,method:o,header:{...r},success:o=>{o.extension&&Qn.updateTimeDifference(o.extension);{n("log","at utils/server.js:24","islog req success----\x3e");let o=function(e,t){let n="";for(var o in e)n+=`&${o}=${e[o]}`;return t+"?"+n.slice(1)}(t,e),r=e.split("?")[0].split("/"),a=r[r.length-1];n("log","at utils/server.js:28","--------------------\x3e> ["+a+"][log]\n请求 Data: \n"+JSON.stringify(t)+"\n URL:\n"+o+"\n <<-------------------- ["+a+"][log] ↑↑↑\n")}if(a){if(""==i)throw Error("默认回调,失败提示不能为空 key -> failMsg");!function({res:e,failMsg:t,resolve:o,reject:r,url:a,data:i}){0==e.data.code?o(e.data.data):(Qn.hideLoad(),Qn.showNone(e.data.message||t||""),401==e.data.code&&uni.showModal({title:"提示",content:e.data.message,success:function(e){e.confirm?(n("log","at utils/server.js:86","用户点击确定"),Qn.routeTo("/pages/login/index","rL")):e.cancel&&n("log","at utils/server.js:89","用户点击取消")}}),r({url:a,res:e,data:i}))}({url:e,data:t,res:o,failMsg:i,resolve:s,reject:l})}else s(o)},fail:r=>{n("log","at utils/server.js:48","req fail----\x3e",{link:e,query:t,method:o,data:r}),Qn.hideLoad(),"string"!=typeof r.errMsg||-1==r.errMsg.indexOf("timeout")&&-1==r.errMsg.indexOf("interrupted")&&-1==r.errMsg.indexOf("请求超时")?"string"==typeof r.errMsg?Qn.showNone(r.errMsg):Qn.showNone("请求数据失败!请检查当前网络状态。"):Qn.showNone("网络超时!"),l(r)},complete(n){Qn.showLog(t,e,n)}})}))}get({url:e,data:t={},header:n={},isDefaultGet:o=!0,failMsg:r=""}){return n=Qn.resetHeader(n,e,t,{}),this.request(e,t,"GET",n,o,r)}post({url:e,data:t={},header:n={},isDefaultGet:o=!0,failMsg:r=""}){return n=Qn.resetHeader(n,e,t,{}),this.request(e,t,"POST",n,o,r)}uploadFile({url:e,filePath:t,onProgressCallBack:n,formData:o={}}){return new Promise(((r,a)=>{wx.uploadFile({url:e,filePath:t,formData:o,name:"file",success:r,fail:a}).onProgressUpdate((e=>n&&n(e)))}))}},Kn={__name:"index",setup(t){o((async()=>{!function(){let e=uni.getStorageSync("userInfo");n("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(){Qn.showLoad("登录中...");let e={assistant_client:"pc",brand_id:u.value,username:r.value,password:c.value};qn.post({url:Tn.padLogin,data:e,isDefaultGet:!0,failMsg:"操作失败!"}).then((e=>{Qn.hideLoad(),n("log","at pages/login/index.vue:104","padLogin suc: ",e);let{token:t,role:o}=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:o},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,n("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||(n("log","at pages/login/index.vue:140","登录的品牌不是历史登录设备的品牌, 清空stadiumInfo缓存"),uni.clearStorageSync("stadiumInfo"),!1)}(u.value)?(getApp().globalData.autoLogin=!1,setTimeout((()=>{Qn.routeTo("/pages/index/standby","nT")}),1e3),Qn.showNone("登录成功")):(getApp().globalData.autoLogin=!1,setTimeout((()=>{Qn.routeTo("/pages/login/success","nT")}),1e3),Qn.showNone("登录成功,请先选择门店"))})).finally((()=>{Qn.hideLoad()}))}return(t,n)=>(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:n[0]||(n[0]=()=>{})},"*登录账号密码请从pc端后台管理【设备运营管理平板管理】里获取"),e.createElementVNode("view",{class:"li-btn"},[e.createVNode(l,{onClick:g},{default:e.withCtx((()=>[e.createTextVNode("登录")])),_:1})])])])),_:1}))}},Wn=r({__name:"page_standby",setup(t){const o=e.ref(0);var r=e.computed((()=>{let{accountInfo:e,stadiumInfo:t}=getApp().globalData,o=e.username||"用户";return uni.getStorageSync("stadiumInfo")&&(n("log","at components/index/page_standby.vue:39","stadiumInfo: ",uni.getStorageSync("stadiumInfo")),t=uni.getStorageSync("stadiumInfo")),t&&(o=t.venue_name),o}));const a=()=>{Qn.routeTo("/pages/index/index","nT")};function i(){o.value++,n("log","at components/index/page_standby.vue:63","tabChnage: ",o.value),o.value>=10&&(o.value=0,Qn.routeTo("/pages/login/success","nT")),s()}const s=Qn.debounce((function(){o.value=0}),1e3,!1);return(t,n)=>(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"]]),zn=e=>{(e.$renderjs||(e.$renderjs=[])).push("keyboard"),(e.$renderjsModules||(e.$renderjsModules={})).keyboard="082c61ac"},Jn={methods:{onEvent(e){this.$emit(e.type,e)}}};zn(Jn);const Yn=r(Jn,[["render",function(t,n,o,r,a,i){return e.openBlock(),e.createElementBlock("view")}]]);const Xn={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,o){return new Promise(((r,a)=>{let i=[];try{e.forEach((function(e,n,r){t.forEach((function(t,a,i){e===t&&("shift"==r[n+1]?(r[n+1]="",r[n]=o[a].double):r[n]=o[a].single)}))})),i=e}catch(ko){n("warn","at utils/dictOfKeyboard.js:164","异常:",ko)}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,o){return new Promise(((o,r)=>{let a=[];try{e.forEach((function(e,n,o){t.forEach((function(t,r,a){e===t&&"shift"==o[n+1]&&(o[n+1]="",o[n]=o[n].toUpperCase())}))})),a=e}catch(ko){n("warn","at utils/dictOfKeyboard.js:189","异常:",ko)}o(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,o){return new Promise(((r,a)=>{let i=[];try{e.forEach((function(e,n,r){t.forEach((function(t,a,i){e===t&&(r[n]=o[a])}))})),i=e}catch(ko){n("warn","at utils/dictOfKeyboard.js:210","异常:",ko)}r(i)}))}(e,["multiply","divide","add","subtract","decimal_point"],["*","/","+","-","."]),n("log","at utils/dictOfKeyboard.js:140","result 最后结果: ",e.join("")),e.join("")||""}};const Zn={resetOXPrintInfo:function(e){let t=[],n="-------------------------------\n";t.push(n);for(let o of e.goods_data){let e=o.name+";"+o.nums+";"+o.price+";"+(o.price*o.nums).toFixed(2);t.push(e)}return t.push(n),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 eo=getApp();const to=r({components:{"page-standby":Wn,"keyboard-listener":Yn},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){n("log","at pages/index/standby.vue:79","onload:",e)},async onReady(){n("log","at pages/index/standby.vue:86","the index page onReady----"+this.screenHeight),eo=getApp(),setTimeout((async()=>{}),100)},methods:{async setTestSku(){n("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:o,token:r}=Qn.getPostParams(),a={brand_id:t,token:r,sku:e};return n("log","at pages/index/standby.vue:106","searchGoodBySku urlParams:",a),qn.post({url:Tn.getGoodsBySKU,data:a,isDefaultGet:!0,failMsg:"操作失败!"}).then((e=>(Qn.hideLoad(),n("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(n("log","at pages/index/standby.vue:129","combinedList",e,t),!t)return Qn.showNone("未找到商品");let o=e;return t.forEach((e=>{let t=o.findIndex((t=>t.id==e.id));-1!=t?(o[t].shopCount+=1,o[t].shopCountPrice=o[t].user_price*o[t].shopCount):o.push(e)})),o},async onKeyup(e){n("log","at pages/index/standby.vue:147","按键松开: ",e);let t=Xn.dict[e.keyCode];if(n("log","at pages/index/standby.vue:150","keyCode from keyboard:",t),this.decryptList.push(t),13!=e.keyCode)return n("log","at pages/index/standby.vue:153","继续接收:",this.decryptList);this.decryptList.pop(),this.strResult=await Xn.resultScan(this.decryptList),n("log","at pages/index/standby.vue:157","扫码结果-step-1:",this.strResult),this.orderQrcode=this.strResult,n("log","at pages/index/standby.vue:159","decryptList-before-splice: ",this.decryptList),this.decryptList.splice(0),n("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","")),n("log","at pages/index/standby.vue:167","扫码结果-step-2:",this.strResult),await this.searchGoodBySku(this.strResult).then((e=>(n("log","at pages/index/standby.vue:170","searchGoodBySku suc: ",e),e))).then((e=>{this.addSkuListToShopList(e)})).catch((e=>{n("log","at pages/index/standby.vue:176","searchGoodBySku err: ",e),Qn.showNone("未找到商品")}))},addSkuListToShopList(e){n("log","at pages/index/standby.vue:186","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)=>qn.post({url:Tn.getGoodFromPad,data:{sku:e,brand_id:t},isDefaultGet:!0}).then((e=>(Qn.hideLoad(),e.data.code,e))),async updateGoodsList(){let e=await this.getGoodsList();n("log","at pages/index/standby.vue:220","app.globaldata: ",eo.globalData),eo.globalData.goodsList=e},updateShopList(){eo.globalData.shopList=this.shopList},getGoodsList(){let{brand_id:e,stadium_id:t,token:o}=Qn.getPostParams(),r={brand_id:e,stadium_id:t,token:o,type_key:"",key:"",page:"1",page_size:"9999",is_sale:"1",is_show_on_assistant:"1"};return qn.post({url:Tn.getGoodsList,data:r,isDefaultGet:!0,failMsg:"获取商品列表失败"}).then((e=>(Qn.hideLoad(),n("log","at pages/index/standby.vue:251","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?(n("log","at pages/index/standby.vue:259","用户点击确定"),Qn.routeTo("/pages/login/index","rL")):e.cancel&&n("log","at pages/index/standby.vue:262","用户点击取消")}}))))}}},[["render",function(t,n,o,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"])])}]]),no=r({__name:"view_header",props:{backgroundCustom:{type:String,default:"#F5F7F8"},needBorder:{type:Boolean,default:!0}},emits:["closeUse"],setup(t,{emit:n}){const o=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,Qn.routeTo("/pages/index/standby","rL"))}),1e3)})),e.onBeforeUnmount((()=>{clearInterval(a),a=null})),e.onUnmounted((()=>{clearInterval(a),a=null}));const i=e.computed((()=>o.needBorder?"border-bottom: 1rpx solid #F5F7F8;":"border-bottom:none;")),s=()=>{Qn.routeTo("/pages/index/standby","rL")};return(t,n)=>(e.openBlock(),e.createElementBlock("view",{class:"header-box",style:e.normalizeStyle([{background:o.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"]]),oo=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:n}){let o=e.ref(!1);e.ref(""),e.ref("");let r=()=>{n("clickQR","")},a=()=>{n("clickToPay","")};return e.onMounted((async e=>{})),(n,i)=>(e.openBlock(),e.createElementBlock("view",{class:"footer-box"},[e.unref(o)?(e.openBlock(),e.createElementBlock("view",{key:0,class:"f-user"},[e.createElementVNode("text",{class:"txt"},"猫星人(18316553589)")])):e.createCommentVNode("",!0),e.unref(o)?(e.openBlock(),e.createElementBlock("view",{key:1,class:"f-line"})):e.createCommentVNode("",!0),e.unref(o)?(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"]]),ro=r({__name:"list_item",props:["mkey","mitem"],emits:["delItem","addItem","minusItem"],setup(t,{emit:n}){const o=t;e.onMounted((async e=>{}));const r=()=>{n("addItem",o.mkey)},a=()=>{n("minusItem",o.mkey)},i=()=>{n("delItem",o.mkey)};return(n,o)=>{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"]]),ao=r({__name:"view_keyboard",props:{maxInput:{type:Number,default:20}},emits:["inputValueUpdate"],setup(t,{emit:o}){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=Qn.debounce((e=>{if(n("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 Qn.showNone(`最多输入${r.maxInput}位`);a.value+=l(e)}o("inputValueUpdate",a.value)}),20,!0);return(t,n)=>(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:n=>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"]]),io=r({__name:"input_box_QR",props:{maskHeight:{type:Number,default:1200},maxInput:{type:Number,default:20}},emits:["showIt","clickCommit"],setup(t,{emit:o}){const r=t;let a=e.ref(""),i=e.ref(!1);e.onMounted((async e=>{n("log","at components/index/keyboard/input_box_QR.vue:58"," the keyboard_box component is now mounted. ",app.globalData)}));const s=()=>{o("showIt","false")},l=async()=>{n("log","at components/index/keyboard/input_box_QR.vue:65","handle_clickCommit"),await u(a.value).then((e=>{let t=a.value;o("clickCommit",{inputCode:t,goods:e})})).catch((e=>{n("error","at components/index/keyboard/input_box_QR.vue:71","searchGoodBySku err:",e),i.value=!0}))},c=e=>{n("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:o,token:r}=Qn.getPostParams(),a={brand_id:t,token:r,sku:e};return n("log","at components/index/keyboard/input_box_QR.vue:105","searchGoodBySku urlParams:",a),qn.post({url:Tn.getGoodsBySKU,data:a,isDefaultGet:!0,failMsg:"操作失败!"}).then((e=>(Qn.hideLoad(),n("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,n)=>(e.openBlock(),e.createElementBlock("view",{class:"keyboard-box",style:e.normalizeStyle({height:r.maskHeight+"px"}),onTouchmove:n[0]||(n[0]=e.withModifiers((()=>{}),["prevent"])),onClick:n[1]||(n[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(ao,{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-8745b40b"]]),so=r({__name:"input_box_end_phone",props:{maskHeight:{type:Number,default:1200},maxInput:{type:Number,default:4}},emits:["showIt","clickCommit"],setup(t,{emit:o}){const r=t;let a=e.ref("");e.onMounted((async e=>{n("log","at components/index/keyboard/input_box_end_phone.vue:58","the input_box_end_phone component is now mounted. "+r.maskHeight)}));const i=()=>{o("showIt","false")},s=()=>{o("clickCommit",a.value)},l=e=>{n("log","at components/index/keyboard/input_box_end_phone.vue:68","accept_inputValueClick:",e),a.value=e.split(""),n("log","at components/index/keyboard/input_box_end_phone.vue:70","inputValue:",a.value)};return(t,n)=>(e.openBlock(),e.createElementBlock("view",{class:"keyboard-box",style:e.normalizeStyle({height:r.maskHeight+"px"}),onTouchmove:n[0]||(n[0]=e.withModifiers((()=>{}),["prevent"])),onClick:n[1]||(n[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(ao,{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 lo="";const co=r({components:{"page-standby":Wn,"view-header":no,"view-footer":oo,"list-item":ro,"input-qr-box":io,"input-box-end-phone":so,"keyboard-listener":Yn},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){n("log","at pages/index/index.vue:124","onload:",e),this.clearShopList(),e.skulist&&this.acceptSKUList(e.skulist)},async onReady(){this.screenHeight=await Qn.getPageHeight(),n("log","at pages/index/index.vue:136","the index page onReady----"+this.screenHeight),lo=getApp(),setTimeout((async()=>{this.setFooterHeight()}),1e3)},methods:{searchGoodBySku:async e=>{Qn.showLoad();let{brand_id:t,stadium_id:o,token:r}=Qn.getPostParams(),a={brand_id:t,token:r,sku:e};return n("log","at pages/index/index.vue:153","searchGoodBySku urlParams:",a),qn.post({url:Tn.getGoodsBySKU,data:a,isDefaultGet:!0,failMsg:"操作失败!"}).then((e=>(Qn.hideLoad(),n("log","at pages/index/index.vue:163","searchGoodBySku suc: ",e),(e=[e]).forEach((e=>{e.shopCount=1,e.shopCountPrice=e.user_price})),Qn.hideLoad(),e))).finally((()=>{Qn.hideLoad()}))},clearShopList(){n("log","at pages/index/index.vue:178","clearShopList"),this.shopList=[]},acceptSKUList(e){n("log","at pages/index/index.vue:183","acceptSKUList:",e=JSON.parse(decodeURIComponent(e))),e&&e.length>0&&(this.shopList=this.combinedList(this.shopList,e))},acceptSKUListFromGlobalData(){let e=lo.globalData.skulist;n("log","at pages/index/index.vue:188","acceptSKUListFromGlobalData:",e),this.shopList=this.combinedList(this.shopList,e)},async setTestSku(){n("log","at pages/index/index.vue:192","Test set SKU 10000012");let e=await this.searchGoodBySku("10000012");this.shopList=this.shopList.concat(e)},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(n("log","at pages/index/index.vue:223","clickToPay",e),this.shopListTotalPrice<=0)return Qn.showNone("请先添加商品");Qn.routeTo(`/pages/pay/index?query=${JSON.stringify(e)}`,"rL")},clickToUse(){Qn.routeTo("/pages/login/success","nT")},handle_closeStandby(e){n("log","at pages/index/index.vue:233","handle_closeSetting",e),this.showPageStandby=!this.showPageStandby},handle_closeQRInputBox(e){n("log","at pages/index/index.vue:237","handle_closeKeyboardBox",e),this.showQRInputBox=!this.showQRInputBox},handle_closeEndPhoneBox(e){n("log","at pages/index/index.vue:241","handle_closeEndPhoneBox",e),this.showEndPhoneBox=!this.showEndPhoneBox},handle_clickQR(){this.showQRInputBox=!this.showQRInputBox},handle_clickCommit_qr(e){n("log","at pages/index/index.vue:249","handle_clickCommit_qr",typeof e.goods,e),n("log","at pages/index/index.vue:251",JSON.stringify(e.goods)),Qn.showNone("添加商品成功,数量:"+e.goods.length+"个"),e.goods&&e.goods.length>0&&(this.shopList=this.combinedList(this.shopList,e.goods)),this.showQRInputBox=!this.showQRInputBox},handle_clickVIP(){Qn.showNone("会员登录"),this.showEndPhoneBox=!this.showEndPhoneBox},combinedList(e,t){if(n("log","at pages/index/index.vue:267","combinedList",e,t),!t)return Qn.showNone("未找到商品");let o=e,r=[],a=[];return t.forEach((e=>{let t=o.findIndex((t=>t.id==e.id));-1!=t?this.checkStock(o[t])?this.handle_add(t):(e.shopCount=1,r.push(e)):a.push(e)})),o.push(...a),n("log","at pages/index/index.vue:290","_list_cannot_add:",r),r.length>0&&Qn.showNone("存在库存不足商品"),o},async setFooterHeight(){n("log","at pages/index/index.vue:297","Auto setFooterHeight")},async onKeyup(e){let t=Xn.dict[e.keyCode];if(this.decryptList.push(t),13!=e.keyCode)return void n("log","at pages/index/index.vue:317","继续接收:",this.decryptList);this.decryptList.pop(),this.strResult=await Xn.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 o=await this.searchGoodBySku(this.strResult).then((e=>(n("log","at pages/index/index.vue:335","searchGoodBySku suc: ",e),e))).catch((e=>{n("log","at pages/index/index.vue:338","searchGoodBySku err: ",e),Qn.showNone("未找到商品")}));o&&o.length>0&&(this.shopList=this.combinedList(this.shopList,o))},onKeydown(e){},handle_add(e){if(n("log","at pages/index/index.vue:353","handle_add",e),!this.checkStock(this.shopList[e]))return Qn.showNone("该商品库存不足");this.shopList[e].shopCount++,this.shopList[e].shopCountPrice=(this.shopList[e].user_price||0)*this.shopList[e].shopCount},handle_minus(e){n("log","at pages/index/index.vue:360","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):Qn.showNone("商品数量不能小于1")},checkStock:e=>e.erp_goods.stock_num-(e.shopCount||0)>=1,handle_del(e){n("log","at pages/index/index.vue:377","handle_del",e),this.shopList.splice(e,1),Qn.showNone("删除成功")},test(){n("log","at pages/index/index.vue:401","test");let e=Qn.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 n("log","at pages/index/index.vue:406","urlParams:",e),qn.post({url:Tn.getGoodsList,data:e,isDefaultGet:!1}).then((e=>(n("log","at pages/index/index.vue:413","test suc: ",e),e)))},getGoodFromPad:(e,t)=>qn.post({url:Tn.getGoodFromPad,data:{sku:e,brand_id:t},isDefaultGet:!0}).then((e=>(Qn.hideLoad(),e.data.code,e))),async updateGoodsList(){let e=await this.getGoodsList();n("log","at pages/index/index.vue:440","app.globaldata: ",lo.globalData),lo.globalData.goodsList=e},updateShopList(){lo.globalData.shopList=this.shopList},getGoodsList(){let{brand_id:e,stadium_id:t,token:o}=Qn.getPostParams(),r={brand_id:e,stadium_id:t,token:o,type_key:"",key:"",page:"1",page_size:"9999",is_sale:"1",is_show_on_assistant:"1"};return qn.post({url:Tn.getGoodsList,data:r,isDefaultGet:!0,failMsg:"获取商品列表失败"}).then((e=>(Qn.hideLoad(),n("log","at pages/index/index.vue:477","getGoodsList suc: ",e),e.list.forEach((e=>{e.shopCount=1,e.shopCountPrice=e.user_price})),e)))}}},[["render",function(t,n,o,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,n)=>(e.openBlock(),e.createBlock(l,{key:n,mkey:n,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-e76ef15e"]]),uo=r({__name:"paying",props:{payTotal:{type:Number,default:0}},emits:["clickVipCard"],setup:(t,{emit:n})=>(n,o)=>(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"]]),po=r({__name:"success",props:{paySuccessInfo:{type:Object,default:{amount:0,goods_data:[]}}},emits:["clickToIndex","clickOpenDoor"],setup(t,{emit:o}){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,Qn.routeTo("/pages/index/standby","rL"))}),1e3),a.value=uni.getStorageSync("showGateBtn")||!1,n("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 n=0;n{o("clickToIndex",""),Qn.routeTo("/pages/index/standby","rL")},u=()=>{n("log","at components/pay/success.vue:115","handle_clickOpenDoor"),o("clickOpenDoor","")};return(n,o)=>(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"]]),fo=t("OX_Pad_Printer");const go=r({components:{"view-header":no,"input-box-end-phone":so,paying:uo,"pay-success":po,"input-qr-box":io,"keyboard-listener":Yn},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){n("log","at pages/pay/index.vue:76","pay onload:",e),e&&this.setPayData(e)},async onReady(){await this.setPageHeight(),this.preMakeOrder()},onUnload(){this.clearMakeOrder()},methods:{testAcceptScanCode(){uni.showModal({title:"模拟扫码",content:"模拟扫码,点确定时执行acceptScanCode",showCancel:!0,confirmText:"确定",success:e=>{e.confirm&&(n("log","at pages/pay/index.vue:100","用户点击确定"),this.acceptScanCode("282659672061313993"))}})},setPayData(e){n("log","at pages/pay/index.vue:107","setPayData:",e),n("log","at pages/pay/index.vue:110","setPayData1:",e=JSON.parse(e.query));let t={goods_data:e.shopList,amount:e.shopListTotalPrice};n("log","at pages/pay/index.vue:115","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 Qn.showNone("生成订单失败,请重新下单!")},clearMakeOrder(){this.makeInfo=null},async acceptScanCode(e){var t;n("log","at pages/pay/index.vue:139","acceptScanCode:",e),Qn.showLoad("交易处理中...");let o=e,r=this.getPayType(o);if(null==r)return void Qn.showNone("支付类型未知,请重试!");let a=(null==(t=this.makeInfo)?void 0:t.order_no)||"";if(!a)return Qn.showNone("支付失败,请重新下单!");await this.payOrder({order_no:a,pay_code:o,pay_type:r}).then((e=>(n("log","at pages/pay/index.vue:168","payInfo-result:",e),this.checkOrder(e)))).then((async e=>{n("log","at pages/pay/index.vue:171","最终checkInfo:",e);let{payRes:t,checkRes:o}=e;if("1"==o.pay_order.status)Qn.showNone(o.res.respMsg),this.paySuccessStatus=1,this.printOrder(e);else{o.res.respMsg||o.res.respCode;let{orderStatus:t,requestDate:r,respCode:a,respMsg:i,tradeNo:s,transNo:l}=o.res;"PROCESSING"==t?(n("log","at pages/pay/index.vue:186","等待支付中,需要继续查询支付结果"),uni.showModal({title:"等待支付中...",content:"如您已确认付款成功,请点击确认,继续查询支付结果!",showCancel:!1,confirmText:"确认已支付成功",success:async t=>{t.confirm&&(n("log","at pages/pay/index.vue:194","用户点击确定"),"pages/pay/index"==Qn.getPageRoute()?this.doLoopCheck(e):Qn.showNone("请重新扫码使用"))}})):await this.checkInfoReactive(e)}})).finally((()=>{Qn.hideLoad()}))},async doLoopCheck(e){let t=this.reCheckOrderCountMax;for(let o=0;o<=t;o++){uni.showLoading({title:"支付结果查询中..."+o+"/"+this.reCheckOrderCountMax,mask:!0});let t=await this.checkOrder(e.payRes).then((e=>e)).catch((e=>{n("warn","at pages/pay/index.vue:225","reCheckOrder err:",e),rj(!1)}));n("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(n("log","at pages/pay/index.vue:231","doLoopCheck recheckInfo:",t),"SUCCESS"==r){let{payRes:n,checkRes:o}=t;"1"==o.pay_order.status&&(Qn.showNone(o.res.respMsg),this.paySuccessStatus=1,this.printOrder(e));break}await Qn.asyncSetTimeOut(2e3)}uni.hideLoading()},async checkInfoReactive(e){return new Promise(((t,o)=>{n("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?(Qn.showNone(a.res.respMsg),this.paySuccessStatus=1,this.printOrder(e),t(!0)):"200021"==l||"200008"==l||"200004"==l?(n("warn","at pages/pay/index.vue:266","需要重新下单"),uni.showModal({title:"支付失败",content:d,showCancel:!1,confirmText:"确定",success:e=>{e.confirm&&(n("log","at pages/pay/index.vue:275","用户点击确定"),Qn.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&&(n("log","at pages/pay/index.vue:292","用户点击确定"),Qn.routeTo("/pages/index/standby","rL"),t(!0))}})):"PROCESSING"==i&&0==this.reCheckOrderCount?(n("log","at pages/pay/index.vue:300","等待支付中,需要继续查询支付结果"),uni.showModal({title:"等待支付中...",content:"如您已确认付款成功,请点击确认,继续查询支付结果!",showCancel:!1,confirmText:"确认已支付成功",success:async e=>{e.confirm&&(n("log","at pages/pay/index.vue:308","用户点击确定"),t(!0))}})):"PROCESSING"==i&&this.reCheckOrderCount>0&&o(e)}))},loopReCheckOrder(e){reCheckOrder(e).then((e=>{loopReCheckOrder(e)})).catch((e=>{n("warn","at pages/pay/index.vue:327","loopReCheckOrder err:",e),Qn.showNone("支付结果查询超时,请联系管理员!"+e)}))},async reCheckOrder(e){let t=e.payRes;return new Promise((async(e,o)=>{if(this.reCheckOrderCount++,this.reCheckOrderCount>=this.reCheckOrderCountMax)uni.hideLoading(),Qn.showNone("支付结果查询超时,请联系管理员!"),o(!1);else{n("log","at pages/pay/index.vue:344","reCheckOrder:",t),await this.checkOrder(t).then((e=>(n("log","at pages/pay/index.vue:346","checkInfo:",e),e))).then((e=>{})).catch((e=>{n("warn","at pages/pay/index.vue:351","reCheckOrder err:",e),o(!1)}));let r=await this.checkOrder(t);await this.checkInfoReactive(r).then((t=>{e(t)})).catch((e=>{n("warn","at pages/pay/index.vue:359","reCheckOrder err:",e),o(!1)}))}}))},printOrder(e){n("warn","at pages/pay/index.vue:369","printOrder checkInfo: ",e),Qn.showNone("小票打印中..."),getApp().globalData.accountInfo;let t=uni.getStorageSync("stadiumInfo"),{venue_name:o}=t;this.dataQuery;let{finishedDate:r,transNo:a}=e.payRes.res;r=this.getTimeFromFinishedDate(r);let i={...this.dataQuery,venue_name:o,time:r,order_no:a},s=Zn.resetOXPrintInfo(i);return n("log","at pages/pay/index.vue:387","uni call android OX_Pad_Printer ------begin---!",s),fo.execAPI({api_name:"doPrint",value:s},(e=>{n("log","at pages/pay/index.vue:394","ox_pad_printer doPrint result: "+JSON.stringify(e))}))},getTimeFromFinishedDate:e=>(n("log","at pages/pay/index.vue:402",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(){n("log","at pages/pay/index.vue:493","OX_Pad_Printer test------begin---!");let e=Zn.resetOXPrintInfo(Zn.testPrintInfo);fo.execAPI({api_name:"doPrint",value:e},(e=>{n("log","at pages/pay/index.vue:499","testPrinter: "+JSON.stringify(e))}))},async makeOrder(){let{brand_id:e,token:t}=getApp().globalData.accountInfo,o=uni.getStorageSync("stadiumInfo").id||"",{goods_data:r,amount:a}=this.dataQuery;e=parseInt(e),a=parseFloat(a);let i={store_id:o,brand_id:e,token:t,amount:a,goods_data:r,pay_type:7,other_pay_type:"付款码支付",card_no:"",mark:""};return n("log","at pages/pay/index.vue:516","makeOrder urlParams:",i),qn.post({url:Tn.makeOrder,data:i,isDefaultGet:!0,failMsg:"操作失败!"}).then((e=>(Qn.hideLoad(),n("log","at pages/pay/index.vue:526","makeOrder suc: ",e),e)))},payOrder(e){n("log","at pages/pay/index.vue:531","payOrder get param:",e);let{order_no:t,pay_code:o,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:o,pay_type:r,brand_id:l,token:c,order_amt:i,goods_info:t};return n("log","at pages/pay/index.vue:545","payOrder urlParams:",u),qn.post({url:Tn.payOrder,data:u,isDefaultGet:!0,failMsg:"payOrder fail"}).then((e=>(n("log","at pages/pay/index.vue:554","payOrder suc: ",e),{order_no:t,pay_code:o,pay_type:r,orderAmt:e.res.orderAmt,transNo:e.res.transNo,res:e.res})))},checkOrder(e){let{store_id:t,brand_id:o,token:r}=getApp().globalData.accountInfo,{transNo:a,orderAmt:i,payCode:s}=e,l={transNo:a,payCode:s,brand_id:o,token:r,orderAmt:i,manual:"yes"};return n("log","at pages/pay/index.vue:574","checkOrder urlParams:",l),qn.post({url:Tn.checkOrder,data:l,isDefaultGet:!0,failMsg:"checkOrder fail"}).then((t=>(n("log","at pages/pay/index.vue:583","checkOrder suc: ",e),{payRes:e,checkRes:t})))},handle_clickVipCard(){Qn.showNone("储值卡支付未接入"),this.handle_clickVIP()},handle_closeEndPhoneBox(e){n("log","at pages/pay/index.vue:598","handle_closeEndPhoneBox",e),this.showEndPhoneBox=!this.showEndPhoneBox},handle_clickCommit_end_phone(e){n("log","at pages/pay/index.vue:602","handle_clickCommit_end_phone",e),this.showEndPhoneBox=!this.showEndPhoneBox},handle_closeQRInputBox(e){n("log","at pages/pay/index.vue:606","handle_closeQRInputBox",e)},handle_clickCommit_qr(e){n("log","at pages/pay/index.vue:609","handle_clickCommit_qr",e),this.showQRInputBox=!this.showQRInputBox},handle_clickVIP(){this.showEndPhoneBox=!this.showEndPhoneBox},handle_clickOpenDoor(e){n("log","at pages/pay/index.vue:618","执行开门"),this.openDoorReq()},async setPageHeight(){this.screenHeight=await Qn.getPageHeight()},async onKeyup(e){let t=Xn.dict[e.keyCode];if(this.decryptList.push(t),13!=e.keyCode)return n("log","at pages/pay/index.vue:631","this.decryptList1: ",this.decryptList);this.decryptList.pop(),this.strResult=await Xn.resultScan(this.decryptList),this.orderQrcode=this.strResult,this.decryptList.splice(0),-1!=this.strResult.indexOf("down_arrow")&&(this.strResult=this.strResult.replace("down_arrow","")),n("log","at pages/pay/index.vue:643","扫码最终结果--:",this.strResult),this.acceptScanCode(this.strResult)},onKeydown(e){},async openDoorReq(){Qn.showLoad();let{store_id:e,brand_id:t,token:o}=getApp().globalData.accountInfo,r=uni.getStorageSync("picker_door"),a={token:o,gate_id:r.p_obj_arr[r.p_index].id};return n("log","at pages/pay/index.vue:664","openDoor: ",a),qn.post({url:Tn.openDoor,data:a,isDefaultGet:!0,failMsg:"openDoor fail"}).then((e=>{Qn.hideLoad(),n("log","at pages/pay/index.vue:674","openDoor suc: ",e),Qn.showModalMsg("开启门禁执行后, 请耐心等待门禁开启. 请不要重复发起开门指令.",!0)})).finally((()=>{Qn.hideLoad()}))}}},[["render",function(t,n,o,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:n[0]||(n[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-982a66f6"]]),yo=r({__name:"pads_picker",props:{padList:{type:Array,default:[]},padListOrigin:{type:Array,default:[]}},emits:["pickerChange"],setup(t,{emit:o}){const r=t,a=e.ref("");async function i(e){n("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 Qn.showModalMsg(e,!0).then((()=>{uni.removeStorageSync("picker_door"),uni.removeStorageSync("showGateBtn"),a.value=t,o("pickerChange",t)})).catch((e=>{n("log","at components/login/pads_picker.vue:69","catch111111",e)}))}else uni.removeStorageSync("picker_door"),uni.removeStorageSync("showGateBtn"),a.value=t,o("pickerChange",t)}return e.onMounted((()=>{})),e.watchEffect((()=>{n("log","at components/login/pads_picker.vue:46","watchEffect",r.padListOrigin),r.padListOrigin.length>0&&function(){n("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,n("log","at components/login/pads_picker.vue:94","autoShowBackStadium set index: ",t))}}()})),(n,o)=>(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"]]),mo=r({__name:"setting_mask",emits:["closeSetting"],setup(o,{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()=>{n("log","at components/login/setting_mask.vue:99","setting_mask onMounted ->"),N(),p.value=f(),_().catch((e=>{Qn.showNone("无法获取该门店门禁信息")})),A()})),e.onBeforeUnmount((async()=>{n("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=()=>{n("log","at components/login/setting_mask.vue:137","logout"),uni.showModal({title:"提示",content:"确定退出登录?",success:function(e){e.confirm?(n("log","at components/login/setting_mask.vue:144","用户点击确定"),m()):e.cancel&&n("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 o=e[t.tapIndex];n("log","at components/login/setting_mask.vue:174","选中了第"+(t.tapIndex+1)+"个按钮"+o),0==t.tapIndex?a.startWatchDog({api_name:""},(e=>{n("log","at components/login/setting_mask.vue:181",e),Qn.showNone("开启")})):a.closeWatchDog({api_name:""},(e=>{n("log","at components/login/setting_mask.vue:188",e),Qn.showNone("关闭")})),n("log","at components/login/setting_mask.vue:193","daemonRun",o,"")},fail:function(e){n("log","at components/login/setting_mask.vue:196",e.errMsg)}})},v=()=>{Qn.showNone(""),uni.showModal({title:"提示",content:"跳转更新前,请先关闭进程守护",success:function(e){e.confirm?(n("log","at components/login/setting_mask.vue:209","用户点击确定"),plus.runtime.openURL("https://www.pgyer.com/oxcheckoutpad",(function(e){}))):e.cancel&&n("log","at components/login/setting_mask.vue:213","用户点击取消")}})},b=()=>{},w=()=>{let e=["开-支付后显示","关-支付后不显示"];uni.showActionSheet({itemList:e,success:async function(t){let o=e[t.tapIndex];n("log","at components/login/setting_mask.vue:247","选中了第"+(t.tapIndex+1)+"个按钮"+o),0==t.tapIndex?(uni.setStorageSync("showGateBtn",!0),Qn.showNone("显示-支付后开门按钮")):(uni.setStorageSync("showGateBtn",!1),Qn.showNone("关闭-支付后开门按钮")),A()},fail:function(e){n("log","at components/login/setting_mask.vue:258",e.errMsg)}})},_=()=>{let{store_id:e,brand_id:t,token:o}=getApp().globalData.accountInfo,r={token:o,stadium_id:e};return qn.post({url:Tn.getDoorList,data:r,isDefaultGet:!0,failMsg:"getDoorList fail"}).then((e=>{n("log","at components/login/setting_mask.vue:277","getDoorList suc: ",e),S(e)}))},k=e=>{n("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");n("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&&(n("log","at components/login/setting_mask.vue:342","用户点击确定"),P())}})},P=async()=>{let{store_id:e,brand_id:t,token:o}=getApp().globalData.accountInfo,r=uni.getStorageSync("picker_door"),a={token:o,gate_id:r.p_obj_arr[r.p_index].id};return n("log","at components/login/setting_mask.vue:362","openDoor: ",a),qn.post({url:Tn.openDoor,data:a,isDefaultGet:!0,failMsg:"openDoor fail"}).then((e=>{n("log","at components/login/setting_mask.vue:371","openDoor suc: ",e),Qn.showNone("门禁:开")}))};return(t,n)=>{var o,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==(o=e.unref(c))?void 0:o.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"]]),ho={__name:"success",setup(t){let r=e.ref(!1);const s=e.ref([]),c=e.ref(""),u=e.ref([]);o((async()=>{v()}));var p=e.computed((()=>{let{accountInfo:e,stadiumInfo:t}=getApp().globalData,o=e.username||"用户";return uni.getStorageSync("stadiumInfo")&&(n("log","at pages/login/success.vue:53","stadiumInfo: ",uni.getStorageSync("stadiumInfo")),t=uni.getStorageSync("stadiumInfo")),t&&(o=t.brand_name),o}));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,n("log","at pages/login/success.vue:73","autoShowBackStadium set index: ",t),!0)}return!1};function f(e){n("log","at pages/login/success.vue:84","handle_closeSetting",e),r.value=!r.value}async function g(e){n("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:n}=t;getApp().globalData.accountInfo.store_id=n,getApp().globalData.stadiumInfo=t,uni.setStorageSync("stadiumInfo",t)}(e)}async function y(){getApp(),d()?Qn.routeTo("/pages/index/standby","nT"):Qn.showNone("请选择门店")}function m(){d()?r.value=!r.value:Qn.showNone("请选择门店")}function h(){n("log","at pages/login/success.vue:175","clickUpdatePadList"),v()}function v(){n("log","at pages/login/success.vue:190","updatePadList"),Qn.showLoad("更新门店列表...");let e=Qn.getPostParams();if(!e)return Qn.showNone("获取用户信息失败");let{brand_id:t,token:o}=e,r={brand_id:t,token:o,page:1,page_size:200};qn.post({url:Tn.padList,data:r,isDefaultGet:!0,failMsg:"更新门店列表失败!"}).then((e=>(Qn.hideLoad(),n("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((()=>{Qn.hideLoad()}))}return(t,n)=>(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(yo,{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(mo,{key:0,onCloseSetting:f})):e.createCommentVNode("",!0)])),_:1}))}};__definePage("pages/login/index",Kn),__definePage("pages/index/standby",to),__definePage("pages/index/index",co),__definePage("pages/pay/index",go),__definePage("pages/login/success",ho);const vo={onLaunch(){n("log","at App.vue:19","App Launch default"),this.globalData.autoLogin=!0,this.reloadUserInfo()},onShow(){n("log","at App.vue:24","App Show default")},onHide(){n("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:o,stadium_id:r,token:a}=Qn.getPostParams(),i={brand_id:o,stadium_id:r,token:a,type_key:"",key:"",page:"1",page_size:"9999",is_sale:"1",is_show_on_assistant:"1"};qn.post({url:Tn.getGoodsList,data:i,isDefaultGet:!1,failMsg:"获取商品列表失败"}).then((t=>{n("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:bo,Vuex:wo,Pinia:_o}={app:e.createVueApp(vo)};uni.Vuex=wo,uni.Pinia=_o,bo.provide("__globalStyles",__uniConfig.styles),bo._component.mpType="app",bo._component.render=()=>{},bo.mount("#app")}(Vue); diff --git a/app/src/main/assets/apps/__UNI__3B4D40B/www/manifest.json b/app/src/main/assets/apps/__UNI__3B4D40B/www/manifest.json index 731f8e5..236c5cc 100644 --- a/app/src/main/assets/apps/__UNI__3B4D40B/www/manifest.json +++ b/app/src/main/assets/apps/__UNI__3B4D40B/www/manifest.json @@ -1 +1 @@ -{"@platforms":["android","iPhone","iPad"],"id":"__UNI__3B4D40B","name":"欧轩收银端","version":{"name":"1.0.0","code":"100"},"description":"","developer":{"name":"","email":"","url":""},"permissions":{"UniNView":{"description":"UniNView原生渲染"}},"plus":{"useragent":{"value":"uni-app","concatenate":true},"splashscreen":{"target":"id:1","autoclose":true,"waiting":true,"delay":0},"popGesture":"close","launchwebview":{"render":"always","id":"1","kernel":"WKWebview"},"usingComponents":true,"nvueStyleCompiler":"uni-app","compilerVersion":3,"statusbar":{"immersed":"supportedDevice","style":"dark","background":"#F8F8F8"},"uniStatistics":{"enable":false},"allowsInlineMediaPlayback":true,"uni-app":{"control":"uni-v3","vueVersion":"3","compilerVersion":"3.99","nvueCompiler":"uni-app","renderer":"auto","nvue":{"flex-direction":"column"},"nvueLaunchMode":"normal","webView":{"minUserAgentVersion":"49.0"}}},"launch_path":"__uniappview.html"} \ No newline at end of file +{"@platforms":["android","iPhone","iPad"],"id":"__UNI__3B4D40B","name":"欧轩收银端","version":{"name":"1.0.1","code":101},"description":"","developer":{"name":"","email":"","url":""},"permissions":{"UniNView":{"description":"UniNView原生渲染"}},"plus":{"useragent":{"value":"uni-app","concatenate":true},"splashscreen":{"target":"id:1","autoclose":true,"waiting":true,"delay":0},"popGesture":"close","launchwebview":{"render":"always","id":"1","kernel":"WKWebview"},"usingComponents":true,"nvueStyleCompiler":"uni-app","compilerVersion":3,"statusbar":{"immersed":"supportedDevice","style":"dark","background":"#F8F8F8"},"uniStatistics":{"enable":false},"allowsInlineMediaPlayback":true,"uni-app":{"control":"uni-v3","vueVersion":"3","compilerVersion":"3.99","nvueCompiler":"uni-app","renderer":"auto","nvue":{"flex-direction":"column"},"nvueLaunchMode":"normal","webView":{"minUserAgentVersion":"49.0"}}},"launch_path":"__uniappview.html"} \ No newline at end of file diff --git a/uniapp_project_code/src/manifest.json b/uniapp_project_code/src/manifest.json index 6325fc0..7f79c02 100644 --- a/uniapp_project_code/src/manifest.json +++ b/uniapp_project_code/src/manifest.json @@ -2,8 +2,8 @@ "name" : "欧轩收银端", "appid" : "__UNI__3B4D40B", "description" : "", - "versionName" : "1.0.0", - "versionCode" : "100", + "versionName" : "1.0.1", + "versionCode" : 101, "transformPx" : false, /* 5+App特有相关 */ "app-plus" : { @@ -69,17 +69,17 @@ "enable" : false }, "vueVersion" : "3", - "h5" : { - "devServer" : { - "proxy" : { - "/api" : { - "target" : "http://localhost:5173", - "changeOrigin" : true, - "pathRewrite" : { - "^/api" : "" - } - } - } - } - } + "h5" : { + "devServer" : { + "proxy" : { + "/api" : { + "target" : "http://localhost:5173", + "changeOrigin" : true, + "pathRewrite" : { + "^/api" : "" + } + } + } + } + } } diff --git a/uniapp_project_code/src/pages/pay/index.vue b/uniapp_project_code/src/pages/pay/index.vue index bdd3c67..dc90ea8 100644 --- a/uniapp_project_code/src/pages/pay/index.vue +++ b/uniapp_project_code/src/pages/pay/index.vue @@ -82,6 +82,10 @@ async onReady() { await this.setPageHeight() // this.testAcceptScanCode() + this.preMakeOrder() + }, + onUnload(){ + this.clearMakeOrder() }, methods: { //测试扫码,弹窗提醒,点确定时执行acceptScanCode @@ -124,6 +128,13 @@ } return pay_type }, + async preMakeOrder(){ + this.makeInfo = await this.makeOrder() + if(!this.makeInfo?.order_no)return util.showNone("生成订单失败,请重新下单!") + }, + clearMakeOrder(){ + this.makeInfo = null + }, async acceptScanCode(code) { console.log("acceptScanCode:",code) // util.showNone("支付中...") @@ -136,15 +147,24 @@ return } - await this.makeOrder((makeInfo)=>{ - console.log("makeInfo-result",makeInfo) - }).then((orderInfo)=>{ - console.log("orderInfo-result",orderInfo) - return this.payOrder({ - "order_no":orderInfo.order_no, + + // await this.makeOrder((makeInfo)=>{ + // console.log("makeInfo-result",makeInfo) + // }).then((orderInfo)=>{ + // console.log("orderInfo-result",orderInfo) + // return this.payOrder({ + // "order_no":orderInfo.order_no, + // pay_code,pay_type + // }) + // }) + + let order_no = this.makeInfo?.order_no||"" + if(!order_no)return util.showNone("支付失败,请重新下单!") + await this.payOrder({ + "order_no":order_no, pay_code,pay_type - }) - }).then((payInfo)=>{ + }) + .then((payInfo)=>{ console.log("payInfo-result:",payInfo) return this.checkOrder(payInfo) }).then(async (checkInfo)=>{