1234567 |
- if("undefined"==typeof Promise||Promise.prototype.finally||(Promise.prototype.finally=function(e){const t=this.constructor;return this.then((a=>t.resolve(e()).then((()=>a))),(a=>t.resolve(e()).then((()=>{throw a}))))}),"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";const t="/static/images/logo.png",a=(e,t)=>{const a=e.__vccOpts||e;for(const[o,n]of t)a[o]=n;return a},o=a(e.defineComponent({__name:"CustomNavbar",setup(a){const{safeAreaInsets:o}=uni.getSystemInfoSync();return(a,n)=>(e.openBlock(),e.createElementBlock("view",{class:"navbar",style:e.normalizeStyle({paddingTop:e.unref(o).top+10+"px"})},[e.createElementVNode("view",{class:"logo"},[e.createElementVNode("image",{class:"logo-image",src:t})])],4))}}),[["__scopeId","data-v-ba4b4dd9"]]),n=a(e.defineComponent({__name:"CategoryPanel",props:{list:{}},setup:t=>(t,a)=>(e.openBlock(),e.createElementBlock("view",{class:"category"},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.list,(t=>(e.openBlock(),e.createElementBlock("navigator",{class:"category-item","hover-class":"none",url:t.target,key:t.id},[e.createElementVNode("view",{class:"icon",style:e.normalizeStyle({"background-image":`linear-gradient(45deg, ${t.colors[0]} 0%, ${t.colors[1]} 99%, ${t.colors[0]} 100%)`})},[e.createElementVNode("image",{class:"",src:t.icon},null,8,["src"])],4),e.createElementVNode("text",{class:"text"},e.toDisplayString(t.name),1)],8,["url"])))),128))]))}),[["__scopeId","data-v-79d5ae72"]]),s=e.defineComponent({__name:"index",setup(t){const a=e.ref([{colors:["#4facfe","#00f2fe"],target:"/pages/inbound/inbound",icon:"/static/home/inbound.png",name:"入库"},{colors:["#6991c7","#a3bded"],target:"/pages/weigh/weigh",icon:"/static/home/weigh.png",name:"称重"},{colors:["#005bea","#00c6fb"],target:"/pages/outbound/outbound",icon:"/static/home/outbound.png",name:"出库"},{colors:["#667eea","#764ba2"],target:"/pages/warehouseScan/warehouseScan",icon:"/static/home/houscan.png",name:"仓库扫描"},{colors:["#f83600","#f9d423"],target:"/pages/printer/printer",icon:"/static/home/houscan.png",name:"打印"},{colors:["#ff0844","#ffb199"],target:"/pages/scanLotno/scanLotno",icon:"/static/home/link.png",name:"托盘/批次"},{colors:["#29323c","#485563"],target:"/pages/waybillNo/waybillNo",icon:"/static/home/link.png",name:"库位绑定"},{colors:["#2af598","#009efd"],target:"/pages/pickup/waybillPickUpOrder",icon:"/static/home/pickup.png",name:"取件单"},{colors:["#4facfe","#00f2fe"],target:"/pages/waybillDeliveryOrder/waybillDeliveryOrder",icon:"/static/home/dispatch.png",name:"派送单"}]);return(t,s)=>(e.openBlock(),e.createElementBlock("view",{class:"viewport"},[e.createVNode(o),e.createElementVNode("scroll-view",{"enable-back-to-top":"","refresher-enabled":!1,class:"scroll-view","scroll-y":""},[e.createVNode(n,{list:a.value},null,8,["list"])])]))}}),i=a(e.defineComponent({__name:"XtxSwiper",props:{list:{}},setup(t){const a=e.ref(0),o=e=>{a.value=e.detail.current};return(t,n)=>(e.openBlock(),e.createElementBlock("view",{class:"carousel"},[e.createElementVNode("swiper",{circular:!0,autoplay:!1,interval:3e3,onChange:o},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.list,(t=>(e.openBlock(),e.createElementBlock("swiper-item",{key:t.id},[e.createElementVNode("navigator",{url:"/pages/index/index","hover-class":"none",class:"navigator"},[e.createElementVNode("image",{mode:"aspectFill",class:"image",src:t.imgUrl},null,8,["src"])])])))),128))],32),e.createElementVNode("view",{class:"indicator"},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.list,((t,o)=>(e.openBlock(),e.createElementBlock("text",{key:t.id,class:e.normalizeClass(["dot",{active:o===a.value}])},null,2)))),128))])]))}}),[["__scopeId","data-v-30ef7205"]]);function r(e){return weex.requireModule(e)}function l(e,t,...a){uni.__log__?uni.__log__(e,t,...a):console[e].apply(console,[...a,t])}function c(e,t){return"string"==typeof e?t:e}const u=t=>(a,o=e.getCurrentInstance())=>{!e.isInSSRComponentSetup&&e.injectHook(t,a,o)},d=u("onShow"),m=u("onHide"),p=u("onLaunch"),h=u("onLoad"),g=u("onUnload"),f=u("onBackPress"),y=u("onNavigationBarButtonTap");
- /*!
- * pinia v2.0.27
- * (c) 2022 Eduardo San Martin Morote
- * @license MIT
- */
- let v;const k=e=>v=e,_=Symbol();function w(e){return e&&"object"==typeof e&&"[object Object]"===Object.prototype.toString.call(e)&&"function"!=typeof e.toJSON}var b,N;(N=b||(b={})).direct="direct",N.patchObject="patch object",N.patchFunction="patch function";const E=()=>{};function x(t,a,o,n=E){t.push(a);const s=()=>{const e=t.indexOf(a);e>-1&&(t.splice(e,1),n())};return!o&&e.getCurrentScope()&&e.onScopeDispose(s),s}function C(e,...t){e.slice().forEach((e=>{e(...t)}))}function V(t,a){t instanceof Map&&a instanceof Map&&a.forEach(((e,a)=>t.set(a,e))),t instanceof Set&&a instanceof Set&&a.forEach(t.add,t);for(const o in a){if(!a.hasOwnProperty(o))continue;const n=a[o],s=t[o];w(s)&&w(n)&&t.hasOwnProperty(o)&&!e.isRef(n)&&!e.isReactive(n)?t[o]=V(s,n):t[o]=n}return t}const S=Symbol();const{assign:B}=Object;function T(t,a,o={},n,s,i){let r;const l=B({actions:{}},o),c={deep:!0};let u,d,m,p=e.markRaw([]),h=e.markRaw([]);const g=n.state.value[t];let f;function y(a){let o;u=d=!1,"function"==typeof a?(a(n.state.value[t]),o={type:b.patchFunction,storeId:t,events:m}):(V(n.state.value[t],a),o={type:b.patchObject,payload:a,storeId:t,events:m});const s=f=Symbol();e.nextTick().then((()=>{f===s&&(u=!0)})),d=!0,C(p,o,n.state.value[t])}i||g||(n.state.value[t]={}),e.ref({});const v=E;function _(e,a){return function(){k(n);const o=Array.from(arguments),s=[],i=[];function r(e){s.push(e)}function l(e){i.push(e)}let c;C(h,{args:o,name:e,store:T,after:r,onError:l});try{c=a.apply(this&&this.$id===t?this:T,o)}catch(u){throw C(i,u),u}return c instanceof Promise?c.then((e=>(C(s,e),e))).catch((e=>(C(i,e),Promise.reject(e)))):(C(s,c),c)}}const N={_p:n,$id:t,$onAction:x.bind(null,h),$patch:y,$reset:v,$subscribe(a,o={}){const s=x(p,a,o.detached,(()=>i())),i=r.run((()=>e.watch((()=>n.state.value[t]),(e=>{("sync"===o.flush?d:u)&&a({storeId:t,type:b.direct,events:m},e)}),B({},c,o))));return s},$dispose:function(){r.stop(),p=[],h=[],n._s.delete(t)}},T=e.reactive(N);n._s.set(t,T);const P=n._e.run((()=>(r=e.effectScope(),r.run((()=>a())))));for(const k in P){const a=P[k];if(e.isRef(a)&&(I=a,!e.isRef(I)||!I.effect)||e.isReactive(a))i||(!g||w(D=a)&&D.hasOwnProperty(S)||(e.isRef(a)?a.value=g[k]:V(a,g[k])),n.state.value[t][k]=a);else if("function"==typeof a){const e=_(k,a);P[k]=e,l.actions[k]=a}}var D,I;return B(T,P),B(e.toRaw(T),P),Object.defineProperty(T,"$state",{get:()=>n.state.value[t],set:e=>{y((t=>{B(t,e)}))}}),n._p.forEach((e=>{B(T,r.run((()=>e({store:T,app:n._a,pinia:n,options:l}))))})),g&&i&&o.hydrate&&o.hydrate(T.$state,g),u=!0,d=!0,T}function P(t,a,o){let n,s;const i="function"==typeof a;function r(t,o){const r=e.getCurrentInstance();(t=t||r&&e.inject(_))&&k(t),(t=v)._s.has(n)||(i?T(n,a,s,t):function(t,a,o,n){const{state:s,actions:i,getters:r}=a,l=o.state.value[t];let c;c=T(t,(function(){l||(o.state.value[t]=s?s():{});const a=e.toRefs(o.state.value[t]);return B(a,i,Object.keys(r||{}).reduce(((a,n)=>(a[n]=e.markRaw(e.computed((()=>{k(o);const e=o._s.get(t);return r[n].call(e,e)}))),a)),{}))}),a,o,0,!0),c.$reset=function(){const e=s?s():{};this.$patch((t=>{B(t,e)}))}}(n,s,t));return t._s.get(n)}return"string"==typeof t?(n=t,s=i?o:a):(s=t,n=t.id),r.$id=n,r}function D(e,t){var a;return e="object"==typeof(a=e)&&null!==a?e:Object.create(null),new Proxy(e,{get:(e,a,o)=>"key"===a?Reflect.get(e,a,o):Reflect.get(e,a,o)||Reflect.get(t,a,o)})}function I(e,{storage:t,serializer:a,key:o,debug:n}){try{const n=null==t?void 0:t.getItem(o);n&&e.$patch(null==a?void 0:a.deserialize(n))}catch(s){n&&console.error(s)}}function L(e,{storage:t,serializer:a,key:o,paths:n,debug:s}){try{const s=Array.isArray(n)?function(e,t){return t.reduce(((t,a)=>{const o=a.split(".");return function(e,t,a){return t.slice(0,-1).reduce(((e,t)=>/^(__proto__)$/.test(t)?{}:e[t]=e[t]||{}),e)[t[t.length-1]]=a,e}(t,o,function(e,t){return t.reduce(((e,t)=>null==e?void 0:e[t]),e)}(e,o))}),{})}(e,n):e;t.setItem(o,a.serialize(s))}catch(i){s&&console.error(i)}}var A=function(e={}){return t=>{const{auto:a=!1}=e,{options:{persist:o=a},store:n,pinia:s}=t;if(!o)return;if(!(n.$id in s.state.value)){const e=s._s.get(n.$id.replace("__hot:",""));return void(e&&Promise.resolve().then((()=>e.$persist())))}const i=(Array.isArray(o)?o.map((t=>D(t,e))):[D(o,e)]).map((({storage:t=localStorage,beforeRestore:a=null,afterRestore:o=null,serializer:s={serialize:JSON.stringify,deserialize:JSON.parse},key:i=n.$id,paths:r=null,debug:l=!1})=>{var c;return{storage:t,beforeRestore:a,afterRestore:o,serializer:s,key:(null!=(c=e.key)?c:e=>e)("string"==typeof i?i:i(n.$id)),paths:r,debug:l}}));n.$persist=()=>{i.forEach((e=>{L(n.$state,e)}))},n.$hydrate=({runHooks:e=!0}={})=>{i.forEach((a=>{const{beforeRestore:o,afterRestore:s}=a;e&&(null==o||o(t)),I(n,a),e&&(null==s||s(t))}))},i.forEach((e=>{const{beforeRestore:a,afterRestore:o}=e;null==a||a(t),I(n,e),null==o||o(t),n.$subscribe(((t,a)=>{L(a,e)}),{detached:!0})}))}}();const O=P("member",(()=>{const t=e.ref();return{profile:t,setProfile:e=>{t.value=e},clearProfile:()=>{t.value=void 0}}}),{persist:{storage:{getItem:e=>uni.getStorageSync(e),setItem(e,t){uni.setStorageSync(e,t)}}}}),F=function(){const t=e.effectScope(!0),a=t.run((()=>e.ref({})));let o=[],n=[];const s=e.markRaw({install(e){k(s),s._a=e,e.provide(_,s),e.config.globalProperties.$pinia=s,n.forEach((e=>o.push(e))),n=[]},use(e){return this._a?o.push(e):n.push(e),this},_p:o,_a:null,_e:t,_s:new Map,state:a});return s}();F.use(A);var M={VITE_CJS_IGNORE_WARNING:"true",VITE_ROOT_DIR:"E:\\demo\\hmrabbit",VITE_USER_NODE_ENV:"production",BASE_URL:"/",MODE:"production",DEV:!1,PROD:!0,SSR:!1};const R=M.VITE_AXIOS_BASE_URL;l("log","at utils/http.ts:17","***",M),l("log","at utils/http.ts:18","**2*",R);const $={invoke(e){var t;e.url.startsWith("http")||(e.url=R+e.url),e.timeout=1e4,e.header={...e.header,"source-client":"miniapp"};const a=null==(t=O().profile)?void 0:t.token;a&&(e.header.batoken=a)}};uni.addInterceptor("request",$),uni.addInterceptor("uploadFile",$);const U=e=>new Promise(((t,a)=>{uni.request({...e,success(e){if(e.statusCode>=200&&e.statusCode<300){const o=e.data;if(302===o.code){l("log","at utils/http.ts:77","未登录 -> 清理用户信息,跳转到登录页---");O().clearProfile(),uni.navigateTo({url:"/pages/login/login"}),a(e)}else if(409===o.code){l("log","at utils/http.ts:84","登录态过期,请重新登录!---");O().clearProfile(),uni.navigateTo({url:"/pages/login/login"}),a(e)}else t(e.data)}else if(401===e.statusCode){O().clearProfile(),uni.navigateTo({url:"/pages/login/login"}),a(e)}else uni.showToast({icon:"none",title:e.data.msg||"请求错误"}),a(e)},fail(e){uni.showToast({icon:"none",title:"网络错误,换个网络试试"}),a(e)}})}));const z=a({},[["render",function(t,a){return e.openBlock(),e.createElementBlock("view",{class:"sk-container"},[e.createElementVNode("view",{class:"viewport"},[e.createElementVNode("view",{class:"search"},[e.createElementVNode("view",{class:"input"},[e.createElementVNode("text",{class:"icon-search sk-transparent sk-text-14-2857-225 sk-text sk-pseudo sk-pseudo-circle"},"女靴")])]),e.createElementVNode("view",{class:"categories"},[e.createElementVNode("scroll-view",{"scroll-y":!0,class:"primary"},[e.createElementVNode("view",{class:"item active sk-pseudo sk-pseudo-circle"},[e.createElementVNode("text",{class:"name sk-transparent sk-text-14-2857-218 sk-text"},"居家")]),e.createElementVNode("view",{class:"item sk-pseudo sk-pseudo-circle"},[e.createElementVNode("text",{class:"name sk-transparent sk-text-14-2857-495 sk-text"},"美食")]),e.createElementVNode("view",{class:"item sk-pseudo sk-pseudo-circle"},[e.createElementVNode("text",{class:"name sk-transparent sk-text-14-2857-628 sk-text"},"服饰")]),e.createElementVNode("view",{class:"item sk-pseudo sk-pseudo-circle"},[e.createElementVNode("text",{class:"name sk-transparent sk-text-14-2857-163 sk-text"},"母婴")]),e.createElementVNode("view",{class:"item sk-pseudo sk-pseudo-circle"},[e.createElementVNode("text",{class:"name sk-transparent sk-text-14-2857-690 sk-text"},"个护")]),e.createElementVNode("view",{class:"item sk-pseudo sk-pseudo-circle"},[e.createElementVNode("text",{class:"name sk-transparent sk-text-14-2857-302 sk-text"},"严选")]),e.createElementVNode("view",{class:"item sk-pseudo sk-pseudo-circle"},[e.createElementVNode("text",{class:"name sk-transparent sk-text-14-2857-730 sk-text"},"数码")]),e.createElementVNode("view",{class:"item sk-pseudo sk-pseudo-circle"},[e.createElementVNode("text",{class:"name sk-transparent sk-text-14-2857-584 sk-text"},"运动")]),e.createElementVNode("view",{class:"item sk-pseudo sk-pseudo-circle"},[e.createElementVNode("text",{class:"name sk-transparent sk-text-14-2857-895 sk-text"},"杂项")])]),e.createElementVNode("scroll-view",{"scroll-y":!0,class:"secondary"},[e.createElementVNode("view",{is:"components/XtxSwiper",class:"banner"},[e.createElementVNode("view",{class:"carousel XtxSwiper--carousel"},[e.createElementVNode("view",{class:"indicator XtxSwiper--indicator"},[e.createElementVNode("text",{class:"dot XtxSwiper--dot active XtxSwiper--active"}),e.createElementVNode("text",{class:"dot XtxSwiper--dot"}),e.createElementVNode("text",{class:"dot XtxSwiper--dot"}),e.createElementVNode("text",{class:"dot XtxSwiper--dot"}),e.createElementVNode("text",{class:"dot XtxSwiper--dot"})])])]),e.createElementVNode("view",{class:"panel"},[e.createElementVNode("view",{class:"title"},[e.createElementVNode("text",{class:"name sk-transparent sk-text-26-6667-885 sk-text"},"居家生活用品"),e.createElementVNode("navigator",{class:"more sk-transparent sk-text-30-0000-892 sk-text sk-pseudo sk-pseudo-circle","hover-class":"none"},"全部")]),e.createElementVNode("view",{class:"section"},[e.createElementVNode("navigator",{class:"goods","hover-class":"none"},[e.createElementVNode("image",{class:"image sk-image"}),e.createElementVNode("view",{class:"name ellipsis sk-transparent sk-text-14-2857-648 sk-text"},"极光限定 珠光蓝珐琅锅"),e.createElementVNode("view",{class:"price"},[e.createElementVNode("text",{class:"symbol sk-transparent sk-opacity"},"¥"),e.createElementVNode("text",{class:"number sk-transparent sk-text-14-2857-708 sk-text"},"199.00")])]),e.createElementVNode("navigator",{class:"goods","hover-class":"none"},[e.createElementVNode("image",{class:"image sk-image"}),e.createElementVNode("view",{class:"name ellipsis sk-transparent sk-text-14-2857-832 sk-text"},"钻石陶瓷涂层多用锅18cm 小奶锅"),e.createElementVNode("view",{class:"price"},[e.createElementVNode("text",{class:"symbol sk-transparent sk-opacity"},"¥"),e.createElementVNode("text",{class:"number sk-transparent sk-text-14-2857-349 sk-text"},"149.00")])])])]),e.createElementVNode("view",{class:"panel"},[e.createElementVNode("view",{class:"title"},[e.createElementVNode("text",{class:"name sk-transparent sk-text-26-6667-486 sk-text"},"收纳"),e.createElementVNode("navigator",{class:"more sk-transparent sk-text-30-0000-520 sk-text sk-pseudo sk-pseudo-circle","hover-class":"none"},"全部")]),e.createElementVNode("view",{class:"section"},[e.createElementVNode("navigator",{class:"goods","hover-class":"none"},[e.createElementVNode("image",{class:"image sk-image"}),e.createElementVNode("view",{class:"name ellipsis sk-transparent sk-text-14-2857-582 sk-text"},"开发员自留款,带滚轮双层脏衣篓"),e.createElementVNode("view",{class:"price"},[e.createElementVNode("text",{class:"symbol sk-transparent sk-opacity"},"¥"),e.createElementVNode("text",{class:"number sk-transparent sk-text-14-2857-938 sk-text"},"125.00")])]),e.createElementVNode("navigator",{class:"goods","hover-class":"none"},[e.createElementVNode("image",{class:"image sk-image"}),e.createElementVNode("view",{class:"name ellipsis sk-transparent sk-text-14-2857-108 sk-text"},"换季好帮手,大容量防尘衣物收纳袋"),e.createElementVNode("view",{class:"price"},[e.createElementVNode("text",{class:"symbol sk-transparent sk-opacity"},"¥"),e.createElementVNode("text",{class:"number sk-transparent sk-text-14-2857-564 sk-text"},"69.00")])]),e.createElementVNode("navigator",{class:"goods","hover-class":"none"},[e.createElementVNode("image",{class:"image sk-image"}),e.createElementVNode("view",{class:"name ellipsis sk-transparent sk-text-14-2857-507 sk-text"},"可水洗的布艺收纳盒"),e.createElementVNode("view",{class:"price"},[e.createElementVNode("text",{class:"symbol sk-transparent sk-opacity"},"¥"),e.createElementVNode("text",{class:"number sk-transparent sk-text-14-2857-503 sk-text"},"29.90")])]),e.createElementVNode("navigator",{class:"goods","hover-class":"none"},[e.createElementVNode("image",{class:"image sk-image"}),e.createElementVNode("view",{class:"name ellipsis sk-transparent sk-text-14-2857-75 sk-text"},"爆款明星好物,抽屉式透明储物柜"),e.createElementVNode("view",{class:"price"},[e.createElementVNode("text",{class:"symbol sk-transparent sk-opacity"},"¥"),e.createElementVNode("text",{class:"number sk-transparent sk-text-14-2857-965 sk-text"},"129.00")])]),e.createElementVNode("navigator",{class:"goods","hover-class":"none"},[e.createElementVNode("image",{class:"image sk-image"}),e.createElementVNode("view",{class:"name ellipsis sk-transparent sk-text-14-2857-71 sk-text"},"给衣柜减减肥,真空防潮压缩袋"),e.createElementVNode("view",{class:"price"},[e.createElementVNode("text",{class:"symbol sk-transparent sk-opacity"},"¥"),e.createElementVNode("text",{class:"number sk-transparent sk-text-14-2857-530 sk-text"},"79.00")])]),e.createElementVNode("navigator",{class:"goods","hover-class":"none"},[e.createElementVNode("image",{class:"image sk-image"}),e.createElementVNode("view",{class:"name ellipsis sk-transparent sk-text-14-2857-151 sk-text"},"拉开抽屉不凌乱,磨砂抽屉整理盒套装"),e.createElementVNode("view",{class:"price"},[e.createElementVNode("text",{class:"symbol sk-transparent sk-opacity"},"¥"),e.createElementVNode("text",{class:"number sk-transparent sk-text-14-2857-641 sk-text"},"49.00")])])])])])])])])}],["__scopeId","data-v-b7bf4660"]]),j=e.defineComponent({__name:"category",setup(t){const a=e.ref([]),o=async()=>{const e=await((e=1)=>U({method:"GET",url:"/home/banner",data:{distributionSite:e}}))(2);a.value=e.result},n=e.ref([]),s=e.ref(0),r=async()=>{const e=await U({method:"GET",url:"/category/top"});n.value=e.result},l=e.ref(!1);h((async()=>{await Promise.all([o(),r()]),l.value=!0}));const u=e.computed((()=>{var e;return(null==(e=n.value[s.value])?void 0:e.children)||[]}));return(t,o)=>{const r=c(e.resolveDynamicComponent("XtxSwiper"),i);return l.value?(e.openBlock(),e.createElementBlock("view",{key:0,class:"viewport"},[e.createElementVNode("view",{class:"search"},[e.createElementVNode("view",{class:"input"},[e.createElementVNode("text",{class:"icon-search"},"女靴")])]),e.createElementVNode("view",{class:"categories"},[e.createElementVNode("scroll-view",{class:"primary","scroll-y":""},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.value,((t,a)=>(e.openBlock(),e.createElementBlock("view",{key:t.id,class:e.normalizeClass(["item",{active:a===s.value}]),onClick:e=>s.value=a},[e.createElementVNode("text",{class:"name"},e.toDisplayString(t.name),1)],10,["onClick"])))),128))]),e.createElementVNode("scroll-view",{"enable-back-to-top":"",class:"secondary","scroll-y":""},[e.createVNode(r,{class:"banner",list:a.value},null,8,["list"]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(u.value,(t=>(e.openBlock(),e.createElementBlock("view",{class:"panel",key:t.id},[e.createElementVNode("view",{class:"title"},[e.createElementVNode("text",{class:"name"},e.toDisplayString(t.name),1),e.createElementVNode("navigator",{class:"more","hover-class":"none"},"全部")]),e.createElementVNode("view",{class:"section"},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.goods,(t=>(e.openBlock(),e.createElementBlock("navigator",{key:t.id,class:"goods","hover-class":"none",url:`/pages/goods/goods?id=${t.id}`},[e.createElementVNode("image",{class:"image",src:t.picture},null,8,["src"]),e.createElementVNode("view",{class:"name ellipsis"},e.toDisplayString(t.name),1),e.createElementVNode("view",{class:"price"},[e.createElementVNode("text",{class:"symbol"},"¥"),e.createElementVNode("text",{class:"number"},e.toDisplayString(t.price),1)])],8,["url"])))),128))])])))),128))])])])):(e.openBlock(),e.createBlock(z,{key:1}))}}});const q=a({name:"vk-data-input-number-box",emits:["update:modelValue","input","change","blur","plus","minus"],props:{value:{type:Number,default:1},modelValue:{type:Number,default:1},bgColor:{type:String,default:"#F2F3F5"},min:{type:Number,default:0},max:{type:Number,default:99999},step:{type:Number,default:1},stepFirst:{type:Number,default:0},stepStrictly:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},size:{type:[Number,String],default:26},color:{type:String,default:"#323233"},inputWidth:{type:[Number,String],default:80},inputHeight:{type:[Number,String],default:50},index:{type:[Number,String],default:""},disabledInput:{type:Boolean,default:!1},cursorSpacing:{type:[Number,String],default:100},longPress:{type:Boolean,default:!0},pressTime:{type:[Number,String],default:250},positiveInteger:{type:Boolean,default:!0}},watch:{valueCom(e,t){this.changeFromInner||(this.inputVal=e,this.$nextTick((function(){this.changeFromInner=!1})))},inputVal(e,t){if(""==e)return;let a=0;a=this.isNumber(e)&&e>=this.min&&e<=this.max?e:t,this.positiveInteger&&(e<0||-1!==String(e).indexOf("."))&&(a=t,this.$nextTick((()=>{this.inputVal=t}))),this.handleChange(a,"change")},min(e){void 0!==e&&""!=e&&this.valueCom<e&&(this.$emit("input",e),this.$emit("update:modelValue",e))},max(e){void 0!==e&&""!=e&&this.valueCom>e&&(this.$emit("input",e),this.$emit("update:modelValue",e))}},data:()=>({inputVal:1,timer:null,changeFromInner:!1,innerChangeTimer:null}),created(){this.inputVal=Number(this.valueCom)},computed:{valueCom(){return this.modelValue},getCursorSpacing(){return Number(uni.upx2px(this.cursorSpacing))}},methods:{btnTouchStart(e){this[e](),this.longPress&&(clearInterval(this.timer),this.timer=null,this.timer=setInterval((()=>{this[e]()}),this.pressTime))},clearTimer(){this.$nextTick((()=>{clearInterval(this.timer),this.timer=null}))},minus(){this.computeVal("minus")},plus(){this.computeVal("plus")},calcPlus(e,t){let a,o,n;try{o=e.toString().split(".")[1].length}catch(Qt){o=0}try{n=t.toString().split(".")[1].length}catch(Qt){n=0}return a=Math.pow(10,Math.max(o,n)),((e*a+t*a)/a).toFixed(o>=n?o:n)},calcMinus(e,t){let a,o,n;try{o=e.toString().split(".")[1].length}catch(Qt){o=0}try{n=t.toString().split(".")[1].length}catch(Qt){n=0}return a=Math.pow(10,Math.max(o,n)),((e*a-t*a)/a).toFixed(o>=n?o:n)},computeVal(e){if(uni.hideKeyboard(),this.disabled)return;let t=0;if("minus"===e?t=this.stepFirst>0&&this.inputVal==this.stepFirst?this.min:this.calcMinus(this.inputVal,this.step):"plus"===e&&(t=this.stepFirst>0&&this.inputVal<this.stepFirst?this.stepFirst:this.calcPlus(this.inputVal,this.step)),this.stepStrictly){let e=t%this.step;e>0&&(t-=e)}t>this.max?t=this.max:t<this.min&&(t=this.min),this.inputVal=t,this.handleChange(t,e)},onBlur(e){let t=0,a=e.detail.value;if(/(^\d+$)/.test(a)&&0!=a[0]||(t=this.min),t=+a,this.stepFirst>0&&this.inputVal<this.stepFirst&&this.inputVal>0&&(t=this.stepFirst),this.stepStrictly){let e=t%this.step;e>0&&(t-=e)}t>this.max?t=this.max:t<this.min&&(t=this.min),this.$nextTick((()=>{this.inputVal=t})),this.handleChange(t,"blur")},handleChange(e,t){this.disabled||(this.innerChangeTimer&&(clearTimeout(this.innerChangeTimer),this.innerChangeTimer=null),this.changeFromInner=!0,this.innerChangeTimer=setTimeout((()=>{this.changeFromInner=!1}),150),this.$emit("input",Number(e)),this.$emit("update:modelValue",Number(e)),this.$emit(t,{value:Number(e),index:this.index}))},isNumber:e=>/^(?:-?\d+|-?\d{1,3}(?:,\d{3})+)?(?:\.\d+)?$/.test(e)}},[["render",function(t,a,o,n,s,i){return e.openBlock(),e.createElementBlock("view",{class:"vk-data-input-number-box"},[e.createElementVNode("view",{class:e.normalizeClass(["u-icon-minus",{"u-icon-disabled":o.disabled||s.inputVal<=o.min}]),style:e.normalizeStyle({background:o.bgColor,height:o.inputHeight+"rpx",color:o.color,fontSize:o.size+"rpx",minHeight:"1.4em"}),onTouchstart:a[0]||(a[0]=e.withModifiers((e=>i.btnTouchStart("minus")),["prevent"])),onTouchend:a[1]||(a[1]=e.withModifiers(((...e)=>i.clearTimer&&i.clearTimer(...e)),["stop","prevent"]))},[e.createElementVNode("view",{style:e.normalizeStyle("font-size:"+(Number(o.size)+10)+"rpx"),class:"num-btn"},"-",4)],38),e.withDirectives(e.createElementVNode("input",{"onUpdate:modelValue":a[2]||(a[2]=e=>s.inputVal=e),disabled:o.disabledInput||o.disabled,"cursor-spacing":i.getCursorSpacing,class:e.normalizeClass([{"u-input-disabled":o.disabled},"u-number-input"]),type:"number",style:e.normalizeStyle({color:o.color,fontSize:o.size+"rpx",background:o.bgColor,height:o.inputHeight+"rpx",width:o.inputWidth+"rpx"}),onBlur:a[3]||(a[3]=(...e)=>i.onBlur&&i.onBlur(...e))},null,46,["disabled","cursor-spacing"]),[[e.vModelText,s.inputVal]]),e.createElementVNode("view",{class:e.normalizeClass(["u-icon-plus",{"u-icon-disabled":o.disabled||s.inputVal>=o.max}]),style:e.normalizeStyle({background:o.bgColor,height:o.inputHeight+"rpx",color:o.color,fontSize:o.size+"rpx",minHeight:"1.4em"}),onTouchstart:a[4]||(a[4]=e.withModifiers((e=>i.btnTouchStart("plus")),["prevent"])),onTouchend:a[5]||(a[5]=e.withModifiers(((...e)=>i.clearTimer&&i.clearTimer(...e)),["stop","prevent"]))},[e.createElementVNode("view",{style:e.normalizeStyle("font-size:"+(Number(o.size)+10)+"rpx"),class:"num-btn"},"+",4)],38)])}],["__scopeId","data-v-ae9af45e"]]);let H={};H={data:()=>({is_show:"none"}),watch:{show(e){this.is_show=this.show}},created(){this.swipeaction=this.getSwipeAction(),void 0!==this.swipeaction.children&&this.swipeaction.children.push(this)},mounted(){this.is_show=this.show},methods:{closeSwipe(e){this.autoClose&&this.swipeaction.closeOther(this)},change(e){this.$emit("change",e.open),this.is_show!==e.open&&(this.is_show=e.open)},appTouchStart(e){const{clientX:t}=e.changedTouches[0];this.clientX=t,this.timestamp=(new Date).getTime()},appTouchEnd(e,t,a,o){const{clientX:n}=e.changedTouches[0];let s=Math.abs(this.clientX-n),i=(new Date).getTime()-this.timestamp;s<40&&i<300&&this.$emit("click",{content:a,index:t,position:o})},onClickForPC(e,t,a){}}};const G=e=>{(e.$wxs||(e.$wxs=[])).push("wxsswipe"),(e.$wxsModules||(e.$wxsModules={})).wxsswipe="105aa6f4"},J=e=>{(e.$renderjs||(e.$renderjs=[])).push("renderswipe"),(e.$renderjsModules||(e.$renderjsModules={})).renderswipe="0db65775"},W={mixins:[H,{},{}],emits:["click","change"],props:{show:{type:String,default:"none"},disabled:{type:Boolean,default:!1},autoClose:{type:Boolean,default:!0},threshold:{type:Number,default:20},leftOptions:{type:Array,default:()=>[]},rightOptions:{type:Array,default:()=>[]}},unmounted(){this.__isUnmounted=!0,this.uninstall()},methods:{uninstall(){this.swipeaction&&this.swipeaction.children.forEach(((e,t)=>{e===this&&this.swipeaction.children.splice(t,1)}))},getSwipeAction(e="uniSwipeAction"){let t=this.$parent,a=t.$options.name;for(;a!==e;){if(t=t.$parent,!t)return!1;a=t.$options.name}return t}}};G(W),J(W);const K=a(W,[["render",function(t,a,o,n,s,i){return e.openBlock(),e.createElementBlock("view",{class:"uni-swipe"},[e.createElementVNode("view",{class:"uni-swipe_box","change:prop":t.wxsswipe.showWatch,prop:e.wp(t.is_show),"data-threshold":o.threshold,"data-disabled":o.disabled,onTouchstart:a[2]||(a[2]=(...e)=>t.wxsswipe.touchstart&&t.wxsswipe.touchstart(...e)),onTouchmove:a[3]||(a[3]=(...e)=>t.wxsswipe.touchmove&&t.wxsswipe.touchmove(...e)),onTouchend:a[4]||(a[4]=(...e)=>t.wxsswipe.touchend&&t.wxsswipe.touchend(...e))},[e.createElementVNode("view",{class:"uni-swipe_button-group button-group--left"},[e.renderSlot(t.$slots,"left",{},(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.leftOptions,((o,n)=>(e.openBlock(),e.createElementBlock("view",{key:n,style:e.normalizeStyle({backgroundColor:o.style&&o.style.backgroundColor?o.style.backgroundColor:"#C7C6CD"}),class:"uni-swipe_button button-hock",onTouchstart:a[0]||(a[0]=(...e)=>t.appTouchStart&&t.appTouchStart(...e)),onTouchend:e=>t.appTouchEnd(e,n,o,"left"),onClick:e.withModifiers((e=>t.onClickForPC(n,o,"left")),["stop"])},[e.createElementVNode("text",{class:"uni-swipe_button-text",style:e.normalizeStyle({color:o.style&&o.style.color?o.style.color:"#FFFFFF",fontSize:o.style&&o.style.fontSize?o.style.fontSize:"16px"})},e.toDisplayString(o.text),5)],44,["onTouchend","onClick"])))),128))]),!0)]),e.createElementVNode("view",{class:"uni-swipe_text--center"},[e.renderSlot(t.$slots,"default",{},void 0,!0)]),e.createElementVNode("view",{class:"uni-swipe_button-group button-group--right"},[e.renderSlot(t.$slots,"right",{},(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.rightOptions,((o,n)=>(e.openBlock(),e.createElementBlock("view",{key:n,style:e.normalizeStyle({backgroundColor:o.style&&o.style.backgroundColor?o.style.backgroundColor:"#C7C6CD"}),class:"uni-swipe_button button-hock",onTouchstart:a[1]||(a[1]=(...e)=>t.appTouchStart&&t.appTouchStart(...e)),onTouchend:e=>t.appTouchEnd(e,n,o,"right"),onClick:e.withModifiers((e=>t.onClickForPC(n,o,"right")),["stop"])},[e.createElementVNode("text",{class:"uni-swipe_button-text",style:e.normalizeStyle({color:o.style&&o.style.color?o.style.color:"#FFFFFF",fontSize:o.style&&o.style.fontSize?o.style.fontSize:"16px"})},e.toDisplayString(o.text),5)],44,["onTouchend","onClick"])))),128))]),!0)])],40,["change:prop","prop","data-threshold","data-disabled"])])}],["__scopeId","data-v-72864e9b"]]);const Y=a({name:"uniSwipeAction",data:()=>({}),created(){this.children=[]},methods:{resize(){},closeAll(){this.children.forEach((e=>{e.is_show="none"}))},closeOther(e){this.openItem&&this.openItem!==e&&(this.openItem.is_show="none"),this.openItem=e}}},[["render",function(t,a,o,n,s,i){return e.openBlock(),e.createElementBlock("view",null,[e.renderSlot(t.$slots,"default")])}]]),Q=a(e.defineComponent({__name:"XtxGuess",setup(t,{expose:a}){const o={page:1,pageSize:10},n=e.ref([]),s=e.ref(!1),i=async()=>{if(!0===s.value)return uni.showToast({icon:"none",title:"没有更多数据~"});const e=await(t=o,U({method:"GET",url:"/home/goods/guessLike",data:t}));var t;n.value.push(...e.result.items),o.page<e.result.pages?o.page++:s.value=!0};return e.onMounted((()=>{i()})),a({resetData:()=>{o.page=1,n.value=[],s.value=!1},getMore:i}),(t,a)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("view",{class:"caption"},[e.createElementVNode("text",{class:"text"},"猜你喜欢")]),e.createElementVNode("view",{class:"guess"},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.value,(t=>(e.openBlock(),e.createElementBlock("navigator",{class:"guess-item",key:t.id,url:`/pages/goods/goods?id=${t.id}`},[e.createElementVNode("image",{class:"image",mode:"aspectFill",src:t.picture},null,8,["src"]),e.createElementVNode("view",{class:"name"},e.toDisplayString(t.name),1),e.createElementVNode("view",{class:"price"},[e.createElementVNode("text",{class:"small"},"¥"),e.createElementVNode("text",null,e.toDisplayString(t.price),1)])],8,["url"])))),128))]),e.createElementVNode("view",{class:"loading-text"},e.toDisplayString(s.value?"没有更多数据~":"正在加载..."),1)],64))}}),[["__scopeId","data-v-571a0c52"]]),X=()=>{const t=e.ref();return{guessRef:t,onScrolltolower:()=>{var e;null==(e=t.value)||e.getMore()}}},Z=(e,t)=>U({method:"PUT",url:`/member/cart/${e}`,data:t}),ee=a(e.defineComponent({__name:"CartMain",props:{safeAreaInsetBottom:{type:Boolean}},setup(t){const{safeAreaInsets:a}=uni.getSystemInfoSync(),o=O(),n=e.ref([]),s=e.ref(!0),i=async()=>{const e=await U({method:"GET",url:"/member/cart"});n.value=e.result,s.value=e.result.length>0};d((()=>{o.profile&&i()}));const r=e=>{uni.showModal({content:"是否删除",confirmColor:"#27BA9B",success:async t=>{var a;t.confirm&&(await(a={ids:[e]},U({method:"DELETE",url:"/member/cart",data:a})),i())}})},l=e=>{Z(e.index,{count:e.value})},u=e.computed((()=>n.value.length&&n.value.every((e=>e.selected)))),m=()=>{const e=!u.value;n.value.forEach((t=>{t.selected=e})),U({method:"PUT",url:"/member/cart/selected",data:{selected:e}})},p=e.computed((()=>n.value.filter((e=>e.selected)))),h=e.computed((()=>p.value.reduce(((e,t)=>e+t.count),0))),g=e.computed((()=>p.value.reduce(((e,t)=>e+t.count*t.nowPrice),0).toFixed(2))),f=()=>{if(0===h.value)return uni.showToast({icon:"none",title:"请选择商品"});uni.navigateTo({url:"/pagesOrder/create/create"})},{guessRef:y,onScrolltolower:v}=X();return(t,i)=>{var d;const p=c(e.resolveDynamicComponent("vk-data-input-number-box"),q),k=c(e.resolveDynamicComponent("uni-swipe-action-item"),K),_=c(e.resolveDynamicComponent("uni-swipe-action"),Y),w=c(e.resolveDynamicComponent("XtxGuess"),Q);return e.openBlock(),e.createElementBlock("scroll-view",{"enable-back-to-top":"","scroll-y":"",class:"scroll-view",onScrolltolower:i[0]||(i[0]=(...t)=>e.unref(v)&&e.unref(v)(...t))},[e.unref(o).profile?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[s.value?(e.openBlock(),e.createElementBlock("view",{key:0,class:"cart-list"},[e.createElementVNode("view",{class:"tips"},[e.createElementVNode("text",{class:"label"},"满减"),e.createElementVNode("text",{class:"desc"},"满1件, 即可享受9折优惠")]),e.createVNode(_,null,{default:e.withCtx((()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.value,(t=>(e.openBlock(),e.createBlock(k,{key:t.skuId,class:"cart-swipe"},{right:e.withCtx((()=>[e.createElementVNode("view",{class:"cart-swipe-right"},[e.createElementVNode("button",{onClick:e=>r(t.skuId),class:"button delete-button"},"删除",8,["onClick"])])])),default:e.withCtx((()=>[e.createElementVNode("view",{class:"goods"},[e.createElementVNode("text",{onClick:e=>(e=>{e.selected=!e.selected,Z(e.skuId,{selected:e.selected})})(t),class:e.normalizeClass(["checkbox",{checked:t.selected}])},null,10,["onClick"]),e.createElementVNode("navigator",{url:`/pages/goods/goods?id=${t.id}`,"hover-class":"none",class:"navigator"},[e.createElementVNode("image",{mode:"aspectFill",class:"picture",src:t.picture},null,8,["src"]),e.createElementVNode("view",{class:"meta"},[e.createElementVNode("view",{class:"name ellipsis"},e.toDisplayString(t.name),1),e.createElementVNode("view",{class:"attrsText ellipsis"},e.toDisplayString(t.attrsText),1),e.createElementVNode("view",{class:"price"},e.toDisplayString(t.nowPrice),1)])],8,["url"]),e.createElementVNode("view",{class:"count"},[e.createVNode(p,{modelValue:t.count,"onUpdate:modelValue":e=>t.count=e,min:1,max:t.stock,index:t.skuId,onChange:l},null,8,["modelValue","onUpdate:modelValue","max","index"])])])])),_:2},1024)))),128))])),_:1})])):(e.openBlock(),e.createElementBlock("view",{key:1,class:"cart-blank"},[e.createElementVNode("image",{src:"/static/images/blank_cart.png",class:"image"}),e.createElementVNode("text",{class:"text"},"购物车还是空的,快来挑选好货吧"),e.createElementVNode("navigator",{url:"/pages/index/index","hover-class":"none"},[e.createElementVNode("button",{class:"button"},"去首页看看")])])),s.value?(e.openBlock(),e.createElementBlock("view",{key:2,class:"toolbar",style:e.normalizeStyle({paddingBottom:t.safeAreaInsetBottom?(null==(d=e.unref(a))?void 0:d.bottom)+"px":0})},[e.createElementVNode("text",{onClick:m,class:e.normalizeClass(["all",{checked:u.value}])},"全选",2),e.createElementVNode("text",{class:"text"},"合计:"),e.createElementVNode("text",{class:"amount"},e.toDisplayString(g.value),1),e.createElementVNode("view",{class:"button-grounp"},[e.createElementVNode("view",{onClick:f,class:e.normalizeClass(["button payment-button",{disabled:0===h.value}])}," 去结算("+e.toDisplayString(h.value)+") ",3)])],4)):e.createCommentVNode("",!0)],64)):(e.openBlock(),e.createElementBlock("view",{key:1,class:"login-blank"},[e.createElementVNode("text",{class:"text"},"登录后可查看购物车中的商品"),e.createElementVNode("navigator",{url:"/pages/login/login","hover-class":"none"},[e.createElementVNode("button",{class:"button"},"去登录")])])),e.createVNode(w,{ref_key:"guessRef",ref:y},null,512),e.createElementVNode("view",{class:"toolbar-height"})],32)}}}),[["__scopeId","data-v-5311b70f"]]),te=e.defineComponent({__name:"cart",setup:t=>(t,a)=>(e.openBlock(),e.createBlock(ee))}),ae=e.defineComponent({__name:"cart2",setup:t=>(t,a)=>(e.openBlock(),e.createBlock(ee,{"safe-area-inset-bottom":""}))}),oe=e.defineComponent({__name:"my",setup(t){const{safeAreaInsets:a}=uni.getSystemInfoSync(),o=[{type:"1",text:"待付款",icon:"icon-currency"},{type:"2",text:"待发货",icon:"icon-gift"},{type:"3",text:"待收货",icon:"icon-check"},{type:"4",text:"待评价",icon:"icon-comment"}],n=O(),{guessRef:s,onScrolltolower:i}=X();return(t,s)=>(e.openBlock(),e.createElementBlock("scroll-view",{"enable-back-to-top":"",onScrolltolower:s[0]||(s[0]=(...t)=>e.unref(i)&&e.unref(i)(...t)),class:"viewport","scroll-y":""},[e.createElementVNode("view",{class:"profile",style:e.normalizeStyle({paddingTop:e.unref(a).top+"px"})},[e.unref(n).profile?(e.openBlock(),e.createElementBlock("view",{key:0,class:"overview"},[e.createElementVNode("navigator",{url:"/pagesMember/profile/profile","hover-class":"none"},[e.createElementVNode("image",{class:"avatar",src:e.unref(n).profile.avatar,mode:"aspectFill"},null,8,["src"])]),e.createElementVNode("view",{class:"meta"},[e.createElementVNode("view",{class:"nickname"},e.toDisplayString(e.unref(n).profile.nickname||e.unref(n).profile.username),1),e.createElementVNode("navigator",{class:"extra",url:"/pagesMember/profile/profile","hover-class":"none"},[e.createElementVNode("text",{class:"update"},"更新头像昵称")])])])):(e.openBlock(),e.createElementBlock("view",{key:1,class:"overview"},[e.createElementVNode("navigator",{url:"/pages/login/login","hover-class":"none"},[e.createElementVNode("image",{class:"avatar gray",mode:"aspectFill",src:"https://yjy-xiaotuxian-dev.oss-cn-beijing.aliyuncs.com/picture/2021-04-06/db628d42-88a7-46e7-abb8-659448c33081.png"})]),e.createElementVNode("view",{class:"meta"},[e.createElementVNode("navigator",{url:"/pages/login/login","hover-class":"none",class:"nickname"}," 未登录 "),e.createElementVNode("view",{class:"extra"},[e.createElementVNode("text",{class:"tips"},"点击登录账号")])])])),e.createElementVNode("navigator",{class:"settings",url:"/pagesMember/settings/settings","hover-class":"none"}," 设置 ")],4),e.createElementVNode("view",{class:"orders"},[e.createElementVNode("view",{class:"title"},[e.createTextVNode(" 我的订单 "),e.createElementVNode("navigator",{class:"navigator",url:"/pagesOrder/list/list?type=0","hover-class":"none"},[e.createTextVNode(" 查看全部订单"),e.createElementVNode("text",{class:"icon-right"})])]),e.createElementVNode("view",{class:"section"},[(e.openBlock(),e.createElementBlock(e.Fragment,null,e.renderList(o,(t=>e.createElementVNode("navigator",{key:t.type,class:e.normalizeClass([t.icon,"navigator"]),url:`/pagesOrder/list/list?type=${t.type}`,"hover-class":"none"},e.toDisplayString(t.text),11,["url"]))),64))])])],32))}}),ne={id:"2852637",name:"uniui图标库",font_family:"uniicons",css_prefix_text:"uniui-",description:"",glyphs:[{icon_id:"25027049",name:"yanse",font_class:"color",unicode:"e6cf",unicode_decimal:59087},{icon_id:"25027048",name:"wallet",font_class:"wallet",unicode:"e6b1",unicode_decimal:59057},{icon_id:"25015720",name:"settings-filled",font_class:"settings-filled",unicode:"e6ce",unicode_decimal:59086},{icon_id:"25015434",name:"shimingrenzheng-filled",font_class:"auth-filled",unicode:"e6cc",unicode_decimal:59084},{icon_id:"24934246",name:"shop-filled",font_class:"shop-filled",unicode:"e6cd",unicode_decimal:59085},{icon_id:"24934159",name:"staff-filled-01",font_class:"staff-filled",unicode:"e6cb",unicode_decimal:59083},{icon_id:"24932461",name:"VIP-filled",font_class:"vip-filled",unicode:"e6c6",unicode_decimal:59078},{icon_id:"24932462",name:"plus_circle_fill",font_class:"plus-filled",unicode:"e6c7",unicode_decimal:59079},{icon_id:"24932463",name:"folder_add-filled",font_class:"folder-add-filled",unicode:"e6c8",unicode_decimal:59080},{icon_id:"24932464",name:"yanse-filled",font_class:"color-filled",unicode:"e6c9",unicode_decimal:59081},{icon_id:"24932465",name:"tune-filled",font_class:"tune-filled",unicode:"e6ca",unicode_decimal:59082},{icon_id:"24932455",name:"a-rilidaka-filled",font_class:"calendar-filled",unicode:"e6c0",unicode_decimal:59072},{icon_id:"24932456",name:"notification-filled",font_class:"notification-filled",unicode:"e6c1",unicode_decimal:59073},{icon_id:"24932457",name:"wallet-filled",font_class:"wallet-filled",unicode:"e6c2",unicode_decimal:59074},{icon_id:"24932458",name:"paihangbang-filled",font_class:"medal-filled",unicode:"e6c3",unicode_decimal:59075},{icon_id:"24932459",name:"gift-filled",font_class:"gift-filled",unicode:"e6c4",unicode_decimal:59076},{icon_id:"24932460",name:"fire-filled",font_class:"fire-filled",unicode:"e6c5",unicode_decimal:59077},{icon_id:"24928001",name:"refreshempty",font_class:"refreshempty",unicode:"e6bf",unicode_decimal:59071},{icon_id:"24926853",name:"location-ellipse",font_class:"location-filled",unicode:"e6af",unicode_decimal:59055},{icon_id:"24926735",name:"person-filled",font_class:"person-filled",unicode:"e69d",unicode_decimal:59037},{icon_id:"24926703",name:"personadd-filled",font_class:"personadd-filled",unicode:"e698",unicode_decimal:59032},{icon_id:"24923351",name:"back",font_class:"back",unicode:"e6b9",unicode_decimal:59065},{icon_id:"24923352",name:"forward",font_class:"forward",unicode:"e6ba",unicode_decimal:59066},{icon_id:"24923353",name:"arrowthinright",font_class:"arrow-right",unicode:"e6bb",unicode_decimal:59067},{icon_id:"24923353",name:"arrowthinright",font_class:"arrowthinright",unicode:"e6bb",unicode_decimal:59067},{icon_id:"24923354",name:"arrowthinleft",font_class:"arrow-left",unicode:"e6bc",unicode_decimal:59068},{icon_id:"24923354",name:"arrowthinleft",font_class:"arrowthinleft",unicode:"e6bc",unicode_decimal:59068},{icon_id:"24923355",name:"arrowthinup",font_class:"arrow-up",unicode:"e6bd",unicode_decimal:59069},{icon_id:"24923355",name:"arrowthinup",font_class:"arrowthinup",unicode:"e6bd",unicode_decimal:59069},{icon_id:"24923356",name:"arrowthindown",font_class:"arrow-down",unicode:"e6be",unicode_decimal:59070},{icon_id:"24923356",name:"arrowthindown",font_class:"arrowthindown",unicode:"e6be",unicode_decimal:59070},{icon_id:"24923349",name:"arrowdown",font_class:"bottom",unicode:"e6b8",unicode_decimal:59064},{icon_id:"24923349",name:"arrowdown",font_class:"arrowdown",unicode:"e6b8",unicode_decimal:59064},{icon_id:"24923346",name:"arrowright",font_class:"right",unicode:"e6b5",unicode_decimal:59061},{icon_id:"24923346",name:"arrowright",font_class:"arrowright",unicode:"e6b5",unicode_decimal:59061},{icon_id:"24923347",name:"arrowup",font_class:"top",unicode:"e6b6",unicode_decimal:59062},{icon_id:"24923347",name:"arrowup",font_class:"arrowup",unicode:"e6b6",unicode_decimal:59062},{icon_id:"24923348",name:"arrowleft",font_class:"left",unicode:"e6b7",unicode_decimal:59063},{icon_id:"24923348",name:"arrowleft",font_class:"arrowleft",unicode:"e6b7",unicode_decimal:59063},{icon_id:"24923334",name:"eye",font_class:"eye",unicode:"e651",unicode_decimal:58961},{icon_id:"24923335",name:"eye-filled",font_class:"eye-filled",unicode:"e66a",unicode_decimal:58986},{icon_id:"24923336",name:"eye-slash",font_class:"eye-slash",unicode:"e6b3",unicode_decimal:59059},{icon_id:"24923337",name:"eye-slash-filled",font_class:"eye-slash-filled",unicode:"e6b4",unicode_decimal:59060},{icon_id:"24923305",name:"info-filled",font_class:"info-filled",unicode:"e649",unicode_decimal:58953},{icon_id:"24923299",name:"reload-01",font_class:"reload",unicode:"e6b2",unicode_decimal:59058},{icon_id:"24923195",name:"mic_slash_fill",font_class:"micoff-filled",unicode:"e6b0",unicode_decimal:59056},{icon_id:"24923165",name:"map-pin-ellipse",font_class:"map-pin-ellipse",unicode:"e6ac",unicode_decimal:59052},{icon_id:"24923166",name:"map-pin",font_class:"map-pin",unicode:"e6ad",unicode_decimal:59053},{icon_id:"24923167",name:"location",font_class:"location",unicode:"e6ae",unicode_decimal:59054},{icon_id:"24923064",name:"starhalf",font_class:"starhalf",unicode:"e683",unicode_decimal:59011},{icon_id:"24923065",name:"star",font_class:"star",unicode:"e688",unicode_decimal:59016},{icon_id:"24923066",name:"star-filled",font_class:"star-filled",unicode:"e68f",unicode_decimal:59023},{icon_id:"24899646",name:"a-rilidaka",font_class:"calendar",unicode:"e6a0",unicode_decimal:59040},{icon_id:"24899647",name:"fire",font_class:"fire",unicode:"e6a1",unicode_decimal:59041},{icon_id:"24899648",name:"paihangbang",font_class:"medal",unicode:"e6a2",unicode_decimal:59042},{icon_id:"24899649",name:"font",font_class:"font",unicode:"e6a3",unicode_decimal:59043},{icon_id:"24899650",name:"gift",font_class:"gift",unicode:"e6a4",unicode_decimal:59044},{icon_id:"24899651",name:"link",font_class:"link",unicode:"e6a5",unicode_decimal:59045},{icon_id:"24899652",name:"notification",font_class:"notification",unicode:"e6a6",unicode_decimal:59046},{icon_id:"24899653",name:"staff",font_class:"staff",unicode:"e6a7",unicode_decimal:59047},{icon_id:"24899654",name:"VIP",font_class:"vip",unicode:"e6a8",unicode_decimal:59048},{icon_id:"24899655",name:"folder_add",font_class:"folder-add",unicode:"e6a9",unicode_decimal:59049},{icon_id:"24899656",name:"tune",font_class:"tune",unicode:"e6aa",unicode_decimal:59050},{icon_id:"24899657",name:"shimingrenzheng",font_class:"auth",unicode:"e6ab",unicode_decimal:59051},{icon_id:"24899565",name:"person",font_class:"person",unicode:"e699",unicode_decimal:59033},{icon_id:"24899566",name:"email-filled",font_class:"email-filled",unicode:"e69a",unicode_decimal:59034},{icon_id:"24899567",name:"phone-filled",font_class:"phone-filled",unicode:"e69b",unicode_decimal:59035},{icon_id:"24899568",name:"phone",font_class:"phone",unicode:"e69c",unicode_decimal:59036},{icon_id:"24899570",name:"email",font_class:"email",unicode:"e69e",unicode_decimal:59038},{icon_id:"24899571",name:"personadd",font_class:"personadd",unicode:"e69f",unicode_decimal:59039},{icon_id:"24899558",name:"chatboxes-filled",font_class:"chatboxes-filled",unicode:"e692",unicode_decimal:59026},{icon_id:"24899559",name:"contact",font_class:"contact",unicode:"e693",unicode_decimal:59027},{icon_id:"24899560",name:"chatbubble-filled",font_class:"chatbubble-filled",unicode:"e694",unicode_decimal:59028},{icon_id:"24899561",name:"contact-filled",font_class:"contact-filled",unicode:"e695",unicode_decimal:59029},{icon_id:"24899562",name:"chatboxes",font_class:"chatboxes",unicode:"e696",unicode_decimal:59030},{icon_id:"24899563",name:"chatbubble",font_class:"chatbubble",unicode:"e697",unicode_decimal:59031},{icon_id:"24881290",name:"upload-filled",font_class:"upload-filled",unicode:"e68e",unicode_decimal:59022},{icon_id:"24881292",name:"upload",font_class:"upload",unicode:"e690",unicode_decimal:59024},{icon_id:"24881293",name:"weixin",font_class:"weixin",unicode:"e691",unicode_decimal:59025},{icon_id:"24881274",name:"compose",font_class:"compose",unicode:"e67f",unicode_decimal:59007},{icon_id:"24881275",name:"qq",font_class:"qq",unicode:"e680",unicode_decimal:59008},{icon_id:"24881276",name:"download-filled",font_class:"download-filled",unicode:"e681",unicode_decimal:59009},{icon_id:"24881277",name:"pengyouquan",font_class:"pyq",unicode:"e682",unicode_decimal:59010},{icon_id:"24881279",name:"sound",font_class:"sound",unicode:"e684",unicode_decimal:59012},{icon_id:"24881280",name:"trash-filled",font_class:"trash-filled",unicode:"e685",unicode_decimal:59013},{icon_id:"24881281",name:"sound-filled",font_class:"sound-filled",unicode:"e686",unicode_decimal:59014},{icon_id:"24881282",name:"trash",font_class:"trash",unicode:"e687",unicode_decimal:59015},{icon_id:"24881284",name:"videocam-filled",font_class:"videocam-filled",unicode:"e689",unicode_decimal:59017},{icon_id:"24881285",name:"spinner-cycle",font_class:"spinner-cycle",unicode:"e68a",unicode_decimal:59018},{icon_id:"24881286",name:"weibo",font_class:"weibo",unicode:"e68b",unicode_decimal:59019},{icon_id:"24881288",name:"videocam",font_class:"videocam",unicode:"e68c",unicode_decimal:59020},{icon_id:"24881289",name:"download",font_class:"download",unicode:"e68d",unicode_decimal:59021},{icon_id:"24879601",name:"help",font_class:"help",unicode:"e679",unicode_decimal:59001},{icon_id:"24879602",name:"navigate-filled",font_class:"navigate-filled",unicode:"e67a",unicode_decimal:59002},{icon_id:"24879603",name:"plusempty",font_class:"plusempty",unicode:"e67b",unicode_decimal:59003},{icon_id:"24879604",name:"smallcircle",font_class:"smallcircle",unicode:"e67c",unicode_decimal:59004},{icon_id:"24879605",name:"minus-filled",font_class:"minus-filled",unicode:"e67d",unicode_decimal:59005},{icon_id:"24879606",name:"micoff",font_class:"micoff",unicode:"e67e",unicode_decimal:59006},{icon_id:"24879588",name:"closeempty",font_class:"closeempty",unicode:"e66c",unicode_decimal:58988},{icon_id:"24879589",name:"clear",font_class:"clear",unicode:"e66d",unicode_decimal:58989},{icon_id:"24879590",name:"navigate",font_class:"navigate",unicode:"e66e",unicode_decimal:58990},{icon_id:"24879591",name:"minus",font_class:"minus",unicode:"e66f",unicode_decimal:58991},{icon_id:"24879592",name:"image",font_class:"image",unicode:"e670",unicode_decimal:58992},{icon_id:"24879593",name:"mic",font_class:"mic",unicode:"e671",unicode_decimal:58993},{icon_id:"24879594",name:"paperplane",font_class:"paperplane",unicode:"e672",unicode_decimal:58994},{icon_id:"24879595",name:"close",font_class:"close",unicode:"e673",unicode_decimal:58995},{icon_id:"24879596",name:"help-filled",font_class:"help-filled",unicode:"e674",unicode_decimal:58996},{icon_id:"24879597",name:"plus-filled",font_class:"paperplane-filled",unicode:"e675",unicode_decimal:58997},{icon_id:"24879598",name:"plus",font_class:"plus",unicode:"e676",unicode_decimal:58998},{icon_id:"24879599",name:"mic-filled",font_class:"mic-filled",unicode:"e677",unicode_decimal:58999},{icon_id:"24879600",name:"image-filled",font_class:"image-filled",unicode:"e678",unicode_decimal:59e3},{icon_id:"24855900",name:"locked-filled",font_class:"locked-filled",unicode:"e668",unicode_decimal:58984},{icon_id:"24855901",name:"info",font_class:"info",unicode:"e669",unicode_decimal:58985},{icon_id:"24855903",name:"locked",font_class:"locked",unicode:"e66b",unicode_decimal:58987},{icon_id:"24855884",name:"camera-filled",font_class:"camera-filled",unicode:"e658",unicode_decimal:58968},{icon_id:"24855885",name:"chat-filled",font_class:"chat-filled",unicode:"e659",unicode_decimal:58969},{icon_id:"24855886",name:"camera",font_class:"camera",unicode:"e65a",unicode_decimal:58970},{icon_id:"24855887",name:"circle",font_class:"circle",unicode:"e65b",unicode_decimal:58971},{icon_id:"24855888",name:"checkmarkempty",font_class:"checkmarkempty",unicode:"e65c",unicode_decimal:58972},{icon_id:"24855889",name:"chat",font_class:"chat",unicode:"e65d",unicode_decimal:58973},{icon_id:"24855890",name:"circle-filled",font_class:"circle-filled",unicode:"e65e",unicode_decimal:58974},{icon_id:"24855891",name:"flag",font_class:"flag",unicode:"e65f",unicode_decimal:58975},{icon_id:"24855892",name:"flag-filled",font_class:"flag-filled",unicode:"e660",unicode_decimal:58976},{icon_id:"24855893",name:"gear-filled",font_class:"gear-filled",unicode:"e661",unicode_decimal:58977},{icon_id:"24855894",name:"home",font_class:"home",unicode:"e662",unicode_decimal:58978},{icon_id:"24855895",name:"home-filled",font_class:"home-filled",unicode:"e663",unicode_decimal:58979},{icon_id:"24855896",name:"gear",font_class:"gear",unicode:"e664",unicode_decimal:58980},{icon_id:"24855897",name:"smallcircle-filled",font_class:"smallcircle-filled",unicode:"e665",unicode_decimal:58981},{icon_id:"24855898",name:"map-filled",font_class:"map-filled",unicode:"e666",unicode_decimal:58982},{icon_id:"24855899",name:"map",font_class:"map",unicode:"e667",unicode_decimal:58983},{icon_id:"24855825",name:"refresh-filled",font_class:"refresh-filled",unicode:"e656",unicode_decimal:58966},{icon_id:"24855826",name:"refresh",font_class:"refresh",unicode:"e657",unicode_decimal:58967},{icon_id:"24855808",name:"cloud-upload",font_class:"cloud-upload",unicode:"e645",unicode_decimal:58949},{icon_id:"24855809",name:"cloud-download-filled",font_class:"cloud-download-filled",unicode:"e646",unicode_decimal:58950},{icon_id:"24855810",name:"cloud-download",font_class:"cloud-download",unicode:"e647",unicode_decimal:58951},{icon_id:"24855811",name:"cloud-upload-filled",font_class:"cloud-upload-filled",unicode:"e648",unicode_decimal:58952},{icon_id:"24855813",name:"redo",font_class:"redo",unicode:"e64a",unicode_decimal:58954},{icon_id:"24855814",name:"images-filled",font_class:"images-filled",unicode:"e64b",unicode_decimal:58955},{icon_id:"24855815",name:"undo-filled",font_class:"undo-filled",unicode:"e64c",unicode_decimal:58956},{icon_id:"24855816",name:"more",font_class:"more",unicode:"e64d",unicode_decimal:58957},{icon_id:"24855817",name:"more-filled",font_class:"more-filled",unicode:"e64e",unicode_decimal:58958},{icon_id:"24855818",name:"undo",font_class:"undo",unicode:"e64f",unicode_decimal:58959},{icon_id:"24855819",name:"images",font_class:"images",unicode:"e650",unicode_decimal:58960},{icon_id:"24855821",name:"paperclip",font_class:"paperclip",unicode:"e652",unicode_decimal:58962},{icon_id:"24855822",name:"settings",font_class:"settings",unicode:"e653",unicode_decimal:58963},{icon_id:"24855823",name:"search",font_class:"search",unicode:"e654",unicode_decimal:58964},{icon_id:"24855824",name:"redo-filled",font_class:"redo-filled",unicode:"e655",unicode_decimal:58965},{icon_id:"24841702",name:"list",font_class:"list",unicode:"e644",unicode_decimal:58948},{icon_id:"24841489",name:"mail-open-filled",font_class:"mail-open-filled",unicode:"e63a",unicode_decimal:58938},{icon_id:"24841491",name:"hand-thumbsdown-filled",font_class:"hand-down-filled",unicode:"e63c",unicode_decimal:58940},{icon_id:"24841492",name:"hand-thumbsdown",font_class:"hand-down",unicode:"e63d",unicode_decimal:58941},{icon_id:"24841493",name:"hand-thumbsup-filled",font_class:"hand-up-filled",unicode:"e63e",unicode_decimal:58942},{icon_id:"24841494",name:"hand-thumbsup",font_class:"hand-up",unicode:"e63f",unicode_decimal:58943},{icon_id:"24841496",name:"heart-filled",font_class:"heart-filled",unicode:"e641",unicode_decimal:58945},{icon_id:"24841498",name:"mail-open",font_class:"mail-open",unicode:"e643",unicode_decimal:58947},{icon_id:"24841488",name:"heart",font_class:"heart",unicode:"e639",unicode_decimal:58937},{icon_id:"24839963",name:"loop",font_class:"loop",unicode:"e633",unicode_decimal:58931},{icon_id:"24839866",name:"pulldown",font_class:"pulldown",unicode:"e632",unicode_decimal:58930},{icon_id:"24813798",name:"scan",font_class:"scan",unicode:"e62a",unicode_decimal:58922},{icon_id:"24813786",name:"bars",font_class:"bars",unicode:"e627",unicode_decimal:58919},{icon_id:"24813788",name:"cart-filled",font_class:"cart-filled",unicode:"e629",unicode_decimal:58921},{icon_id:"24813790",name:"checkbox",font_class:"checkbox",unicode:"e62b",unicode_decimal:58923},{icon_id:"24813791",name:"checkbox-filled",font_class:"checkbox-filled",unicode:"e62c",unicode_decimal:58924},{icon_id:"24813794",name:"shop",font_class:"shop",unicode:"e62f",unicode_decimal:58927},{icon_id:"24813795",name:"headphones",font_class:"headphones",unicode:"e630",unicode_decimal:58928},{icon_id:"24813796",name:"cart",font_class:"cart",unicode:"e631",unicode_decimal:58929}]};const se=a({name:"UniIcons",emits:["click"],props:{type:{type:String,default:""},color:{type:String,default:"#333333"},size:{type:[Number,String],default:16},customPrefix:{type:String,default:""}},data:()=>({icons:ne.glyphs}),computed:{unicode(){let e=this.icons.find((e=>e.font_class===this.type));return e?unescape(`%u${e.unicode}`):""},iconSize(){return"number"==typeof(e=this.size)||/^[0-9]*$/g.test(e)?e+"px":e;var e}},methods:{_onClick(){this.$emit("click")}}},[["render",function(t,a,o,n,s,i){return e.openBlock(),e.createElementBlock("text",{style:e.normalizeStyle({color:o.color,"font-size":i.iconSize}),class:e.normalizeClass(["uni-icons",["uniui-"+o.type,o.customPrefix,o.customPrefix?o.type:""]]),onClick:a[0]||(a[0]=(...e)=>i._onClick&&i._onClick(...e))},null,6)}],["__scopeId","data-v-4b2c0a25"]]);function ie(e){let t="";for(let a in e){t+=`${a}:${e[a]};`}return t}const re=a({name:"uni-easyinput",emits:["click","iconClick","update:modelValue","input","focus","blur","confirm","clear","eyes","change"],model:{prop:"modelValue",event:"update:modelValue"},options:{virtualHost:!0},inject:{form:{from:"uniForm",default:null},formItem:{from:"uniFormItem",default:null}},props:{name:String,value:[Number,String],modelValue:[Number,String],type:{type:String,default:"text"},clearable:{type:Boolean,default:!0},autoHeight:{type:Boolean,default:!1},placeholder:{type:String,default:" "},placeholderStyle:String,focus:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},maxlength:{type:[Number,String],default:140},confirmType:{type:String,default:"done"},clearSize:{type:[Number,String],default:24},inputBorder:{type:Boolean,default:!0},prefixIcon:{type:String,default:""},suffixIcon:{type:String,default:""},trim:{type:[Boolean,String],default:!0},passwordIcon:{type:Boolean,default:!0},primaryColor:{type:String,default:"#2979ff"},styles:{type:Object,default:()=>({color:"#333",disableColor:"#F7F6F6",borderColor:"#e5e5e5"})},errorMessage:{type:[String,Boolean],default:""}},data:()=>({focused:!1,val:"",showMsg:"",border:!1,isFirstBorder:!1,showClearIcon:!1,showPassword:!1,focusShow:!1,localMsg:""}),computed:{isVal(){const e=this.val;return!(!e&&0!==e)},msg(){return this.localMsg||this.errorMessage},inputMaxlength(){return Number(this.maxlength)},boxStyle(){return`color:${this.inputBorder&&this.msg?"#e43d33":this.styles.color};`},inputContentClass(){return function(e){let t="";for(let a in e)e[a]&&(t+=`${a} `);return t}({"is-input-border":this.inputBorder,"is-input-error-border":this.inputBorder&&this.msg,"is-textarea":"textarea"===this.type,"is-disabled":this.disabled})},inputContentStyle(){const e=this.focusShow?this.primaryColor:this.styles.borderColor;return ie({"border-color":(this.inputBorder&&this.msg?"#dd524d":e)||"#e5e5e5","background-color":this.disabled?this.styles.disableColor:this.styles.backgroundColor})},inputStyle(){return ie({"padding-right":"password"===this.type||this.clearable||this.prefixIcon?"":"10px","padding-left":this.prefixIcon?"":"10px"})}},watch:{value(e){this.val=e},modelValue(e){this.val=e},focus(e){this.$nextTick((()=>{this.focused=this.focus,this.focusShow=this.focus}))}},created(){this.init(),this.form&&this.formItem&&this.$watch("formItem.errMsg",(e=>{this.localMsg=e}))},mounted(){this.$nextTick((()=>{this.focused=this.focus,this.focusShow=this.focus}))},methods:{init(){this.value||0===this.value?this.val=this.value:this.modelValue||0===this.modelValue?this.val=this.modelValue:this.val=null},onClickIcon(e){this.$emit("iconClick",e)},onEyes(){this.showPassword=!this.showPassword,this.$emit("eyes",this.showPassword)},onInput(e){let t=e.detail.value;this.trim&&("boolean"==typeof this.trim&&this.trim&&(t=this.trimStr(t)),"string"==typeof this.trim&&(t=this.trimStr(t,this.trim))),this.errMsg&&(this.errMsg=""),this.val=t,this.$emit("input",t),this.$emit("update:modelValue",t)},onFocus(){this.$nextTick((()=>{this.focused=!0})),this.$emit("focus",null)},_Focus(e){this.focusShow=!0,this.$emit("focus",e)},onBlur(){this.focused=!1,this.$emit("focus",null)},_Blur(e){if(e.detail.value,this.focusShow=!1,this.$emit("blur",e),this.$emit("change",this.val),this.form&&this.formItem){const{validateTrigger:e}=this.form;"blur"===e&&this.formItem.onFieldChange()}},onConfirm(e){this.$emit("confirm",this.val),this.$emit("change",this.val)},onClear(e){this.val="",this.$emit("input",""),this.$emit("update:modelValue",""),this.$emit("clear")},trimStr:(e,t="both")=>"both"===t?e.trim():"left"===t?e.trimLeft():"right"===t?e.trimRight():"start"===t?e.trimStart():"end"===t?e.trimEnd():"all"===t?e.replace(/\s+/g,""):e}},[["render",function(t,a,o,n,s,i){const r=c(e.resolveDynamicComponent("uni-icons"),se);return e.openBlock(),e.createElementBlock("view",{class:e.normalizeClass(["uni-easyinput",{"uni-easyinput-error":i.msg}]),style:e.normalizeStyle(i.boxStyle)},[e.createElementVNode("view",{class:e.normalizeClass(["uni-easyinput__content",i.inputContentClass]),style:e.normalizeStyle(i.inputContentStyle)},[e.renderSlot(t.$slots,"prefixIcon",{},(()=>[o.prefixIcon?(e.openBlock(),e.createBlock(r,{key:0,class:"content-clear-icon",type:o.prefixIcon,color:"#c0c4cc",onClick:a[0]||(a[0]=e=>i.onClickIcon("prefix")),size:"22"},null,8,["type"])):e.createCommentVNode("",!0)]),!0),"textarea"===o.type?(e.openBlock(),e.createElementBlock("textarea",{key:0,class:e.normalizeClass(["uni-easyinput__content-textarea",{"input-padding":o.inputBorder}]),name:o.name,value:s.val,placeholder:o.placeholder,placeholderStyle:o.placeholderStyle,disabled:o.disabled,"placeholder-class":"uni-easyinput__placeholder-class",maxlength:i.inputMaxlength,focus:s.focused,autoHeight:o.autoHeight,onInput:a[1]||(a[1]=(...e)=>i.onInput&&i.onInput(...e)),onBlur:a[2]||(a[2]=(...e)=>i._Blur&&i._Blur(...e)),onFocus:a[3]||(a[3]=(...e)=>i._Focus&&i._Focus(...e)),onConfirm:a[4]||(a[4]=(...e)=>i.onConfirm&&i.onConfirm(...e))},null,42,["name","value","placeholder","placeholderStyle","disabled","maxlength","focus","autoHeight"])):(e.openBlock(),e.createElementBlock("input",{key:1,type:"password"===o.type?"text":o.type,class:"uni-easyinput__content-input",style:e.normalizeStyle(i.inputStyle),name:o.name,value:s.val,password:!s.showPassword&&"password"===o.type,placeholder:o.placeholder,placeholderStyle:o.placeholderStyle,"placeholder-class":"uni-easyinput__placeholder-class",disabled:o.disabled,maxlength:i.inputMaxlength,focus:s.focused,confirmType:o.confirmType,onFocus:a[5]||(a[5]=(...e)=>i._Focus&&i._Focus(...e)),onBlur:a[6]||(a[6]=(...e)=>i._Blur&&i._Blur(...e)),onInput:a[7]||(a[7]=(...e)=>i.onInput&&i.onInput(...e)),onConfirm:a[8]||(a[8]=(...e)=>i.onConfirm&&i.onConfirm(...e))},null,44,["type","name","value","password","placeholder","placeholderStyle","disabled","maxlength","focus","confirmType"])),"password"===o.type&&o.passwordIcon?(e.openBlock(),e.createElementBlock(e.Fragment,{key:2},[i.isVal?(e.openBlock(),e.createBlock(r,{key:0,class:e.normalizeClass(["content-clear-icon",{"is-textarea-icon":"textarea"===o.type}]),type:s.showPassword?"eye-slash-filled":"eye-filled",size:22,color:s.focusShow?o.primaryColor:"#c0c4cc",onClick:i.onEyes},null,8,["class","type","color","onClick"])):e.createCommentVNode("",!0)],64)):o.suffixIcon||t.$slots.suffixIcon?e.renderSlot(t.$slots,"suffixIcon",{key:3},(()=>[o.suffixIcon?(e.openBlock(),e.createBlock(r,{key:0,class:"content-clear-icon",type:o.suffixIcon,color:"#c0c4cc",onClick:a[9]||(a[9]=e=>i.onClickIcon("suffix")),size:"22"},null,8,["type"])):e.createCommentVNode("",!0)]),!0):(e.openBlock(),e.createElementBlock(e.Fragment,{key:4},[o.clearable&&i.isVal&&!o.disabled&&"textarea"!==o.type?(e.openBlock(),e.createBlock(r,{key:0,class:e.normalizeClass(["content-clear-icon",{"is-textarea-icon":"textarea"===o.type}]),type:"clear",size:o.clearSize,color:i.msg?"#dd524d":s.focusShow?o.primaryColor:"#c0c4cc",onClick:i.onClear},null,8,["class","size","color","onClick"])):e.createCommentVNode("",!0)],64)),e.renderSlot(t.$slots,"right",{},void 0,!0)],6)],6)}],["__scopeId","data-v-9d8a5598"]]);var le={email:/^\S+?@\S+?\.\S+?$/,idcard:/^[1-9]\d{5}(18|19|([23]\d))\d{2}((0[1-9])|(10|11|12))(([0-2][1-9])|10|20|30|31)\d{3}[0-9Xx]$/,url:new RegExp("^(?!mailto:)(?:(?:http|https|ftp)://|//)(?:\\S+(?::\\S*)?@)?(?:(?:(?:[1-9]\\d?|1\\d\\d|2[01]\\d|22[0-3])(?:\\.(?:1?\\d{1,2}|2[0-4]\\d|25[0-5])){2}(?:\\.(?:[0-9]\\d?|1\\d\\d|2[0-4]\\d|25[0-4]))|(?:(?:[a-z\\u00a1-\\uffff0-9]+-*)*[a-z\\u00a1-\\uffff0-9]+)(?:\\.(?:[a-z\\u00a1-\\uffff0-9]+-*)*[a-z\\u00a1-\\uffff0-9]+)*(?:\\.(?:[a-z\\u00a1-\\uffff]{2,})))|localhost)(?::\\d{2,5})?(?:(/|\\?|#)[^\\s]*)?$","i")};const ce={int:"integer",bool:"boolean",double:"number",long:"number",password:"string"};function ue(e,t=""){["label"].forEach((t=>{void 0===e[t]&&(e[t]="")}));let a=t;for(let o in e){let t=new RegExp("{"+o+"}");a=a.replace(t,e[o])}return a}const de={integer:e=>de.number(e)&&parseInt(e,10)===e,string:e=>"string"==typeof e,number:e=>!isNaN(e)&&"number"==typeof e,boolean:function(e){return"boolean"==typeof e},float:function(e){return de.number(e)&&!de.integer(e)},array:e=>Array.isArray(e),object:e=>"object"==typeof e&&!de.array(e),date:e=>e instanceof Date,timestamp(e){return!(!this.integer(e)||Math.abs(e).toString().length>16)},file:e=>"string"==typeof e.url,email:e=>"string"==typeof e&&!!e.match(le.email)&&e.length<255,url:e=>"string"==typeof e&&!!e.match(le.url),pattern(e,t){try{return new RegExp(e).test(t)}catch(Qt){return!1}},method:e=>"function"==typeof e,idcard:e=>"string"==typeof e&&!!e.match(le.idcard),"url-https"(e){return this.url(e)&&e.startsWith("https://")},"url-scheme":e=>e.startsWith("://"),"url-web":e=>!1};class me{constructor(e){this._message=e}async validateRule(e,t,a,o,n){var s=null;let i=t.rules;if(i.findIndex((e=>e.required))<0){if(null==a)return s;if("string"==typeof a&&!a.length)return s}var r=this._message;if(void 0===i)return r.default;for(var l=0;l<i.length;l++){let c=i[l],u=this._getValidateType(c);if(Object.assign(c,{label:t.label||`["${e}"]`}),pe[u]&&null!=(s=pe[u](c,a,r)))break;if(c.validateExpr){let e=Date.now();if(!1===c.validateExpr(a,n,e)){s=this._getMessage(c,c.errorMessage||this._message.default);break}}if(c.validateFunction&&null!==(s=await this.validateFunction(c,a,o,n,u)))break}return null!==s&&(s=r.TAG+s),s}async validateFunction(e,t,a,o,n){let s=null;try{let i=null;const r=await e.validateFunction(e,t,o||a,(e=>{i=e}));(i||"string"==typeof r&&r||!1===r)&&(s=this._getMessage(e,i||r,n))}catch(Qt){s=this._getMessage(e,Qt.message,n)}return s}_getMessage(e,t,a){return ue(e,t||e.errorMessage||this._message[a]||t.default)}_getValidateType(e){var t="";return e.required?t="required":e.format?t="format":e.arrayType?t="arrayTypeFormat":e.range?t="range":void 0!==e.maximum||void 0!==e.minimum?t="rangeNumber":void 0!==e.maxLength||void 0!==e.minLength?t="rangeLength":e.pattern?t="pattern":e.validateFunction&&(t="validateFunction"),t}}const pe={required:(e,t,a)=>e.required&&function(e,t){return null==e||"string"==typeof e&&!e||!(!Array.isArray(e)||e.length)||"object"===t&&!Object.keys(e).length}(t,e.format||typeof t)?ue(e,e.errorMessage||a.required):null,range(e,t,a){const{range:o,errorMessage:n}=e;let s=new Array(o.length);for(let r=0;r<o.length;r++){const e=o[r];de.object(e)&&void 0!==e.value?s[r]=e.value:s[r]=e}let i=!1;return Array.isArray(t)?i=new Set(t.concat(s)).size===s.length:s.indexOf(t)>-1&&(i=!0),i?null:ue(e,n||a.enum)},rangeNumber(e,t,a){if(!de.number(t))return ue(e,e.errorMessage||a.pattern.mismatch);let{minimum:o,maximum:n,exclusiveMinimum:s,exclusiveMaximum:i}=e,r=s?t<=o:t<o,l=i?t>=n:t>n;return void 0!==o&&r?ue(e,e.errorMessage||a.number[s?"exclusiveMinimum":"minimum"]):void 0!==n&&l?ue(e,e.errorMessage||a.number[i?"exclusiveMaximum":"maximum"]):void 0!==o&&void 0!==n&&(r||l)?ue(e,e.errorMessage||a.number.range):null},rangeLength(e,t,a){if(!de.string(t)&&!de.array(t))return ue(e,e.errorMessage||a.pattern.mismatch);let o=e.minLength,n=e.maxLength,s=t.length;return void 0!==o&&s<o?ue(e,e.errorMessage||a.length.minLength):void 0!==n&&s>n?ue(e,e.errorMessage||a.length.maxLength):void 0!==o&&void 0!==n&&(s<o||s>n)?ue(e,e.errorMessage||a.length.range):null},pattern:(e,t,a)=>de.pattern(e.pattern,t)?null:ue(e,e.errorMessage||a.pattern.mismatch),format(e,t,a){var o=Object.keys(de),n=ce[e.format]?ce[e.format]:e.format||e.arrayType;return o.indexOf(n)>-1&&!de[n](t)?ue(e,e.errorMessage||a.typeError):null},arrayTypeFormat(e,t,a){if(!Array.isArray(t))return ue(e,e.errorMessage||a.typeError);for(let o=0;o<t.length;o++){const n=t[o];let s=this.format(e,n,a);if(null!==s)return s}return null}};class he extends me{constructor(e,t){super(he.message),this._schema=e,this._options=t||null}updateSchema(e){this._schema=e}async validate(e,t){let a=this._checkFieldInSchema(e);return a||(a=await this.invokeValidate(e,!1,t)),a.length?a[0]:null}async validateAll(e,t){let a=this._checkFieldInSchema(e);return a||(a=await this.invokeValidate(e,!0,t)),a}async validateUpdate(e,t){let a=this._checkFieldInSchema(e);return a||(a=await this.invokeValidateUpdate(e,!1,t)),a.length?a[0]:null}async invokeValidate(e,t,a){let o=[],n=this._schema;for(let s in n){let i=n[s],r=await this.validateRule(s,i,e[s],e,a);if(null!=r&&(o.push({key:s,errorMessage:r}),!t))break}return o}async invokeValidateUpdate(e,t,a){let o=[];for(let n in e){let s=await this.validateRule(n,this._schema[n],e[n],e,a);if(null!=s&&(o.push({key:n,errorMessage:s}),!t))break}return o}_checkFieldInSchema(e){var t=Object.keys(e),a=Object.keys(this._schema);if(new Set(t.concat(a)).size===a.length)return"";var o=t.filter((e=>a.indexOf(e)<0));return[{key:"invalid",errorMessage:ue({field:JSON.stringify(o)},he.message.TAG+he.message.defaultInvalid)}]}}he.message=new function(){return{TAG:"",default:"验证错误",defaultInvalid:"提交的字段{field}在数据库中并不存在",validateFunction:"验证无效",required:"{label}必填",enum:"{label}超出范围",timestamp:"{label}格式无效",whitespace:"{label}不能为空",typeError:"{label}类型无效",date:{format:"{label}日期{value}格式无效",parse:"{label}日期无法解析,{value}无效",invalid:"{label}日期{value}无效"},length:{minLength:"{label}长度不能少于{minLength}",maxLength:"{label}长度不能超过{maxLength}",range:"{label}必须介于{minLength}和{maxLength}之间"},number:{minimum:"{label}不能小于{minimum}",maximum:"{label}不能大于{maximum}",exclusiveMinimum:"{label}不能小于等于{minimum}",exclusiveMaximum:"{label}不能大于等于{maximum}",range:"{label}必须介于{minimum}and{maximum}之间"},pattern:{mismatch:"{label}格式不匹配"}}};const ge=(e,t,a)=>{const o=a.find((e=>{return e.format&&("int"===(t=e.format)||"double"===t||"number"===t||"timestamp"===t);var t})),n=a.find((e=>e.format&&"boolean"===e.format||"bool"===e.format));return o&&(t=t||0===t?be(Number(t))?Number(t):t:null),n&&(t=!!Ne(t)&&t),t},fe=(e,t)=>we(t,e),ye=(e,t={})=>{const a=_e(e);if("object"==typeof a&&Array.isArray(a)&&a.length>1){return a.reduce(((e,t)=>e+`#${t}`),"_formdata_")}return a[0]||e},ve=e=>{let t=e.replace("_formdata_#","");return t=t.split("#").map((e=>be(e)?Number(e):e)),t},ke=(e,t,a)=>("object"!=typeof e||_e(t).reduce(((e,t,o,n)=>o===n.length-1?(e[t]=a,null):(t in e||(e[t]=/^[0-9]{1,}$/.test(n[o+1])?[]:{}),e[t])),e),e);function _e(e){return Array.isArray(e)?e:e.replace(/\[/g,".").replace(/\]/g,"").split(".")}const we=(e,t,a="undefined")=>{let o=_e(t).reduce(((e,t)=>(e||{})[t]),e);return o&&void 0===o?a:o},be=e=>!isNaN(Number(e)),Ne=e=>"boolean"==typeof e;const Ee=a({name:"uniForms",emits:["validate","submit"],options:{virtualHost:!0},props:{value:{type:Object,default:()=>null},modelValue:{type:Object,default:()=>null},model:{type:Object,default:()=>null},rules:{type:Object,default:()=>({})},errShowType:{type:String,default:"undertext"},validateTrigger:{type:String,default:"submit"},labelPosition:{type:String,default:"left"},labelWidth:{type:[String,Number],default:""},labelAlign:{type:String,default:"left"},border:{type:Boolean,default:!1}},provide(){return{uniForm:this}},data:()=>({formData:{},formRules:{}}),computed:{localData(){const e=this.model||this.modelValue||this.value;return e?(t=e,JSON.parse(JSON.stringify(t))):{};var t}},watch:{rules:{handler:function(e,t){this.setRules(e)},deep:!0,immediate:!0}},created(){getApp().$vm.$.appContext.config.globalProperties.binddata||(getApp().$vm.$.appContext.config.globalProperties.binddata=function(e,t,a){if(a)this.$refs[a].setValue(e,t);else{let a;for(let e in this.$refs){const t=this.$refs[e];if(t&&t.$options&&"uniForms"===t.$options.name){a=t;break}}if(!a)return console.error("当前 uni-froms 组件缺少 ref 属性");a.setValue(e,t)}}),this.childrens=[],this.inputChildrens=[],this.setRules(this.rules)},methods:{setRules(e){this.formRules=Object.assign({},this.formRules,e),this.validator=new he(e)},setValue(e,t){let a=this.childrens.find((t=>t.name===e));return a?(this.formData[e]=ge(0,t,this.formRules[e]&&this.formRules[e].rules||[]),a.onFieldChange(this.formData[e])):null},validate(e,t){return this.checkAll(this.formData,e,t)},validateField(e=[],t){e=[].concat(e);let a={};return this.childrens.forEach((t=>{const o=ye(t.name);-1!==e.indexOf(o)&&(a=Object.assign({},a,{[o]:this.formData[o]}))})),this.checkAll(a,[],t)},clearValidate(e=[]){e=[].concat(e),this.childrens.forEach((t=>{if(0===e.length)t.errMsg="";else{const a=ye(t.name);-1!==e.indexOf(a)&&(t.errMsg="")}}))},submit(e,t,a){for(let o in this.dataValue){this.childrens.find((e=>e.name===o))&&void 0===this.formData[o]&&(this.formData[o]=this._getValue(o,this.dataValue[o]))}return a||console.warn("submit 方法即将废弃,请使用validate方法代替!"),this.checkAll(this.formData,e,t,"submit")},async checkAll(e,t,a,o){if(!this.validator)return;let n,s=[];for(let c in e){const e=this.childrens.find((e=>ye(e.name)===c));e&&s.push(e)}a||"function"!=typeof t||(a=t),!a&&"function"!=typeof a&&Promise&&(n=new Promise(((e,t)=>{a=function(a,o){a?t(a):e(o)}})));let i=[],r=JSON.parse(JSON.stringify(e));for(let c in s){const e=s[c];let t=ye(e.name);const a=await e.onFieldChange(r[t]);if(a&&(i.push(a),"toast"===this.errShowType||"modal"===this.errShowType))break}Array.isArray(i)&&0===i.length&&(i=null),Array.isArray(t)&&t.forEach((e=>{let t=ye(e),a=fe(e,this.localData);void 0!==a&&(r[t]=a)})),"submit"===o?this.$emit("submit",{detail:{value:r,errors:i}}):this.$emit("validate",i);let l={};return l=((e={},t)=>{let a=JSON.parse(JSON.stringify(e)),o={};for(let n in a){let e=ve(n);ke(o,e,a[n])}return o})(r,this.name),a&&"function"==typeof a&&a(i,l),n&&a?n:null},validateCheck(e){this.$emit("validate",e)},_getValue:ge,_isRequiredField:e=>{let t=!1;for(let a=0;a<e.length;a++){if(e[a].required){t=!0;break}}return t},_setDataValue:(e,t,a)=>(t[e]=a,a||""),_getDataValue:fe,_realName:ye,_isRealName:e=>/^_formdata_#*/.test(e),_isEqual:(e,t)=>{if(e===t)return 0!==e||1/e==1/t;if(null==e||null==t)return e===t;var a=toString.call(e);if(a!==toString.call(t))return!1;switch(a){case"[object RegExp]":case"[object String]":return""+e==""+t;case"[object Number]":return+e!=+e?+t!=+t:0==+e?1/+e==1/t:+e==+t;case"[object Date]":case"[object Boolean]":return+e==+t}if("[object Object]"==a){var o=Object.getOwnPropertyNames(e),n=Object.getOwnPropertyNames(t);if(o.length!=n.length)return!1;for(var s=0;s<o.length;s++){var i=o[s];if(e[i]!==t[i])return!1}return!0}return"[object Array]"==a?e.toString()==t.toString():void 0}}},[["render",function(t,a,o,n,s,i){return e.openBlock(),e.createElementBlock("view",{class:"uni-forms"},[e.createElementVNode("form",null,[e.renderSlot(t.$slots,"default",{},void 0,!0)])])}],["__scopeId","data-v-13c326f0"]]),xe=e.defineComponent({__name:"login",setup(a){const o=e.ref(!1),n=e.ref(""),s=e.reactive({captcha_id:"f2dd39ce-0d3e-4c1e-916c-b50090a7590s"});h((()=>{i()}));const i=async()=>{const e=await(t=s.captcha_id,U({method:"GET",url:`/api/common/captcha?server=1&id=${t}&m=`+Math.random(),responseType:"arraybuffer"}));var t;const a=new Uint8Array(e),o="data:image/png;base64,"+uni.arrayBufferToBase64(a);n.value=o},r=e.ref({account:"admin",password:"",captcha:""}),u=async()=>{if(o.value)return!1;if(""==r.value.account)return void uni.showToast({icon:"none",position:"bottom",title:"用户名不能为空"});if(""==r.value.password)return void uni.showToast({icon:"none",position:"bottom",title:"密码不能为空"});if(r.value.password.length<6)return void uni.showToast({icon:"none",position:"bottom",title:"密码长度不能小于6位"});o.value=!0;const e={username:r.value.account,password:r.value.password,captcha:r.value.captcha,keep:!0,loading:!0,captcha_id:s.captcha_id},t=await(e=>U({method:"POST",url:"/admin/index/login",data:e}))(e);var a;o.value=!1,1===t.code?(a=t.data.userInfo,O().setProfile(a),uni.showToast({icon:"success",title:"登录成功"}),l("log","at pages/login/login.vue:28","登录成功",a),setTimeout((()=>{uni.navigateBack()}),500)):(uni.showToast({title:t.msg,icon:"none"}),i())};return(a,s)=>{const l=c(e.resolveDynamicComponent("uni-icons"),se),d=c(e.resolveDynamicComponent("uni-easyinput"),re),m=c(e.resolveDynamicComponent("uni-forms"),Ee);return e.openBlock(),e.createElementBlock("view",{class:"viewport"},[e.createElementVNode("view",{class:"logo"},[e.createElementVNode("image",{src:t})]),e.createElementVNode("view",{class:"login"},[e.createElementVNode("view",{class:"input-box padding-lr"},[e.createVNode(m,{modelValue:r.value},{default:e.withCtx((()=>[e.createElementVNode("view",{class:"cu-form-group margin-top"},[e.createVNode(l,{class:"uni-icon",type:"person",size:"30",color:"#999"}),e.createVNode(d,{placeholder:"账号",modelValue:r.value.account,"onUpdate:modelValue":s[0]||(s[0]=e=>r.value.account=e)},null,8,["modelValue"])]),e.createElementVNode("view",{class:"cu-form-group"},[e.createVNode(l,{class:"uni-icon",type:"locked",size:"30",color:"#999"}),e.createVNode(d,{placeholder:"密码",type:"password",modelValue:r.value.password,"onUpdate:modelValue":s[1]||(s[1]=e=>r.value.password=e)},null,8,["modelValue"])]),e.createElementVNode("view",{class:"cu-form-group solid-bottom"},[e.createVNode(l,{class:"uni-icon",type:"more-filled",size:"30",color:"#999"}),e.createVNode(d,{placeholder:"验证码",modelValue:r.value.captcha,"onUpdate:modelValue":s[2]||(s[2]=e=>r.value.captcha=e)},null,8,["modelValue"]),e.createElementVNode("image",{class:"cu-btn captchaImg",src:n.value,onClick:i},null,8,["src"])])])),_:1},8,["modelValue"])]),e.createElementVNode("button",{onClick:u,class:"button phone",loading:o.value},"登录",8,["loading"]),e.createElementVNode("view",{class:"tips"},"登录/注册即视为你同意《服务条款》和《英途仓库隐私协议》")])])}}}),Ce=(e,t)=>U({method:"GET",url:e,data:t}),Ve=e.defineComponent({__name:"hot",props:{type:{}},setup(t){const a=t,o=[{type:"1",title:"特惠推荐",url:"/hot/preference"},{type:"2",title:"爆款推荐",url:"/hot/inVogue"},{type:"3",title:"一站买全",url:"/hot/oneStop"},{type:"4",title:"新鲜好物",url:"/hot/new"}].find((e=>e.type===a.type));uni.setNavigationBarTitle({title:o.title});const n=e.ref(""),s=e.ref([]),i=e.ref(0);h((()=>{(async()=>{const e=await Ce(o.url,{page:1,pageSize:10});n.value=e.result.bannerPicture,s.value=e.result.subTypes})()}));const r=async()=>{const e=s.value[i.value];if(!(e.goodsItems.page<e.goodsItems.pages))return e.finish=!0,uni.showToast({icon:"none",title:"没有更多数据了~"});e.goodsItems.page++;const t=(await Ce(o.url,{subType:e.id,page:e.goodsItems.page,pageSize:e.goodsItems.pageSize})).result.subTypes[i.value];e.goodsItems.items.push(...t.goodsItems.items)};return(t,a)=>(e.openBlock(),e.createElementBlock("view",{class:"viewport"},[e.createElementVNode("view",{class:"cover"},[e.createElementVNode("image",{class:"image",mode:"widthFix",src:n.value},null,8,["src"])]),e.createElementVNode("view",{class:"tabs"},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s.value,((t,a)=>(e.openBlock(),e.createElementBlock("text",{key:t.id,class:e.normalizeClass(["text",{active:a===i.value}]),onClick:e=>i.value=a},e.toDisplayString(t.title),11,["onClick"])))),128))]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s.value,((t,a)=>e.withDirectives((e.openBlock(),e.createElementBlock("scroll-view",{"enable-back-to-top":"",key:t.id,"scroll-y":"",class:"scroll-view",onScrolltolower:r},[e.createElementVNode("view",{class:"goods"},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.goodsItems.items,(t=>(e.openBlock(),e.createElementBlock("navigator",{"hover-class":"none",class:"navigator",key:t.id,url:`/pages/goods/goods?id=${t.id}`},[e.createElementVNode("image",{class:"thumb",src:t.picture},null,8,["src"]),e.createElementVNode("view",{class:"name ellipsis"},e.toDisplayString(t.name),1),e.createElementVNode("view",{class:"price"},[e.createElementVNode("text",{class:"symbol"},"¥"),e.createElementVNode("text",{class:"number"},e.toDisplayString(t.price),1)])],8,["url"])))),128))]),e.createElementVNode("view",{class:"loading-text"},e.toDisplayString(t.finish?"没有更多数据了~":"正在加载..."),1)],32)),[[e.vShow,i.value===a]]))),128))]))}});var Se,Be={};const Te={name:"vk-data-goods-sku-popup",emits:["update:modelValue","input","update-goods","open","close","add-cart","buy-now","cart","buy","num-change"],props:{value:{Type:Boolean,default:!1},modelValue:{Type:Boolean,default:!1},goodsId:{Type:String,default:""},action:{Type:String,default:""},noStockText:{Type:String,default:"该商品已抢完"},stockText:{Type:String,default:"库存"},goodsIdName:{Type:String,default:"_id"},skuIdName:{Type:String,default:"_id"},skuListName:{Type:String,default:"sku_list"},specListName:{Type:String,default:"spec_list"},stockName:{Type:String,default:"stock"},skuArrName:{Type:String,default:"sku_name_arr"},defaultSingleSkuName:{Type:String,default:"默认"},mode:{Type:Number,default:1},maskCloseAble:{Type:Boolean,default:!0},borderRadius:{Type:[String,Number],default:0},goodsThumbName:{Type:[String],default:"goods_thumb"},goodsThumbBackgroundColor:{Type:String,default:"transparent"},minBuyNum:{Type:[Number,String],default:1},maxBuyNum:{Type:[Number,String],default:1e5},stepBuyNum:{Type:[Number,String],default:1},stepStrictly:{Type:Boolean,default:!1},customAction:{Type:[Function],default:null},localdata:{type:Object},priceColor:{Type:String},buyNowText:{Type:String,default:"立即购买"},buyNowColor:{Type:String},buyNowBackgroundColor:{Type:String},addCartText:{Type:String,default:"加入购物车"},addCartColor:{Type:String},addCartBackgroundColor:{Type:String},disableStyle:{Type:Object,default:null},activedStyle:{Type:Object,default:null},btnStyle:{Type:Object,default:null},showClose:{Type:Boolean,default:!0},closeImage:{Type:String,default:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACoAAAAqCAYAAADFw8lbAAAEyUlEQVR42sSZeWwNURTGp4OqtBo7sSXELragdkpQsRRJ1Zr4hyJiJ9YgxNIg1qANiT+E1i5IY0kVVWtQEbuEKLFGUSH27/ANN5PXmTvzupzkl/tm8t6b7517lnvvC0lKSjJ8WmnQAUSDFqABqALKgl8gD7wE90E2SAeXwFf1SxISErQeVtKHwCgwFsSDSIf3hYFKoCkYDBaDdyAViHdueHmoF6FtwDLQ23b/E7gM7oIcejIERIDaoBFoC8qA8mA8SQNz6W1XC9GY+nCQCCYAk/c+gF0gBZwH312+IxR0BCPBUIaH2A+wHsxHCHxx+gLT5QGN6a2JfG8uvVCDws9oiDQYlxkMGfHyQvARlADTwcXk5OT6foV2kS8ATXidymlcyen1a/Jjl9IJh3hPkjELYqO8Cu0KjjNZvtETw5jFBWXPmGSTGQKSeOn5iQ0kVLL0CINfPNcPbDMKyRCbGzEMBJ+ZD8cChYFdqGTqfsWT8otPGoVsEHsMwxDFs3shNsxJ6BrQ0Po8OGUUkVHsNCVml+cntB1jUWwn2GEUsTEMrASbDK+2CCQ0kYX6nfLLisMmKqUr0S60M+jG10vAm+JSCa8+x7CKlzHwaktV6DiObzUzPJIxFO1BQ12wGtTReO9GetVgY/kjNJzZbcWmTjHfxw51AsRqvL8eOAtmsJuFu3g1l+1ZLB5eDTVZ3K0P7tL0TkWOpSg61kVkBtuuNRthGs+wtJST5aQI7cEbkkRXNYVKgX6kIdYuUhYzMQwxN8tiExCLFqHNeSF9/aem0BzGp5PYQCJ7c/Gsk1RfuSD6U1dNpcDf9ZigTmKbMRZ9iVTsHscGJluW2FMf1SSQWGnBmaB6kCJVTVVNJZE++Cx9drEllS1KMCINpURFmEbBWA63Fz9s95cGIdJgp/zXmT4pZcOvSUzuZttTbblmnc3PIjjmidDXvKgdhMh0JdbzuCjWrbNOVovjS5P7bkPJ/mBESkz2BO0166ybNeJ431S2q+01NntuIq3E0amzjiZtk9tssWyTDzO4525bACK9NAUn68TtkNhpEXpOSagRml+S6iLSSeweHv242Qhl13rRyvoDvDlKyTQny/ZQJ+1iH7vVbEx7OR5UiKVIO7VicgvHCtwrudloMIV7/0uadVYW57O4Wvvi8v4pymlKkrpwvsDeLLZAY2pkwbAB3PSQfC+4cH7l4k1ZH8zkZRq8ecO+Z5rN40JJqnXFuGfaxPCTLjcn0OZOpnArXw8HY4paIbw5CcMgXq6HN2/mt6+XGLrN15tBryIUGavMpCTrfKcDCKkAceA9S8nhAOehhSUyhXpkBxxnP4YM1InugP7cBkjBPcqVUWFYCEROxXiQz5JlXV+IfKh7mpfJac+lZ6V87QXVClBkTc7YWsWTPSDyitfzUTlJlj8TbvE6jluDOdwZ+jX57GLO3ADeuyZrDYi86vV81FD2UVGsmT+5Zl0BnkhoseOEaogL46pqO4v/IqUEyalIR4h85BgjHv6+aUWRMbb7EstX6O0cpT1Gco0ry8fWygLDMjmDnQeBt3Qe7uVfkeugDwVLcsVzGsuwLXbV+I63XNAkG5r/hvgRqgqWs6pJPKrsbvz/Q6yyun0w/h6lP+BnzrCpfPMT2L8FGAA7k1GZ/vnaqAAAAABJRU5ErkJggg=="},hideStock:{Type:Boolean,default:!1},theme:{Type:String,default:"default"},actionTips:{Type:String,default:"请求中..."},defaultSelect:{Type:Object},useCache:{Type:Boolean,default:!0},defaultGoods:{Type:Object},amountType:{Type:Number,default:1},selectedInit:{Type:Boolean,default:!1},safeAreaInsetBottom:{Type:Boolean,default:!0}},data(){return{safeBottom:0,complete:!1,goodsInfo:{},isShow:!1,initKey:!0,shopItemInfo:{},selectArr:[],subIndex:[],selectShop:{},selectNum:this.minBuyNum||1,outFoStock:!1,openTime:0,themeColor:{default:{priceColor:"rgb(254, 86, 10)",buyNowColor:"#ffffff",buyNowBackgroundColor:"rgb(254, 86, 10)",addCartColor:"#ffffff",addCartBackgroundColor:"rgb(255, 148, 2)",btnStyle:{color:"#333333",borderColor:"#f4f4f4",backgroundColor:"#ffffff"},activedStyle:{color:"rgb(254, 86, 10)",borderColor:"rgb(254, 86, 10)",backgroundColor:"rgba(254,86,10,0.1)"},disableStyle:{color:"#c3c3c3",borderColor:"#f6f6f6",backgroundColor:"#f6f6f6"}},"red-black":{priceColor:"rgb(255, 68, 68)",buyNowColor:"#ffffff",buyNowBackgroundColor:"rgb(255, 68, 68)",addCartColor:"#ffffff",addCartBackgroundColor:"rgb(85, 85, 85)",activedStyle:{color:"rgb(255, 68, 68)",borderColor:"rgb(255, 68, 68)",backgroundColor:"rgba(255,68,68,0.1)"}},"black-white":{priceColor:"rgb(47, 47, 52)",buyNowColor:"#ffffff",buyNowBackgroundColor:"rgb(47, 47, 52)",addCartColor:"rgb(47, 47, 52)",addCartBackgroundColor:"rgb(235, 236, 242)",activedStyle:{color:"rgb(47, 47, 52)",borderColor:"rgba(47,47,52,0.12)",backgroundColor:"rgba(47,47,52,0.12)"}},coffee:{priceColor:"rgb(195, 167, 105)",buyNowColor:"#ffffff",buyNowBackgroundColor:"rgb(195, 167, 105)",addCartColor:"rgb(195, 167, 105)",addCartBackgroundColor:"rgb(243, 238, 225)",activedStyle:{color:"rgb(195, 167, 105)",borderColor:"rgb(195, 167, 105)",backgroundColor:"rgba(195, 167, 105,0.1)"}},green:{priceColor:"rgb(99, 190, 114)",buyNowColor:"#ffffff",buyNowBackgroundColor:"rgb(99, 190, 114)",addCartColor:"rgb(99, 190, 114)",addCartBackgroundColor:"rgb(225, 244, 227)",activedStyle:{color:"rgb(99, 190, 114)",borderColor:"rgb(99, 190, 114)",backgroundColor:"rgba(99, 190, 114,0.1)"}}}}},created(){let e=this;Se=e.vk,e.valueCom&&e.open();const{safeAreaInsets:t}=uni.getSystemInfoSync();e.safeBottom=t.bottom},mounted(){},methods:{init(e){let t=this;t.selectArr=[],t.subIndex=[],t.selectShop={},t.selectNum=t.minBuyNum||1,t.outFoStock=!1,t.shopItemInfo={};let a=t.specListName;t.goodsInfo[a].map((e=>{t.selectArr.push(""),t.subIndex.push(-1)})),t.checkItem(),t.checkInpath(-1),e||t.autoClickSku()},findGoodsInfo(e={}){let t=this,{useCache:a}=e;if(void 0===Se)return t.toast("custom-action必须是function","none"),!1;let{actionTips:o}=t,n="",s=!1;"custom"!==o?n=a?"":"请求中...":s=!a,Se.callFunction({url:t.action,title:n,loading:s,data:{goods_id:t.goodsId},success(e){t.updateGoodsInfo(e.goodsInfo),Be[t.goodsId]=e.goodsInfo,t.$emit("update-goods",e.goodsInfo)},fail(){t.updateValue(!1)}})},updateValue(e){let t=this;e?(t.$emit("open",!0),t.$emit("input",!0),t.$emit("update:modelValue",!0)):(t.$emit("input",!1),t.$emit("close","close"),t.$emit("update:modelValue",!1))},updateGoodsInfo(e){let t=this,{skuListName:a}=t;"{}"===JSON.stringify(t.goodsInfo)||t.goodsInfo[t.goodsIdName]!==e[t.goodsIdName]?(t.goodsInfo=e,t.initKey=!0):t.goodsInfo[a]=e[a],t.initKey&&(t.initKey=!1,t.init());let o=t.getListItem(t.goodsInfo[a],t.skuIdName,t.selectShop[t.skuIdName]);Object.assign(t.selectShop,o),t.defaultSelectSku(),t.complete=!0},async open(){let e=this;e.openTime=(new Date).getTime();let t=!0;e.skuListName;let a=!1,o=Be[e.goodsId];if(o&&e.useCache?(a=!0,e.updateGoodsInfo(o)):e.complete=!1,e.customAction&&"function"==typeof e.customAction){try{o=await e.customAction({useCache:a,goodsId:e.goodsId,goodsInfo:o,close:function(){setTimeout((function(){e.close()}),500)}}).catch((t=>{setTimeout((function(){e.close()}),500)}))}catch(n){let{message:t=""}=n;if(t.indexOf(".catch is not a function")>-1)return e.toast("custom-action必须返回一个Promise","none"),setTimeout((function(){e.close()}),500),!1}if(Be[e.goodsId]=o,!o||"object"!=typeof o||"{}"==JSON.stringify(o))return e.toast("未获取到商品信息","none"),e.$emit("input",!1),!1;t=!1,e.updateGoodsInfo(o),e.updateValue(!0)}else if(void 0!==e.localdata&&null!==e.localdata){if(o=e.localdata,!o||"object"!=typeof o||"{}"==JSON.stringify(o))return e.toast("未获取到商品信息","none"),e.$emit("input",!1),!1;t=!1,e.updateGoodsInfo(o),e.updateValue(!0)}else t&&e.findGoodsInfo({useCache:a})},close(e){let t=this;if((new Date).getTime()-t.openTime<400)return!1;"mask"==e?!1!==t.maskCloseAble&&(t.$emit("input",!1),t.$emit("close","mask"),t.$emit("update:modelValue",!1)):(t.$emit("input",!1),t.$emit("close","close"),t.$emit("update:modelValue",!1))},moveHandle(){},skuClick(e,t,a){let o=this;e.ishow&&(o.selectArr[t]!=e.name?(o.$set(o.selectArr,t,e.name),o.$set(o.subIndex,t,a)):(o.$set(o.selectArr,t,""),o.$set(o.subIndex,t,-1)),o.checkInpath(t),o.checkSelectShop())},checkSelectShop(){let e=this;if(e.selectArr.every((e=>""!=e))){e.selectShop=e.shopItemInfo[e.getArrayToSting(e.selectArr)];let t=e.selectShop[e.stockName];void 0!==t&&e.selectNum>t&&(e.selectNum=t),e.selectNum>e.maxBuyNum&&(e.selectNum=e.maxBuyNum),e.selectNum<e.minBuyNum&&(e.selectNum=e.minBuyNum),e.selectedInit&&(e.selectNum=e.minBuyNum||1)}else e.selectShop={}},checkInpath(e){let t=this,a=t.specListName,o=t.goodsInfo[a];for(let n=0,s=o.length;n<s;n++){if(n==e)continue;let a=o[n].list.length;for(let e=0;e<a;e++){if(-1!=t.subIndex[n]&&e==t.subIndex[n])continue;let a=[...t.selectArr];t.$set(a,n,o[n].list[e].name);let s=a.filter((e=>""!==e&&void 0!==e));t.shopItemInfo.hasOwnProperty(t.getArrayToSting(s))?o[n].list[e].ishow=!0:o[n].list[e].ishow=!1}}t.$set(t.goodsInfo,a,o)},checkItem(){let e=this,{stockName:t}=e,a=e.skuListName,o=e.goodsInfo[a],n=[],s=0;o.map(((e,a)=>{e[t]>0&&(n.push(e),s+=e[t])})),s<=0&&(e.outFoStock=!0),n.reduce(((t,a)=>t.concat(a[e.skuArrName].reduce(((t,o)=>t.concat(t.map((t=>(e.shopItemInfo.hasOwnProperty(e.getArrayToSting([...t,o]))||(e.shopItemInfo[e.getArrayToSting([...t,o])]=a),[...t,o]))))),[[]]))),[[]])},getArrayToSting(e){let t="";return e.map(((e,a)=>{e=e.replace(/\./g,"。"),t+=0==a?e:","+e})),t},checkSelectComplete(e={}){let t=this,a=(new Date).getTime();if(t.clickTime&&a-t.clickTime<400)return!1;t.clickTime=a;let{selectShop:o,selectNum:n,stockText:s,stockName:i}=t;return o&&o[t.skuIdName]?n<=0?(t.toast("购买数量必须>0","none"),!1):n>o[i]?(t.toast(s+"不足","none"),!1):void("function"==typeof e.success&&e.success(o)):(t.toast("请先选择对应规格","none"),!1)},addCart(){let e=this;e.checkSelectComplete({success:function(t){t.buy_num=e.selectNum,e.$emit("add-cart",t),e.$emit("cart",t)}})},buyNow(){let e=this;e.checkSelectComplete({success:function(t){t.buy_num=e.selectNum,e.$emit("buy-now",t),e.$emit("buy",t)}})},toast(e,t){uni.showToast({title:e,icon:t})},getListItem(e,t,a){let o;for(let n in e)if("object"==typeof a){if(JSON.stringify(e[n][t])===JSON.stringify(a)){o=e[n];break}}else if(e[n][t]===a){o=e[n];break}return o},getListIndex(e,t,a){let o=-1;for(let n=0;n<e.length;n++)if(e[n][t]===a){o=n;break}return o},autoClickSku(){let e=this,{stockName:t}=e,a=e.goodsInfo[e.skuListName],o=e.goodsInfo[e.specListName];if(1==o.length){let n=o[0].list;for(let o=0;o<n.length;o++){let s=e.getListItem(a,e.skuArrName,[n[o].name]);if(s&&s[t]>0){e.skuClick(n[o],0,o);break}}}},themeColorFn(e){let t=this,{theme:a,themeColor:o}=t;return t[e]?t[e]:o[a][e]},defaultSelectSku(){let e=this,{defaultSelect:t}=e;t&&t.sku&&t.sku.length>0&&e.selectSku(t)},selectSku(e={}){let t=this,{sku:a,num:o}=e,n=t.goodsInfo[t.specListName];if(a&&n.length===a.length){let e=[],o=!0;for(let s=0;s<a.length;s++){let i=a[s],r=n[s].list,l=s,c=t.getListIndex(r,"name",i);if(-1==c){o=!1;break}e.push({spec:r[c],index1:l,index2:c})}o&&(t.init(!0),e.map((e=>{t.skuClick(e.spec,e.index1,e.index2)})))}o>0&&(t.selectNum=o)},priceFilter(e=0){return"string"==typeof e&&(e=parseFloat(e)),0===this.amountType?e.toFixed(2):(e/100).toFixed(2)},pushGoodsCache(e){let{goodsIdName:t}=this;Be[e[t]]=e},stop(){},previewImage(){let{selectShop:e,goodsInfo:t,goodsThumbName:a}=this,o=e.image?e.image:t[a];o&&uni.previewImage({urls:[o]})},getMaxStock(){let e=0,{selectShop:t={},goodsInfo:a={},skuListName:o,stockName:n}=this;if(t[n])e=t[n];else{let t=a[o];if(t&&t.length>0){let a=[];t.map(((e,t)=>{a.push(e[n])})),e=Math.max(...a)}}return e},numChange(e){this.$emit("num-change",e.value)}},computed:{valueCom(){return this.modelValue},maxBuyNumCom(){let e=this.getMaxStock(),t=this.maxBuyNum||1e5;return t>e&&(t=e),t},isManyCom(){let{goodsInfo:e,defaultSingleSkuName:t,specListName:a}=this,o=!0;return e[a]&&1===e[a].length&&1===e[a][0].list.length&&e[a][0].name===t&&(o=!1),o},priceCom(){let e="",t=this,{selectShop:a={},goodsInfo:o={},skuListName:n,skuIdName:s}=t;if(a[s])e=t.priceFilter(a.price);else{let a=o[n];if(a&&a.length>0){let o=[];a.map(((e,t)=>{o.push(e.price)}));let n=t.priceFilter(Math.min(...o)),s=t.priceFilter(Math.max(...o));e=n===s?n+"":`${n} - ${s}`}}return e},stockCom(){let e="",{selectShop:t={},goodsInfo:a={},skuListName:o,stockName:n}=this;if(t[n])e=t[n];else{let t=a[o];if(t&&t.length>0){let a=[];t.map(((e,t)=>{a.push(e[n])}));let o=Math.min(...a),s=Math.max(...a);e=o===s?o:`${o} - ${s}`}}return e}},watch:{valueCom(e,t){e&&this.open()},defaultGoods:{immediate:!0,handler:function(e,t){let a=this,{goodsIdName:o}=a;"object"==typeof e&&e&&e[o]&&!Be[e[o]]&&a.pushGoodsCache(e)}}}};const Pe=a(Te,[["render",function(t,a,o,n,s,i){const r=c(e.resolveDynamicComponent("vk-data-input-number-box"),q);return e.openBlock(),e.createElementBlock("view",{class:e.normalizeClass(["vk-data-goods-sku-popup",i.valueCom&&s.complete?"show":"none"]),catchtouchmove:"true",onTouchmove:a[8]||(a[8]=e.withModifiers(((...e)=>i.moveHandle&&i.moveHandle(...e)),["stop","prevent"])),onClick:a[9]||(a[9]=e.withModifiers(((...e)=>i.stop&&i.stop(...e)),["stop"]))},[e.createElementVNode("view",{class:"mask",onClick:a[0]||(a[0]=e=>i.close("mask"))}),e.createElementVNode("view",{class:e.normalizeClass(["layer attr-content",{"safe-area-inset-bottom":o.safeAreaInsetBottom}]),style:e.normalizeStyle({borderRadius:o.borderRadius+"rpx "+o.borderRadius+"rpx 0 0",paddingBottom:s.safeBottom+"px"})},[e.createElementVNode("view",{class:"specification-wrapper"},[e.createElementVNode("scroll-view",{class:"specification-wrapper-content","scroll-y":"true"},[e.createElementVNode("view",{class:"specification-header"},[e.createElementVNode("view",{class:"specification-left"},[e.createElementVNode("image",{class:"product-img",src:s.selectShop.image?s.selectShop.image:s.goodsInfo[o.goodsThumbName],style:e.normalizeStyle({backgroundColor:o.goodsThumbBackgroundColor}),mode:"aspectFill",onClick:a[1]||(a[1]=(...e)=>i.previewImage&&i.previewImage(...e))},null,12,["src"])]),e.createElementVNode("view",{class:"specification-right"},[e.createElementVNode("view",{class:"price-content",style:e.normalizeStyle({color:i.themeColorFn("priceColor")})},[e.createElementVNode("text",{class:"sign"},"¥"),e.createElementVNode("text",{class:e.normalizeClass(["price",i.priceCom.length>16?"price2":""])},e.toDisplayString(i.priceCom),3)],4),o.hideStock?(e.openBlock(),e.createElementBlock("view",{key:1,class:"inventory"})):(e.openBlock(),e.createElementBlock("view",{key:0,class:"inventory"},e.toDisplayString(o.stockText)+":"+e.toDisplayString(i.stockCom),1)),e.withDirectives(e.createElementVNode("view",{class:"choose"},"已选:"+e.toDisplayString(s.selectArr.join(" ")),513),[[e.vShow,i.isManyCom]])])]),e.createElementVNode("view",{class:"specification-content"},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s.goodsInfo[o.specListName],((t,a)=>e.withDirectives((e.openBlock(),e.createElementBlock("view",{class:"specification-item",key:a},[e.createElementVNode("view",{class:"item-title"},e.toDisplayString(t.name),1),e.createElementVNode("view",{class:"item-wrapper"},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.list,((t,o)=>(e.openBlock(),e.createElementBlock("view",{class:e.normalizeClass(["item-content",[t.ishow?"":"noactived",s.subIndex[a]==o?"actived":""]]),key:o,style:e.normalizeStyle([t.ishow?"":i.themeColorFn("disableStyle"),t.ishow?i.themeColorFn("btnStyle"):"",s.subIndex[a]==o?i.themeColorFn("activedStyle"):""]),onClick:e=>i.skuClick(t,a,o)},e.toDisplayString(t.name),15,["onClick"])))),128))])])),[[e.vShow,i.isManyCom]]))),128)),e.createElementVNode("view",{class:"number-box-view"},[e.createElementVNode("view",{style:{flex:"1"}},"数量"),e.createElementVNode("view",{style:{flex:"4","text-align":"right"}},[e.createVNode(r,{modelValue:s.selectNum,"onUpdate:modelValue":a[2]||(a[2]=e=>s.selectNum=e),min:o.minBuyNum||1,max:i.maxBuyNumCom,step:o.stepBuyNum||1,"step-strictly":o.stepStrictly,"positive-integer":!0,onChange:i.numChange},null,8,["modelValue","min","max","step","step-strictly","onChange"])])])])]),0!=o.showClose?(e.openBlock(),e.createElementBlock("view",{key:0,class:"close",onClick:a[3]||(a[3]=e=>i.close("close"))},[e.createElementVNode("image",{class:"close-item",src:o.closeImage},null,8,["src"])])):e.createCommentVNode("",!0)]),s.outFoStock||4==o.mode?(e.openBlock(),e.createElementBlock("view",{key:0,class:"btn-wrapper"},[e.createElementVNode("view",{class:"sure",style:{color:"#ffffff","background-color":"#cccccc"}},e.toDisplayString(o.noStockText),1)])):1==o.mode?(e.openBlock(),e.createElementBlock("view",{key:1,class:"btn-wrapper"},[e.createElementVNode("view",{class:"sure add-cart",style:e.normalizeStyle([{"border-radius":"38rpx 0rpx 0rpx 38rpx"},{color:i.themeColorFn("addCartColor"),backgroundColor:i.themeColorFn("addCartBackgroundColor")}]),onClick:a[4]||(a[4]=(...e)=>i.addCart&&i.addCart(...e))},e.toDisplayString(o.addCartText),5),e.createElementVNode("view",{class:"sure",style:e.normalizeStyle([{"border-radius":"0rpx 38rpx 38rpx 0rpx"},{color:i.themeColorFn("buyNowColor"),backgroundColor:i.themeColorFn("buyNowBackgroundColor")}]),onClick:a[5]||(a[5]=(...e)=>i.buyNow&&i.buyNow(...e))},e.toDisplayString(o.buyNowText),5)])):2==o.mode?(e.openBlock(),e.createElementBlock("view",{key:2,class:"btn-wrapper"},[e.createElementVNode("view",{class:"sure add-cart",style:e.normalizeStyle({color:i.themeColorFn("addCartColor"),backgroundColor:i.themeColorFn("addCartBackgroundColor")}),onClick:a[6]||(a[6]=(...e)=>i.addCart&&i.addCart(...e))},e.toDisplayString(o.addCartText),5)])):3==o.mode?(e.openBlock(),e.createElementBlock("view",{key:3,class:"btn-wrapper"},[e.createElementVNode("view",{class:"sure",style:e.normalizeStyle({color:i.themeColorFn("buyNowColor"),backgroundColor:i.themeColorFn("buyNowBackgroundColor")}),onClick:a[7]||(a[7]=(...e)=>i.buyNow&&i.buyNow(...e))},e.toDisplayString(o.buyNowText),5)])):e.createCommentVNode("",!0)],6)],34)}],["__scopeId","data-v-0c578af6"]]);class De{constructor(e,t){this.options=e,this.animation=uni.createAnimation(e),this.currentStepAnimates={},this.next=0,this.$=t}_nvuePushAnimates(e,t){let a=this.currentStepAnimates[this.next],o={};if(o=a||{styles:{},config:{}},Ie.includes(e)){o.styles.transform||(o.styles.transform="");let a="";"rotate"===e&&(a="deg"),o.styles.transform+=`${e}(${t+a}) `}else o.styles[e]=`${t}`;this.currentStepAnimates[this.next]=o}_animateRun(e={},t={}){let a=this.$.$refs.ani.ref;if(a)return new Promise(((o,n)=>{nvueAnimation.transition(a,{styles:e,...t},(e=>{o()}))}))}_nvueNextAnimate(e,t=0,a){let o=e[t];if(o){let{styles:n,config:s}=o;this._animateRun(n,s).then((()=>{t+=1,this._nvueNextAnimate(e,t,a)}))}else this.currentStepAnimates={},"function"==typeof a&&a(),this.isEnd=!0}step(e={}){return this.animation.step(e),this}run(e){this.$.animationData=this.animation.export(),this.$.timer=setTimeout((()=>{"function"==typeof e&&e()}),this.$.durationTime)}}const Ie=["matrix","matrix3d","rotate","rotate3d","rotateX","rotateY","rotateZ","scale","scale3d","scaleX","scaleY","scaleZ","skew","skewX","skewY","translate","translate3d","translateX","translateY","translateZ"];function Le(e,t){if(t)return clearTimeout(t.timer),new De(e,t)}Ie.concat(["opacity","backgroundColor"],["width","height","left","right","top","bottom"]).forEach((e=>{De.prototype[e]=function(...t){return this.animation[e](...t),this}}));const Ae=a({name:"uniTransition",emits:["click","change"],props:{show:{type:Boolean,default:!1},modeClass:{type:[Array,String],default:()=>"fade"},duration:{type:Number,default:300},styles:{type:Object,default:()=>({})},customClass:{type:String,default:""},onceRender:{type:Boolean,default:!1}},data:()=>({isShow:!1,transform:"",opacity:1,animationData:{},durationTime:300,config:{}}),watch:{show:{handler(e){e?this.open():this.isShow&&this.close()},immediate:!0}},computed:{stylesObject(){let e={...this.styles,"transition-duration":this.duration/1e3+"s"},t="";for(let a in e){t+=this.toLine(a)+":"+e[a]+";"}return t},transformStyles(){return"transform:"+this.transform+";opacity:"+this.opacity+";"+this.stylesObject}},created(){this.config={duration:this.duration,timingFunction:"ease",transformOrigin:"50% 50%",delay:0},this.durationTime=this.duration},methods:{init(e={}){e.duration&&(this.durationTime=e.duration),this.animation=Le(Object.assign(this.config,e),this)},onClick(){this.$emit("click",{detail:this.isShow})},step(e,t={}){if(this.animation){for(let t in e)try{"object"==typeof e[t]?this.animation[t](...e[t]):this.animation[t](e[t])}catch(Qt){console.error(`方法 ${t} 不存在`)}return this.animation.step(t),this}},run(e){this.animation&&this.animation.run(e)},open(){clearTimeout(this.timer),this.transform="",this.isShow=!0;let{opacity:e,transform:t}=this.styleInit(!1);void 0!==e&&(this.opacity=e),this.transform=t,this.$nextTick((()=>{this.timer=setTimeout((()=>{this.animation=Le(this.config,this),this.tranfromInit(!1).step(),this.animation.run(),this.$emit("change",{detail:this.isShow})}),20)}))},close(e){this.animation&&this.tranfromInit(!0).step().run((()=>{this.isShow=!1,this.animationData=null,this.animation=null;let{opacity:e,transform:t}=this.styleInit(!1);this.opacity=e||1,this.transform=t,this.$emit("change",{detail:this.isShow})}))},styleInit(e){let t={transform:""},a=(e,a)=>{"fade"===a?t.opacity=this.animationType(e)[a]:t.transform+=this.animationType(e)[a]+" "};return"string"==typeof this.modeClass?a(e,this.modeClass):this.modeClass.forEach((t=>{a(e,t)})),t},tranfromInit(e){let t=(e,t)=>{let a=null;"fade"===t?a=e?0:1:(a=e?"-100%":"0","zoom-in"===t&&(a=e?.8:1),"zoom-out"===t&&(a=e?1.2:1),"slide-right"===t&&(a=e?"100%":"0"),"slide-bottom"===t&&(a=e?"100%":"0")),this.animation[this.animationMode()[t]](a)};return"string"==typeof this.modeClass?t(e,this.modeClass):this.modeClass.forEach((a=>{t(e,a)})),this.animation},animationType:e=>({fade:e?1:0,"slide-top":`translateY(${e?"0":"-100%"})`,"slide-right":`translateX(${e?"0":"100%"})`,"slide-bottom":`translateY(${e?"0":"100%"})`,"slide-left":`translateX(${e?"0":"-100%"})`,"zoom-in":`scaleX(${e?1:.8}) scaleY(${e?1:.8})`,"zoom-out":`scaleX(${e?1:1.2}) scaleY(${e?1:1.2})`}),animationMode:()=>({fade:"opacity","slide-top":"translateY","slide-right":"translateX","slide-bottom":"translateY","slide-left":"translateX","zoom-in":"scale","zoom-out":"scale"}),toLine:e=>e.replace(/([A-Z])/g,"-$1").toLowerCase()}},[["render",function(t,a,o,n,s,i){return s.isShow||o.onceRender?e.withDirectives((e.openBlock(),e.createElementBlock("view",{key:0,ref:"ani",animation:s.animationData,class:e.normalizeClass(o.customClass),style:e.normalizeStyle(i.transformStyles),onClick:a[0]||(a[0]=(...e)=>i.onClick&&i.onClick(...e))},[e.renderSlot(t.$slots,"default")],14,["animation"])),[[e.vShow,s.isShow]]):e.createCommentVNode("",!0)}]]),Oe={name:"uniPopup",components:{},emits:["change","maskClick"],props:{animation:{type:Boolean,default:!0},type:{type:String,default:"center"},isMaskClick:{type:Boolean,default:null},maskClick:{type:Boolean,default:null},backgroundColor:{type:String,default:"none"},safeArea:{type:Boolean,default:!0},maskBackgroundColor:{type:String,default:"rgba(0, 0, 0, 0.4)"},onceRender:{type:Boolean,default:!1}},watch:{type:{handler:function(e){this.config[e]&&this[this.config[e]](!0)},immediate:!0},isDesktop:{handler:function(e){this.config[e]&&this[this.config[this.type]](!0)},immediate:!0},maskClick:{handler:function(e){this.mkclick=e},immediate:!0},isMaskClick:{handler:function(e){this.mkclick=e},immediate:!0},showPopup(e){}},data(){return{duration:300,ani:[],showPopup:!1,showTrans:!1,popupWidth:0,popupHeight:0,config:{top:"top",bottom:"bottom",center:"center",left:"left",right:"right",message:"top",dialog:"center",share:"bottom"},maskClass:{position:"fixed",bottom:0,top:0,left:0,right:0,backgroundColor:"rgba(0, 0, 0, 0.4)"},transClass:{position:"fixed",left:0,right:0},maskShow:!0,mkclick:!0,popupstyle:this.isDesktop?"fixforpc-top":"top"}},computed:{isDesktop(){return this.popupWidth>=500&&this.popupHeight>=500},bg(){return""===this.backgroundColor||"none"===this.backgroundColor?"transparent":this.backgroundColor}},mounted(){(()=>{const{windowWidth:e,windowHeight:t,windowTop:a,safeArea:o,screenHeight:n,safeAreaInsets:s}=uni.getSystemInfoSync();this.popupWidth=e,this.popupHeight=t+(a||0),o&&this.safeArea?this.safeAreaInsets=s.bottom:this.safeAreaInsets=0})()},unmounted(){this.setH5Visible()},created(){null===this.isMaskClick&&null===this.maskClick?this.mkclick=!0:this.mkclick=null!==this.isMaskClick?this.isMaskClick:this.maskClick,this.animation?this.duration=300:this.duration=0,this.messageChild=null,this.clearPropagation=!1,this.maskClass.backgroundColor=this.maskBackgroundColor},methods:{setH5Visible(){},closeMask(){this.maskShow=!1},disableMask(){this.mkclick=!1},clear(e){e.stopPropagation(),this.clearPropagation=!0},open(e){this.showPopup&&(clearTimeout(this.timer),this.showPopup=!1);e&&-1!==["top","center","bottom","left","right","message","dialog","share"].indexOf(e)||(e=this.type),this.config[e]?(this[this.config[e]](),this.$emit("change",{show:!0,type:e})):console.error("缺少类型:",e)},close(e){this.showTrans=!1,this.$emit("change",{show:!1,type:this.type}),clearTimeout(this.timer),this.timer=setTimeout((()=>{this.showPopup=!1}),300)},touchstart(){this.clearPropagation=!1},onTap(){this.clearPropagation?this.clearPropagation=!1:(this.$emit("maskClick"),this.mkclick&&this.close())},top(e){this.popupstyle=this.isDesktop?"fixforpc-top":"top",this.ani=["slide-top"],this.transClass={position:"fixed",left:0,right:0,backgroundColor:this.bg},e||(this.showPopup=!0,this.showTrans=!0,this.$nextTick((()=>{this.messageChild&&"message"===this.type&&this.messageChild.timerClose()})))},bottom(e){this.popupstyle="bottom",this.ani=["slide-bottom"],this.transClass={position:"fixed",left:0,right:0,bottom:0,paddingBottom:this.safeAreaInsets+"px",backgroundColor:this.bg},e||(this.showPopup=!0,this.showTrans=!0)},center(e){this.popupstyle="center",this.ani=["zoom-out","fade"],this.transClass={position:"fixed",display:"flex",flexDirection:"column",bottom:0,left:0,right:0,top:0,justifyContent:"center",alignItems:"center"},e||(this.showPopup=!0,this.showTrans=!0)},left(e){this.popupstyle="left",this.ani=["slide-left"],this.transClass={position:"fixed",left:0,bottom:0,top:0,backgroundColor:this.bg,display:"flex",flexDirection:"column"},e||(this.showPopup=!0,this.showTrans=!0)},right(e){this.popupstyle="right",this.ani=["slide-right"],this.transClass={position:"fixed",bottom:0,right:0,top:0,backgroundColor:this.bg,display:"flex",flexDirection:"column"},e||(this.showPopup=!0,this.showTrans=!0)}}};const Fe=a(Oe,[["render",function(t,a,o,n,s,i){const r=c(e.resolveDynamicComponent("uni-transition"),Ae);return s.showPopup||o.onceRender?e.withDirectives((e.openBlock(),e.createElementBlock("view",{key:0,class:e.normalizeClass(["uni-popup",[s.popupstyle,i.isDesktop?"fixforpc-z-index":""]])},[e.createElementVNode("view",{onTouchstart:a[1]||(a[1]=(...e)=>i.touchstart&&i.touchstart(...e))},[s.maskShow?(e.openBlock(),e.createBlock(r,{key:"1",name:"mask","mode-class":"fade",styles:s.maskClass,duration:s.duration,show:s.showTrans,onClick:i.onTap},null,8,["styles","duration","show","onClick"])):e.createCommentVNode("",!0),e.createVNode(r,{key:"2","mode-class":s.ani,name:"content",styles:s.transClass,duration:s.duration,show:s.showTrans,onClick:i.onTap,"once-render":o.onceRender},{default:e.withCtx((()=>[e.createElementVNode("view",{class:e.normalizeClass(["uni-popup__wrapper",[s.popupstyle]]),style:e.normalizeStyle({backgroundColor:i.bg}),onClick:a[0]||(a[0]=(...e)=>i.clear&&i.clear(...e))},[e.renderSlot(t.$slots,"default",{},void 0,!0)],6)])),_:3},8,["mode-class","styles","duration","show","onClick","once-render"])],32)],2)),[[e.vShow,s.showPopup]]):e.createCommentVNode("",!0)}],["__scopeId","data-v-49e15a0a"]]),Me=a(e.defineComponent({__name:"AddressPanel",setup:t=>(t,a)=>(e.openBlock(),e.createElementBlock("view",{class:"address-panel"},[e.createElementVNode("text",{class:"close icon-close"}),e.createElementVNode("view",{class:"title"},"配送至"),e.createElementVNode("view",{class:"content"},[e.createElementVNode("view",{class:"item"},[e.createElementVNode("view",{class:"user"},"李明 13824686868"),e.createElementVNode("view",{class:"address"},"北京市顺义区后沙峪地区安平北街6号院"),e.createElementVNode("text",{class:"icon icon-checked"})]),e.createElementVNode("view",{class:"item"},[e.createElementVNode("view",{class:"user"},"王东 13824686868"),e.createElementVNode("view",{class:"address"},"北京市顺义区后沙峪地区安平北街6号院"),e.createElementVNode("text",{class:"icon icon-ring"})]),e.createElementVNode("view",{class:"item"},[e.createElementVNode("view",{class:"user"},"张三 13824686868"),e.createElementVNode("view",{class:"address"},"北京市朝阳区孙河安平北街6号院"),e.createElementVNode("text",{class:"icon icon-ring"})])]),e.createElementVNode("view",{class:"footer"},[e.createElementVNode("view",{class:"button primary"}," 新建地址 "),e.createCommentVNode("",!0)])]))}),[["__scopeId","data-v-451cf5e7"]]),Re=a(e.defineComponent({__name:"ServicePanel",emits:["close"],setup(t,{emit:a}){const o=a;return(t,a)=>(e.openBlock(),e.createElementBlock("view",{class:"service-panel"},[e.createElementVNode("text",{class:"close icon-close",onClick:a[0]||(a[0]=e=>o("close"))}),e.createElementVNode("view",{class:"title"},"服务说明"),e.createElementVNode("view",{class:"content"},[e.createElementVNode("view",{class:"item"},[e.createElementVNode("view",{class:"dt"},"无忧退货"),e.createElementVNode("view",{class:"dd"}," 自收到商品之日起30天内,可在线申请无忧退货服务(食品等特殊商品除外) ")]),e.createElementVNode("view",{class:"item"},[e.createElementVNode("view",{class:"dt"},"快速退款"),e.createElementVNode("view",{class:"dd"}," 收到退货包裹并确认无误后,将在48小时内办理退款, 退款将原路返回,不同银行处理时间不同,预计1-5个工作日到账 ")]),e.createElementVNode("view",{class:"item"},[e.createElementVNode("view",{class:"dt"},"满88元免邮费"),e.createElementVNode("view",{class:"dd"}," 单笔订单金额(不含运费)满88元可免邮费,不满88元, 单笔订单收取10元邮费 ")])])]))}}),[["__scopeId","data-v-c3ec87ba"]]),$e=e.defineComponent({__name:"goods",props:{id:{}},setup(t){const{safeAreaInsets:a}=uni.getSystemInfoSync(),o=t,n=e.ref(),s=async()=>{const e=await(t=o.id,U({method:"GET",url:"/goods",data:{id:t}}));var t;n.value=e.result,p.value={_id:e.result.id,name:e.result.name,goods_thumb:e.result.mainPictures[0],spec_list:e.result.specs.map((e=>({name:e.name,list:e.values}))),sku_list:e.result.skus.map((t=>({_id:t.id,goods_id:e.result.id,goods_name:e.result.name,image:t.picture,price:100*t.price,stock:t.inventory,sku_name_arr:t.specs.map((e=>e.valueName))})))}};h((()=>{s()}));const i=e.ref(0),r=e=>{i.value=e.detail.current},l=e.ref(),u=e.ref(),d=e=>{var t;u.value=e,null==(t=l.value)||t.open()},m=e.ref(!1),p=e.ref({}),g=e.ref(2),f=e=>{m.value=!0,g.value=e},y=e.ref(),v=e.computed((()=>{var e,t;return(null==(t=null==(e=y.value)?void 0:e.selectArr)?void 0:t.join(" ").trim())||"请选择商品规格"})),k=async e=>{var t;await(t={skuId:e._id,count:e.buy_num},U({method:"POST",url:"/member/cart",data:t})),uni.showToast({title:"添加成功"}),m.value=!1},_=e=>{uni.navigateTo({url:`/pagesOrder/create/create?skuId=${e._id}&count=${e.buy_num}`})};return(t,o)=>{var s,h,w,b,N,E,x,C,V;const S=c(e.resolveDynamicComponent("vk-data-goods-sku-popup"),Pe),B=c(e.resolveDynamicComponent("uni-popup"),Fe);return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createVNode(S,{modelValue:m.value,"onUpdate:modelValue":o[0]||(o[0]=e=>m.value=e),localdata:p.value,mode:g.value,"add-cart-background-color":"#FFA868","buy-now-background-color":"#27BA9B",ref_key:"skuPopupRef",ref:y,"actived-style":{color:"#27BA9B",borderColor:"#27BA9B",backgroundColor:"#E9F8F5"},onAddCart:k,onBuyNow:_},null,8,["modelValue","localdata","mode"]),e.createElementVNode("scroll-view",{"enable-back-to-top":"","scroll-y":"",class:"viewport"},[e.createElementVNode("view",{class:"goods"},[e.createElementVNode("view",{class:"preview"},[e.createElementVNode("swiper",{onChange:r,circular:""},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(null==(s=n.value)?void 0:s.mainPictures,(t=>(e.openBlock(),e.createElementBlock("swiper-item",{key:t},[e.createElementVNode("image",{class:"image",onClick:e=>{return a=t,void uni.previewImage({current:a,urls:n.value.mainPictures});var a},mode:"aspectFill",src:t},null,8,["onClick","src"])])))),128))],32),e.createElementVNode("view",{class:"indicator"},[e.createElementVNode("text",{class:"current"},e.toDisplayString(i.value+1),1),e.createElementVNode("text",{class:"split"},"/"),e.createElementVNode("text",{class:"total"},e.toDisplayString(null==(h=n.value)?void 0:h.mainPictures.length),1)])]),e.createElementVNode("view",{class:"meta"},[e.createElementVNode("view",{class:"price"},[e.createElementVNode("text",{class:"symbol"},"¥"),e.createElementVNode("text",{class:"number"},e.toDisplayString(null==(w=n.value)?void 0:w.price),1)]),e.createElementVNode("view",{class:"name ellipsis"},e.toDisplayString(null==(b=n.value)?void 0:b.name),1),e.createElementVNode("view",{class:"desc"},e.toDisplayString(null==(N=n.value)?void 0:N.desc),1)]),e.createElementVNode("view",{class:"action"},[e.createElementVNode("view",{onClick:o[1]||(o[1]=e=>f(1)),class:"item arrow"},[e.createElementVNode("text",{class:"label"},"选择"),e.createElementVNode("text",{class:"text ellipsis"},e.toDisplayString(v.value),1)]),e.createElementVNode("view",{onClick:o[2]||(o[2]=e=>d("address")),class:"item arrow"},[e.createElementVNode("text",{class:"label"},"送至"),e.createElementVNode("text",{class:"text ellipsis"}," 请选择收获地址 ")]),e.createElementVNode("view",{onClick:o[3]||(o[3]=e=>d("service")),class:"item arrow"},[e.createElementVNode("text",{class:"label"},"服务"),e.createElementVNode("text",{class:"text ellipsis"}," 无忧退 快速退款 免费包邮 ")])])]),e.createElementVNode("view",{class:"detail panel"},[e.createElementVNode("view",{class:"title"},[e.createElementVNode("text",null,"详情")]),e.createElementVNode("view",{class:"content"},[e.createElementVNode("view",{class:"properties"},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(null==(E=n.value)?void 0:E.details.properties,(t=>(e.openBlock(),e.createElementBlock("view",{class:"item",key:t.name},[e.createElementVNode("text",{class:"label"},e.toDisplayString(t.name),1),e.createElementVNode("text",{class:"value"},e.toDisplayString(t.value),1)])))),128))]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(null==(x=n.value)?void 0:x.details.pictures,(t=>(e.openBlock(),e.createElementBlock("image",{class:"image",key:t,mode:"widthFix",src:t},null,8,["src"])))),128))])]),e.createElementVNode("view",{class:"similar panel"},[e.createElementVNode("view",{class:"title"},[e.createElementVNode("text",null,"同类推荐")]),e.createElementVNode("view",{class:"content"},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(null==(C=n.value)?void 0:C.similarProducts,(t=>(e.openBlock(),e.createElementBlock("navigator",{key:t.id,class:"goods","hover-class":"none",url:`/pages/goods/goods?id=${t.id}`},[e.createElementVNode("image",{class:"image",mode:"aspectFill",src:t.picture},null,8,["src"]),e.createElementVNode("view",{class:"name ellipsis"},e.toDisplayString(t.name),1),e.createElementVNode("view",{class:"price"},[e.createElementVNode("text",{class:"symbol"},"¥"),e.createElementVNode("text",{class:"number"},e.toDisplayString(t.price),1)])],8,["url"])))),128))])])]),n.value?(e.openBlock(),e.createElementBlock("view",{key:0,class:"toolbar",style:e.normalizeStyle({paddingBottom:(null==(V=e.unref(a))?void 0:V.bottom)+"px"})},[e.createElementVNode("view",{class:"icons"},[e.createElementVNode("button",{class:"icons-button"},[e.createElementVNode("text",{class:"icon-heart"}),e.createTextVNode("收藏")]),e.createElementVNode("navigator",{class:"icons-button",url:"/pages/cart/cart2","open-type":"navigate"},[e.createElementVNode("text",{class:"icon-cart"}),e.createTextVNode("购物车 ")])]),e.createElementVNode("view",{class:"buttons"},[e.createElementVNode("view",{onClick:o[4]||(o[4]=e=>f(2)),class:"addcart"}," 加入购物车 "),e.createElementVNode("view",{onClick:o[5]||(o[5]=e=>f(3)),class:"payment"}," 立即购买 ")])],4)):e.createCommentVNode("",!0),e.createVNode(B,{ref_key:"popup",ref:l,type:"bottom","background-color":"#fff"},{default:e.withCtx((()=>["address"===u.value?(e.openBlock(),e.createBlock(Me,{key:0,onClose:o[6]||(o[6]=e=>{var t;return null==(t=l.value)?void 0:t.close()})})):e.createCommentVNode("",!0),"service"===u.value?(e.openBlock(),e.createBlock(Re,{key:1,onClose:o[7]||(o[7]=e=>{var t;return null==(t=l.value)?void 0:t.close()})})):e.createCommentVNode("",!0)])),_:1},512)],64)}}});const Ue=a({name:"uniFormsItem",options:{virtualHost:!0},provide(){return{uniFormItem:this}},inject:{form:{from:"uniForm",default:null}},props:{rules:{type:Array,default:()=>null},name:{type:[String,Array],default:""},required:{type:Boolean,default:!1},label:{type:String,default:""},labelWidth:{type:[String,Number],default:""},labelAlign:{type:String,default:""},errorMessage:{type:[String,Boolean],default:""},leftIcon:String,iconColor:{type:String,default:"#606266"}},data:()=>({errMsg:"",isRequired:!1,userRules:null,localLabelAlign:"left",localLabelWidth:"65px",localLabelPos:"left",border:!1,isFirstBorder:!1}),computed:{msg(){return this.errorMessage||this.errMsg}},watch:{"form.formRules"(e){this.init()},"form.labelWidth"(e){this.localLabelWidth=this._labelWidthUnit(e)},"form.labelPosition"(e){this.localLabelPos=this._labelPosition()},"form.labelAlign"(e){}},created(){this.init(!0),this.name&&this.form&&this.$watch((()=>this.form._getDataValue(this.name,this.form.localData)),((e,t)=>{if(!this.form._isEqual(e,t)){const t=this.itemSetValue(e);this.onFieldChange(t,!1)}}),{immediate:!1})},unmounted(){this.__isUnmounted=!0,this.unInit()},methods:{setRules(e=null){this.userRules=e,this.init(!1)},setValue(){},async onFieldChange(e,t=!0){const{formData:a,localData:o,errShowType:n,validateCheck:s,validateTrigger:i,_isRequiredField:r,_realName:l}=this.form,c=l(this.name);e||(e=this.form.formData[c]);const u=this.itemRules.rules&&this.itemRules.rules.length;if(!this.validator||!u||0===u)return;const d=r(this.itemRules.rules||[]);let m=null;return"bind"===i||t?(m=await this.validator.validateUpdate({[c]:e},a),d||void 0!==e&&""!==e||(m=null),m&&m.errorMessage?("undertext"===n&&(this.errMsg=m?m.errorMessage:""),"toast"===n&&uni.showToast({title:m.errorMessage||"校验错误",icon:"none"}),"modal"===n&&uni.showModal({title:"提示",content:m.errorMessage||"校验错误"})):this.errMsg="",s(m||null)):this.errMsg="",m||null},init(e=!1){const{validator:t,formRules:a,childrens:o,formData:n,localData:s,_realName:i,labelWidth:r,_getDataValue:l,_setDataValue:c}=this.form||{};if(this.localLabelAlign=this._justifyContent(),this.localLabelWidth=this._labelWidthUnit(r),this.localLabelPos=this._labelPosition(),this.isRequired=this.required,this.form&&e&&o.push(this),!t||!a)return;this.form.isFirstBorder||(this.form.isFirstBorder=!0,this.isFirstBorder=!0),this.group&&(this.group.isFirstBorder||(this.group.isFirstBorder=!0,this.isFirstBorder=!0)),this.border=this.form.border;const u=i(this.name),d=this.userRules||this.rules;"object"==typeof a&&d&&(a[u]={rules:d},t.updateSchema(a));const m=a[u]||{};this.itemRules=m,this.validator=t,this.itemSetValue(l(this.name,s)),this.isRequired=this._isRequired()},unInit(){if(this.form){const{childrens:e,formData:t,_realName:a}=this.form;e.forEach(((e,o)=>{e===this&&(this.form.childrens.splice(o,1),delete t[a(e.name)])}))}},itemSetValue(e){const t=this.form._realName(this.name),a=this.itemRules.rules||[],o=this.form._getValue(t,e,a);return this.form._setDataValue(t,this.form.formData,o),o},clearValidate(){this.errMsg=""},_isRequired(){return this.required},_justifyContent(){if(this.form){const{labelAlign:e}=this.form;let t=this.labelAlign?this.labelAlign:e;if("left"===t)return"flex-start";if("center"===t)return"center";if("right"===t)return"flex-end"}return"flex-start"},_labelWidthUnit(e){return this.num2px(this.labelWidth?this.labelWidth:e||(this.label?65:"auto"))},_labelPosition(){return this.form&&this.form.labelPosition||"left"},isTrigger:(e,t,a)=>"submit"!==e&&e?"bind":void 0===e?"bind"!==t?t?"submit":""===a?"bind":"submit":"bind":"submit",num2px:e=>"number"==typeof e?`${e}px`:e}},[["render",function(t,a,o,n,s,i){return e.openBlock(),e.createElementBlock("view",{class:e.normalizeClass(["uni-forms-item",["is-direction-"+s.localLabelPos,s.border?"uni-forms-item--border":"",s.border&&s.isFirstBorder?"is-first-border":""]])},[e.renderSlot(t.$slots,"label",{},(()=>[e.createElementVNode("view",{class:e.normalizeClass(["uni-forms-item__label",{"no-label":!o.label&&!s.isRequired}]),style:e.normalizeStyle({width:s.localLabelWidth,justifyContent:s.localLabelAlign})},[s.isRequired?(e.openBlock(),e.createElementBlock("text",{key:0,class:"is-required"},"*")):e.createCommentVNode("",!0),e.createElementVNode("text",null,e.toDisplayString(o.label),1)],6)]),!0),e.createElementVNode("view",{class:"uni-forms-item__content"},[e.renderSlot(t.$slots,"default",{},void 0,!0),e.createElementVNode("view",{class:e.normalizeClass(["uni-forms-item__error",{"msg--active":i.msg}])},[e.createElementVNode("text",null,e.toDisplayString(i.msg),1)],2)])],2)}],["__scopeId","data-v-4bd9be43"]]),ze={easycom:{autoscan:!0,custom:{"^uni-(.*)":"@dcloudio/uni-ui/lib/uni-$1/uni-$1.vue","^Xtx(.*)":"@/components/Xtx$1.vue"}},pages:[{path:"pages/index/index",style:{navigationStyle:"custom",navigationBarTextStyle:"white",navigationBarTitleText:"首页"}},{path:"pages/category/category",style:{navigationBarTitleText:"商品分类"}},{path:"pages/cart/cart",style:{navigationBarTitleText:"购物车"}},{path:"pages/cart/cart2",style:{navigationBarTitleText:"购物车"}},{path:"pages/my/my",style:{navigationStyle:"custom",navigationBarTextStyle:"white",navigationBarTitleText:"我的"}},{path:"pages/login/login",style:{navigationBarTitleText:"登录"}},{path:"pages/hot/hot",style:{navigationBarTitleText:"热门推荐"}},{path:"pages/goods/goods",style:{navigationBarTitleText:"商品详情"}},{path:"pages/inbound/inbound",style:{navigationBarTitleText:"入库","app-plus":{bounce:"none",titleNView:{buttons:[{fontSize:"16px",text:"历史"}]}}}},{path:"pages/inbound/logList",style:{navigationBarTitleText:"录入历史"}},{path:"pages/weigh/weigh",style:{navigationBarTitleText:"称重","app-plus":{bounce:"none",titleNView:{buttons:[{fontSize:"16px",text:"历史"}]}}}},{path:"pages/weigh/logList",style:{navigationBarTitleText:"录入历史"}},{path:"pages/outbound/outbound",style:{navigationBarTitleText:"出库","app-plus":{bounce:"none",titleNView:{buttons:[{fontSize:"16px",text:"历史"}]}}}},{path:"pages/outbound/logList",style:{navigationBarTitleText:"录入历史"}},{path:"pages/warehouseScan/warehouseScan",style:{navigationBarTitleText:"仓库扫描","app-plus":{bounce:"none",titleNView:{buttons:[{fontSize:"16px",text:"历史"}]}}}},{path:"pages/warehouseScan/logList",style:{navigationBarTitleText:"录入历史"}},{path:"pages/printer/printer",style:{navigationBarTitleText:"打印","app-plus":{bounce:"none",titleNView:{buttons:[{fontSize:"16px",text:"历史"}]}}}},{path:"pages/printer/logList",style:{navigationBarTitleText:"录入历史"}},{path:"pages/scanLotno/scanLotno",style:{navigationBarTitleText:"托盘/批次","app-plus":{bounce:"none",titleNView:{buttons:[{fontSize:"16px",text:"历史"}]}}}},{path:"pages/scanLotno/logList",style:{navigationBarTitleText:"录入历史"}},{path:"pages/scanLotno/waybillsList",style:{navigationBarTitleText:"运单列表"}},{path:"pages/waybillNo/waybillNo",style:{navigationBarTitleText:"库位绑定","app-plus":{bounce:"none",titleNView:{buttons:[{fontSize:"16px",text:"历史"}]}}}},{path:"pages/waybillNo/logList",style:{navigationBarTitleText:"库位历史"}},{path:"pages/pickup/waybillPickUpOrder",style:{navigationBarTitleText:"取件单","app-plus":{bounce:"none",titleNView:{buttons:[{color:"#007AFF",fontSize:"22px",text:"",fontSrc:"/static/iconfont/iconfont.ttf",float:"right"}]}}}},{path:"pages/pickup/waybillPickUpDetails",style:{navigationBarTitleText:"取件详情"}},{path:"pages/pickup/waybillPickUpDetail",style:{navigationBarTitleText:"运单信息"}},{path:"pages/waybillDeliveryOrder/waybillDeliveryOrder",style:{navigationBarTitleText:"派送单"}}],globalStyle:{navigationBarTextStyle:"black",navigationBarTitleText:"",navigationBarBackgroundColor:"#F8F8F8",backgroundColor:"#F8F8F8"},tabBar:{color:"#333",selectedColor:"#27ba9b",backgroundColor:"#fff",borderStyle:"white",list:[{text:"首页",pagePath:"pages/index/index",iconPath:"static/tabs/home_default.png",selectedIconPath:"static/tabs/home_selected.png"},{text:"我的",pagePath:"pages/my/my",iconPath:"static/tabs/user_default.png",selectedIconPath:"static/tabs/user_selected.png"}]},subPackages:[{root:"pagesMember",pages:[{path:"settings/settings",style:{navigationBarTitleText:"设置"}},{path:"profile/profile",style:{navigationStyle:"custom",navigationBarTextStyle:"white",navigationBarTitleText:"个人信息"}},{path:"address/address",style:{navigationBarTitleText:"地址管理"}},{path:"address-form/address-form",style:{navigationBarTitleText:""}}]},{root:"pagesOrder",pages:[{path:"create/create",style:{navigationBarTitleText:"填写订单"}},{path:"detail/detail",style:{navigationBarTitleText:"订单详情",navigationStyle:"custom"}},{path:"payment/payment",style:{navigationBarTitleText:"支付结果"}},{path:"list/list",style:{navigationBarTitleText:"订单列表"}}]}],preloadRule:{"pages/my/my":{network:"all",packages:["pagesMember"]}}};function je(e,t,a){return e(a={path:t,exports:{},require:function(e,t){return function(){throw new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs")}(null==t&&a.path)}},a.exports),a.exports}var qe=je((function(e,t){var a;e.exports=(a=a||function(e,t){var a=Object.create||function(){function e(){}return function(t){var a;return e.prototype=t,a=new e,e.prototype=null,a}}(),o={},n=o.lib={},s=n.Base={extend:function(e){var t=a(this);return e&&t.mixIn(e),t.hasOwnProperty("init")&&this.init!==t.init||(t.init=function(){t.$super.init.apply(this,arguments)}),t.init.prototype=t,t.$super=this,t},create:function(){var e=this.extend();return e.init.apply(e,arguments),e},init:function(){},mixIn:function(e){for(var t in e)e.hasOwnProperty(t)&&(this[t]=e[t]);e.hasOwnProperty("toString")&&(this.toString=e.toString)},clone:function(){return this.init.prototype.extend(this)}},i=n.WordArray=s.extend({init:function(e,t){e=this.words=e||[],this.sigBytes=null!=t?t:4*e.length},toString:function(e){return(e||l).stringify(this)},concat:function(e){var t=this.words,a=e.words,o=this.sigBytes,n=e.sigBytes;if(this.clamp(),o%4)for(var s=0;s<n;s++){var i=a[s>>>2]>>>24-s%4*8&255;t[o+s>>>2]|=i<<24-(o+s)%4*8}else for(s=0;s<n;s+=4)t[o+s>>>2]=a[s>>>2];return this.sigBytes+=n,this},clamp:function(){var t=this.words,a=this.sigBytes;t[a>>>2]&=4294967295<<32-a%4*8,t.length=e.ceil(a/4)},clone:function(){var e=s.clone.call(this);return e.words=this.words.slice(0),e},random:function(t){for(var a,o=[],n=function(t){var a=987654321,o=4294967295;return function(){var n=((a=36969*(65535&a)+(a>>16)&o)<<16)+(t=18e3*(65535&t)+(t>>16)&o)&o;return n/=4294967296,(n+=.5)*(e.random()>.5?1:-1)}},s=0;s<t;s+=4){var r=n(4294967296*(a||e.random()));a=987654071*r(),o.push(4294967296*r()|0)}return new i.init(o,t)}}),r=o.enc={},l=r.Hex={stringify:function(e){for(var t=e.words,a=e.sigBytes,o=[],n=0;n<a;n++){var s=t[n>>>2]>>>24-n%4*8&255;o.push((s>>>4).toString(16)),o.push((15&s).toString(16))}return o.join("")},parse:function(e){for(var t=e.length,a=[],o=0;o<t;o+=2)a[o>>>3]|=parseInt(e.substr(o,2),16)<<24-o%8*4;return new i.init(a,t/2)}},c=r.Latin1={stringify:function(e){for(var t=e.words,a=e.sigBytes,o=[],n=0;n<a;n++){var s=t[n>>>2]>>>24-n%4*8&255;o.push(String.fromCharCode(s))}return o.join("")},parse:function(e){for(var t=e.length,a=[],o=0;o<t;o++)a[o>>>2]|=(255&e.charCodeAt(o))<<24-o%4*8;return new i.init(a,t)}},u=r.Utf8={stringify:function(e){try{return decodeURIComponent(escape(c.stringify(e)))}catch(t){throw new Error("Malformed UTF-8 data")}},parse:function(e){return c.parse(unescape(encodeURIComponent(e)))}},d=n.BufferedBlockAlgorithm=s.extend({reset:function(){this._data=new i.init,this._nDataBytes=0},_append:function(e){"string"==typeof e&&(e=u.parse(e)),this._data.concat(e),this._nDataBytes+=e.sigBytes},_process:function(t){var a=this._data,o=a.words,n=a.sigBytes,s=this.blockSize,r=n/(4*s),l=(r=t?e.ceil(r):e.max((0|r)-this._minBufferSize,0))*s,c=e.min(4*l,n);if(l){for(var u=0;u<l;u+=s)this._doProcessBlock(o,u);var d=o.splice(0,l);a.sigBytes-=c}return new i.init(d,c)},clone:function(){var e=s.clone.call(this);return e._data=this._data.clone(),e},_minBufferSize:0});n.Hasher=d.extend({cfg:s.extend(),init:function(e){this.cfg=this.cfg.extend(e),this.reset()},reset:function(){d.reset.call(this),this._doReset()},update:function(e){return this._append(e),this._process(),this},finalize:function(e){return e&&this._append(e),this._doFinalize()},blockSize:16,_createHelper:function(e){return function(t,a){return new e.init(a).finalize(t)}},_createHmacHelper:function(e){return function(t,a){return new m.HMAC.init(e,a).finalize(t)}}});var m=o.algo={};return o}(Math),a)})),He=qe,Ge=(je((function(e,t){var a;e.exports=(a=He,function(e){var t=a,o=t.lib,n=o.WordArray,s=o.Hasher,i=t.algo,r=[];!function(){for(var t=0;t<64;t++)r[t]=4294967296*e.abs(e.sin(t+1))|0}();var l=i.MD5=s.extend({_doReset:function(){this._hash=new n.init([1732584193,4023233417,2562383102,271733878])},_doProcessBlock:function(e,t){for(var a=0;a<16;a++){var o=t+a,n=e[o];e[o]=16711935&(n<<8|n>>>24)|4278255360&(n<<24|n>>>8)}var s=this._hash.words,i=e[t+0],l=e[t+1],p=e[t+2],h=e[t+3],g=e[t+4],f=e[t+5],y=e[t+6],v=e[t+7],k=e[t+8],_=e[t+9],w=e[t+10],b=e[t+11],N=e[t+12],E=e[t+13],x=e[t+14],C=e[t+15],V=s[0],S=s[1],B=s[2],T=s[3];V=c(V,S,B,T,i,7,r[0]),T=c(T,V,S,B,l,12,r[1]),B=c(B,T,V,S,p,17,r[2]),S=c(S,B,T,V,h,22,r[3]),V=c(V,S,B,T,g,7,r[4]),T=c(T,V,S,B,f,12,r[5]),B=c(B,T,V,S,y,17,r[6]),S=c(S,B,T,V,v,22,r[7]),V=c(V,S,B,T,k,7,r[8]),T=c(T,V,S,B,_,12,r[9]),B=c(B,T,V,S,w,17,r[10]),S=c(S,B,T,V,b,22,r[11]),V=c(V,S,B,T,N,7,r[12]),T=c(T,V,S,B,E,12,r[13]),B=c(B,T,V,S,x,17,r[14]),V=u(V,S=c(S,B,T,V,C,22,r[15]),B,T,l,5,r[16]),T=u(T,V,S,B,y,9,r[17]),B=u(B,T,V,S,b,14,r[18]),S=u(S,B,T,V,i,20,r[19]),V=u(V,S,B,T,f,5,r[20]),T=u(T,V,S,B,w,9,r[21]),B=u(B,T,V,S,C,14,r[22]),S=u(S,B,T,V,g,20,r[23]),V=u(V,S,B,T,_,5,r[24]),T=u(T,V,S,B,x,9,r[25]),B=u(B,T,V,S,h,14,r[26]),S=u(S,B,T,V,k,20,r[27]),V=u(V,S,B,T,E,5,r[28]),T=u(T,V,S,B,p,9,r[29]),B=u(B,T,V,S,v,14,r[30]),V=d(V,S=u(S,B,T,V,N,20,r[31]),B,T,f,4,r[32]),T=d(T,V,S,B,k,11,r[33]),B=d(B,T,V,S,b,16,r[34]),S=d(S,B,T,V,x,23,r[35]),V=d(V,S,B,T,l,4,r[36]),T=d(T,V,S,B,g,11,r[37]),B=d(B,T,V,S,v,16,r[38]),S=d(S,B,T,V,w,23,r[39]),V=d(V,S,B,T,E,4,r[40]),T=d(T,V,S,B,i,11,r[41]),B=d(B,T,V,S,h,16,r[42]),S=d(S,B,T,V,y,23,r[43]),V=d(V,S,B,T,_,4,r[44]),T=d(T,V,S,B,N,11,r[45]),B=d(B,T,V,S,C,16,r[46]),V=m(V,S=d(S,B,T,V,p,23,r[47]),B,T,i,6,r[48]),T=m(T,V,S,B,v,10,r[49]),B=m(B,T,V,S,x,15,r[50]),S=m(S,B,T,V,f,21,r[51]),V=m(V,S,B,T,N,6,r[52]),T=m(T,V,S,B,h,10,r[53]),B=m(B,T,V,S,w,15,r[54]),S=m(S,B,T,V,l,21,r[55]),V=m(V,S,B,T,k,6,r[56]),T=m(T,V,S,B,C,10,r[57]),B=m(B,T,V,S,y,15,r[58]),S=m(S,B,T,V,E,21,r[59]),V=m(V,S,B,T,g,6,r[60]),T=m(T,V,S,B,b,10,r[61]),B=m(B,T,V,S,p,15,r[62]),S=m(S,B,T,V,_,21,r[63]),s[0]=s[0]+V|0,s[1]=s[1]+S|0,s[2]=s[2]+B|0,s[3]=s[3]+T|0},_doFinalize:function(){var t=this._data,a=t.words,o=8*this._nDataBytes,n=8*t.sigBytes;a[n>>>5]|=128<<24-n%32;var s=e.floor(o/4294967296),i=o;a[15+(n+64>>>9<<4)]=16711935&(s<<8|s>>>24)|4278255360&(s<<24|s>>>8),a[14+(n+64>>>9<<4)]=16711935&(i<<8|i>>>24)|4278255360&(i<<24|i>>>8),t.sigBytes=4*(a.length+1),this._process();for(var r=this._hash,l=r.words,c=0;c<4;c++){var u=l[c];l[c]=16711935&(u<<8|u>>>24)|4278255360&(u<<24|u>>>8)}return r},clone:function(){var e=s.clone.call(this);return e._hash=this._hash.clone(),e}});function c(e,t,a,o,n,s,i){var r=e+(t&a|~t&o)+n+i;return(r<<s|r>>>32-s)+t}function u(e,t,a,o,n,s,i){var r=e+(t&o|a&~o)+n+i;return(r<<s|r>>>32-s)+t}function d(e,t,a,o,n,s,i){var r=e+(t^a^o)+n+i;return(r<<s|r>>>32-s)+t}function m(e,t,a,o,n,s,i){var r=e+(a^(t|~o))+n+i;return(r<<s|r>>>32-s)+t}t.MD5=s._createHelper(l),t.HmacMD5=s._createHmacHelper(l)}(Math),a.MD5)})),je((function(e,t){var a,o,n;e.exports=(o=(a=He).lib.Base,n=a.enc.Utf8,void(a.algo.HMAC=o.extend({init:function(e,t){e=this._hasher=new e.init,"string"==typeof t&&(t=n.parse(t));var a=e.blockSize,o=4*a;t.sigBytes>o&&(t=e.finalize(t)),t.clamp();for(var s=this._oKey=t.clone(),i=this._iKey=t.clone(),r=s.words,l=i.words,c=0;c<a;c++)r[c]^=1549556828,l[c]^=909522486;s.sigBytes=i.sigBytes=o,this.reset()},reset:function(){var e=this._hasher;e.reset(),e.update(this._iKey)},update:function(e){return this._hasher.update(e),this},finalize:function(e){var t=this._hasher,a=t.finalize(e);return t.reset(),t.finalize(this._oKey.clone().concat(a))}})))})),je((function(e,t){e.exports=He.HmacMD5}))),Je=je((function(e,t){e.exports=He.enc.Utf8})),We=je((function(e,t){var a,o,n;e.exports=(n=(o=a=He).lib.WordArray,o.enc.Base64={stringify:function(e){var t=e.words,a=e.sigBytes,o=this._map;e.clamp();for(var n=[],s=0;s<a;s+=3)for(var i=(t[s>>>2]>>>24-s%4*8&255)<<16|(t[s+1>>>2]>>>24-(s+1)%4*8&255)<<8|t[s+2>>>2]>>>24-(s+2)%4*8&255,r=0;r<4&&s+.75*r<a;r++)n.push(o.charAt(i>>>6*(3-r)&63));var l=o.charAt(64);if(l)for(;n.length%4;)n.push(l);return n.join("")},parse:function(e){var t=e.length,a=this._map,o=this._reverseMap;if(!o){o=this._reverseMap=[];for(var s=0;s<a.length;s++)o[a.charCodeAt(s)]=s}var i=a.charAt(64);if(i){var r=e.indexOf(i);-1!==r&&(t=r)}return function(e,t,a){for(var o=[],s=0,i=0;i<t;i++)if(i%4){var r=a[e.charCodeAt(i-1)]<<i%4*2,l=a[e.charCodeAt(i)]>>>6-i%4*2;o[s>>>2]|=(r|l)<<24-s%4*8,s++}return n.create(o,s)}(e,t,o)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="},a.enc.Base64)}));const Ke="FUNCTION",Ye="pending",Qe="rejected";function Xe(e){return Object.prototype.toString.call(e).slice(8,-1).toLowerCase()}function Ze(e){return"object"===Xe(e)}function et(e){return"function"==typeof e}function tt(e){return function(){try{return e.apply(e,arguments)}catch(t){console.error(t)}}}const at="REJECTED",ot="NOT_PENDING";class nt{constructor({createPromise:e,retryRule:t=at}={}){this.createPromise=e,this.status=null,this.promise=null,this.retryRule=t}get needRetry(){if(!this.status)return!0;switch(this.retryRule){case at:return this.status===Qe;case ot:return this.status!==Ye}}exec(){return this.needRetry?(this.status=Ye,this.promise=this.createPromise().then((e=>(this.status="fulfilled",Promise.resolve(e))),(e=>(this.status=Qe,Promise.reject(e)))),this.promise):this.promise}}function st(e){return e&&"string"==typeof e?JSON.parse(e):e}const it=st([]);st("");const rt=st("[]")||[];let lt="";try{lt="__UNI__1619D0F"}catch(Qt){}let ct={};function ut(e,t={}){var a,o;return a=ct,o=e,Object.prototype.hasOwnProperty.call(a,o)||(ct[e]=t),ct[e]}ct=uni._globalUniCloudObj?uni._globalUniCloudObj:uni._globalUniCloudObj={};const dt=["invoke","success","fail","complete"],mt=ut("_globalUniCloudInterceptor");function pt(e,t){mt[e]||(mt[e]={}),Ze(t)&&Object.keys(t).forEach((a=>{dt.indexOf(a)>-1&&function(e,t,a){let o=mt[e][t];o||(o=mt[e][t]=[]),-1===o.indexOf(a)&&et(a)&&o.push(a)}(e,a,t[a])}))}function ht(e,t){mt[e]||(mt[e]={}),Ze(t)?Object.keys(t).forEach((a=>{dt.indexOf(a)>-1&&function(e,t,a){const o=mt[e][t];if(!o)return;const n=o.indexOf(a);n>-1&&o.splice(n,1)}(e,a,t[a])})):delete mt[e]}function gt(e,t){return e&&0!==e.length?e.reduce(((e,a)=>e.then((()=>a(t)))),Promise.resolve()):Promise.resolve()}function ft(e,t){return mt[e]&&mt[e][t]||[]}function yt(e){pt("callObject",e)}const vt=ut("_globalUniCloudListener"),kt="response",_t="needLogin",wt="refreshToken",bt="clientdb",Nt="cloudfunction",Et="cloudobject";function xt(e){return vt[e]||(vt[e]=[]),vt[e]}function Ct(e,t){const a=xt(e);a.includes(t)||a.push(t)}function Vt(e,t){const a=xt(e),o=a.indexOf(t);-1!==o&&a.splice(o,1)}function St(e,t){const a=xt(e);for(let o=0;o<a.length;o++)(0,a[o])(t)}let Bt,Tt=!1;function Pt(){return Bt||(Bt=new Promise((e=>{Tt&&e(),function t(){if("function"==typeof getCurrentPages){const t=getCurrentPages();t&&t[0]&&(Tt=!0,e())}Tt||setTimeout((()=>{t()}),30)}()})),Bt)}function Dt(e){const t={};for(const a in e){const o=e[a];et(o)&&(t[a]=tt(o))}return t}class It extends Error{constructor(e){super(e.message),this.errMsg=e.message||e.errMsg||"unknown system error",this.code=this.errCode=e.code||e.errCode||"SYSTEM_ERROR",this.errSubject=this.subject=e.subject||e.errSubject,this.cause=e.cause,this.requestId=e.requestId}toJson(e=0){if(!(e>=10))return e++,{errCode:this.errCode,errMsg:this.errMsg,errSubject:this.errSubject,cause:this.cause&&this.cause.toJson?this.cause.toJson(e):this.cause}}}var Lt={request:e=>uni.request(e),uploadFile:e=>uni.uploadFile(e),setStorageSync:(e,t)=>uni.setStorageSync(e,t),getStorageSync:e=>uni.getStorageSync(e),removeStorageSync:e=>uni.removeStorageSync(e),clearStorageSync:()=>uni.clearStorageSync(),connectSocket:e=>uni.connectSocket(e)};function At(e){return e&&At(e.__v_raw)||e}function Ot(){return{token:Lt.getStorageSync("uni_id_token")||Lt.getStorageSync("uniIdToken"),tokenExpired:Lt.getStorageSync("uni_id_token_expired")}}function Ft({token:e,tokenExpired:t}={}){e&&Lt.setStorageSync("uni_id_token",e),t&&Lt.setStorageSync("uni_id_token_expired",t)}let Mt,Rt;function $t(){return Mt||(Mt=uni.getSystemInfoSync()),Mt}function Ut(){let e,t;try{if(uni.getLaunchOptionsSync){if(uni.getLaunchOptionsSync.toString().indexOf("not yet implemented")>-1)return;const{scene:a,channel:o}=uni.getLaunchOptionsSync();e=o,t=a}}catch(a){}return{channel:e,scene:t}}let zt={};function jt(){const e=uni.getLocale&&uni.getLocale()||"en";if(Rt)return{...zt,...Rt,locale:e,LOCALE:e};const t=$t(),{deviceId:a,osName:o,uniPlatform:n,appId:s}=t,i=["appId","appLanguage","appName","appVersion","appVersionCode","appWgtVersion","browserName","browserVersion","deviceBrand","deviceId","deviceModel","deviceType","osName","osVersion","romName","romVersion","ua","hostName","hostVersion","uniPlatform","uniRuntimeVersion","uniRuntimeVersionCode","uniCompilerVersion","uniCompilerVersionCode"];for(const r in t)Object.hasOwnProperty.call(t,r)&&-1===i.indexOf(r)&&delete t[r];return Rt={PLATFORM:n,OS:o,APPID:s,DEVICEID:a,...Ut(),...t},{...zt,...Rt,locale:e,LOCALE:e}}var qt=function(e,t){let a="";return Object.keys(e).sort().forEach((function(t){e[t]&&(a=a+"&"+t+"="+e[t])})),a=a.slice(1),Ge(a,t).toString()},Ht=function(e,t){return new Promise(((a,o)=>{t(Object.assign(e,{complete(e){e||(e={});const t=e.data&&e.data.header&&e.data.header["x-serverless-request-id"]||e.header&&e.header["request-id"];if(!e.statusCode||e.statusCode>=400){const a=e.data&&e.data.error&&e.data.error.code||"SYS_ERR",n=e.data&&e.data.error&&e.data.error.message||e.errMsg||"request:fail";return o(new It({code:a,message:n,requestId:t}))}const n=e.data;if(n.error)return o(new It({code:n.error.code,message:n.error.message,requestId:t}));n.result=n.data,n.requestId=t,delete n.data,a(n)}}))}))},Gt=function(e){return We.stringify(Je.parse(e))},Jt=class{constructor(e){["spaceId","clientSecret"].forEach((t=>{if(!Object.prototype.hasOwnProperty.call(e,t))throw new Error(`${t} required`)})),this.config=Object.assign({},{endpoint:0===e.spaceId.indexOf("mp-")?"https://api.next.bspapp.com":"https://api.bspapp.com"},e),this.config.provider="aliyun",this.config.requestUrl=this.config.endpoint+"/client",this.config.envType=this.config.envType||"public",this.config.accessTokenKey="access_token_"+this.config.spaceId,this.adapter=Lt,this._getAccessTokenPromiseHub=new nt({createPromise:()=>this.requestAuth(this.setupRequest({method:"serverless.auth.user.anonymousAuthorize",params:"{}"},"auth")).then((e=>{if(!e.result||!e.result.accessToken)throw new It({code:"AUTH_FAILED",message:"获取accessToken失败"});this.setAccessToken(e.result.accessToken)})),retryRule:ot})}get hasAccessToken(){return!!this.accessToken}setAccessToken(e){this.accessToken=e}requestWrapped(e){return Ht(e,this.adapter.request)}requestAuth(e){return this.requestWrapped(e)}request(e,t){return Promise.resolve().then((()=>this.hasAccessToken?t?this.requestWrapped(e):this.requestWrapped(e).catch((t=>new Promise(((e,a)=>{!t||"GATEWAY_INVALID_TOKEN"!==t.code&&"InvalidParameter.InvalidToken"!==t.code?a(t):e()})).then((()=>this.getAccessToken())).then((()=>{const t=this.rebuildRequest(e);return this.request(t,!0)})))):this.getAccessToken().then((()=>{const t=this.rebuildRequest(e);return this.request(t,!0)}))))}rebuildRequest(e){const t=Object.assign({},e);return t.data.token=this.accessToken,t.header["x-basement-token"]=this.accessToken,t.header["x-serverless-sign"]=qt(t.data,this.config.clientSecret),t}setupRequest(e,t){const a=Object.assign({},e,{spaceId:this.config.spaceId,timestamp:Date.now()}),o={"Content-Type":"application/json"};return"auth"!==t&&(a.token=this.accessToken,o["x-basement-token"]=this.accessToken),o["x-serverless-sign"]=qt(a,this.config.clientSecret),{url:this.config.requestUrl,method:"POST",data:a,dataType:"json",header:o}}getAccessToken(){return this._getAccessTokenPromiseHub.exec()}async authorize(){await this.getAccessToken()}callFunction(e){const t={method:"serverless.function.runtime.invoke",params:JSON.stringify({functionTarget:e.name,functionArgs:e.data||{}})};return this.request(this.setupRequest(t))}getOSSUploadOptionsFromPath(e){const t={method:"serverless.file.resource.generateProximalSign",params:JSON.stringify(e)};return this.request(this.setupRequest(t))}uploadFileToOSS({url:e,formData:t,name:a,filePath:o,fileType:n,onUploadProgress:s}){return new Promise(((i,r)=>{const l=this.adapter.uploadFile({url:e,formData:t,name:a,filePath:o,fileType:n,header:{"X-OSS-server-side-encrpytion":"AES256"},success(e){e&&e.statusCode<400?i(e):r(new It({code:"UPLOAD_FAILED",message:"文件上传失败"}))},fail(e){r(new It({code:e.code||"UPLOAD_FAILED",message:e.message||e.errMsg||"文件上传失败"}))}});"function"==typeof s&&l&&"function"==typeof l.onProgressUpdate&&l.onProgressUpdate((e=>{s({loaded:e.totalBytesSent,total:e.totalBytesExpectedToSend})}))}))}reportOSSUpload(e){const t={method:"serverless.file.resource.report",params:JSON.stringify(e)};return this.request(this.setupRequest(t))}async uploadFile({filePath:e,cloudPath:t,fileType:a="image",cloudPathAsRealPath:o=!1,onUploadProgress:n,config:s}){if("string"!==Xe(t))throw new It({code:"INVALID_PARAM",message:"cloudPath必须为字符串类型"});if(!(t=t.trim()))throw new It({code:"INVALID_PARAM",message:"cloudPath不可为空"});if(/:\/\//.test(t))throw new It({code:"INVALID_PARAM",message:"cloudPath不合法"});const i=s&&s.envType||this.config.envType;if(o&&("/"!==t[0]&&(t="/"+t),t.indexOf("\\")>-1))throw new It({code:"INVALID_PARAM",message:"使用cloudPath作为路径时,cloudPath不可包含“\\”"});const r=(await this.getOSSUploadOptionsFromPath({env:i,filename:o?t.split("/").pop():t,fileId:o?t:void 0})).result,l="https://"+r.cdnDomain+"/"+r.ossPath,{securityToken:c,accessKeyId:u,signature:d,host:m,ossPath:p,id:h,policy:g,ossCallbackUrl:f}=r,y={"Cache-Control":"max-age=2592000","Content-Disposition":"attachment",OSSAccessKeyId:u,Signature:d,host:m,id:h,key:p,policy:g,success_action_status:200};if(c&&(y["x-oss-security-token"]=c),f){const e=JSON.stringify({callbackUrl:f,callbackBody:JSON.stringify({fileId:h,spaceId:this.config.spaceId}),callbackBodyType:"application/json"});y.callback=Gt(e)}const v={url:"https://"+r.host,formData:y,fileName:"file",name:"file",filePath:e,fileType:a};if(await this.uploadFileToOSS(Object.assign({},v,{onUploadProgress:n})),f)return{success:!0,filePath:e,fileID:l};if((await this.reportOSSUpload({id:h})).success)return{success:!0,filePath:e,fileID:l};throw new It({code:"UPLOAD_FAILED",message:"文件上传失败"})}getTempFileURL({fileList:e}={}){return new Promise(((t,a)=>{Array.isArray(e)&&0!==e.length||a(new It({code:"INVALID_PARAM",message:"fileList的元素必须是非空的字符串"})),t({fileList:e.map((e=>({fileID:e,tempFileURL:e})))})}))}async getFileInfo({fileList:e}={}){if(!Array.isArray(e)||0===e.length)throw new It({code:"INVALID_PARAM",message:"fileList的元素必须是非空的字符串"});const t={method:"serverless.file.resource.info",params:JSON.stringify({id:e.map((e=>e.split("?")[0])).join(",")})};return{fileList:(await this.request(this.setupRequest(t))).result}}},Wt={init(e){const t=new Jt(e),a={signInAnonymously:function(){return t.authorize()},getLoginState:function(){return Promise.resolve(!1)}};return t.auth=function(){return a},t.customAuth=t.auth,t}};const Kt="undefined"!=typeof location&&"http:"===location.protocol?"http:":"https:";var Yt,Qt;(Qt=Yt||(Yt={})).local="local",Qt.none="none",Qt.session="session";var Xt=function(){},Zt=je((function(e,t){var a;e.exports=(a=He,function(e){var t=a,o=t.lib,n=o.WordArray,s=o.Hasher,i=t.algo,r=[],l=[];!function(){function t(t){for(var a=e.sqrt(t),o=2;o<=a;o++)if(!(t%o))return!1;return!0}function a(e){return 4294967296*(e-(0|e))|0}for(var o=2,n=0;n<64;)t(o)&&(n<8&&(r[n]=a(e.pow(o,.5))),l[n]=a(e.pow(o,1/3)),n++),o++}();var c=[],u=i.SHA256=s.extend({_doReset:function(){this._hash=new n.init(r.slice(0))},_doProcessBlock:function(e,t){for(var a=this._hash.words,o=a[0],n=a[1],s=a[2],i=a[3],r=a[4],u=a[5],d=a[6],m=a[7],p=0;p<64;p++){if(p<16)c[p]=0|e[t+p];else{var h=c[p-15],g=(h<<25|h>>>7)^(h<<14|h>>>18)^h>>>3,f=c[p-2],y=(f<<15|f>>>17)^(f<<13|f>>>19)^f>>>10;c[p]=g+c[p-7]+y+c[p-16]}var v=o&n^o&s^n&s,k=(o<<30|o>>>2)^(o<<19|o>>>13)^(o<<10|o>>>22),_=m+((r<<26|r>>>6)^(r<<21|r>>>11)^(r<<7|r>>>25))+(r&u^~r&d)+l[p]+c[p];m=d,d=u,u=r,r=i+_|0,i=s,s=n,n=o,o=_+(k+v)|0}a[0]=a[0]+o|0,a[1]=a[1]+n|0,a[2]=a[2]+s|0,a[3]=a[3]+i|0,a[4]=a[4]+r|0,a[5]=a[5]+u|0,a[6]=a[6]+d|0,a[7]=a[7]+m|0},_doFinalize:function(){var t=this._data,a=t.words,o=8*this._nDataBytes,n=8*t.sigBytes;return a[n>>>5]|=128<<24-n%32,a[14+(n+64>>>9<<4)]=e.floor(o/4294967296),a[15+(n+64>>>9<<4)]=o,t.sigBytes=4*a.length,this._process(),this._hash},clone:function(){var e=s.clone.call(this);return e._hash=this._hash.clone(),e}});t.SHA256=s._createHelper(u),t.HmacSHA256=s._createHmacHelper(u)}(Math),a.SHA256)})),ea=Zt,ta=je((function(e,t){e.exports=He.HmacSHA256}));const aa=()=>{let e;if(!Promise){e=()=>{},e.promise={};const t=()=>{throw new It({message:'Your Node runtime does support ES6 Promises. Set "global.Promise" to your preferred implementation of promises.'})};return Object.defineProperty(e.promise,"then",{get:t}),Object.defineProperty(e.promise,"catch",{get:t}),e}const t=new Promise(((t,a)=>{e=(e,o)=>e?a(e):t(o)}));return e.promise=t,e};function oa(e){return void 0===e}function na(e){return"[object Null]"===Object.prototype.toString.call(e)}var sa;!function(e){e.WEB="web",e.WX_MP="wx_mp"}(sa||(sa={}));const ia={adapter:null,runtime:void 0},ra=["anonymousUuidKey"];class la extends Xt{constructor(){super(),ia.adapter.root.tcbObject||(ia.adapter.root.tcbObject={})}setItem(e,t){ia.adapter.root.tcbObject[e]=t}getItem(e){return ia.adapter.root.tcbObject[e]}removeItem(e){delete ia.adapter.root.tcbObject[e]}clear(){delete ia.adapter.root.tcbObject}}function ca(e,t){switch(e){case"local":return t.localStorage||new la;case"none":return new la;default:return t.sessionStorage||new la}}class ua{constructor(e){if(!this._storage){this._persistence=ia.adapter.primaryStorage||e.persistence,this._storage=ca(this._persistence,ia.adapter);const t=`access_token_${e.env}`,a=`access_token_expire_${e.env}`,o=`refresh_token_${e.env}`,n=`anonymous_uuid_${e.env}`,s=`login_type_${e.env}`,i=`user_info_${e.env}`;this.keys={accessTokenKey:t,accessTokenExpireKey:a,refreshTokenKey:o,anonymousUuidKey:n,loginTypeKey:s,userInfoKey:i}}}updatePersistence(e){if(e===this._persistence)return;const t="local"===this._persistence;this._persistence=e;const a=ca(e,ia.adapter);for(const o in this.keys){const e=this.keys[o];if(t&&ra.includes(o))continue;const n=this._storage.getItem(e);oa(n)||na(n)||(a.setItem(e,n),this._storage.removeItem(e))}this._storage=a}setStore(e,t,a){if(!this._storage)return;const o={version:a||"localCachev1",content:t},n=JSON.stringify(o);try{this._storage.setItem(e,n)}catch(s){throw s}}getStore(e,t){try{if(!this._storage)return}catch(o){return""}t=t||"localCachev1";const a=this._storage.getItem(e);return a&&a.indexOf(t)>=0?JSON.parse(a).content:""}removeStore(e){this._storage.removeItem(e)}}const da={},ma={};function pa(e){return da[e]}class ha{constructor(e,t){this.data=t||null,this.name=e}}class ga extends ha{constructor(e,t){super("error",{error:e,data:t}),this.error=e}}const fa=new class{constructor(){this._listeners={}}on(e,t){return a=e,o=t,(n=this._listeners)[a]=n[a]||[],n[a].push(o),this;var a,o,n}off(e,t){return function(e,t,a){if(a&&a[e]){const o=a[e].indexOf(t);-1!==o&&a[e].splice(o,1)}}(e,t,this._listeners),this}fire(e,t){if(e instanceof ga)return console.error(e.error),this;const a="string"==typeof e?new ha(e,t||{}):e,o=a.name;if(this._listens(o)){a.target=this;const e=this._listeners[o]?[...this._listeners[o]]:[];for(const t of e)t.call(this,a)}return this}_listens(e){return this._listeners[e]&&this._listeners[e].length>0}};function ya(e,t){fa.on(e,t)}function va(e,t={}){fa.fire(e,t)}function ka(e,t){fa.off(e,t)}const _a="loginStateChanged",wa="loginStateExpire",ba="loginTypeChanged",Na="anonymousConverted",Ea="refreshAccessToken";var xa;!function(e){e.ANONYMOUS="ANONYMOUS",e.WECHAT="WECHAT",e.WECHAT_PUBLIC="WECHAT-PUBLIC",e.WECHAT_OPEN="WECHAT-OPEN",e.CUSTOM="CUSTOM",e.EMAIL="EMAIL",e.USERNAME="USERNAME",e.NULL="NULL"}(xa||(xa={}));const Ca=["auth.getJwt","auth.logout","auth.signInWithTicket","auth.signInAnonymously","auth.signIn","auth.fetchAccessTokenWithRefreshToken","auth.signUpWithEmailAndPassword","auth.activateEndUserMail","auth.sendPasswordResetEmail","auth.resetPasswordWithToken","auth.isUsernameRegistered"],Va={"X-SDK-Version":"1.3.5"};function Sa(e,t,a){const o=e[t];e[t]=function(t){const n={},s={};a.forEach((a=>{const{data:o,headers:i}=a.call(e,t);Object.assign(n,o),Object.assign(s,i)}));const i=t.data;return i&&(()=>{var e;if(e=i,"[object FormData]"!==Object.prototype.toString.call(e))t.data={...i,...n};else for(const t in n)i.append(t,n[t])})(),t.headers={...t.headers||{},...s},o.call(e,t)}}function Ba(){const e=Math.random().toString(16).slice(2);return{data:{seqId:e},headers:{...Va,"x-seqid":e}}}class Ta{constructor(e={}){var t;this.config=e,this._reqClass=new ia.adapter.reqClass({timeout:this.config.timeout,timeoutMsg:`请求在${this.config.timeout/1e3}s内未完成,已中断`,restrictedMethods:["post"]}),this._cache=pa(this.config.env),this._localCache=(t=this.config.env,ma[t]),Sa(this._reqClass,"post",[Ba]),Sa(this._reqClass,"upload",[Ba]),Sa(this._reqClass,"download",[Ba])}async post(e){return await this._reqClass.post(e)}async upload(e){return await this._reqClass.upload(e)}async download(e){return await this._reqClass.download(e)}async refreshAccessToken(){let e,t;this._refreshAccessTokenPromise||(this._refreshAccessTokenPromise=this._refreshAccessToken());try{e=await this._refreshAccessTokenPromise}catch(a){t=a}if(this._refreshAccessTokenPromise=null,this._shouldRefreshAccessTokenHook=null,t)throw t;return e}async _refreshAccessToken(){const{accessTokenKey:e,accessTokenExpireKey:t,refreshTokenKey:a,loginTypeKey:o,anonymousUuidKey:n}=this._cache.keys;this._cache.removeStore(e),this._cache.removeStore(t);let s=this._cache.getStore(a);if(!s)throw new It({message:"未登录CloudBase"});const i={refresh_token:s},r=await this.request("auth.fetchAccessTokenWithRefreshToken",i);if(r.data.code){const{code:e}=r.data;if("SIGN_PARAM_INVALID"===e||"REFRESH_TOKEN_EXPIRED"===e||"INVALID_REFRESH_TOKEN"===e){if(this._cache.getStore(o)===xa.ANONYMOUS&&"INVALID_REFRESH_TOKEN"===e){const e=this._cache.getStore(n),t=this._cache.getStore(a),o=await this.send("auth.signInAnonymously",{anonymous_uuid:e,refresh_token:t});return this.setRefreshToken(o.refresh_token),this._refreshAccessToken()}va(wa),this._cache.removeStore(a)}throw new It({code:r.data.code,message:`刷新access token失败:${r.data.code}`})}if(r.data.access_token)return va(Ea),this._cache.setStore(e,r.data.access_token),this._cache.setStore(t,r.data.access_token_expire+Date.now()),{accessToken:r.data.access_token,accessTokenExpire:r.data.access_token_expire};r.data.refresh_token&&(this._cache.removeStore(a),this._cache.setStore(a,r.data.refresh_token),this._refreshAccessToken())}async getAccessToken(){const{accessTokenKey:e,accessTokenExpireKey:t,refreshTokenKey:a}=this._cache.keys;if(!this._cache.getStore(a))throw new It({message:"refresh token不存在,登录状态异常"});let o=this._cache.getStore(e),n=this._cache.getStore(t),s=!0;return this._shouldRefreshAccessTokenHook&&!(await this._shouldRefreshAccessTokenHook(o,n))&&(s=!1),(!o||!n||n<Date.now())&&s?this.refreshAccessToken():{accessToken:o,accessTokenExpire:n}}async request(e,t,a){const o=`x-tcb-trace_${this.config.env}`;let n="application/x-www-form-urlencoded";const s={action:e,env:this.config.env,dataVersion:"2019-08-16",...t};if(-1===Ca.indexOf(e)){const{refreshTokenKey:e}=this._cache.keys;this._cache.getStore(e)&&(s.access_token=(await this.getAccessToken()).accessToken)}let i;if("storage.uploadFile"===e){i=new FormData;for(let e in i)i.hasOwnProperty(e)&&void 0!==i[e]&&i.append(e,s[e]);n="multipart/form-data"}else{n="application/json",i={};for(let e in s)void 0!==s[e]&&(i[e]=s[e])}let r={headers:{"content-type":n}};a&&a.onUploadProgress&&(r.onUploadProgress=a.onUploadProgress);const l=this._localCache.getStore(o);l&&(r.headers["X-TCB-Trace"]=l);const{parse:c,inQuery:u,search:d}=t;let m={env:this.config.env};c&&(m.parse=!0),u&&(m={...u,...m});let p=function(e,t,a={}){const o=/\?/.test(t);let n="";for(let s in a)""===n?!o&&(t+="?"):n+="&",n+=`${s}=${encodeURIComponent(a[s])}`;return/^http(s)?\:\/\//.test(t+=n)?t:`${e}${t}`}(Kt,"//tcb-api.tencentcloudapi.com/web",m);d&&(p+=d);const h=await this.post({url:p,data:i,...r}),g=h.header&&h.header["x-tcb-trace"];if(g&&this._localCache.setStore(o,g),200!==Number(h.status)&&200!==Number(h.statusCode)||!h.data)throw new It({code:"NETWORK_ERROR",message:"network request error"});return h}async send(e,t={}){const a=await this.request(e,t,{onUploadProgress:t.onUploadProgress});if("ACCESS_TOKEN_EXPIRED"===a.data.code&&-1===Ca.indexOf(e)){await this.refreshAccessToken();const a=await this.request(e,t,{onUploadProgress:t.onUploadProgress});if(a.data.code)throw new It({code:a.data.code,message:a.data.message});return a.data}if(a.data.code)throw new It({code:a.data.code,message:a.data.message});return a.data}setRefreshToken(e){const{accessTokenKey:t,accessTokenExpireKey:a,refreshTokenKey:o}=this._cache.keys;this._cache.removeStore(t),this._cache.removeStore(a),this._cache.setStore(o,e)}}const Pa={};function Da(e){return Pa[e]}class Ia{constructor(e){this.config=e,this._cache=pa(e.env),this._request=Da(e.env)}setRefreshToken(e){const{accessTokenKey:t,accessTokenExpireKey:a,refreshTokenKey:o}=this._cache.keys;this._cache.removeStore(t),this._cache.removeStore(a),this._cache.setStore(o,e)}setAccessToken(e,t){const{accessTokenKey:a,accessTokenExpireKey:o}=this._cache.keys;this._cache.setStore(a,e),this._cache.setStore(o,t)}async refreshUserInfo(){const{data:e}=await this._request.send("auth.getUserInfo",{});return this.setLocalUserInfo(e),e}setLocalUserInfo(e){const{userInfoKey:t}=this._cache.keys;this._cache.setStore(t,e)}}class La{constructor(e){if(!e)throw new It({code:"PARAM_ERROR",message:"envId is not defined"});this._envId=e,this._cache=pa(this._envId),this._request=Da(this._envId),this.setUserInfo()}linkWithTicket(e){if("string"!=typeof e)throw new It({code:"PARAM_ERROR",message:"ticket must be string"});return this._request.send("auth.linkWithTicket",{ticket:e})}linkWithRedirect(e){e.signInWithRedirect()}updatePassword(e,t){return this._request.send("auth.updatePassword",{oldPassword:t,newPassword:e})}updateEmail(e){return this._request.send("auth.updateEmail",{newEmail:e})}updateUsername(e){if("string"!=typeof e)throw new It({code:"PARAM_ERROR",message:"username must be a string"});return this._request.send("auth.updateUsername",{username:e})}async getLinkedUidList(){const{data:e}=await this._request.send("auth.getLinkedUidList",{});let t=!1;const{users:a}=e;return a.forEach((e=>{e.wxOpenId&&e.wxPublicId&&(t=!0)})),{users:a,hasPrimaryUid:t}}setPrimaryUid(e){return this._request.send("auth.setPrimaryUid",{uid:e})}unlink(e){return this._request.send("auth.unlink",{platform:e})}async update(e){const{nickName:t,gender:a,avatarUrl:o,province:n,country:s,city:i}=e,{data:r}=await this._request.send("auth.updateUserInfo",{nickName:t,gender:a,avatarUrl:o,province:n,country:s,city:i});this.setLocalUserInfo(r)}async refresh(){const{data:e}=await this._request.send("auth.getUserInfo",{});return this.setLocalUserInfo(e),e}setUserInfo(){const{userInfoKey:e}=this._cache.keys,t=this._cache.getStore(e);["uid","loginType","openid","wxOpenId","wxPublicId","unionId","qqMiniOpenId","email","hasPassword","customUserId","nickName","gender","avatarUrl"].forEach((e=>{this[e]=t[e]})),this.location={country:t.country,province:t.province,city:t.city}}setLocalUserInfo(e){const{userInfoKey:t}=this._cache.keys;this._cache.setStore(t,e),this.setUserInfo()}}class Aa{constructor(e){if(!e)throw new It({code:"PARAM_ERROR",message:"envId is not defined"});this._cache=pa(e);const{refreshTokenKey:t,accessTokenKey:a,accessTokenExpireKey:o}=this._cache.keys,n=this._cache.getStore(t),s=this._cache.getStore(a),i=this._cache.getStore(o);this.credential={refreshToken:n,accessToken:s,accessTokenExpire:i},this.user=new La(e)}get isAnonymousAuth(){return this.loginType===xa.ANONYMOUS}get isCustomAuth(){return this.loginType===xa.CUSTOM}get isWeixinAuth(){return this.loginType===xa.WECHAT||this.loginType===xa.WECHAT_OPEN||this.loginType===xa.WECHAT_PUBLIC}get loginType(){return this._cache.getStore(this._cache.keys.loginTypeKey)}}class Oa extends Ia{async signIn(){this._cache.updatePersistence("local");const{anonymousUuidKey:e,refreshTokenKey:t}=this._cache.keys,a=this._cache.getStore(e)||void 0,o=this._cache.getStore(t)||void 0,n=await this._request.send("auth.signInAnonymously",{anonymous_uuid:a,refresh_token:o});if(n.uuid&&n.refresh_token){this._setAnonymousUUID(n.uuid),this.setRefreshToken(n.refresh_token),await this._request.refreshAccessToken(),va(_a),va(ba,{env:this.config.env,loginType:xa.ANONYMOUS,persistence:"local"});const e=new Aa(this.config.env);return await e.user.refresh(),e}throw new It({message:"匿名登录失败"})}async linkAndRetrieveDataWithTicket(e){const{anonymousUuidKey:t,refreshTokenKey:a}=this._cache.keys,o=this._cache.getStore(t),n=this._cache.getStore(a),s=await this._request.send("auth.linkAndRetrieveDataWithTicket",{anonymous_uuid:o,refresh_token:n,ticket:e});if(s.refresh_token)return this._clearAnonymousUUID(),this.setRefreshToken(s.refresh_token),await this._request.refreshAccessToken(),va(Na,{env:this.config.env}),va(ba,{loginType:xa.CUSTOM,persistence:"local"}),{credential:{refreshToken:s.refresh_token}};throw new It({message:"匿名转化失败"})}_setAnonymousUUID(e){const{anonymousUuidKey:t,loginTypeKey:a}=this._cache.keys;this._cache.removeStore(t),this._cache.setStore(t,e),this._cache.setStore(a,xa.ANONYMOUS)}_clearAnonymousUUID(){this._cache.removeStore(this._cache.keys.anonymousUuidKey)}}class Fa extends Ia{async signIn(e){if("string"!=typeof e)throw new It({code:"PARAM_ERROR",message:"ticket must be a string"});const{refreshTokenKey:t}=this._cache.keys,a=await this._request.send("auth.signInWithTicket",{ticket:e,refresh_token:this._cache.getStore(t)||""});if(a.refresh_token)return this.setRefreshToken(a.refresh_token),await this._request.refreshAccessToken(),va(_a),va(ba,{env:this.config.env,loginType:xa.CUSTOM,persistence:this.config.persistence}),await this.refreshUserInfo(),new Aa(this.config.env);throw new It({message:"自定义登录失败"})}}class Ma extends Ia{async signIn(e,t){if("string"!=typeof e)throw new It({code:"PARAM_ERROR",message:"email must be a string"});const{refreshTokenKey:a}=this._cache.keys,o=await this._request.send("auth.signIn",{loginType:"EMAIL",email:e,password:t,refresh_token:this._cache.getStore(a)||""}),{refresh_token:n,access_token:s,access_token_expire:i}=o;if(n)return this.setRefreshToken(n),s&&i?this.setAccessToken(s,i):await this._request.refreshAccessToken(),await this.refreshUserInfo(),va(_a),va(ba,{env:this.config.env,loginType:xa.EMAIL,persistence:this.config.persistence}),new Aa(this.config.env);throw o.code?new It({code:o.code,message:`邮箱登录失败: ${o.message}`}):new It({message:"邮箱登录失败"})}async activate(e){return this._request.send("auth.activateEndUserMail",{token:e})}async resetPasswordWithToken(e,t){return this._request.send("auth.resetPasswordWithToken",{token:e,newPassword:t})}}class Ra extends Ia{async signIn(e,t){if("string"!=typeof e)throw new It({code:"PARAM_ERROR",message:"username must be a string"});"string"!=typeof t&&(t="",console.warn("password is empty"));const{refreshTokenKey:a}=this._cache.keys,o=await this._request.send("auth.signIn",{loginType:xa.USERNAME,username:e,password:t,refresh_token:this._cache.getStore(a)||""}),{refresh_token:n,access_token_expire:s,access_token:i}=o;if(n)return this.setRefreshToken(n),i&&s?this.setAccessToken(i,s):await this._request.refreshAccessToken(),await this.refreshUserInfo(),va(_a),va(ba,{env:this.config.env,loginType:xa.USERNAME,persistence:this.config.persistence}),new Aa(this.config.env);throw o.code?new It({code:o.code,message:`用户名密码登录失败: ${o.message}`}):new It({message:"用户名密码登录失败"})}}class $a{constructor(e){this.config=e,this._cache=pa(e.env),this._request=Da(e.env),this._onAnonymousConverted=this._onAnonymousConverted.bind(this),this._onLoginTypeChanged=this._onLoginTypeChanged.bind(this),ya(ba,this._onLoginTypeChanged)}get currentUser(){const e=this.hasLoginState();return e&&e.user||null}get loginType(){return this._cache.getStore(this._cache.keys.loginTypeKey)}anonymousAuthProvider(){return new Oa(this.config)}customAuthProvider(){return new Fa(this.config)}emailAuthProvider(){return new Ma(this.config)}usernameAuthProvider(){return new Ra(this.config)}async signInAnonymously(){return new Oa(this.config).signIn()}async signInWithEmailAndPassword(e,t){return new Ma(this.config).signIn(e,t)}signInWithUsernameAndPassword(e,t){return new Ra(this.config).signIn(e,t)}async linkAndRetrieveDataWithTicket(e){return this._anonymousAuthProvider||(this._anonymousAuthProvider=new Oa(this.config)),ya(Na,this._onAnonymousConverted),await this._anonymousAuthProvider.linkAndRetrieveDataWithTicket(e)}async signOut(){if(this.loginType===xa.ANONYMOUS)throw new It({message:"匿名用户不支持登出操作"});const{refreshTokenKey:e,accessTokenKey:t,accessTokenExpireKey:a}=this._cache.keys,o=this._cache.getStore(e);if(!o)return;const n=await this._request.send("auth.logout",{refresh_token:o});return this._cache.removeStore(e),this._cache.removeStore(t),this._cache.removeStore(a),va(_a),va(ba,{env:this.config.env,loginType:xa.NULL,persistence:this.config.persistence}),n}async signUpWithEmailAndPassword(e,t){return this._request.send("auth.signUpWithEmailAndPassword",{email:e,password:t})}async sendPasswordResetEmail(e){return this._request.send("auth.sendPasswordResetEmail",{email:e})}onLoginStateChanged(e){ya(_a,(()=>{const t=this.hasLoginState();e.call(this,t)}));const t=this.hasLoginState();e.call(this,t)}onLoginStateExpired(e){ya(wa,e.bind(this))}onAccessTokenRefreshed(e){ya(Ea,e.bind(this))}onAnonymousConverted(e){ya(Na,e.bind(this))}onLoginTypeChanged(e){ya(ba,(()=>{const t=this.hasLoginState();e.call(this,t)}))}async getAccessToken(){return{accessToken:(await this._request.getAccessToken()).accessToken,env:this.config.env}}hasLoginState(){const{refreshTokenKey:e}=this._cache.keys;return this._cache.getStore(e)?new Aa(this.config.env):null}async isUsernameRegistered(e){if("string"!=typeof e)throw new It({code:"PARAM_ERROR",message:"username must be a string"});const{data:t}=await this._request.send("auth.isUsernameRegistered",{username:e});return t&&t.isRegistered}getLoginState(){return Promise.resolve(this.hasLoginState())}async signInWithTicket(e){return new Fa(this.config).signIn(e)}shouldRefreshAccessToken(e){this._request._shouldRefreshAccessTokenHook=e.bind(this)}getUserInfo(){return this._request.send("auth.getUserInfo",{}).then((e=>e.code?e:{...e.data,requestId:e.seqId}))}getAuthHeader(){const{refreshTokenKey:e,accessTokenKey:t}=this._cache.keys,a=this._cache.getStore(e);return{"x-cloudbase-credentials":this._cache.getStore(t)+"/@@/"+a}}_onAnonymousConverted(e){const{env:t}=e.data;t===this.config.env&&this._cache.updatePersistence(this.config.persistence)}_onLoginTypeChanged(e){const{loginType:t,persistence:a,env:o}=e.data;o===this.config.env&&(this._cache.updatePersistence(a),this._cache.setStore(this._cache.keys.loginTypeKey,t))}}const Ua=function(e,t){t=t||aa();const a=Da(this.config.env),{cloudPath:o,filePath:n,onUploadProgress:s,fileType:i="image"}=e;return a.send("storage.getUploadMetadata",{path:o}).then((e=>{const{data:{url:r,authorization:l,token:c,fileId:u,cosFileId:d},requestId:m}=e,p={key:o,signature:l,"x-cos-meta-fileid":d,success_action_status:"201","x-cos-security-token":c};a.upload({url:r,data:p,file:n,name:o,fileType:i,onUploadProgress:s}).then((e=>{201===e.statusCode?t(null,{fileID:u,requestId:m}):t(new It({code:"STORAGE_REQUEST_FAIL",message:`STORAGE_REQUEST_FAIL: ${e.data}`}))})).catch((e=>{t(e)}))})).catch((e=>{t(e)})),t.promise},za=function(e,t){t=t||aa();const a=Da(this.config.env),{cloudPath:o}=e;return a.send("storage.getUploadMetadata",{path:o}).then((e=>{t(null,e)})).catch((e=>{t(e)})),t.promise},ja=function({fileList:e},t){if(t=t||aa(),!e||!Array.isArray(e))return{code:"INVALID_PARAM",message:"fileList必须是非空的数组"};for(let o of e)if(!o||"string"!=typeof o)return{code:"INVALID_PARAM",message:"fileList的元素必须是非空的字符串"};const a={fileid_list:e};return Da(this.config.env).send("storage.batchDeleteFile",a).then((e=>{e.code?t(null,e):t(null,{fileList:e.data.delete_list,requestId:e.requestId})})).catch((e=>{t(e)})),t.promise},qa=function({fileList:e},t){t=t||aa(),e&&Array.isArray(e)||t(null,{code:"INVALID_PARAM",message:"fileList必须是非空的数组"});let a=[];for(let n of e)"object"==typeof n?(n.hasOwnProperty("fileID")&&n.hasOwnProperty("maxAge")||t(null,{code:"INVALID_PARAM",message:"fileList的元素必须是包含fileID和maxAge的对象"}),a.push({fileid:n.fileID,max_age:n.maxAge})):"string"==typeof n?a.push({fileid:n}):t(null,{code:"INVALID_PARAM",message:"fileList的元素必须是字符串"});const o={file_list:a};return Da(this.config.env).send("storage.batchGetDownloadUrl",o).then((e=>{e.code?t(null,e):t(null,{fileList:e.data.download_list,requestId:e.requestId})})).catch((e=>{t(e)})),t.promise},Ha=async function({fileID:e},t){const a=(await qa.call(this,{fileList:[{fileID:e,maxAge:600}]})).fileList[0];if("SUCCESS"!==a.code)return t?t(a):new Promise((e=>{e(a)}));const o=Da(this.config.env);let n=a.download_url;if(n=encodeURI(n),!t)return o.download({url:n});t(await o.download({url:n}))},Ga=function({name:e,data:t,query:a,parse:o,search:n},s){const i=s||aa();let r;try{r=t?JSON.stringify(t):""}catch(c){return Promise.reject(c)}if(!e)return Promise.reject(new It({code:"PARAM_ERROR",message:"函数名不能为空"}));const l={inQuery:a,parse:o,search:n,function_name:e,request_data:r};return Da(this.config.env).send("functions.invokeFunction",l).then((e=>{if(e.code)i(null,e);else{let a=e.data.response_data;if(o)i(null,{result:a,requestId:e.requestId});else try{a=JSON.parse(e.data.response_data),i(null,{result:a,requestId:e.requestId})}catch(t){i(new It({message:"response data must be json"}))}}return i.promise})).catch((e=>{i(e)})),i.promise},Ja={timeout:15e3,persistence:"session"},Wa={};class Ka{constructor(e){this.config=e||this.config,this.authObj=void 0}init(e){switch(ia.adapter||(this.requestClient=new ia.adapter.reqClass({timeout:e.timeout||5e3,timeoutMsg:`请求在${(e.timeout||5e3)/1e3}s内未完成,已中断`})),this.config={...Ja,...e},!0){case this.config.timeout>6e5:console.warn("timeout大于可配置上限[10分钟],已重置为上限数值"),this.config.timeout=6e5;break;case this.config.timeout<100:console.warn("timeout小于可配置下限[100ms],已重置为下限数值"),this.config.timeout=100}return new Ka(this.config)}auth({persistence:e}={}){if(this.authObj)return this.authObj;const t=e||ia.adapter.primaryStorage||Ja.persistence;var a;return t!==this.config.persistence&&(this.config.persistence=t),function(e){const{env:t}=e;da[t]=new ua(e),ma[t]=new ua({...e,persistence:"local"})}(this.config),a=this.config,Pa[a.env]=new Ta(a),this.authObj=new $a(this.config),this.authObj}on(e,t){return ya.apply(this,[e,t])}off(e,t){return ka.apply(this,[e,t])}callFunction(e,t){return Ga.apply(this,[e,t])}deleteFile(e,t){return ja.apply(this,[e,t])}getTempFileURL(e,t){return qa.apply(this,[e,t])}downloadFile(e,t){return Ha.apply(this,[e,t])}uploadFile(e,t){return Ua.apply(this,[e,t])}getUploadMetadata(e,t){return za.apply(this,[e,t])}registerExtension(e){Wa[e.name]=e}async invokeExtension(e,t){const a=Wa[e];if(!a)throw new It({message:`扩展${e} 必须先注册`});return await a.invoke(t,this)}useAdapters(e){const{adapter:t,runtime:a}=function(e){const t=(a=e,"[object Array]"===Object.prototype.toString.call(a)?e:[e]);var a;for(const o of t){const{isMatch:e,genAdapter:t,runtime:a}=o;if(e())return{adapter:t(),runtime:a}}}(e)||{};t&&(ia.adapter=t),a&&(ia.runtime=a)}}var Ya=new Ka;function Qa(e,t,a){void 0===a&&(a={});var o=/\?/.test(t),n="";for(var s in a)""===n?!o&&(t+="?"):n+="&",n+=s+"="+encodeURIComponent(a[s]);return/^http(s)?:\/\//.test(t+=n)?t:""+e+t}class Xa{post(e){const{url:t,data:a,headers:o}=e;return new Promise(((e,n)=>{Lt.request({url:Qa("https:",t),data:a,method:"POST",header:o,success(t){e(t)},fail(e){n(e)}})}))}upload(e){return new Promise(((t,a)=>{const{url:o,file:n,data:s,headers:i,fileType:r}=e,l=Lt.uploadFile({url:Qa("https:",o),name:"file",formData:Object.assign({},s),filePath:n,fileType:r,header:i,success(e){const a={statusCode:e.statusCode,data:e.data||{}};200===e.statusCode&&s.success_action_status&&(a.statusCode=parseInt(s.success_action_status,10)),t(a)},fail(e){a(new Error(e.errMsg||"uploadFile:fail"))}});"function"==typeof e.onUploadProgress&&l&&"function"==typeof l.onProgressUpdate&&l.onProgressUpdate((t=>{e.onUploadProgress({loaded:t.totalBytesSent,total:t.totalBytesExpectedToSend})}))}))}}const Za={setItem(e,t){Lt.setStorageSync(e,t)},getItem:e=>Lt.getStorageSync(e),removeItem(e){Lt.removeStorageSync(e)},clear(){Lt.clearStorageSync()}};var eo={genAdapter:function(){return{root:{},reqClass:Xa,localStorage:Za,primaryStorage:"local"}},isMatch:function(){return!0},runtime:"uni_app"};Ya.useAdapters(eo);const to=Ya,ao=to.init;to.init=function(e){e.env=e.spaceId;const t=ao.call(this,e);t.config.provider="tencent",t.config.spaceId=e.spaceId;const a=t.auth;return t.auth=function(e){const t=a.call(this,e);return["linkAndRetrieveDataWithTicket","signInAnonymously","signOut","getAccessToken","getLoginState","signInWithTicket","getUserInfo"].forEach((e=>{var a;t[e]=(a=t[e],function(e){e=e||{};const{success:t,fail:o,complete:n}=Dt(e);if(!(t||o||n))return a.call(this,e);a.call(this,e).then((e=>{t&&t(e),n&&n(e)}),(e=>{o&&o(e),n&&n(e)}))}).bind(t)})),t},t.customAuth=t.auth,t};var oo=to,no=class extends Jt{getAccessToken(){return new Promise(((e,t)=>{const a="Anonymous_Access_token";this.setAccessToken(a),e(a)}))}setupRequest(e,t){const a=Object.assign({},e,{spaceId:this.config.spaceId,timestamp:Date.now()}),o={"Content-Type":"application/json"};"auth"!==t&&(a.token=this.accessToken,o["x-basement-token"]=this.accessToken),o["x-serverless-sign"]=qt(a,this.config.clientSecret);const n=jt();o["x-client-info"]=encodeURIComponent(JSON.stringify(n));const{token:s}=Ot();return o["x-client-token"]=s,{url:this.config.requestUrl,method:"POST",data:a,dataType:"json",header:JSON.parse(JSON.stringify(o))}}uploadFileToOSS({url:e,formData:t,name:a,filePath:o,fileType:n,onUploadProgress:s}){return new Promise(((i,r)=>{const l=this.adapter.uploadFile({url:e,formData:t,name:a,filePath:o,fileType:n,success(e){e&&e.statusCode<400?i(e):r(new It({code:"UPLOAD_FAILED",message:"文件上传失败"}))},fail(e){r(new It({code:e.code||"UPLOAD_FAILED",message:e.message||e.errMsg||"文件上传失败"}))}});"function"==typeof s&&l&&"function"==typeof l.onProgressUpdate&&l.onProgressUpdate((e=>{s({loaded:e.totalBytesSent,total:e.totalBytesExpectedToSend})}))}))}uploadFile({filePath:e,cloudPath:t,fileType:a="image",onUploadProgress:o}){if(!t)throw new It({code:"CLOUDPATH_REQUIRED",message:"cloudPath不可为空"});let n;return this.getOSSUploadOptionsFromPath({cloudPath:t}).then((t=>{const{url:s,formData:i,name:r}=t.result;n=t.result.fileUrl;const l={url:s,formData:i,name:r,filePath:e,fileType:a};return this.uploadFileToOSS(Object.assign({},l,{onUploadProgress:o}))})).then((()=>this.reportOSSUpload({cloudPath:t}))).then((t=>new Promise(((a,o)=>{t.success?a({success:!0,filePath:e,fileID:n}):o(new It({code:"UPLOAD_FAILED",message:"文件上传失败"}))}))))}deleteFile({fileList:e}){const t={method:"serverless.file.resource.delete",params:JSON.stringify({fileList:e})};return this.request(this.setupRequest(t)).then((e=>{if(e.success)return e.result;throw new It({code:"DELETE_FILE_FAILED",message:"删除文件失败"})}))}getTempFileURL({fileList:e,maxAge:t}={}){if(!Array.isArray(e)||0===e.length)throw new It({code:"INVALID_PARAM",message:"fileList的元素必须是非空的字符串"});const a={method:"serverless.file.resource.getTempFileURL",params:JSON.stringify({fileList:e,maxAge:t})};return this.request(this.setupRequest(a)).then((e=>{if(e.success)return{fileList:e.result.fileList.map((e=>({fileID:e.fileID,tempFileURL:e.tempFileURL})))};throw new It({code:"GET_TEMP_FILE_URL_FAILED",message:"获取临时文件链接失败"})}))}},so={init(e){const t=new no(e),a={signInAnonymously:function(){return t.authorize()},getLoginState:function(){return Promise.resolve(!1)}};return t.auth=function(){return a},t.customAuth=t.auth,t}},io=je((function(e,t){e.exports=He.enc.Hex}));function ro(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(function(e){var t=16*Math.random()|0;return("x"===e?t:3&t|8).toString(16)}))}function lo(e="",t={}){const{data:a,functionName:o,method:n,headers:s,signHeaderKeys:i=[],config:r}=t,l=Date.now(),c=ro(),u=Object.assign({},s,{"x-from-app-id":r.spaceAppId,"x-from-env-id":r.spaceId,"x-to-env-id":r.spaceId,"x-from-instance-id":l,"x-from-function-name":o,"x-client-timestamp":l,"x-alipay-source":"client","x-request-id":c,"x-alipay-callid":c,"x-trace-id":c}),d=["x-from-app-id","x-from-env-id","x-to-env-id","x-from-instance-id","x-from-function-name","x-client-timestamp"].concat(i),[m="",p=""]=e.split("?")||[],h=function(e){const t=e.signedHeaders.join(";"),a=e.signedHeaders.map((t=>`${t.toLowerCase()}:${e.headers[t]}\n`)).join(""),o=ea(e.body).toString(io),n=`${e.method.toUpperCase()}\n${e.path}\n${e.query}\n${a}\n${t}\n${o}\n`,s=ea(n).toString(io),i=`HMAC-SHA256\n${e.timestamp}\n${s}\n`,r=ta(i,e.secretKey).toString(io);return`HMAC-SHA256 Credential=${e.secretId}, SignedHeaders=${t}, Signature=${r}`}({path:m,query:p,method:n,headers:u,timestamp:l,body:JSON.stringify(a),secretId:r.accessKey,secretKey:r.secretKey,signedHeaders:d.sort()});return{url:`${r.endpoint}${e}`,headers:Object.assign({},u,{Authorization:h})}}function co({url:e,data:t,method:a="POST",headers:o={}}){return new Promise(((n,s)=>{Lt.request({url:e,method:a,data:"object"==typeof t?JSON.stringify(t):t,header:o,dataType:"json",complete:(e={})=>{const t=o["x-trace-id"]||"";if(!e.statusCode||e.statusCode>=400){const{message:a,errMsg:o,trace_id:n}=e.data||{};return s(new It({code:"SYS_ERR",message:a||o||"request:fail",requestId:n||t}))}n({status:e.statusCode,data:e.data,headers:e.header,requestId:t})}})}))}function uo(e,t){const{path:a,data:o,method:n="GET"}=e,{url:s,headers:i}=lo(a,{functionName:"",data:o,method:n,headers:{"x-alipay-cloud-mode":"oss","x-data-api-type":"oss","x-expire-timestamp":Date.now()+6e4},signHeaderKeys:["x-data-api-type","x-expire-timestamp"],config:t});return co({url:s,data:o,method:n,headers:i}).then((e=>{const t=e.data||{};if(!t.success)throw new It({code:e.errCode,message:e.errMsg,requestId:e.requestId});return t.data||{}})).catch((e=>{throw new It({code:e.errCode,message:e.errMsg,requestId:e.requestId})}))}function mo(e=""){const t=e.trim().replace(/^cloud:\/\//,""),a=t.indexOf("/");if(a<=0)throw new It({code:"INVALID_PARAM",message:"fileID不合法"});const o=t.substring(0,a),n=t.substring(a+1);return o!==this.config.spaceId&&console.warn("file ".concat(e," does not belong to env ").concat(this.config.spaceId)),n}function po(e=""){return"cloud://".concat(this.config.spaceId,"/").concat(e.replace(/^\/+/,""))}class ho{constructor(e){this.config=e}signedURL(e,t={}){const a=`/ws/function/${e}`,o=this.config.wsEndpoint.replace(/^ws(s)?:\/\//,""),n=Object.assign({},t,{accessKeyId:this.config.accessKey,signatureNonce:ro(),timestamp:""+Date.now()}),s=[a,["accessKeyId","authorization","signatureNonce","timestamp"].sort().map((function(e){return n[e]?"".concat(e,"=").concat(n[e]):null})).filter(Boolean).join("&"),`host:${o}`].join("\n"),i=["HMAC-SHA256",ea(s).toString(io)].join("\n"),r=ta(i,this.config.secretKey).toString(io),l=Object.keys(n).map((e=>`${e}=${encodeURIComponent(n[e])}`)).join("&");return`${this.config.wsEndpoint}${a}?${l}&signature=${r}`}}var go={init:e=>{e.provider="alipay";const t=new class{constructor(e){if(["spaceId","spaceAppId","accessKey","secretKey"].forEach((t=>{if(!Object.prototype.hasOwnProperty.call(e,t))throw new Error(`${t} required`)})),e.endpoint){if("string"!=typeof e.endpoint)throw new Error("endpoint must be string");if(!/^https:\/\//.test(e.endpoint))throw new Error("endpoint must start with https://");e.endpoint=e.endpoint.replace(/\/$/,"")}this.config=Object.assign({},e,{endpoint:e.endpoint||`https://${e.spaceId}.api-hz.cloudbasefunction.cn`,wsEndpoint:e.wsEndpoint||`wss://${e.spaceId}.api-hz.cloudbasefunction.cn`}),this._websocket=new ho(this.config)}callFunction(e){return function(e,t){const{name:a,data:o,async:n=!1}=e,s="POST",i={"x-to-function-name":a};n&&(i["x-function-invoke-type"]="async");const{url:r,headers:l}=lo("/functions/invokeFunction",{functionName:a,data:o,method:s,headers:i,signHeaderKeys:["x-to-function-name"],config:t});return co({url:r,data:o,method:s,headers:l}).then((e=>{let t=0;if(n){const a=e.data||{};t="200"===a.errCode?0:a.errCode,e.data=a.data||{},e.errMsg=a.errMsg}if(0!==t)throw new It({code:t,message:e.errMsg,requestId:e.requestId});return{errCode:t,success:0===t,requestId:e.requestId,result:e.data}})).catch((e=>{throw new It({code:e.errCode,message:e.errMsg,requestId:e.requestId})}))}(e,this.config)}uploadFileToOSS({url:e,filePath:t,fileType:a,formData:o,onUploadProgress:n}){return new Promise(((s,i)=>{const r=Lt.uploadFile({url:e,filePath:t,fileType:a,formData:o,name:"file",success(e){e&&e.statusCode<400?s(e):i(new It({code:"UPLOAD_FAILED",message:"文件上传失败"}))},fail(e){i(new It({code:e.code||"UPLOAD_FAILED",message:e.message||e.errMsg||"文件上传失败"}))}});"function"==typeof n&&r&&"function"==typeof r.onProgressUpdate&&r.onProgressUpdate((e=>{n({loaded:e.totalBytesSent,total:e.totalBytesExpectedToSend})}))}))}async uploadFile({filePath:e,cloudPath:t="",fileType:a="image",onUploadProgress:o}){if("string"!==Xe(t))throw new It({code:"INVALID_PARAM",message:"cloudPath必须为字符串类型"});if(!(t=t.trim()))throw new It({code:"INVALID_PARAM",message:"cloudPath不可为空"});if(/:\/\//.test(t))throw new It({code:"INVALID_PARAM",message:"cloudPath不合法"});const n=await uo({path:"/".concat(t.replace(/^\//,""),"?post_url")},this.config),{file_id:s,upload_url:i,form_data:r}=n,l=r&&r.reduce(((e,t)=>(e[t.key]=t.value,e)),{});return this.uploadFileToOSS({url:i,filePath:e,fileType:a,formData:l,onUploadProgress:o}).then((()=>({fileID:s})))}async getTempFileURL({fileList:e}){return new Promise(((t,a)=>{(!e||e.length<0)&&a(new It({errCode:"INVALID_PARAM",errMsg:"fileList不能为空数组"})),e.length>50&&a(new It({errCode:"INVALID_PARAM",errMsg:"fileList数组长度不能超过50"}));const o=[];for(const n of e){"string"!==Xe(n)&&a(new It({errCode:"INVALID_PARAM",errMsg:"fileList的元素必须是非空的字符串"}));const e=mo.call(this,n);o.push({file_id:e,expire:600})}uo({path:"/?download_url",data:{file_list:o},method:"POST"},this.config).then((e=>{const{file_list:a=[]}=e;t({fileList:a.map((e=>({fileID:po.call(this,e.file_id),tempFileURL:e.download_url})))})})).catch((e=>a(e)))}))}async connectWebSocket(e){const{name:t,query:a}=e;return Lt.connectSocket({url:this._websocket.signedURL(t,a),complete:()=>{}})}}(e);return t.auth=function(){return{signInAnonymously:function(){return Promise.resolve()},getLoginState:function(){return Promise.resolve(!0)}}},t}};function fo({data:e}){let t;t=jt();const a=JSON.parse(JSON.stringify(e||{}));if(Object.assign(a,{clientInfo:t}),!a.uniIdToken){const{token:e}=Ot();e&&(a.uniIdToken=e)}return a}const yo=[{rule:/fc_function_not_found|FUNCTION_NOT_FOUND/,content:",云函数[{functionName}]在云端不存在,请检查此云函数名称是否正确以及该云函数是否已上传到服务空间",mode:"append"}];var vo=/[\\^$.*+?()[\]{}|]/g,ko=RegExp(vo.source);function _o(e,t,a){return e.replace(new RegExp((o=t)&&ko.test(o)?o.replace(vo,"\\$&"):o,"g"),a);var o}const wo=2e4,bo={code:20101,message:"Invalid client"};function No(e){const{errSubject:t,subject:a,errCode:o,errMsg:n,code:s,message:i,cause:r}=e||{};return new It({subject:t||a||"uni-secure-network",code:o||s||wo,message:n||i,cause:r})}let Eo;function xo({secretType:e}={}){return"request"===e||"response"===e||"both"===e}function Co({name:e,data:t={}}={}){return"DCloud-clientDB"===e&&"encryption"===t.redirectTo&&"getAppClientKey"===t.action}function Vo({functionName:e,result:t,logPvd:a}){}function So(e){const t=e.callFunction,a=function(a){const o=a.name;a.data=fo.call(e,{data:a.data});const n={aliyun:"aliyun",tencent:"tcb",tcb:"tcb",alipay:"alipay"}[this.config.provider],s=xo(a),i=Co(a),r=s||i;return t.call(this,a).then((e=>(e.errCode=0,!r&&Vo.call(this,{functionName:o,result:e,logPvd:n}),Promise.resolve(e))),(e=>(!r&&Vo.call(this,{functionName:o,result:e,logPvd:n}),e&&e.message&&(e.message=function({message:e="",extraInfo:t={},formatter:a=[]}={}){for(let o=0;o<a.length;o++){const{rule:n,content:s,mode:i}=a[o],r=e.match(n);if(!r)continue;let l=s;for(let e=1;e<r.length;e++)l=_o(l,`{$${e}}`,r[e]);for(const e in t)l=_o(l,`{${e}}`,t[e]);return"replace"===i?l:e+l}return e}({message:`[${a.name}]: ${e.message}`,formatter:yo,extraInfo:{functionName:o}})),Promise.reject(e))))};e.callFunction=function(t){const{provider:o,spaceId:n}=e.config,s=t.name;let i,r;return t.data=t.data||{},i=a,i=i.bind(e),r=Co(t)?a.call(e,t):xo(t)?new Eo({secretType:t.secretType,uniCloudIns:e}).wrapEncryptDataCallFunction(a.bind(e))(t):function({provider:e,spaceId:t,functionName:a}={}){const{appId:o,uniPlatform:n,osName:s}=$t();let i=n;"app"===n&&(i=s);const r=function({provider:e,spaceId:t}={}){const a=it;if(!a)return{};e=function(e){return"tencent"===e?"tcb":e}(e);const o=a.find((a=>a.provider===e&&a.spaceId===t));return o&&o.config}({provider:e,spaceId:t});if(!r||!r.accessControl||!r.accessControl.enable)return!1;const l=r.accessControl.function||{},c=Object.keys(l);if(0===c.length)return!0;const u=function(e,t){let a,o,n;for(let s=0;s<e.length;s++){const i=e[s];i!==t?"*"!==i?i.split(",").map((e=>e.trim())).indexOf(t)>-1&&(o=i):n=i:a=i}return a||o||n}(c,a);if(!u)return!1;if((l[u]||[]).find(((e={})=>e.appId===o&&(e.platform||"").toLowerCase()===i.toLowerCase())))return!0;throw console.error(`此应用[appId: ${o}, platform: ${i}]不在云端配置的允许访问的应用列表内,参考:https://uniapp.dcloud.net.cn/uniCloud/secure-network.html#verify-client`),No(bo)}({provider:o,spaceId:n,functionName:s})?new Eo({secretType:t.secretType,uniCloudIns:e}).wrapVerifyClientCallFunction(a.bind(e))(t):i(t),Object.defineProperty(r,"result",{get:()=>(console.warn("当前返回结果为Promise类型,不可直接访问其result属性,详情请参考:https://uniapp.dcloud.net.cn/uniCloud/faq?id=promise"),{})}),r.then((e=>("undefined"!=typeof UTSJSONObject&&(e.result=new UTSJSONObject(e.result)),e)))}}Eo=class{constructor(){throw No({message:"Platform app is not enabled, please check whether secure network module is enabled in your manifest.json"})}};const Bo=Symbol("CLIENT_DB_INTERNAL");function To(e,t){return e.then="DoNotReturnProxyWithAFunctionNamedThen",e._internalType=Bo,e.inspect=null,e.__v_raw=void 0,new Proxy(e,{get(e,a,o){if("_uniClient"===a)return null;if("symbol"==typeof a)return e[a];if(a in e||"string"!=typeof a){const t=e[a];return"function"==typeof t?t.bind(e):t}return t.get(e,a,o)}})}function Po(e){return{on:(t,a)=>{e[t]=e[t]||[],e[t].indexOf(a)>-1||e[t].push(a)},off:(t,a)=>{e[t]=e[t]||[];const o=e[t].indexOf(a);-1!==o&&e[t].splice(o,1)}}}const Do=["db.Geo","db.command","command.aggregate"];function Io(e,t){return Do.indexOf(`${e}.${t}`)>-1}function Lo(e){switch(Xe(e=At(e))){case"array":return e.map((e=>Lo(e)));case"object":return e._internalType===Bo||Object.keys(e).forEach((t=>{e[t]=Lo(e[t])})),e;case"regexp":return{$regexp:{source:e.source,flags:e.flags}};case"date":return{$date:e.toISOString()};default:return e}}function Ao(e){return e&&e.content&&e.content.$method}class Oo{constructor(e,t,a){this.content=e,this.prevStage=t||null,this.udb=null,this._database=a}toJSON(){let e=this;const t=[e.content];for(;e.prevStage;)e=e.prevStage,t.push(e.content);return{$db:t.reverse().map((e=>({$method:e.$method,$param:Lo(e.$param)})))}}toString(){return JSON.stringify(this.toJSON())}getAction(){const e=this.toJSON().$db.find((e=>"action"===e.$method));return e&&e.$param&&e.$param[0]}getCommand(){return{$db:this.toJSON().$db.filter((e=>"action"!==e.$method))}}get isAggregate(){let e=this;for(;e;){const t=Ao(e),a=Ao(e.prevStage);if("aggregate"===t&&"collection"===a||"pipeline"===t)return!0;e=e.prevStage}return!1}get isCommand(){let e=this;for(;e;){if("command"===Ao(e))return!0;e=e.prevStage}return!1}get isAggregateCommand(){let e=this;for(;e;){const t=Ao(e),a=Ao(e.prevStage);if("aggregate"===t&&"command"===a)return!0;e=e.prevStage}return!1}getNextStageFn(e){const t=this;return function(){return Fo({$method:e,$param:Lo(Array.from(arguments))},t,t._database)}}get count(){return this.isAggregate?this.getNextStageFn("count"):function(){return this._send("count",Array.from(arguments))}}get remove(){return this.isCommand?this.getNextStageFn("remove"):function(){return this._send("remove",Array.from(arguments))}}get(){return this._send("get",Array.from(arguments))}get add(){return this.isCommand?this.getNextStageFn("add"):function(){return this._send("add",Array.from(arguments))}}update(){return this._send("update",Array.from(arguments))}end(){return this._send("end",Array.from(arguments))}get set(){return this.isCommand?this.getNextStageFn("set"):function(){throw new Error("JQL禁止使用set方法")}}_send(e,t){const a=this.getAction(),o=this.getCommand();return o.$db.push({$method:e,$param:Lo(t)}),this._database._callCloudFunction({action:a,command:o})}}function Fo(e,t,a){return To(new Oo(e,t,a),{get(e,t){let o="db";return e&&e.content&&(o=e.content.$method),Io(o,t)?Fo({$method:t},e,a):function(){return Fo({$method:t,$param:Lo(Array.from(arguments))},e,a)}}})}function Mo({path:e,method:t}){return class{constructor(){this.param=Array.from(arguments)}toJSON(){return{$newDb:[...e.map((e=>({$method:e}))),{$method:t,$param:this.param}]}}toString(){return JSON.stringify(this.toJSON())}}}function Ro(e,t={}){return To(new e(t),{get:(e,t)=>Io("db",t)?Fo({$method:t},null,e):function(){return Fo({$method:t,$param:Lo(Array.from(arguments))},null,e)}})}class $o extends class{constructor({uniClient:e={},isJQL:t=!1}={}){this._uniClient=e,this._authCallBacks={},this._dbCallBacks={},e._isDefault&&(this._dbCallBacks=ut("_globalUniCloudDatabaseCallback")),t||(this.auth=Po(this._authCallBacks)),this._isJQL=t,Object.assign(this,Po(this._dbCallBacks)),this.env=To({},{get:(e,t)=>({$env:t})}),this.Geo=To({},{get:(e,t)=>Mo({path:["Geo"],method:t})}),this.serverDate=Mo({path:[],method:"serverDate"}),this.RegExp=Mo({path:[],method:"RegExp"})}getCloudEnv(e){if("string"!=typeof e||!e.trim())throw new Error("getCloudEnv参数错误");return{$env:e.replace("$cloudEnv_","")}}_callback(e,t){const a=this._dbCallBacks;a[e]&&a[e].forEach((e=>{e(...t)}))}_callbackAuth(e,t){const a=this._authCallBacks;a[e]&&a[e].forEach((e=>{e(...t)}))}multiSend(){const e=Array.from(arguments),t=e.map((e=>{const t=e.getAction(),a=e.getCommand();if("getTemp"!==a.$db[a.$db.length-1].$method)throw new Error("multiSend只支持子命令内使用getTemp");return{action:t,command:a}}));return this._callCloudFunction({multiCommand:t,queryList:e})}}{_parseResult(e){return this._isJQL?e.result:e}_callCloudFunction({action:e,command:t,multiCommand:a,queryList:o}){function n(e,t){if(a&&o)for(let a=0;a<o.length;a++){const n=o[a];n.udb&&"function"==typeof n.udb.setResult&&(t?n.udb.setResult(t):n.udb.setResult(e.result.dataList[a]))}}const s=this,i=this._isJQL?"databaseForJQL":"database";function r(e){return s._callback("error",[e]),gt(ft(i,"fail"),e).then((()=>gt(ft(i,"complete"),e))).then((()=>(n(null,e),St(kt,{type:bt,content:e}),Promise.reject(e))))}const l=gt(ft(i,"invoke")),c=this._uniClient;return l.then((()=>c.callFunction({name:"DCloud-clientDB",type:"CLIENT_DB",data:{action:e,command:t,multiCommand:a}}))).then((e=>{const{code:t,message:a,token:o,tokenExpired:l,systemInfo:c=[]}=e.result;if(c)for(let n=0;n<c.length;n++){const{level:e,message:t,detail:a}=c[n],o=console["warn"===e?"error":e]||console.log;let s="[System Info]"+t;a&&(s=`${s}\n详细信息:${a}`),o(s)}if(t)return r(new It({code:t,message:a,requestId:e.requestId}));e.result.errCode=e.result.errCode||e.result.code,e.result.errMsg=e.result.errMsg||e.result.message,o&&l&&(Ft({token:o,tokenExpired:l}),this._callbackAuth("refreshToken",[{token:o,tokenExpired:l}]),this._callback("refreshToken",[{token:o,tokenExpired:l}]),St(wt,{token:o,tokenExpired:l}));const u=[{prop:"affectedDocs",tips:"affectedDocs不再推荐使用,请使用inserted/deleted/updated/data.length替代"},{prop:"code",tips:"code不再推荐使用,请使用errCode替代"},{prop:"message",tips:"message不再推荐使用,请使用errMsg替代"}];for(let n=0;n<u.length;n++){const{prop:t,tips:a}=u[n];if(t in e.result){const o=e.result[t];Object.defineProperty(e.result,t,{get:()=>(console.warn(a),o)})}}return d=e,gt(ft(i,"success"),d).then((()=>gt(ft(i,"complete"),d))).then((()=>{n(d,null);const e=s._parseResult(d);return St(kt,{type:bt,content:e}),Promise.resolve(e)}));var d}),(e=>(/fc_function_not_found|FUNCTION_NOT_FOUND/g.test(e.message)&&console.warn("clientDB未初始化,请在web控制台保存一次schema以开启clientDB"),r(new It({code:e.code||"SYSTEM_ERROR",message:e.message,requestId:e.requestId})))))}}const Uo="token无效,跳转登录页面",zo="token过期,跳转登录页面",jo={TOKEN_INVALID_TOKEN_EXPIRED:zo,TOKEN_INVALID_INVALID_CLIENTID:Uo,TOKEN_INVALID:Uo,TOKEN_INVALID_WRONG_TOKEN:Uo,TOKEN_INVALID_ANONYMOUS_USER:Uo},qo={"uni-id-token-expired":zo,"uni-id-check-token-failed":Uo,"uni-id-token-not-exist":Uo,"uni-id-check-device-feature-failed":Uo};function Ho(e,t){let a="";return a=e?`${e}/${t}`:t,a.replace(/^\//,"")}function Go(e=[],t=""){const a=[],o=[];return e.forEach((e=>{!0===e.needLogin?a.push(Ho(t,e.path)):!1===e.needLogin&&o.push(Ho(t,e.path))})),{needLoginPage:a,notNeedLoginPage:o}}function Jo(e){return e.split("?")[0].replace(/^\//,"")}function Wo(){return function(e){let t=e&&e.$page&&e.$page.fullPath||"";return t?("/"!==t.charAt(0)&&(t="/"+t),t):t}(function(){const e=getCurrentPages();return e[e.length-1]}())}function Ko(){return Jo(Wo())}function Yo(e="",t={}){if(!e)return!1;if(!(t&&t.list&&t.list.length))return!1;const a=t.list,o=Jo(e);return a.some((e=>e.pagePath===o))}const Qo=!!ze.uniIdRouter,{loginPage:Xo,routerNeedLogin:Zo,resToLogin:en,needLoginPage:tn,notNeedLoginPage:an,loginPageInTabBar:on}=function({pages:e=[],subPackages:t=[],uniIdRouter:a={},tabBar:o={}}=ze){const{loginPage:n,needLogin:s=[],resToLogin:i=!0}=a,{needLoginPage:r,notNeedLoginPage:l}=Go(e),{needLoginPage:c,notNeedLoginPage:u}=function(e=[]){const t=[],a=[];return e.forEach((e=>{const{root:o,pages:n=[]}=e,{needLoginPage:s,notNeedLoginPage:i}=Go(n,o);t.push(...s),a.push(...i)})),{needLoginPage:t,notNeedLoginPage:a}}(t);return{loginPage:n,routerNeedLogin:s,resToLogin:i,needLoginPage:[...r,...c],notNeedLoginPage:[...l,...u],loginPageInTabBar:Yo(n,o)}}();if(tn.indexOf(Xo)>-1)throw new Error(`Login page [${Xo}] should not be "needLogin", please check your pages.json`);function nn(e){const t=Ko();if("/"===e.charAt(0))return e;const[a,o]=e.split("?"),n=a.replace(/^\//,"").split("/"),s=t.split("/");s.pop();for(let i=0;i<n.length;i++){const e=n[i];".."===e?s.pop():"."!==e&&s.push(e)}return""===s[0]&&s.shift(),"/"+s.join("/")+(o?"?"+o:"")}function sn({redirect:e}){const t=Jo(e),a=Jo(Xo);return Ko()!==a&&t!==a}function rn({api:e,redirect:t}={}){if(!t||!sn({redirect:t}))return;const a=(n=t,"/"!==(o=Xo).charAt(0)&&(o="/"+o),n?o.indexOf("?")>-1?o+`&uniIdRedirectUrl=${encodeURIComponent(n)}`:o+`?uniIdRedirectUrl=${encodeURIComponent(n)}`:o);var o,n;on?"navigateTo"!==e&&"redirectTo"!==e||(e="switchTab"):"switchTab"===e&&(e="navigateTo");const s={navigateTo:uni.navigateTo,redirectTo:uni.redirectTo,switchTab:uni.switchTab,reLaunch:uni.reLaunch};setTimeout((()=>{s[e]({url:a})}),0)}function ln({url:e}={}){const t={abortLoginPageJump:!1,autoToLoginPage:!1},a=function(){const{token:e,tokenExpired:t}=Ot();let a;if(e){if(t<Date.now()){const e="uni-id-token-expired";a={errCode:e,errMsg:qo[e]}}}else{const e="uni-id-check-token-failed";a={errCode:e,errMsg:qo[e]}}return a}();if(function(e){const t=Jo(nn(e));return!(an.indexOf(t)>-1)&&(tn.indexOf(t)>-1||Zo.some((t=>{return a=e,new RegExp(t).test(a);var a})))}(e)&&a){if(a.uniIdRedirectUrl=e,xt(_t).length>0)return setTimeout((()=>{St(_t,a)}),0),t.abortLoginPageJump=!0,t;t.autoToLoginPage=!0}return t}function cn(){!function(){const e=Wo(),{abortLoginPageJump:t,autoToLoginPage:a}=ln({url:e});t||a&&rn({api:"redirectTo",redirect:e})}();const e=["navigateTo","redirectTo","reLaunch","switchTab"];for(let t=0;t<e.length;t++){const a=e[t];uni.addInterceptor(a,{invoke(e){const{abortLoginPageJump:t,autoToLoginPage:o}=ln({url:e.url});return t?e:o?(rn({api:a,redirect:nn(e.url)}),!1):e}})}}function un(){this.onResponse((e=>{const{type:t,content:a}=e;let o=!1;switch(t){case"cloudobject":o=function(e){if("object"!=typeof e)return!1;const{errCode:t}=e||{};return t in qo}(a);break;case"clientdb":o=function(e){if("object"!=typeof e)return!1;const{errCode:t}=e||{};return t in jo}(a)}o&&function(e={}){const t=xt(_t);Pt().then((()=>{const a=Wo();if(a&&sn({redirect:a}))return t.length>0?St(_t,Object.assign({uniIdRedirectUrl:a},e)):void(Xo&&rn({api:"navigateTo",redirect:a}))}))}(a)}))}function dn(e){var t;(t=e).onResponse=function(e){Ct(kt,e)},t.offResponse=function(e){Vt(kt,e)},function(e){e.onNeedLogin=function(e){Ct(_t,e)},e.offNeedLogin=function(e){Vt(_t,e)},Qo&&(ut("_globalUniCloudStatus").needLoginInit||(ut("_globalUniCloudStatus").needLoginInit=!0,Pt().then((()=>{cn.call(e)})),en&&un.call(e)))}(e),function(e){e.onRefreshToken=function(e){Ct(wt,e)},e.offRefreshToken=function(e){Vt(wt,e)}}(e)}let mn;const pn="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",hn=/^(?:[A-Za-z\d+/]{4})*?(?:[A-Za-z\d+/]{2}(?:==)?|[A-Za-z\d+/]{3}=?)?$/;function gn(){const e=Ot().token||"",t=e.split(".");if(!e||3!==t.length)return{uid:null,role:[],permission:[],tokenExpired:0};let a;try{a=JSON.parse((o=t[1],decodeURIComponent(mn(o).split("").map((function(e){return"%"+("00"+e.charCodeAt(0).toString(16)).slice(-2)})).join(""))))}catch(n){throw new Error("获取当前用户信息出错,详细错误信息为:"+n.message)}var o;return a.tokenExpired=1e3*a.exp,delete a.exp,delete a.iat,a}mn="function"!=typeof atob?function(e){if(e=String(e).replace(/[\t\n\f\r ]+/g,""),!hn.test(e))throw new Error("Failed to execute 'atob' on 'Window': The string to be decoded is not correctly encoded.");var t;e+="==".slice(2-(3&e.length));for(var a,o,n="",s=0;s<e.length;)t=pn.indexOf(e.charAt(s++))<<18|pn.indexOf(e.charAt(s++))<<12|(a=pn.indexOf(e.charAt(s++)))<<6|(o=pn.indexOf(e.charAt(s++))),n+=64===a?String.fromCharCode(t>>16&255):64===o?String.fromCharCode(t>>16&255,t>>8&255):String.fromCharCode(t>>16&255,t>>8&255,255&t);return n}:atob;var fn=function(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}(je((function(e,t){Object.defineProperty(t,"__esModule",{value:!0});const a="chooseAndUploadFile:ok",o="chooseAndUploadFile:fail";function n(e,t){return e.tempFiles.forEach(((e,a)=>{e.name||(e.name=e.path.substring(e.path.lastIndexOf("/")+1)),t&&(e.fileType=t),e.cloudPath=Date.now()+"_"+a+e.name.substring(e.name.lastIndexOf("."))})),e.tempFilePaths||(e.tempFilePaths=e.tempFiles.map((e=>e.path))),e}function s(e,t,{onChooseFile:o,onUploadProgress:n}){return t.then((e=>{if(o){const t=o(e);if(void 0!==t)return Promise.resolve(t).then((t=>void 0===t?e:t))}return e})).then((t=>!1===t?{errMsg:a,tempFilePaths:[],tempFiles:[]}:function(e,t,o=5,n){(t=Object.assign({},t)).errMsg=a;const s=t.tempFiles,i=s.length;let r=0;return new Promise((a=>{for(;r<o;)l();function l(){const o=r++;if(o>=i)return void(!s.find((e=>!e.url&&!e.errMsg))&&a(t));const c=s[o];e.uploadFile({provider:c.provider,filePath:c.path,cloudPath:c.cloudPath,fileType:c.fileType,cloudPathAsRealPath:c.cloudPathAsRealPath,onUploadProgress(e){e.index=o,e.tempFile=c,e.tempFilePath=c.path,n&&n(e)}}).then((e=>{c.url=e.fileID,o<i&&l()})).catch((e=>{c.errMsg=e.errMsg||e.message,o<i&&l()}))}}))}(e,t,5,n)))}t.initChooseAndUploadFile=function(e){return function(t={type:"all"}){return"image"===t.type?s(e,function(e){const{count:t,sizeType:a,sourceType:s=["album","camera"],extension:i}=e;return new Promise(((e,r)=>{uni.chooseImage({count:t,sizeType:a,sourceType:s,extension:i,success(t){e(n(t,"image"))},fail(e){r({errMsg:e.errMsg.replace("chooseImage:fail",o)})}})}))}(t),t):"video"===t.type?s(e,function(e){const{camera:t,compressed:a,maxDuration:s,sourceType:i=["album","camera"],extension:r}=e;return new Promise(((e,l)=>{uni.chooseVideo({camera:t,compressed:a,maxDuration:s,sourceType:i,extension:r,success(t){const{tempFilePath:a,duration:o,size:s,height:i,width:r}=t;e(n({errMsg:"chooseVideo:ok",tempFilePaths:[a],tempFiles:[{name:t.tempFile&&t.tempFile.name||"",path:a,size:s,type:t.tempFile&&t.tempFile.type||"",width:r,height:i,duration:o,fileType:"video",cloudPath:""}]},"video"))},fail(e){l({errMsg:e.errMsg.replace("chooseVideo:fail",o)})}})}))}(t),t):s(e,function(e){const{count:t,extension:a}=e;return new Promise(((e,s)=>{let i=uni.chooseFile;if("undefined"!=typeof wx&&"function"==typeof wx.chooseMessageFile&&(i=wx.chooseMessageFile),"function"!=typeof i)return s({errMsg:o+" 请指定 type 类型,该平台仅支持选择 image 或 video。"});i({type:"all",count:t,extension:a,success(t){e(n(t))},fail(e){s({errMsg:e.errMsg.replace("chooseFile:fail",o)})}})}))}(t),t)}}})));function yn(e){return{props:{localdata:{type:Array,default:()=>[]},options:{type:[Object,Array],default:()=>({})},spaceInfo:{type:Object,default:()=>({})},collection:{type:[String,Array],default:""},action:{type:String,default:""},field:{type:String,default:""},orderby:{type:String,default:""},where:{type:[String,Object],default:""},pageData:{type:String,default:"add"},pageCurrent:{type:Number,default:1},pageSize:{type:Number,default:20},getcount:{type:[Boolean,String],default:!1},gettree:{type:[Boolean,String],default:!1},gettreepath:{type:[Boolean,String],default:!1},startwith:{type:String,default:""},limitlevel:{type:Number,default:10},groupby:{type:String,default:""},groupField:{type:String,default:""},distinct:{type:[Boolean,String],default:!1},foreignKey:{type:String,default:""},loadtime:{type:String,default:"auto"},manual:{type:Boolean,default:!1}},data:()=>({mixinDatacomLoading:!1,mixinDatacomHasMore:!1,mixinDatacomResData:[],mixinDatacomErrorMessage:"",mixinDatacomPage:{},mixinDatacomError:null}),created(){this.mixinDatacomPage={current:this.pageCurrent,size:this.pageSize,count:0},this.$watch((()=>{var e=[];return["pageCurrent","pageSize","localdata","collection","action","field","orderby","where","getont","getcount","gettree","groupby","groupField","distinct"].forEach((t=>{e.push(this[t])})),e}),((e,t)=>{if("manual"===this.loadtime)return;let a=!1;const o=[];for(let n=2;n<e.length;n++)e[n]!==t[n]&&(o.push(e[n]),a=!0);e[0]!==t[0]&&(this.mixinDatacomPage.current=this.pageCurrent),this.mixinDatacomPage.size=this.pageSize,this.onMixinDatacomPropsChange(a,o)}))},methods:{onMixinDatacomPropsChange(e,t){},mixinDatacomEasyGet({getone:e=!1,success:t,fail:a}={}){this.mixinDatacomLoading||(this.mixinDatacomLoading=!0,this.mixinDatacomErrorMessage="",this.mixinDatacomError=null,this.mixinDatacomGet().then((a=>{this.mixinDatacomLoading=!1;const{data:o,count:n}=a.result;this.getcount&&(this.mixinDatacomPage.count=n),this.mixinDatacomHasMore=o.length<this.pageSize;const s=e?o.length?o[0]:void 0:o;this.mixinDatacomResData=s,t&&t(s)})).catch((e=>{this.mixinDatacomLoading=!1,this.mixinDatacomErrorMessage=e,this.mixinDatacomError=e,a&&a(e)})))},mixinDatacomGet(t={}){let a;t=t||{},a="undefined"!=typeof __uniX&&__uniX?e.databaseForJQL(this.spaceInfo):e.database(this.spaceInfo);const o=t.action||this.action;o&&(a=a.action(o));const n=t.collection||this.collection;a=Array.isArray(n)?a.collection(...n):a.collection(n);const s=t.where||this.where;s&&Object.keys(s).length&&(a=a.where(s));const i=t.field||this.field;i&&(a=a.field(i));const r=t.foreignKey||this.foreignKey;r&&(a=a.foreignKey(r));const l=t.groupby||this.groupby;l&&(a=a.groupBy(l));const c=t.groupField||this.groupField;c&&(a=a.groupField(c)),!0===(void 0!==t.distinct?t.distinct:this.distinct)&&(a=a.distinct());const u=t.orderby||this.orderby;u&&(a=a.orderBy(u));const d=void 0!==t.pageCurrent?t.pageCurrent:this.mixinDatacomPage.current,m=void 0!==t.pageSize?t.pageSize:this.mixinDatacomPage.size,p=void 0!==t.getcount?t.getcount:this.getcount,h=void 0!==t.gettree?t.gettree:this.gettree,g=void 0!==t.gettreepath?t.gettreepath:this.gettreepath,f={getCount:p},y={limitLevel:void 0!==t.limitlevel?t.limitlevel:this.limitlevel,startWith:void 0!==t.startwith?t.startwith:this.startwith};return h&&(f.getTree=y),g&&(f.getTreePath=y),a=a.skip(m*(d-1)).limit(m).get(f),a}}}}function vn(e){return ut("_globalUniCloudSecureNetworkCache__{spaceId}".replace("{spaceId}",e.config.spaceId))}async function kn({openid:e,callLoginByWeixin:t=!1}={}){throw vn(this),new Error("[SecureNetwork] API `initSecureNetworkByWeixin` is not supported on platform `app`")}async function _n(e){const t=vn(this);return t.initPromise||(t.initPromise=kn.call(this,e).then((e=>e)).catch((e=>{throw delete t.initPromise,e}))),t.initPromise}function wn(e){zt=e}function bn(e){const t={getSystemInfo:uni.getSystemInfo,getPushClientId:uni.getPushClientId};return function(a){return new Promise(((o,n)=>{t[e]({...a,success(e){o(e)},fail(e){n(e)}})}))}}class Nn extends class{constructor(){this._callback={}}addListener(e,t){this._callback[e]||(this._callback[e]=[]),this._callback[e].push(t)}on(e,t){return this.addListener(e,t)}removeListener(e,t){if(!t)throw new Error('The "listener" argument must be of type function. Received undefined');const a=this._callback[e];if(!a)return;const o=function(e,t){for(let a=e.length-1;a>=0;a--)if(e[a]===t)return a;return-1}(a,t);a.splice(o,1)}off(e,t){return this.removeListener(e,t)}removeAllListener(e){delete this._callback[e]}emit(e,...t){const a=this._callback[e];if(a)for(let o=0;o<a.length;o++)a[o](...t)}}{constructor(){super(),this._uniPushMessageCallback=this._receivePushMessage.bind(this),this._currentMessageId=-1,this._payloadQueue=[]}init(){return Promise.all([bn("getSystemInfo")(),bn("getPushClientId")()]).then((([{appId:e}={},{cid:t}={}]=[])=>{if(!e)throw new Error("Invalid appId, please check the manifest.json file");if(!t)throw new Error("Invalid push client id");this._appId=e,this._pushClientId=t,this._seqId=Date.now()+"-"+Math.floor(9e5*Math.random()+1e5),this.emit("open"),this._initMessageListener()}),(e=>{throw this.emit("error",e),this.close(),e}))}async open(){return this.init()}_isUniCloudSSE(e){if("receive"!==e.type)return!1;const t=e&&e.data&&e.data.payload;return!(!t||"UNI_CLOUD_SSE"!==t.channel||t.seqId!==this._seqId)}_receivePushMessage(e){if(!this._isUniCloudSSE(e))return;const t=e&&e.data&&e.data.payload,{action:a,messageId:o,message:n}=t;this._payloadQueue.push({action:a,messageId:o,message:n}),this._consumMessage()}_consumMessage(){for(;;){const e=this._payloadQueue.find((e=>e.messageId===this._currentMessageId+1));if(!e)break;this._currentMessageId++,this._parseMessagePayload(e)}}_parseMessagePayload(e){const{action:t,messageId:a,message:o}=e;"end"===t?this._end({messageId:a,message:o}):"message"===t&&this._appendMessage({messageId:a,message:o})}_appendMessage({messageId:e,message:t}={}){this.emit("message",t)}_end({messageId:e,message:t}={}){this.emit("end",t),this.close()}_initMessageListener(){uni.onPushMessage(this._uniPushMessageCallback)}_destroy(){uni.offPushMessage(this._uniPushMessageCallback)}toJSON(){return{appId:this._appId,pushClientId:this._pushClientId,seqId:this._seqId}}close(){this._destroy(),this.emit("close")}}const En={tcb:oo,tencent:oo,aliyun:Wt,private:so,alipay:go};let xn=new class{init(e){let t={};const a=En[e.provider];if(!a)throw new Error("未提供正确的provider参数");var o;return t=a.init(e),function(e){e._initPromiseHub||(e._initPromiseHub=new nt({createPromise:function(){let t=Promise.resolve();t=new Promise((e=>{setTimeout((()=>{e()}),1)}));const a=e.auth();return t.then((()=>a.getLoginState())).then((e=>e?Promise.resolve():a.signInAnonymously()))}}))}(t),So(t),function(e){const t=e.uploadFile;e.uploadFile=function(e){return t.call(this,e)}}(t),(o=t).database=function(e){if(e&&Object.keys(e).length>0)return o.init(e).database();if(this._database)return this._database;const t=Ro($o,{uniClient:o});return this._database=t,t},o.databaseForJQL=function(e){if(e&&Object.keys(e).length>0)return o.init(e).databaseForJQL();if(this._databaseForJQL)return this._databaseForJQL;const t=Ro($o,{uniClient:o,isJQL:!0});return this._databaseForJQL=t,t},function(e){e.getCurrentUserInfo=gn,e.chooseAndUploadFile=fn.initChooseAndUploadFile(e),Object.assign(e,{get mixinDatacom(){return yn(e)}}),e.SSEChannel=Nn,e.initSecureNetworkByWeixin=function(e){return function({openid:t,callLoginByWeixin:a=!1}={}){return _n.call(e,{openid:t,callLoginByWeixin:a})}}(e),e.setCustomClientInfo=wn,e.importObject=function(t){return function(a,o={}){o=function(e,t={}){return e.customUI=t.customUI||e.customUI,e.parseSystemError=t.parseSystemError||e.parseSystemError,Object.assign(e.loadingOptions,t.loadingOptions),Object.assign(e.errorOptions,t.errorOptions),"object"==typeof t.secretMethods&&(e.secretMethods=t.secretMethods),e}({customUI:!1,loadingOptions:{title:"加载中...",mask:!0},errorOptions:{type:"modal",retry:!1}},o);const{customUI:n,loadingOptions:s,errorOptions:i,parseSystemError:r}=o,l=!n;return new Proxy({},{get(n,c){switch(c){case"toString":return"[object UniCloudObject]";case"toJSON":return{}}return function({fn:e,interceptorName:t,getCallbackArgs:a}={}){return async function(...o){const n=a?a({params:o}):{};let s,i;try{return await gt(ft(t,"invoke"),{...n}),s=await e(...o),await gt(ft(t,"success"),{...n,result:s}),s}catch(r){throw i=r,await gt(ft(t,"fail"),{...n,error:i}),i}finally{await gt(ft(t,"complete"),i?{...n,error:i}:{...n,result:s})}}}({fn:async function n(...u){let d;l&&uni.showLoading({title:s.title,mask:s.mask});const m={name:a,type:"OBJECT",data:{method:c,params:u}};"object"==typeof o.secretMethods&&function(e,t){const a=t.data.method,o=e.secretMethods||{},n=o[a]||o["*"];n&&(t.secretType=n)}(o,m);let p=!1;try{d=await t.callFunction(m)}catch(e){p=!0,d={result:new It(e)}}const{errSubject:h,errCode:g,errMsg:f,newToken:y}=d.result||{};if(l&&uni.hideLoading(),y&&y.token&&y.tokenExpired&&(Ft(y),St(wt,{...y})),g){let e=f;if(p&&r&&(e=(await r({objectName:a,methodName:c,params:u,errSubject:h,errCode:g,errMsg:f})).errMsg||f),l)if("toast"===i.type)uni.showToast({title:e,icon:"none"});else{if("modal"!==i.type)throw new Error(`Invalid errorOptions.type: ${i.type}`);{const{confirm:t}=await async function({title:e,content:t,showCancel:a,cancelText:o,confirmText:n}={}){return new Promise(((s,i)=>{uni.showModal({title:e,content:t,showCancel:a,cancelText:o,confirmText:n,success(e){s(e)},fail(){s({confirm:!1,cancel:!0})}})}))}({title:"提示",content:e,showCancel:i.retry,cancelText:"取消",confirmText:i.retry?"重试":"确定"});if(i.retry&&t)return n(...u)}}const t=new It({subject:h,code:g,message:f,requestId:d.requestId});throw t.detail=d.result,St(kt,{type:Et,content:t}),t}return St(kt,{type:Et,content:d.result}),d.result},interceptorName:"callObject",getCallbackArgs:function({params:e}={}){return{objectName:a,methodName:c,params:e}}})}})}}(e)}(t),["callFunction","uploadFile","deleteFile","getTempFileURL","downloadFile","chooseAndUploadFile"].forEach((e=>{if(!t[e])return;const a=t[e];t[e]=function(){return a.apply(t,Array.from(arguments))},t[e]=function(e,t){return function(a){let o=!1;if("callFunction"===t){const e=a&&a.type||Ke;o=e!==Ke}const n="callFunction"===t&&!o,s=this._initPromiseHub.exec();a=a||{};const{success:i,fail:r,complete:l}=Dt(a),c=s.then((()=>o?Promise.resolve():gt(ft(t,"invoke"),a))).then((()=>e.call(this,a))).then((e=>o?Promise.resolve(e):gt(ft(t,"success"),e).then((()=>gt(ft(t,"complete"),e))).then((()=>(n&&St(kt,{type:Nt,content:e}),Promise.resolve(e))))),(e=>o?Promise.reject(e):gt(ft(t,"fail"),e).then((()=>gt(ft(t,"complete"),e))).then((()=>(St(kt,{type:Nt,content:e}),Promise.reject(e))))));if(!(i||r||l))return c;c.then((e=>{i&&i(e),l&&l(e),n&&St(kt,{type:Nt,content:e})}),(e=>{r&&r(e),l&&l(e),n&&St(kt,{type:Nt,content:e})}))}}(t[e],e).bind(t)})),t.init=this.init,t}};(()=>{const e=rt;let t={};if(e&&1===e.length)t=e[0],xn=xn.init(t),xn._isDefault=!0;else{const t=["auth","callFunction","uploadFile","deleteFile","getTempFileURL","downloadFile","database","getCurrentUSerInfo","importObject"];let a;a=e&&e.length>0?"应用有多个服务空间,请通过uniCloud.init方法指定要使用的服务空间":"应用未关联服务空间,请在uniCloud目录右键关联服务空间",t.forEach((e=>{xn[e]=function(){return console.error(a),Promise.reject(new It({code:"SYS_ERR",message:a}))}}))}Object.assign(xn,{get mixinDatacom(){return yn(xn)}}),dn(xn),xn.addInterceptor=pt,xn.removeInterceptor=ht,xn.interceptObject=yt})();var Cn=xn;const Vn=a({name:"uni-stat-select",mixins:[Cn.mixinDatacom||{}],data:()=>({showSelector:!1,current:"",mixinDatacomResData:[],apps:[],channels:[]}),props:{localdata:{type:Array,default:()=>[]},value:{type:[String,Number],default:""},modelValue:{type:[String,Number],default:""},label:{type:String,default:""},placeholder:{type:String,default:"请选择"},emptyTips:{type:String,default:"无选项"},clear:{type:Boolean,default:!0},defItem:{type:Number,default:0},disabled:{type:Boolean,default:!1}},created(){this.last=`${this.collection}_last_selected_option_value`,this.collection&&!this.localdata.length&&this.mixinDatacomEasyGet()},computed:{typePlaceholder(){const e=this.placeholder,t={"opendb-stat-app-versions":"版本","opendb-app-channels":"渠道","opendb-app-list":"应用"}[this.collection];return t?e+t:e}},watch:{localdata:{immediate:!0,handler(e,t){Array.isArray(e)&&t!==e&&(this.mixinDatacomResData=e)}},modelValue(){this.initDefVal()},mixinDatacomResData:{immediate:!0,handler(e){e.length&&this.initDefVal()}}},methods:{initDefVal(){let e="";if(!this.value&&0!==this.value||this.isDisabled(this.value))if(!this.modelValue&&0!==this.modelValue||this.isDisabled(this.modelValue)){let t;if(this.collection&&(t=uni.getStorageSync(this.last)),t||0===t)e=t;else{let t="";this.defItem>0&&this.defItem<this.mixinDatacomResData.length&&(t=this.mixinDatacomResData[this.defItem-1].value),e=t}this.emit(e)}else e=this.modelValue;else e=this.value;const t=this.mixinDatacomResData.find((t=>t.value===e));this.current=t?this.formatItemName(t):""},isDisabled(e){let t=!1;return this.mixinDatacomResData.forEach((a=>{a.value===e&&(t=a.disable)})),t},clearVal(){this.emit(""),this.collection&&uni.removeStorageSync(this.last)},change(e){e.disable||(this.showSelector=!1,this.current=this.formatItemName(e),this.emit(e.value))},emit(e){this.$emit("change",e),this.$emit("input",e),this.$emit("update:modelValue",e),this.collection&&uni.setStorageSync(this.last,e)},toggleSelector(){this.disabled||(this.showSelector=!this.showSelector)},formatItemName(e){let{text:t,value:a,channel_code:o}=e;return o=o?`(${o})`:"",this.collection.indexOf("app-list")>0?`${t}(${a})`:t||`未命名${o}`}}},[["render",function(t,a,o,n,s,i){const r=c(e.resolveDynamicComponent("uni-icons"),se);return e.openBlock(),e.createElementBlock("view",{class:"uni-stat__select"},[o.label?(e.openBlock(),e.createElementBlock("span",{key:0,class:"uni-label-text hide-on-phone"},e.toDisplayString(o.label+":"),1)):e.createCommentVNode("",!0),e.createElementVNode("view",{class:e.normalizeClass(["uni-stat-box",{"uni-stat__actived":s.current}])},[e.createElementVNode("view",{class:e.normalizeClass(["uni-select",{"uni-select--disabled":o.disabled}])},[e.createElementVNode("view",{class:"uni-select__input-box",onClick:a[0]||(a[0]=(...e)=>i.toggleSelector&&i.toggleSelector(...e))},[s.current?(e.openBlock(),e.createElementBlock("view",{key:0,class:"uni-select__input-text"},e.toDisplayString(s.current),1)):(e.openBlock(),e.createElementBlock("view",{key:1,class:"uni-select__input-text uni-select__input-placeholder"},e.toDisplayString(i.typePlaceholder),1)),s.current&&o.clear?(e.openBlock(),e.createBlock(r,{key:2,type:"clear",color:"#c0c4cc",size:"24",onClick:i.clearVal},null,8,["onClick"])):(e.openBlock(),e.createBlock(r,{key:3,type:s.showSelector?"top":"bottom",size:"14",color:"#999"},null,8,["type"]))]),s.showSelector?(e.openBlock(),e.createElementBlock("view",{key:0,class:"uni-select--mask",onClick:a[1]||(a[1]=(...e)=>i.toggleSelector&&i.toggleSelector(...e))})):e.createCommentVNode("",!0),s.showSelector?(e.openBlock(),e.createElementBlock("view",{key:1,class:"uni-select__selector"},[e.createElementVNode("view",{class:"uni-popper__arrow"}),e.createElementVNode("scroll-view",{"scroll-y":"true",class:"uni-select__selector-scroll"},[0===s.mixinDatacomResData.length?(e.openBlock(),e.createElementBlock("view",{key:0,class:"uni-select__selector-empty"},[e.createElementVNode("text",null,e.toDisplayString(o.emptyTips),1)])):(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:1},e.renderList(s.mixinDatacomResData,((t,a)=>(e.openBlock(),e.createElementBlock("view",{class:"uni-select__selector-item",key:a,onClick:e=>i.change(t)},[e.createElementVNode("text",{class:e.normalizeClass({"uni-select__selector__disabled":t.disable})},e.toDisplayString(i.formatItemName(t)),3)],8,["onClick"])))),128))])])):e.createCommentVNode("",!0)],2)],2)])}],["__scopeId","data-v-e0e2a85a"]]),Sn={data:()=>({}),created(){this.popup=this.getParent()},methods:{getParent(e="uniPopup"){let t=this.$parent,a=t.$options.name;for(;a!==e;){if(t=t.$parent,!t)return!1;a=t.$options.name}return t}}};const Bn=a({name:"uniPopupMessage",mixins:[Sn],props:{type:{type:String,default:"success"},message:{type:String,default:""},duration:{type:Number,default:3e3},maskShow:{type:Boolean,default:!1}},data:()=>({}),created(){this.popup.maskShow=this.maskShow,this.popup.messageChild=this},methods:{timerClose(){0!==this.duration&&(clearTimeout(this.timer),this.timer=setTimeout((()=>{this.popup.close()}),this.duration))}}},[["render",function(t,a,o,n,s,i){return e.openBlock(),e.createElementBlock("view",{class:"uni-popup-message"},[e.createElementVNode("view",{class:e.normalizeClass(["uni-popup-message__box fixforpc-width","uni-popup__"+o.type])},[e.renderSlot(t.$slots,"default",{},(()=>[e.createElementVNode("text",{class:e.normalizeClass(["uni-popup-message-text","uni-popup__"+o.type+"-text"])},e.toDisplayString(o.message),3)]),!0)],2)])}],["__scopeId","data-v-ad4a514f"]]);"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self&&self;function Tn(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Pn={exports:{}};Pn.exports=function(){var e=1e3,t=6e4,a=36e5,o="millisecond",n="second",s="minute",i="hour",r="day",l="week",c="month",u="quarter",d="year",m="date",p="Invalid Date",h=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,g=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,f={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(e){var t=["th","st","nd","rd"],a=e%100;return"["+e+(t[(a-20)%10]||t[a]||t[0])+"]"}},y=function(e,t,a){var o=String(e);return!o||o.length>=t?e:""+Array(t+1-o.length).join(a)+e},v={s:y,z:function(e){var t=-e.utcOffset(),a=Math.abs(t),o=Math.floor(a/60),n=a%60;return(t<=0?"+":"-")+y(o,2,"0")+":"+y(n,2,"0")},m:function e(t,a){if(t.date()<a.date())return-e(a,t);var o=12*(a.year()-t.year())+(a.month()-t.month()),n=t.clone().add(o,c),s=a-n<0,i=t.clone().add(o+(s?-1:1),c);return+(-(o+(a-n)/(s?n-i:i-n))||0)},a:function(e){return e<0?Math.ceil(e)||0:Math.floor(e)},p:function(e){return{M:c,y:d,w:l,d:r,D:m,h:i,m:s,s:n,ms:o,Q:u}[e]||String(e||"").toLowerCase().replace(/s$/,"")},u:function(e){return void 0===e}},k="en",_={};_[k]=f;var w="$isDayjsObject",b=function(e){return e instanceof C||!(!e||!e[w])},N=function e(t,a,o){var n;if(!t)return k;if("string"==typeof t){var s=t.toLowerCase();_[s]&&(n=s),a&&(_[s]=a,n=s);var i=t.split("-");if(!n&&i.length>1)return e(i[0])}else{var r=t.name;_[r]=t,n=r}return!o&&n&&(k=n),n||!o&&k},E=function(e,t){if(b(e))return e.clone();var a="object"==typeof t?t:{};return a.date=e,a.args=arguments,new C(a)},x=v;x.l=N,x.i=b,x.w=function(e,t){return E(e,{locale:t.$L,utc:t.$u,x:t.$x,$offset:t.$offset})};var C=function(){function f(e){this.$L=N(e.locale,null,!0),this.parse(e),this.$x=this.$x||e.x||{},this[w]=!0}var y=f.prototype;return y.parse=function(e){this.$d=function(e){var t=e.date,a=e.utc;if(null===t)return new Date(NaN);if(x.u(t))return new Date;if(t instanceof Date)return new Date(t);if("string"==typeof t&&!/Z$/i.test(t)){var o=t.match(h);if(o){var n=o[2]-1||0,s=(o[7]||"0").substring(0,3);return a?new Date(Date.UTC(o[1],n,o[3]||1,o[4]||0,o[5]||0,o[6]||0,s)):new Date(o[1],n,o[3]||1,o[4]||0,o[5]||0,o[6]||0,s)}}return new Date(t)}(e),this.init()},y.init=function(){var e=this.$d;this.$y=e.getFullYear(),this.$M=e.getMonth(),this.$D=e.getDate(),this.$W=e.getDay(),this.$H=e.getHours(),this.$m=e.getMinutes(),this.$s=e.getSeconds(),this.$ms=e.getMilliseconds()},y.$utils=function(){return x},y.isValid=function(){return!(this.$d.toString()===p)},y.isSame=function(e,t){var a=E(e);return this.startOf(t)<=a&&a<=this.endOf(t)},y.isAfter=function(e,t){return E(e)<this.startOf(t)},y.isBefore=function(e,t){return this.endOf(t)<E(e)},y.$g=function(e,t,a){return x.u(e)?this[t]:this.set(a,e)},y.unix=function(){return Math.floor(this.valueOf()/1e3)},y.valueOf=function(){return this.$d.getTime()},y.startOf=function(e,t){var a=this,o=!!x.u(t)||t,u=x.p(e),p=function(e,t){var n=x.w(a.$u?Date.UTC(a.$y,t,e):new Date(a.$y,t,e),a);return o?n:n.endOf(r)},h=function(e,t){return x.w(a.toDate()[e].apply(a.toDate("s"),(o?[0,0,0,0]:[23,59,59,999]).slice(t)),a)},g=this.$W,f=this.$M,y=this.$D,v="set"+(this.$u?"UTC":"");switch(u){case d:return o?p(1,0):p(31,11);case c:return o?p(1,f):p(0,f+1);case l:var k=this.$locale().weekStart||0,_=(g<k?g+7:g)-k;return p(o?y-_:y+(6-_),f);case r:case m:return h(v+"Hours",0);case i:return h(v+"Minutes",1);case s:return h(v+"Seconds",2);case n:return h(v+"Milliseconds",3);default:return this.clone()}},y.endOf=function(e){return this.startOf(e,!1)},y.$set=function(e,t){var a,l=x.p(e),u="set"+(this.$u?"UTC":""),p=(a={},a[r]=u+"Date",a[m]=u+"Date",a[c]=u+"Month",a[d]=u+"FullYear",a[i]=u+"Hours",a[s]=u+"Minutes",a[n]=u+"Seconds",a[o]=u+"Milliseconds",a)[l],h=l===r?this.$D+(t-this.$W):t;if(l===c||l===d){var g=this.clone().set(m,1);g.$d[p](h),g.init(),this.$d=g.set(m,Math.min(this.$D,g.daysInMonth())).$d}else p&&this.$d[p](h);return this.init(),this},y.set=function(e,t){return this.clone().$set(e,t)},y.get=function(e){return this[x.p(e)]()},y.add=function(o,u){var m,p=this;o=Number(o);var h=x.p(u),g=function(e){var t=E(p);return x.w(t.date(t.date()+Math.round(e*o)),p)};if(h===c)return this.set(c,this.$M+o);if(h===d)return this.set(d,this.$y+o);if(h===r)return g(1);if(h===l)return g(7);var f=(m={},m[s]=t,m[i]=a,m[n]=e,m)[h]||1,y=this.$d.getTime()+o*f;return x.w(y,this)},y.subtract=function(e,t){return this.add(-1*e,t)},y.format=function(e){var t=this,a=this.$locale();if(!this.isValid())return a.invalidDate||p;var o=e||"YYYY-MM-DDTHH:mm:ssZ",n=x.z(this),s=this.$H,i=this.$m,r=this.$M,l=a.weekdays,c=a.months,u=a.meridiem,d=function(e,a,n,s){return e&&(e[a]||e(t,o))||n[a].slice(0,s)},m=function(e){return x.s(s%12||12,e,"0")},h=u||function(e,t,a){var o=e<12?"AM":"PM";return a?o.toLowerCase():o};return o.replace(g,(function(e,o){return o||function(e){switch(e){case"YY":return String(t.$y).slice(-2);case"YYYY":return x.s(t.$y,4,"0");case"M":return r+1;case"MM":return x.s(r+1,2,"0");case"MMM":return d(a.monthsShort,r,c,3);case"MMMM":return d(c,r);case"D":return t.$D;case"DD":return x.s(t.$D,2,"0");case"d":return String(t.$W);case"dd":return d(a.weekdaysMin,t.$W,l,2);case"ddd":return d(a.weekdaysShort,t.$W,l,3);case"dddd":return l[t.$W];case"H":return String(s);case"HH":return x.s(s,2,"0");case"h":return m(1);case"hh":return m(2);case"a":return h(s,i,!0);case"A":return h(s,i,!1);case"m":return String(i);case"mm":return x.s(i,2,"0");case"s":return String(t.$s);case"ss":return x.s(t.$s,2,"0");case"SSS":return x.s(t.$ms,3,"0");case"Z":return n}return null}(e)||n.replace(":","")}))},y.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},y.diff=function(o,m,p){var h,g=this,f=x.p(m),y=E(o),v=(y.utcOffset()-this.utcOffset())*t,k=this-y,_=function(){return x.m(g,y)};switch(f){case d:h=_()/12;break;case c:h=_();break;case u:h=_()/3;break;case l:h=(k-v)/6048e5;break;case r:h=(k-v)/864e5;break;case i:h=k/a;break;case s:h=k/t;break;case n:h=k/e;break;default:h=k}return p?h:x.a(h)},y.daysInMonth=function(){return this.endOf(c).$D},y.$locale=function(){return _[this.$L]},y.locale=function(e,t){if(!e)return this.$L;var a=this.clone(),o=N(e,t,!0);return o&&(a.$L=o),a},y.clone=function(){return x.w(this.$d,this)},y.toDate=function(){return new Date(this.valueOf())},y.toJSON=function(){return this.isValid()?this.toISOString():null},y.toISOString=function(){return this.$d.toISOString()},y.toString=function(){return this.$d.toUTCString()},f}(),V=C.prototype;return E.prototype=V,[["$ms",o],["$s",n],["$m",s],["$H",i],["$W",r],["$M",c],["$y",d],["$D",m]].forEach((function(e){V[e[1]]=function(t){return this.$g(t,e[0],e[1])}})),E.extend=function(e,t){return e.$i||(e(t,C,E),e.$i=!0),E},E.locale=N,E.isDayjs=b,E.unix=function(e){return E(1e3*e)},E.en=_[k],E.Ls=_,E.p={},E}();const Dn=Tn(Pn.exports);var In;const Ln={get isIOS(){return"boolean"==typeof In?In:In="ios"===uni.getSystemInfoSync().platform},requestIOS:function(e){return new Promise((t=>{switch(e){case"push":t(function(){var e=0,t=plus.ios.import("UIApplication"),a=t.sharedApplication();if(a.currentUserNotificationSettings){var o=a.currentUserNotificationSettings();0==o.plusGetAttribute("types")?(e=0,l("log","at utils/permission.js:64","推送权限没有开启")):(e=1,l("log","at utils/permission.js:67","已经开启推送功能!")),plus.ios.deleteObject(o)}else 0==a.enabledRemoteNotificationTypes()?(e=3,l("log","at utils/permission.js:74","推送权限没有开启!")):(e=4,l("log","at utils/permission.js:77","已经开启推送功能!"));return plus.ios.deleteObject(a),plus.ios.deleteObject(t),e}());break;case"location":t((a=0,o=plus.ios.import("CLLocationManager"),n=o.locationServicesEnabled(),s=o.authorizationStatus(),a=n?0===s?null:3===s||4===s?1:0:2,plus.ios.deleteObject(o),a));break;case"record":t(function(){var e=null,t=plus.ios.import("AVAudioSession"),a=t.sharedInstance().recordPermission();return l("log","at utils/permission.js:105","permissionStatus:"+a),e=1970168948===a?null:1735552628===a?1:0,plus.ios.deleteObject(t),e}());break;case"camera":t(function(){var e=0,t=plus.ios.import("AVCaptureDevice"),a=t.authorizationStatusForMediaType("vide");return e=0===a?null:3==a?1:0,plus.ios.deleteObject(t),e}());break;case"album":t(function(){var e=0,t=plus.ios.import("PHPhotoLibrary"),a=t.authorizationStatus();return e=0===a?null:3==a?1:0,plus.ios.deleteObject(t),e}());break;case"contact":t(function(){var e=0,t=plus.ios.import("CNContactStore"),a=t.authorizationStatusForEntityType(0);return e=0===a?null:3==a?1:0,plus.ios.deleteObject(t),e}());break;case"calendar":t(function(){var e=null,t=plus.ios.import("EKEventStore");return 3==t.authorizationStatusForEntityType(0)?(e=1,l("log","at utils/permission.js:123","日历权限已经开启")):l("log","at utils/permission.js:125","日历权限没有开启"),plus.ios.deleteObject(t),e}());break;case"memo":t(function(){var e=null,t=plus.ios.import("EKEventStore");return 3==t.authorizationStatusForEntityType(1)?(e=1,l("log","at utils/permission.js:137","备忘录权限已经开启")):l("log","at utils/permission.js:139","备忘录权限没有开启"),plus.ios.deleteObject(t),e}());break;default:t(0)}var a,o,n,s}))},requestAndroid:function(e){return new Promise((t=>{plus.android.requestPermissions([e],(function(e){var a=0;for(let t=0;t<e.granted.length;t++){l("log","at utils/permission.js:187","已获取的权限:"+e.granted[t]),a=1}for(let t=0;t<e.deniedPresent.length;t++){l("log","at utils/permission.js:192","拒绝本次申请的权限:"+e.deniedPresent[t]),a=0}for(let t=0;t<e.deniedAlways.length;t++){l("log","at utils/permission.js:197","永久拒绝申请的权限:"+e.deniedAlways[t]),a=-1}t(a)}),(function(e){l("log","at utils/permission.js:203","result error: "+e.message),t({code:e.code,message:e.message})}))}))},gotoAppSetting:function(){if(Ln.isIOS){var e=plus.ios.import("UIApplication").sharedApplication(),t=plus.ios.import("NSURL"),a=t.URLWithString("app-settings:");e.openURL(a),plus.ios.deleteObject(a),plus.ios.deleteObject(t),plus.ios.deleteObject(e)}else{var o=plus.android.importClass("android.content.Intent"),n=plus.android.importClass("android.provider.Settings"),s=plus.android.importClass("android.net.Uri"),i=plus.android.runtimeMainActivity(),r=new o;r.setAction(n.ACTION_APPLICATION_DETAILS_SETTINGS);var l=s.fromParts("package",i.getPackageName(),null);r.setData(l),i.startActivity(r)}}},An=(e,t="YYYY-MM-DD HH:mm:ss")=>{const a=String(e.getFullYear()),o=String(e.getMonth()+1).padStart(2,"0"),n=String(e.getDate()).padStart(2,"0"),s=String(e.getHours()).padStart(2,"0"),i=String(e.getMinutes()).padStart(2,"0"),r=String(e.getSeconds()).padStart(2,"0");return t.replace("YYYY",a).replace("MM",o).replace("DD",n).replace("HH",s).replace("mm",i).replace("ss",r)},On=async()=>{let e=Ln.isIOS?await Ln.requestIOS("camera"):await Ln.requestAndroid("android.permission.CAMERA");return null===e||1===e?e=1:uni.showModal({content:"Camera permission required",confirmText:"Setting",success:function(e){e.confirm&&Ln.gotoAppSetting()}}),e},Fn=()=>U({method:"GET",url:"/admin/Config/getAliyunOssSignature"}),Mn=[];for(let ci=0;ci<=15;ci++)Mn[ci]=ci.toString(16);function Rn(){let e="";for(let t=1;t<=36;t++)e+=9===t||14===t||19===t||24===t?"-":15===t?4:20===t?Mn[4*Math.random()|8]:Mn[16*Math.random()|0];return e}const $n=e.defineComponent({__name:"inbound",setup(t){const a=e.ref(),o=e.ref(),n=e.ref(!1),s=e.ref([]),i=e.ref(""),r=e.ref(""),u=e.ref([]),p=e.ref(null),h=e.ref(6),g=e.ref([]),f=e.ref(!0),v=e.ref(),k=e.reactive({images:[],orderNum:"",space_code:"",weight:"",typing:!0}),_=e.computed((()=>({orderNum:{rules:[{required:!0,errorMessage:"单号不能为空"}]}}))),w=e.computed((()=>{try{const e=u.value.find((e=>e.value===k.space_code));return null==e?void 0:e.text}catch(Qt){return l("log","at pages/inbound/inbound.vue:163",Qt),""}}));d((async()=>{f.value=!0,n.value=!1,await b()})),m((()=>{f.value=!1,n.value=!1})),y((e=>{0===e.index&&uni.navigateTo({url:"/pages/inbound/logList"})}));const b=async()=>{const e=await((e="")=>U({method:"POST",url:"/admin/order.ScanOrder/getWarehouseSpace",data:{code:e}}))();1===e.code&&(u.value=e.data.spaces.map((e=>({text:e.name,value:e.code}))))},N=()=>{n.value=!1,f.value=!1,s.value=[],k.orderNum="",k.weight="",k.typing=!0,e.nextTick((()=>{f.value=!0}))},E=async()=>{1===await On()&&uni.scanCode({success:e=>{v.value=e.result,k.orderNum=e.result},fail:e=>{}})};let x;const C=async()=>{const e=B();let t=!0;for(var o=0;o<e.length;o++)e[o].savePath||(t=!1);if(!t)return i.value="error",r.value="图片还没上传完毕,请稍后...",a.value.open(),void(n.value=!1);const s=await(l={order_no:k.orderNum,space_code:k.space_code,images:e},U({method:"POST",url:"/admin/order.scanOrder/instock",data:l}));var l;if(n.value=!1,1==s.code){i.value="success",r.value=s.msg,a.value.open();const e={orderNum:k.orderNum,createTime:new Date,space:w.value,type:"入库",status:!0};g.value.unshift(e),uni.setStorageSync("inboundHistory",g.value),S(),x=setTimeout((()=>{N(),x&&clearTimeout(x)}),1e3)}else{i.value="error",r.value=s.msg,a.value.open();const e={orderNum:k.orderNum,createTime:new Date,space:w.value,type:"入库",status:!1};g.value.unshift(e),uni.setStorageSync("inboundHistory",g.value),S(),x=setTimeout((()=>{N(),x&&clearTimeout(x)}),1e3)}},V=()=>{o.value.validate().then((e=>{(async()=>{x&&clearTimeout(x),C()})()})).catch((e=>{l("log","at pages/inbound/inbound.vue:300","err",e)}))},S=()=>{g.value=uni.getStorageSync("inboundHistory")},B=()=>s.value.map((e=>({name:e.name,savePath:e.serverUrl,fileSize:e.size,mimeType:e.type}))),T=(e,t)=>{const a={policy:e.policy,signature:e.signature,ossaccessKeyId:e.ossAccessKeyId,key:e.dir+Dn().format("YYYYMMDD")+"/"+Rn()+"_"+t.name,dir:e.dir,host:e.host,file:t.file};return new Promise(((o,n)=>{let s=t.name;s="file";uni.uploadFile({url:e.host,filePath:t.path,name:"file",formData:a,success:e=>{204===e.statusCode||200===e.statusCode?(t.serverUrl=a.key,o(e)):n(e)},fail:e=>{l("log","at pages/inbound/inbound.vue:381","error++",e),n(e)},complete:()=>{l("log","at pages/inbound/inbound.vue:386","complete---"),t.progress=100}}).onProgressUpdate((e=>{t.progress=e.progress}))}))},P=()=>{uni.chooseImage({count:h.value-s.value.length,success:t=>{s.value=s.value.concat(t.tempFiles.map((e=>{const t={size:e.size,path:e.path,name:e.name,type:e.type,progress:0,file:e},a=e.path.substring(e.path.lastIndexOf(".")+1),o=e.path.substring(e.path.lastIndexOf("/")+1);return t.name=o,t.type=a,t})));const a=s.value.filter((e=>0===e.progress));e.nextTick((()=>{(async e=>{const t=(await Fn()).data.signature,a=e.map((e=>T(t,e)));Promise.all(a).then((e=>{l("log","at pages/inbound/inbound.vue:329","所有图片加载成功:",e),uni.showToast({title:"加载成功",icon:"success"})})).catch((e=>{l("error","at pages/inbound/inbound.vue:336","加载失败:",e),uni.showToast({title:"加载失败",icon:"none"})}))})(a)}))},fail:e=>{l("error","at pages/inbound/inbound.vue:431",e)}})},D=()=>{p.value=null};return(t,l)=>{const d=c(e.resolveDynamicComponent("uni-easyinput"),re),m=c(e.resolveDynamicComponent("uni-forms-item"),Ue),y=c(e.resolveDynamicComponent("uni-data-select"),Vn),v=c(e.resolveDynamicComponent("uni-icons"),se),w=c(e.resolveDynamicComponent("uni-forms"),Ee),b=c(e.resolveDynamicComponent("uni-popup-message"),Bn),x=c(e.resolveDynamicComponent("uni-popup"),Fe);return e.openBlock(),e.createElementBlock("view",{class:"container"},[e.createElementVNode("view",{class:"example"},[e.createVNode(w,{ref_key:"valiForm",ref:o,"label-align":"right","label-width":"80px",rules:_.value,modelValue:k},{default:e.withCtx((()=>[e.createVNode(m,{label:"单号",required:"",name:"orderNum"},{default:e.withCtx((()=>[e.createVNode(d,{modelValue:k.orderNum,"onUpdate:modelValue":l[0]||(l[0]=e=>k.orderNum=e),placeholder:"请输入单号",suffixIcon:"scan",focus:f.value,onIconClick:E},null,8,["modelValue","focus"])])),_:1}),e.createVNode(m,{label:"仓位编码",name:"space_code"},{default:e.withCtx((()=>[e.createVNode(y,{modelValue:k.space_code,"onUpdate:modelValue":l[1]||(l[1]=e=>k.space_code=e),localdata:u.value,placeholder:"请选择仓位编码"},null,8,["modelValue","localdata"])])),_:1}),e.createVNode(m,{label:"图片",name:"images"},{default:e.withCtx((()=>[e.createElementVNode("view",{class:"upload-container"},[e.createElementVNode("view",{class:"preview"},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s.value,((t,a)=>(e.openBlock(),e.createElementBlock("view",{key:a,class:"image-container"},[e.createElementVNode("image",{src:t.path,class:"preview-image",mode:"aspectFill",onClick:e=>{return a=t.path,void(p.value=a);var a}},null,8,["src","onClick"]),e.createElementVNode("progress",{percent:t.progress||0,activeColor:100===Number(t.progress||0)?"#00ff00":"#10AEFF","stroke-width":"3"},null,8,["percent","activeColor"]),"success"===t.status?(e.openBlock(),e.createElementBlock("text",{key:0},"1")):e.createCommentVNode("",!0),e.createVNode(v,{class:"delete-icon",onClick:e=>(e=>{s.value.splice(e,1)})(a),type:"clear",size:"20",color:"red"},null,8,["onClick"])])))),128)),s.value.length<h.value?(e.openBlock(),e.createElementBlock("view",{key:0,class:"choose-image-container",onClick:P},[e.createVNode(v,{type:"plusempty",size:"40",color:"#ccc"})])):e.createCommentVNode("",!0)]),e.createElementVNode("text",{style:{"padding-top":"8px"}},"最多选择6张图片"),p.value?(e.openBlock(),e.createElementBlock("view",{key:0,class:"preview-modal",onClick:D},[e.createElementVNode("image",{src:p.value,class:"preview-large",mode:"aspectFit",onClick:e.withModifiers(D,["stop"])},null,8,["src"])])):e.createCommentVNode("",!0)])])),_:1})])),_:1},8,["rules","modelValue"]),e.createElementVNode("view",{class:"button-group"},[e.createElementVNode("button",{type:"info",onClick:N},"重置"),e.createElementVNode("button",{type:"primary",onClick:V,loading:n.value},[n.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(v,{key:0,type:"checkmarkempty",size:"18",color:"white"})),e.createTextVNode(" 提交 ")],8,["loading"])])]),e.createElementVNode("view",{class:"history"},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(g.value.slice(0,5),((t,a)=>(e.openBlock(),e.createElementBlock("view",{class:"item",key:a},[e.createElementVNode("text",{class:"code",style:e.normalizeStyle({color:t.status?"green":"#666"})},[e.createTextVNode(e.toDisplayString(t.orderNum)+" ",1),t.space?(e.openBlock(),e.createElementBlock("text",{key:0},"仓位编码: "+e.toDisplayString(t.space),1)):e.createCommentVNode("",!0),e.createTextVNode(" "+e.toDisplayString(t.type),1)],4),t.status?(e.openBlock(),e.createBlock(v,{key:0,type:"checkmarkempty",class:"status",size:"16",color:"green"})):(e.openBlock(),e.createElementBlock("text",{key:1,class:"status fail"},"F")),e.createElementVNode("text",{style:{"margin-left":"10rpx","font-weight":"300"}},e.toDisplayString("\r\n"+t.createTime),1)])))),128))]),e.createVNode(x,{ref_key:"message",ref:a,type:"message"},{default:e.withCtx((()=>[e.createVNode(b,{type:i.value,message:r.value,duration:2e3},null,8,["type","message"])])),_:1},512)])}}}),Un=a($n,[["__scopeId","data-v-a03ff240"]]),zn=a(e.defineComponent({__name:"logList",setup(t){const a=e.ref([]);return h((()=>{a.value=uni.getStorageSync("inboundHistory")})),(t,o)=>{const n=c(e.resolveDynamicComponent("uni-icons"),se);return e.openBlock(),e.createElementBlock("view",{class:"history"},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.value,((t,a)=>(e.openBlock(),e.createElementBlock("view",{class:"item",key:a},[e.createElementVNode("text",{class:"code",style:e.normalizeStyle({color:t.status?"green":"#666"})},[e.createTextVNode(e.toDisplayString(t.orderNum)+" ",1),t.space?(e.openBlock(),e.createElementBlock("text",{key:0},"仓位编码: "+e.toDisplayString(t.space),1)):e.createCommentVNode("",!0),e.createTextVNode(" "+e.toDisplayString(t.type),1)],4),t.status?(e.openBlock(),e.createBlock(n,{key:0,type:"checkmarkempty",class:"status",size:"16",color:"green"})):(e.openBlock(),e.createElementBlock("text",{key:1,class:"status fail"},"F")),e.createElementVNode("text",{style:{"margin-left":"10rpx","font-weight":"300"}},e.toDisplayString("\r\n"+t.createTime),1)])))),128)),0===a.value.length?(e.openBlock(),e.createElementBlock("view",{key:0,class:"is-empty"},"暂无历史")):e.createCommentVNode("",!0)])}}}),[["__scopeId","data-v-32ccdb2e"]]),jn=["{","}"];const qn=/^(?:\d)+/,Hn=/^(?:\w)+/;const Gn="zh-Hans",Jn="zh-Hant",Wn="en",Kn=Object.prototype.hasOwnProperty,Yn=(e,t)=>Kn.call(e,t),Qn=new class{constructor(){this._caches=Object.create(null)}interpolate(e,t,a=jn){if(!t)return[e];let o=this._caches[e];return o||(o=function(e,[t,a]){const o=[];let n=0,s="";for(;n<e.length;){let i=e[n++];if(i===t){s&&o.push({type:"text",value:s}),s="";let t="";for(i=e[n++];void 0!==i&&i!==a;)t+=i,i=e[n++];const r=i===a,l=qn.test(t)?"list":r&&Hn.test(t)?"named":"unknown";o.push({value:t,type:l})}else s+=i}return s&&o.push({type:"text",value:s}),o}(e,a),this._caches[e]=o),function(e,t){const a=[];let o=0;const n=Array.isArray(t)?"list":(s=t,null!==s&&"object"==typeof s?"named":"unknown");var s;if("unknown"===n)return a;for(;o<e.length;){const s=e[o];switch(s.type){case"text":a.push(s.value);break;case"list":a.push(t[parseInt(s.value,10)]);break;case"named":"named"===n&&a.push(t[s.value])}o++}return a}(o,t)}};function Xn(e,t){if(!e)return;if(e=e.trim().replace(/_/g,"-"),t&&t[e])return e;if("chinese"===(e=e.toLowerCase()))return Gn;if(0===e.indexOf("zh"))return e.indexOf("-hans")>-1?Gn:e.indexOf("-hant")>-1?Jn:(a=e,["-tw","-hk","-mo","-cht"].find((e=>-1!==a.indexOf(e)))?Jn:Gn);var a;let o=[Wn,"fr","es"];t&&Object.keys(t).length>0&&(o=Object.keys(t));const n=function(e,t){return t.find((t=>0===e.indexOf(t)))}(e,o);return n||void 0}class Zn{constructor({locale:e,fallbackLocale:t,messages:a,watcher:o,formater:n}){this.locale=Wn,this.fallbackLocale=Wn,this.message={},this.messages={},this.watchers=[],t&&(this.fallbackLocale=t),this.formater=n||Qn,this.messages=a||{},this.setLocale(e||Wn),o&&this.watchLocale(o)}setLocale(e){const t=this.locale;this.locale=Xn(e,this.messages)||this.fallbackLocale,this.messages[this.locale]||(this.messages[this.locale]={}),this.message=this.messages[this.locale],t!==this.locale&&this.watchers.forEach((e=>{e(this.locale,t)}))}getLocale(){return this.locale}watchLocale(e){const t=this.watchers.push(e)-1;return()=>{this.watchers.splice(t,1)}}add(e,t,a=!0){const o=this.messages[e];o?a?Object.assign(o,t):Object.keys(t).forEach((e=>{Yn(o,e)||(o[e]=t[e])})):this.messages[e]=t}f(e,t,a){return this.formater.interpolate(e,t,a).join("")}t(e,t,a){let o=this.message;return"string"==typeof t?(t=Xn(t,this.messages))&&(o=this.messages[t]):a=t,Yn(o,e)?this.formater.interpolate(o[e],a).join(""):(console.warn(`Cannot translate the value of keypath ${e}. Use the value of keypath as default.`),e)}}function es(e,t={},a,o){if("string"!=typeof e){const a=[t,e];e=a[0],t=a[1]}"string"!=typeof e&&(e="undefined"!=typeof uni&&uni.getLocale?uni.getLocale():"undefined"!=typeof global&&global.getLocale?global.getLocale():Wn),"string"!=typeof a&&(a="undefined"!=typeof __uniConfig&&__uniConfig.fallbackLocale||Wn);const n=new Zn({locale:e,fallbackLocale:a,messages:t,watcher:o});let s=(e,t)=>{if("function"!=typeof getApp)s=function(e,t){return n.t(e,t)};else{let e=!1;s=function(t,a){const o=getApp().$vm;return o&&(o.$locale,e||(e=!0,function(e,t){e.$watchLocale?e.$watchLocale((e=>{t.setLocale(e)})):e.$watch((()=>e.$locale),(e=>{t.setLocale(e)}))}(o,n))),n.t(t,a)}}return s(e,t)};return{i18n:n,f:(e,t,a)=>n.f(e,t,a),t:(e,t)=>s(e,t),add:(e,t,a=!0)=>n.add(e,t,a),watch:e=>n.watchLocale(e),getLocale:()=>n.getLocale(),setLocale:e=>n.setLocale(e)}}const ts={en:{"uni-popup.cancel":"cancel","uni-popup.ok":"ok","uni-popup.placeholder":"pleace enter","uni-popup.title":"Hint","uni-popup.shareTitle":"Share to"},"zh-Hans":{"uni-popup.cancel":"取消","uni-popup.ok":"确定","uni-popup.placeholder":"请输入","uni-popup.title":"提示","uni-popup.shareTitle":"分享到"},"zh-Hant":{"uni-popup.cancel":"取消","uni-popup.ok":"確定","uni-popup.placeholder":"請輸入","uni-popup.title":"提示","uni-popup.shareTitle":"分享到"}},{t:as}=es(ts);const os=a({name:"uniPopupDialog",mixins:[Sn],emits:["confirm","close"],props:{value:{type:[String,Number],default:""},placeholder:{type:[String,Number],default:""},type:{type:String,default:"error"},mode:{type:String,default:"base"},title:{type:String,default:""},content:{type:String,default:""},beforeClose:{type:Boolean,default:!1},cancelText:{type:String,default:""},confirmText:{type:String,default:""}},data:()=>({dialogType:"error",focus:!1,val:""}),computed:{okText(){return this.confirmText||as("uni-popup.ok")},closeText(){return this.cancelText||as("uni-popup.cancel")},placeholderText(){return this.placeholder||as("uni-popup.placeholder")},titleText(){return this.title||as("uni-popup.title")}},watch:{type(e){this.dialogType=e},mode(e){"input"===e&&(this.dialogType="info")},value(e){this.val=e}},created(){this.popup.disableMask(),"input"===this.mode?(this.dialogType="info",this.val=this.value):this.dialogType=this.type},mounted(){this.focus=!0},methods:{onOk(){"input"===this.mode?this.$emit("confirm",this.val):this.$emit("confirm"),this.beforeClose||this.popup.close()},closeDialog(){this.$emit("close"),this.beforeClose||this.popup.close()},close(){this.popup.close()}}},[["render",function(t,a,o,n,s,i){return e.openBlock(),e.createElementBlock("view",{class:"uni-popup-dialog"},[e.createElementVNode("view",{class:"uni-dialog-title"},[e.createElementVNode("text",{class:e.normalizeClass(["uni-dialog-title-text",["uni-popup__"+s.dialogType]])},e.toDisplayString(i.titleText),3)]),"base"===o.mode?(e.openBlock(),e.createElementBlock("view",{key:0,class:"uni-dialog-content"},[e.renderSlot(t.$slots,"default",{},(()=>[e.createElementVNode("text",{class:"uni-dialog-content-text"},e.toDisplayString(o.content),1)]),!0)])):(e.openBlock(),e.createElementBlock("view",{key:1,class:"uni-dialog-content"},[e.renderSlot(t.$slots,"default",{},(()=>[e.withDirectives(e.createElementVNode("input",{class:"uni-dialog-input","onUpdate:modelValue":a[0]||(a[0]=e=>s.val=e),type:"text",placeholder:i.placeholderText,focus:s.focus},null,8,["placeholder","focus"]),[[e.vModelText,s.val]])]),!0)])),e.createElementVNode("view",{class:"uni-dialog-button-group"},[e.createElementVNode("view",{class:"uni-dialog-button",onClick:a[1]||(a[1]=(...e)=>i.closeDialog&&i.closeDialog(...e))},[e.createElementVNode("text",{class:"uni-dialog-button-text"},e.toDisplayString(i.closeText),1)]),e.createElementVNode("view",{class:"uni-dialog-button uni-border-left",onClick:a[2]||(a[2]=(...e)=>i.onOk&&i.onOk(...e))},[e.createElementVNode("text",{class:"uni-dialog-button-text uni-button-color"},e.toDisplayString(i.okText),1)])])])}],["__scopeId","data-v-654c64a2"]]),ns=a(e.defineComponent({__name:"weigh",setup(t){const a=e.ref(),o=e.ref(),n=e.ref(),s=e.ref(!1),i=e.ref([]),r=e.ref(""),u=e.ref(""),p=e.ref(null),h=e.ref(6),g=e.ref([]),f=e.ref(!0),v=e.ref(),k=e.reactive({images:[],orderNum:"",weight:"",typing:!0}),_=e.computed((()=>({orderNum:{rules:[{required:!0,errorMessage:"单号不能为空"}]},weight:{rules:[{required:!0,errorMessage:"重量不能为空"},{format:"number",errorMessage:"重量只能输入数字"}]}})));d((async()=>{f.value=!0,s.value=!1})),m((()=>{f.value=!1,s.value=!1})),y((e=>{0===e.index&&uni.navigateTo({url:"/pages/weigh/logList"})}));const w=()=>{s.value=!1,f.value=!1,i.value=[],k.orderNum="",k.weight="",k.typing=!0,e.nextTick((()=>{f.value=!0}))},b=async()=>{1===await On()&&uni.scanCode({success:e=>{v.value=e.result,k.orderNum=e.result},fail:e=>{}})};let N;const E=async()=>{s.value=!0;const e=await(t=k.orderNum,U({method:"POST",url:"/admin/order.scanOrder/checkWaybillGoods",data:{order_no:t}}));var t;1===e.code?e.data.is_goods_empty?a.value.open():x(0):(r.value="error",u.value=e.msg,o.value.open(),s.value=!1)},x=async e=>{const t=T();let a=!0;for(var n=0;n<t.length;n++)t[n].savePath||(a=!1);if(!a)return r.value="error",u.value="图片还没上传完毕,请稍后...",o.value.open(),void(s.value=!1);const i=await(l={order_no:k.orderNum,weight:k.weight,is_save_goods:e,images:t},U({method:"POST",url:"/admin/order.scanOrder/weigh",data:l}));var l;if(s.value=!1,1==i.code){r.value="success",u.value=i.msg,o.value.open();const e={orderNum:k.orderNum,createTime:new Date,type:"称重",status:!0};g.value.unshift(e),uni.setStorageSync("weighHistory",g.value),B(),N=setTimeout((()=>{w(),N&&clearTimeout(N)}),1e3)}else{r.value="error",u.value=i.msg,o.value.open();const e={orderNum:k.orderNum,createTime:new Date,type:"称重",status:!1};g.value.unshift(e),uni.setStorageSync("weighHistory",g.value),B(),N=setTimeout((()=>{w(),N&&clearTimeout(N)}),1e3)}},C=()=>{x(1)},V=()=>{x(0)},S=()=>{n.value.validate().then((e=>{(async()=>{N&&clearTimeout(N),await E()})()})).catch((e=>{l("log","at pages/weigh/weigh.vue:329","err",e)}))},B=()=>{g.value=uni.getStorageSync("weighHistory")},T=()=>i.value.map((e=>({name:e.name,savePath:e.serverUrl,fileSize:e.size,mimeType:e.type}))),P=(e,t)=>{const a={policy:e.policy,signature:e.signature,ossaccessKeyId:e.ossAccessKeyId,key:e.dir+Dn().format("YYYYMMDD")+"/"+Rn()+"_"+t.name,dir:e.dir,host:e.host,file:t.file};return new Promise(((o,n)=>{let s=t.name;s="file";uni.uploadFile({url:e.host,filePath:t.path,name:"file",formData:a,success:e=>{204===e.statusCode||200===e.statusCode?(t.serverUrl=a.key,o(e)):n(e)},fail:e=>{l("log","at pages/weigh/weigh.vue:409","error++",e),n(e)},complete:()=>{l("log","at pages/weigh/weigh.vue:414","complete---"),t.progress=100}}).onProgressUpdate((e=>{t.progress=e.progress}))}))},D=()=>{uni.chooseImage({count:h.value-i.value.length,success:t=>{i.value=i.value.concat(t.tempFiles.map((e=>{const t={size:e.size,path:e.path,name:e.name,type:e.type,progress:0,file:e},a=e.path.substring(e.path.lastIndexOf(".")+1),o=e.path.substring(e.path.lastIndexOf("/")+1);return t.name=o,t.type=a,t})));const a=i.value.filter((e=>0===e.progress));e.nextTick((()=>{(async e=>{const t=(await Fn()).data.signature,a=e.map((e=>P(t,e)));Promise.all(a).then((e=>{uni.showToast({title:"加载成功",icon:"success"})})).catch((e=>{l("error","at pages/weigh/weigh.vue:364","加载失败:",e),uni.showToast({title:"加载失败",icon:"none"})}))})(a)}))},fail:e=>{l("error","at pages/weigh/weigh.vue:459",e)}})},I=()=>{p.value=null};return(t,l)=>{const d=c(e.resolveDynamicComponent("uni-easyinput"),re),m=c(e.resolveDynamicComponent("uni-forms-item"),Ue),y=c(e.resolveDynamicComponent("uni-icons"),se),v=c(e.resolveDynamicComponent("uni-forms"),Ee),N=c(e.resolveDynamicComponent("uni-popup-message"),Bn),E=c(e.resolveDynamicComponent("uni-popup"),Fe),x=c(e.resolveDynamicComponent("uni-popup-dialog"),os);return e.openBlock(),e.createElementBlock("view",{class:"container"},[e.createElementVNode("view",{class:"example"},[e.createVNode(v,{ref_key:"valiForm",ref:n,"label-align":"right","label-width":"80px",rules:_.value,modelValue:k},{default:e.withCtx((()=>[e.createVNode(m,{label:"单号",required:"",name:"orderNum"},{default:e.withCtx((()=>[e.createVNode(d,{modelValue:k.orderNum,"onUpdate:modelValue":l[0]||(l[0]=e=>k.orderNum=e),placeholder:"请输入单号",suffixIcon:"scan",focus:f.value,onIconClick:b},null,8,["modelValue","focus"])])),_:1}),e.createVNode(m,{label:"重量",required:"",name:"weight"},{default:e.withCtx((()=>[e.createVNode(d,{modelValue:k.weight,"onUpdate:modelValue":l[1]||(l[1]=e=>k.weight=e),placeholder:"请输入重量",oninput:"value=value.replace(/[^\\d.]/g,'').replace(/^\\./g, '').replace(/\\.{2,}/g, '').replace('.', '$#$').replace(/\\./g, '').replace('$#$', '.').match(/^\\d*(\\.?\\d{0,2})/g)[0] || null"},{right:e.withCtx((()=>[e.createElementVNode("view",{class:"weight-right"},"KG")])),_:1},8,["modelValue"])])),_:1}),e.createVNode(m,{label:"图片",name:"images"},{default:e.withCtx((()=>[e.createElementVNode("view",{class:"upload-container"},[e.createElementVNode("view",{class:"preview"},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(i.value,((t,a)=>(e.openBlock(),e.createElementBlock("view",{key:a,class:"image-container"},[e.createElementVNode("image",{src:t.path,class:"preview-image",mode:"aspectFill",onClick:e=>{return a=t.path,void(p.value=a);var a}},null,8,["src","onClick"]),e.createElementVNode("progress",{percent:t.progress||0,activeColor:100===Number(t.progress||0)?"#00ff00":"#10AEFF","stroke-width":"3"},null,8,["percent","activeColor"]),"success"===t.status?(e.openBlock(),e.createElementBlock("text",{key:0},"1")):e.createCommentVNode("",!0),e.createVNode(y,{class:"delete-icon",onClick:e=>(e=>{i.value.splice(e,1)})(a),type:"clear",size:"20",color:"red"},null,8,["onClick"])])))),128)),i.value.length<h.value?(e.openBlock(),e.createElementBlock("view",{key:0,class:"choose-image-container",onClick:D},[e.createVNode(y,{type:"plusempty",size:"40",color:"#ccc"})])):e.createCommentVNode("",!0)]),e.createElementVNode("text",{style:{"padding-top":"8px"}},"最多选择6张图片"),p.value?(e.openBlock(),e.createElementBlock("view",{key:0,class:"preview-modal",onClick:I},[e.createElementVNode("image",{src:p.value,class:"preview-large",mode:"aspectFit",onClick:e.withModifiers(I,["stop"])},null,8,["src"])])):e.createCommentVNode("",!0)])])),_:1})])),_:1},8,["rules","modelValue"]),e.createElementVNode("view",{class:"button-group"},[e.createElementVNode("button",{type:"info",onClick:w},"重置"),e.createElementVNode("button",{type:"primary",onClick:S,loading:s.value},[s.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(y,{key:0,type:"checkmarkempty",size:"18",color:"white"})),e.createTextVNode(" 提交 ")],8,["loading"])])]),e.createElementVNode("view",{class:"history"},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(g.value.slice(0,5),((t,a)=>(e.openBlock(),e.createElementBlock("view",{class:"item",key:a},[e.createElementVNode("text",{class:"code",style:e.normalizeStyle({color:t.status?"green":"#666"})},e.toDisplayString(t.orderNum)+" "+e.toDisplayString(t.type),5),t.status?(e.openBlock(),e.createBlock(y,{key:0,type:"checkmarkempty",class:"status",size:"16",color:"green"})):(e.openBlock(),e.createElementBlock("text",{key:1,class:"status fail"},"F")),e.createElementVNode("text",{style:{"margin-left":"10rpx","font-weight":"300"}},e.toDisplayString("\r\n"+t.createTime),1)])))),128))]),e.createVNode(E,{ref_key:"message",ref:o,type:"message"},{default:e.withCtx((()=>[e.createVNode(N,{type:r.value,message:u.value,duration:2e3},null,8,["type","message"])])),_:1},512),e.createVNode(E,{ref_key:"alertDialog",ref:a,type:"dialog"},{default:e.withCtx((()=>[e.createVNode(x,{type:"info",cancelText:"否",confirmText:"是",title:"提示",content:"是否按默认申报(默认申报为:衣服,10件,单价1)",onConfirm:C,onClose:V})])),_:1},512)])}}}),[["__scopeId","data-v-7a3835b1"]]),ss=a(e.defineComponent({__name:"logList",setup(t){const a=e.ref([]);return h((()=>{a.value=uni.getStorageSync("weighHistory")})),(t,o)=>{const n=c(e.resolveDynamicComponent("uni-icons"),se);return e.openBlock(),e.createElementBlock("view",{class:"history"},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.value,((t,a)=>(e.openBlock(),e.createElementBlock("view",{class:"item",key:a},[e.createElementVNode("text",{class:"code",style:e.normalizeStyle({color:t.status?"green":"#666"})},e.toDisplayString(t.orderNum)+" "+e.toDisplayString(t.type),5),t.status?(e.openBlock(),e.createBlock(n,{key:0,type:"checkmarkempty",class:"status",size:"16",color:"green"})):(e.openBlock(),e.createElementBlock("text",{key:1,class:"status fail"},"F")),e.createElementVNode("text",{style:{"margin-left":"10rpx","font-weight":"300"}},e.toDisplayString("\r\n"+t.createTime),1)])))),128)),0===a.value.length?(e.openBlock(),e.createElementBlock("view",{key:0,class:"is-empty"},"暂无历史")):e.createCommentVNode("",!0)])}}}),[["__scopeId","data-v-63b14e41"]]),is=a(e.defineComponent({__name:"outbound",setup(t){const a=e.ref(),o=e.ref(),n=e.ref(!1),s=e.ref(""),i=e.ref(""),r=e.ref([]),u=e.ref([]),p=e.ref({}),h=e.ref([]),g=e.ref(!0),f=e.ref(),v=e.reactive({orderNum:"",batch_number:"",express_company_id:"",express_no:"",express_tracking_number:"",typing:!0}),k=e.computed((()=>({orderNum:{rules:[{required:!0,errorMessage:"单号不能为空"}]}})));d((async()=>{g.value=!0,n.value=!1,await Promise.all([_(),w()])})),m((()=>{g.value=!1,n.value=!1})),y((e=>{0===e.index&&uni.navigateTo({url:"/pages/outbound/logList"})}));const _=async()=>{const e=await U({method:"GET",url:"/admin/order.scanOrder/getBindParams"});1===e.code&&(r.value=e.data.batch_number.map((e=>({text:e.name,value:e.id}))))},w=async()=>{const e=await(t={limit:100,order:"id,desc"},U({method:"GET",url:"/admin/expressCompany/index",data:t}));var t;1===e.code&&(u.value=e.data.list.map((e=>({text:e.name,value:e.id}))))},b=e=>{var t;return null==(t=r.value.find((t=>t.value===e)))?void 0:t.text},N=()=>{n.value=!1,g.value=!1,v.orderNum="",v.batch_number="",v.express_company_id="",v.express_no="",v.express_tracking_number="",v.typing=!0,e.nextTick((()=>{g.value=!0}))};let E;const x=async()=>{if(0===v.orderNum.length)return;const e=await(t={order_no:v.orderNum},U({method:"GET",url:"/admin/order.scanOrder/getOrderInfo",data:t}));var t;1===e.code?p.value=e.data:(p.value={},s.value="error",i.value=e.msg,a.value.open())},C=async e=>{1===await On()&&uni.scanCode({success:t=>{f.value=t.result,v[e]=t.result,"orderNum"===e&&(e=>{v.orderNum=e,E&&clearTimeout(E),E=setTimeout((()=>{x(),clearTimeout(E)}),800)})(t.result)},fail:e=>{}})};let V;const S=async()=>{if(0===v.orderNum.length&&0===v.batch_number.length)return s.value="error",i.value="单号或批次号至少填一个",void a.value.open();n.value=!0;let e={order_no:v.orderNum,batch_number:v.batch_number};Number(v.express_company_id)&&(e.express_company_id=Number(v.express_company_id)),v.express_no&&(e.express_no=v.express_no),v.express_tracking_number&&(e.express_tracking_number=v.express_tracking_number);const t=await(e=>U({method:"POST",url:"/admin/order.scanOrder/outStock",data:e}))(e);if(n.value=!1,1==t.code){s.value="success",i.value=t.msg,a.value.open();const e={orderNum:v.orderNum,batch_text:b(v.batch_number),createTime:new Date,type:"出库",status:!0};h.value.unshift(e),h.value.length>10&&(h.value.length=10),uni.setStorageSync("outboundHistory",h.value),T(),V=setTimeout((()=>{N(),V&&clearTimeout(V),n.value=!1}),700)}else{s.value="error",i.value=t.msg,a.value.open();const e={orderNum:v.orderNum,batch_text:b(v.batch_number),createTime:new Date,type:"出库",status:!1};h.value.unshift(e),h.value.length>10&&(h.value.length=10),uni.setStorageSync("outboundHistory",h.value),T(),V=setTimeout((()=>{N(),V&&clearTimeout(V),n.value=!1}),700)}},B=()=>{o.value.validate().then((e=>{(async()=>{V&&clearTimeout(V),await S()})()})).catch((e=>{l("log","at pages/outbound/outbound.vue:331","err",e)}))},T=()=>{h.value=uni.getStorageSync("outboundHistory")};return(t,l)=>{const d=c(e.resolveDynamicComponent("uni-easyinput"),re),m=c(e.resolveDynamicComponent("uni-forms-item"),Ue),f=c(e.resolveDynamicComponent("uni-data-select"),Vn),y=c(e.resolveDynamicComponent("uni-forms"),Ee),_=c(e.resolveDynamicComponent("uni-icons"),se),w=c(e.resolveDynamicComponent("uni-popup-message"),Bn),b=c(e.resolveDynamicComponent("uni-popup"),Fe);return e.openBlock(),e.createElementBlock("view",{class:"container"},[e.createElementVNode("view",{class:"example"},[e.createVNode(y,{ref_key:"valiForm",ref:o,"label-align":"right","label-width":"80px",rules:k.value,modelValue:v},{default:e.withCtx((()=>[e.createVNode(m,{label:"单号",required:!0,name:"orderNum"},{default:e.withCtx((()=>[e.createVNode(d,{modelValue:v.orderNum,"onUpdate:modelValue":l[0]||(l[0]=e=>v.orderNum=e),placeholder:"请输入单号",suffixIcon:"scan",focus:g.value,onIconClick:l[1]||(l[1]=e=>C("orderNum"))},null,8,["modelValue","focus"])])),_:1}),e.createVNode(m,{label:"批次号",name:"batch_number"},{default:e.withCtx((()=>[e.createVNode(f,{modelValue:v.batch_number,"onUpdate:modelValue":l[2]||(l[2]=e=>v.batch_number=e),localdata:r.value,placeholder:"请选择批次号"},null,8,["modelValue","localdata"])])),_:1}),p.value.order_id?(e.openBlock(),e.createElementBlock("view",{key:0},[p.value.express_sn?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("view",{key:0},[e.createVNode(m,{label:"物流公司",name:"express_company_id"},{default:e.withCtx((()=>[e.createVNode(f,{modelValue:v.express_company_id,"onUpdate:modelValue":l[3]||(l[3]=e=>v.express_company_id=e),localdata:u.value,placeholder:"请选择物流公司"},null,8,["modelValue","localdata"])])),_:1}),e.createVNode(m,{label:"物流单号",name:"express_no"},{default:e.withCtx((()=>[e.createVNode(d,{modelValue:v.express_no,"onUpdate:modelValue":l[4]||(l[4]=e=>v.express_no=e),placeholder:"请输入物流单号",suffixIcon:"scan",onIconClick:l[5]||(l[5]=e=>C("express_no"))},null,8,["modelValue"])])),_:1}),e.createVNode(m,{label:"追踪单号",name:"express_tracking_number"},{default:e.withCtx((()=>[e.createVNode(d,{modelValue:v.express_tracking_number,"onUpdate:modelValue":l[6]||(l[6]=e=>v.express_tracking_number=e),placeholder:"请输入追踪单号",suffixIcon:"scan",onIconClick:l[7]||(l[7]=e=>C("express_tracking_number"))},null,8,["modelValue"])])),_:1})]))])):e.createCommentVNode("",!0)])),_:1},8,["rules","modelValue"]),e.createElementVNode("view",{class:"button-group"},[e.createElementVNode("button",{type:"info",onClick:N},"重置"),e.createElementVNode("button",{type:"primary",onClick:B,loading:n.value},[n.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(_,{key:0,type:"checkmarkempty",size:"18",color:"white"})),e.createTextVNode(" 提交 ")],8,["loading"])])]),e.createElementVNode("view",{class:"history"},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(h.value.slice(0,5),((t,a)=>(e.openBlock(),e.createElementBlock("view",{class:"item",key:a},[e.createElementVNode("text",{class:"code",style:e.normalizeStyle({color:t.status?"green":"#666"})},[e.createTextVNode(e.toDisplayString(t.orderNum)+" ",1),t.batch_text?(e.openBlock(),e.createElementBlock("text",{key:0},"批次号: "+e.toDisplayString(t.batch_text),1)):e.createCommentVNode("",!0),e.createTextVNode(" "+e.toDisplayString(t.type),1)],4),t.status?(e.openBlock(),e.createBlock(_,{key:0,type:"checkmarkempty",class:"status",size:"16",color:"green"})):(e.openBlock(),e.createElementBlock("text",{key:1,class:"status fail"},"F")),e.createElementVNode("text",{style:{"margin-left":"10rpx","font-weight":"300"}},e.toDisplayString("\r\n"+t.createTime),1)])))),128))]),e.createVNode(b,{ref_key:"message",ref:a,type:"message"},{default:e.withCtx((()=>[e.createVNode(w,{type:s.value,message:i.value,duration:2e3},null,8,["type","message"])])),_:1},512)])}}}),[["__scopeId","data-v-726989ba"]]),rs=a(e.defineComponent({__name:"logList",setup(t){const a=e.ref([]);return h((()=>{a.value=uni.getStorageSync("outboundHistory")})),(t,o)=>{const n=c(e.resolveDynamicComponent("uni-icons"),se);return e.openBlock(),e.createElementBlock("view",{class:"history"},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.value,((t,a)=>(e.openBlock(),e.createElementBlock("view",{class:"item",key:a},[e.createElementVNode("text",{class:"code",style:e.normalizeStyle({color:t.status?"green":"#666"})},[e.createTextVNode(e.toDisplayString(t.orderNum)+" ",1),t.batch_text?(e.openBlock(),e.createElementBlock("text",{key:0},"批次号: "+e.toDisplayString(t.batch_text),1)):e.createCommentVNode("",!0),e.createTextVNode(" "+e.toDisplayString(t.type),1)],4),t.status?(e.openBlock(),e.createBlock(n,{key:0,type:"checkmarkempty",class:"status",size:"16",color:"green"})):(e.openBlock(),e.createElementBlock("text",{key:1,class:"status fail"},"F")),e.createElementVNode("text",{style:{"margin-left":"10rpx","font-weight":"300"}},e.toDisplayString("\r\n"+t.createTime),1)])))),128)),0===a.value.length?(e.openBlock(),e.createElementBlock("view",{key:0,class:"is-empty"},"暂无历史")):e.createCommentVNode("",!0)])}}}),[["__scopeId","data-v-cb22260c"]]),ls=e.defineComponent({__name:"warehouseScan",setup(t){const a=e.ref(),o=e.ref(!1),n=e.ref(!1),s=e.ref(!0),i=e.ref([]),r=e.ref(),u=e.ref(),p=e.ref();let v;const k=e.ref({order_code:""}),_=e.reactive({order_code:{rules:[{required:!0,errorMessage:"单据编号不能为空"}]}}),w=async()=>{1===await On()&&uni.scanCode({success:e=>{k.value.order_code=e.result,E()},fail:e=>{}})},b=()=>{o.value=!1,k.value.order_code=""},N=()=>{n.value||(s.value=!1,e.nextTick((()=>{s.value=!0})))},E=async()=>{v&&clearTimeout(v);if(!(await a.value.validate()))return;o.value=!0;const e=await(t={order_code:k.value.order_code},U({method:"POST",url:"/admin/order.sheetOrder/warehouseScan",data:t}));var t;if(l("log","at pages/warehouseScan/warehouseScan.vue:143","res---",e),o.value=!1,1==e.code){u.value="success",p.value=e.msg,r.value.open();const t={order_code:k.value.order_code,createTime:new Date,type:"单据扫描",status:!0};i.value.unshift(t),uni.setStorageSync("warehouseLogHistory",i.value),x()}else{u.value="error",p.value=e.msg,r.value.open();const t={order_code:k.value.order_code,createTime:new Date,type:"单据扫描",status:!1};i.value.unshift(t),uni.setStorageSync("warehouseLogHistory",i.value),x()}v=setTimeout((()=>{b(),v&&clearTimeout(v)}),1e3)},x=()=>{i.value=uni.getStorageSync("warehouseLogHistory")||[]},C=e=>{102===e.keyCode||103===e.keyCode||e.keyCode,66==e.keyCode&&E()};return h((()=>{plus.key.addEventListener("keyup",C)})),g((()=>{plus.key.removeEventListener("keyup",C)})),m((()=>{n.value=!0,plus.key.removeEventListener("keyup",C)})),f((()=>{plus.key.removeEventListener("keyup",C)})),d((()=>{n.value=!1,x()})),y((e=>{0===e.index&&uni.navigateTo({url:"/pages/warehouseScan/logList"})})),(t,n)=>{const l=c(e.resolveDynamicComponent("uni-easyinput"),re),d=c(e.resolveDynamicComponent("uni-forms-item"),Ue),m=c(e.resolveDynamicComponent("uni-forms"),Ee),h=c(e.resolveDynamicComponent("uni-icons"),se),g=c(e.resolveDynamicComponent("uni-popup-message"),Bn),f=c(e.resolveDynamicComponent("uni-popup"),Fe);return e.openBlock(),e.createElementBlock("view",{class:"container"},[e.createVNode(m,{ref_key:"valiFormRef",ref:a,"label-align":"right","label-width":80,rules:_,modelValue:k.value},{default:e.withCtx((()=>[e.createVNode(d,{label:"单据编号",required:"",name:"order_code"},{default:e.withCtx((()=>[e.createVNode(l,{modelValue:k.value.order_code,"onUpdate:modelValue":n[0]||(n[0]=e=>k.value.order_code=e),placeholder:"请输入单据编号",suffixIcon:"scan",focus:s.value,onIconClick:w,onBlur:N,onConfirm:E},null,8,["modelValue","focus"])])),_:1})])),_:1},8,["rules","modelValue"]),e.createElementVNode("view",{class:"button-group"},[e.createElementVNode("button",{type:"default",onClick:b},"重置"),e.createElementVNode("button",{type:"primary",onClick:E,loading:o.value},[o.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(h,{key:0,type:"checkmarkempty",size:"18",color:"white"})),e.createTextVNode(" 提交 ")],8,["loading"])]),i.value.length>0?(e.openBlock(),e.createElementBlock("view",{key:0,class:"history"},[e.createElementVNode("text",{class:"title"},"记录(最近5条)")])):e.createCommentVNode("",!0),e.createElementVNode("view",{class:"history"},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(i.value.slice(0,5),((t,a)=>(e.openBlock(),e.createElementBlock("view",{class:"item",key:a},[e.createElementVNode("text",{class:"code",style:e.normalizeStyle({color:t.status?"green":"#666"})},e.toDisplayString(t.order_code),5),t.status?(e.openBlock(),e.createBlock(h,{key:0,type:"checkmarkempty",class:"status",size:"16",color:"green"})):(e.openBlock(),e.createElementBlock("text",{key:1,class:"status fail"},"F")),e.createElementVNode("text",{style:{"margin-left":"10rpx","font-weight":"300"}},e.toDisplayString("\r\n"+t.createTime),1)])))),128))]),e.createVNode(f,{ref_key:"messageRef",ref:r,type:"message"},{default:e.withCtx((()=>[e.createVNode(g,{type:u.value,message:p.value,duration:2e3},null,8,["type","message"])])),_:1},512)])}}}),cs=a(ls,[["__scopeId","data-v-417ab7a0"]]),us=a(e.defineComponent({__name:"logList",setup(t){const a=e.ref([]);return h((()=>{a.value=uni.getStorageSync("warehouseLogHistory")})),(t,o)=>{const n=c(e.resolveDynamicComponent("uni-icons"),se);return e.openBlock(),e.createElementBlock("view",{class:"history"},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.value,((t,a)=>(e.openBlock(),e.createElementBlock("view",{class:"item",key:a},[e.createElementVNode("text",{class:"type"},e.toDisplayString(t.type),1),e.createElementVNode("text",{class:"code",style:e.normalizeStyle({color:t.status?"green":"#666"})},e.toDisplayString(t.order_code),5),t.status?(e.openBlock(),e.createBlock(n,{key:0,type:"checkmarkempty",class:"status",size:"16",color:"green"})):(e.openBlock(),e.createElementBlock("text",{key:1,class:"status fail"},"F")),e.createElementVNode("text",{style:{"margin-left":"10rpx","font-weight":"300"}},e.toDisplayString("\r\n"+t.createTime),1)])))),128)),0===a.value.length?(e.openBlock(),e.createElementBlock("view",{key:0,class:"is-empty"},"暂无历史")):e.createCommentVNode("",!0)])}}}),[["__scopeId","data-v-0982f1ca"]]),ds=r("modal");var ms=r("AutoReplyPrintUniModule"),ps=0,hs=!1,gs=!1,fs="rbBT2";const ys=a({data:()=>({udsBT2Value:0,udsBT2Range:[],udsNETValue:0,udsNETRange:[],udsUSBValue:0,udsUSBRange:[],udsCOMValue:0,udsCOMRange:[],udsCOMBaudrateValue:9600,udsCOMBaudrateRange:[{text:"9600",value:9600},{text:"19200",value:19200},{text:"38400",value:38400},{text:"57600",value:57600},{text:"115200",value:115200},{text:"230400",value:230400},{text:"256000",value:256e3},{text:"500000",value:5e5}],udsCOMFlowControlValue:0,udsCOMFlowControlRange:[{text:"NoFlowControl",value:0},{text:"Hardware",value:2}],btnOpenPortDisabled:!1,btnClosePortDisabled:!0}),onLoad(){uni.setNavigationBarTitle({title:"SampleLabel "+ms.CP_Library_Version()})},onReady(){},methods:{radioChange:function(e){fs=e.detail.value},enumPort(){var e=new Array,t=ms.CP_Port_EnumCom();if(null!=t)for(var a=0;a<t.length;a++){var o={text:t[a],value:a};l("log","at pages/printer/printer.vue:176",o),e.push(o)}this.udsCOMRange=e;var n=new Array,s=ms.CP_Port_EnumUsb();if(null!=s)for(let i=0;i<s.length;i++){let e={text:s[i],value:i};l("log","at pages/printer/printer.vue:190",e),n.push(e)}this.udsUSBRange=n,hs||(hs=!0,l("log","at pages/printer/printer.vue:198","isEnumeratingBT2"),ms.CP_Port_EnumBtDevice(12e3,(e=>{for(var t=e.device_address+"("+e.device_name+")",a=0;a<this.udsBT2Range.length;a++)if(this.udsBT2Range[a].text==t)return;var o={text:t,value:this.udsBT2Range.length};l("log","at pages/printer/printer.vue:213",o),this.udsBT2Range.push(o)}),(e=>{hs=!1,l("log","at pages/printer/printer.vue:218","finishedEnumeratingBT2")}))),gs||(gs=!0,l("log","at pages/printer/printer.vue:225","isEnumeratingNET"),ms.CP_Port_EnumNetPrinter(12e3,(e=>{for(var t=e.discovered_ip+"("+e.discovered_name+")",a=0;a<this.udsNETRange.length;a++)if(this.udsNETRange[a].text==t)return;var o={text:t,value:this.udsNETRange.length};l("log","at pages/printer/printer.vue:240",o),this.udsNETRange.push(o)}),(e=>{gs=!1,l("log","at pages/printer/printer.vue:245","finishedEnumeratingNET")})))},openPort(){if(0==ps){if("rbBT2"==fs){var e=this.udsBT2Range[this.udsBT2Value].text,t=e.substring(0,e.indexOf("("));ds.toast({message:"Connecting: "+t+" ......",duration:1.5}),l("log","at pages/printer/printer.vue:259","Connecting: "+t+" ......"),l("log","at pages/printer/printer.vue:261","hPrinter: "+(ps=ms.CP_Port_OpenBtSpp(t,1)))}else if("rbNET"==fs){let e=this.udsNETRange[this.udsNETValue].text;var a=e.substring(0,e.indexOf("("));ds.toast({message:"Connecting: "+a+" ......",duration:1.5}),l("log","at pages/printer/printer.vue:269","Connecting: "+a+" ......"),l("log","at pages/printer/printer.vue:271","hPrinter: "+(ps=ms.CP_Port_OpenTcp(null,a,9100,5e3,1)))}else if("rbUSB"==fs){var o=this.udsUSBRange[this.udsUSBValue].text;ds.toast({message:"Connecting: "+o+" ......",duration:1.5}),l("log","at pages/printer/printer.vue:278","Connecting: "+o+" ......"),l("log","at pages/printer/printer.vue:280","hPrinter: "+(ps=ms.CP_Port_OpenUsb(o,1)))}else if("rbCOM"==fs){var n=this.udsCOMRange[this.udsCOMValue].text,s=this.udsCOMBaudrateValue,i=this.udsCOMFlowControlValue;ds.toast({message:"Connecting: "+n+","+s+","+i+" ......",duration:1.5}),l("log","at pages/printer/printer.vue:290","Connecting: "+n+","+s+","+i+"......"),l("log","at pages/printer/printer.vue:302","hPrinter: "+(ps=ms.CP_Port_OpenCom(n,s,8,0,0,i,1)))}ds.toast({message:0!=ps?"Connected":"Failed",duration:1.5})}this.btnOpenPortDisabled=0!=ps,this.btnClosePortDisabled=0==ps},closePort(){0!=ps&&(ms.CP_Port_Close(ps),ps=0),this.btnOpenPortDisabled=0!=ps,this.btnClosePortDisabled=0==ps},Test_Label_SampleTicket_58MM_1(){ms.CP_Pos_SetMultiByteMode(ps),ms.CP_Pos_SetMultiByteEncoding(ps,1),ms.CP_Label_PageBegin(ps,0,0,384,240,0),ms.CP_Label_DrawText(ps,10,10,24,0,"型号:P58A+"),ms.CP_Label_DrawText(ps,10,40,24,0,"MFG :00"),ms.CP_Label_DrawBarcode(ps,10,70,8,2,60,2,0,"No.123456"),ms.CP_Label_PagePrint(ps,1);var e=ms.CP_Pos_QueryPrintResult(ps,1e4);ds.toast({message:e?"Print Success":"Print Failed",duration:1.5})},Test_Label_SampleTicket_80MM_1(){ms.CP_Pos_SetMultiByteMode(ps),ms.CP_Pos_SetMultiByteEncoding(ps,1),ms.CP_Label_PageBegin(ps,0,0,576,240,0),ms.CP_Label_DrawText(ps,10,10,24,0,"型号:P80A+"),ms.CP_Label_DrawText(ps,10,40,24,0,"MFG :00"),ms.CP_Label_DrawBarcode(ps,10,70,8,2,60,4,0,"No.123456"),ms.CP_Label_PagePrint(ps,1);var e=ms.CP_Pos_QueryPrintResult(ps,1e4);ds.toast({message:e?"Print Success":"Print Failed",duration:1.5})},GetPrinterResolutionInfo(){var e=ms.CP_Printer_GetPrinterResolutionInfo(ps);ds.toast({message:e,duration:1.5})},GetPrinterFirmwareVersion(){var e=ms.CP_Printer_GetPrinterFirmwareVersion(ps);ds.toast({message:e,duration:1.5})},GetPrinterStatusInfo(){var e=ms.CP_Printer_GetPrinterStatusInfo(ps),t=new Date(e.timestamp_ms),a=e.printer_error_status,o="";0!=a?(o+="ERROR_OCCURED\n",0!=(1&a)&&(o+="ERROR_CUTTER\n"),0!=(2&a)&&(o+="ERROR_FLASH\n"),0!=(4&a)&&(o+="ERROR_NOPAPER\n"),0!=(8&a)&&(o+="ERROR_VOLTAGE\n"),0!=(16&a)&&(o+="ERROR_MARKER\n"),0!=(32&a)&&(o+="ERROR_ENGINE\n"),0!=(64&a)&&(o+="ERROR_OVERHEAT\n"),0!=(128&a)&&(o+="ERROR_COVERUP\n"),0!=(256&a)&&(o+="ERROR_MOTOR\n")):o+="Status OK\n",ds.toast({message:t+"\n"+o,duration:1.5})},CP_Pos_KickOutDrawer(){var e=ms.CP_Pos_KickOutDrawer(ps,0,100,100);ds.toast({message:e,duration:1.5})},CP_Pos_Beep(){var e=ms.CP_Pos_Beep(ps,3,500);ds.toast({message:e,duration:1.5})},CP_Pos_PrintSelfTestPage(){var e=ms.CP_Pos_PrintSelfTestPage(ps);ds.toast({message:e,duration:1.5})},CP_Pos_ResetPrinter(){var e=ms.CP_Pos_ResetPrinter(ps);ds.toast({message:e,duration:1.5})},CP_Pos_SetPrintSpeed_100(){var e=ms.CP_Pos_SetPrintSpeed(ps,100);ms.CP_Pos_PrintSelfTestPage(ps),ds.toast({message:e,duration:1.5})},CP_Pos_SetPrintSpeed_150(){var e=ms.CP_Pos_SetPrintSpeed(ps,150);ms.CP_Pos_PrintSelfTestPage(ps),ds.toast({message:e,duration:1.5})},CP_Pos_SetPrintDensity_7(){var e=ms.CP_Pos_SetPrintDensity(ps,7);ms.CP_Pos_PrintSelfTestPage(ps),ds.toast({message:e,duration:1.5})},CP_Pos_SetPrintDensity_15(){var e=ms.CP_Pos_SetPrintDensity(ps,15);ms.CP_Pos_PrintSelfTestPage(ps),ds.toast({message:e,duration:1.5})},CP_Label_EnableLabelMode(){var e=ms.CP_Label_EnableLabelMode(ps);ds.toast({message:e,duration:1.5})},CP_Label_DisableLabelMode(){var e=ms.CP_Label_DisableLabelMode(ps);ds.toast({message:e,duration:1.5})},CP_Label_CalibrateLabel(){var e=ms.CP_Label_CalibrateLabel(ps);ds.toast({message:e,duration:1.5})},CP_Label_FeedLabel(){var e=ms.CP_Label_FeedLabel(ps);ds.toast({message:e,duration:1.5})},CP_Label_PageBegin(){var e=ms.CP_Label_PageBegin(ps,0,0,384,400,0);ms.CP_Label_DrawBox(ps,0,0,383,399,1,1),ms.CP_Label_PagePrint(ps,1),ds.toast({message:e,duration:1.5})},CP_Label_PagePrint(){ms.CP_Label_PageBegin(ps,0,0,384,400,0),ms.CP_Label_DrawBox(ps,0,0,383,399,1,1);var e=ms.CP_Label_PagePrint(ps,1);ds.toast({message:e,duration:1.5})},CP_Label_DrawText(){ms.CP_Pos_SetMultiByteMode(ps),ms.CP_Pos_SetMultiByteEncoding(ps,1),ms.CP_Label_PageBegin(ps,0,0,384,400,0),ms.CP_Label_DrawBox(ps,0,0,383,399,1,1);var e=ms.CP_Label_DrawText(ps,10,10,24,0,"$$$123哈哈哈");ms.CP_Label_PagePrint(ps,1),ds.toast({message:e,duration:1.5})},CP_Label_DrawTextInUTF8(){ms.CP_Pos_SetMultiByteMode(ps),ms.CP_Pos_SetMultiByteEncoding(ps,1),ms.CP_Label_PageBegin(ps,0,0,384,400,0),ms.CP_Label_DrawBox(ps,0,0,383,399,1,1);var e=ms.CP_Label_DrawTextInUTF8(ps,10,10,24,0,"$$$123哈哈哈");ms.CP_Label_PagePrint(ps,1),ds.toast({message:e,duration:1.5})},CP_Label_DrawTextInGBK(){ms.CP_Pos_SetMultiByteMode(ps),ms.CP_Pos_SetMultiByteEncoding(ps,0),ms.CP_Label_PageBegin(ps,0,0,384,400,0),ms.CP_Label_DrawBox(ps,0,0,383,399,1,1);var e=ms.CP_Label_DrawTextInGBK(ps,10,10,24,0,"$$$123哈哈哈");ms.CP_Label_PagePrint(ps,1),ds.toast({message:e,duration:1.5})},CP_Label_DrawBarcode(){ms.CP_Label_PageBegin(ps,0,0,384,400,0),ms.CP_Label_DrawBox(ps,0,0,383,399,1,1);var e=ms.CP_Label_DrawBarcode(ps,10,10,0,2,60,2,0,"01234567890");ms.CP_Label_PagePrint(ps,1),ds.toast({message:e,duration:1.5})},CP_Label_DrawQRCode(){ms.CP_Label_PageBegin(ps,0,0,384,400,0),ms.CP_Label_DrawBox(ps,0,0,383,399,1,1);var e=ms.CP_Label_DrawQRCode(ps,10,10,0,1,8,0,"Hello 你好");ms.CP_Label_PagePrint(ps,1),ds.toast({message:e,duration:1.5})},CP_Label_DrawPDF417Code(){ms.CP_Label_PageBegin(ps,0,0,384,400,0),ms.CP_Label_DrawBox(ps,0,0,383,399,1,1);var e=ms.CP_Label_DrawPDF417Code(ps,10,10,3,3,0,3,0,"Hello 你好");ms.CP_Label_PagePrint(ps,1),ds.toast({message:e,duration:1.5})},CP_Label_DrawImageFromFile(){uni.chooseImage({count:1,sizeType:["original","compressed"],sourceType:["album"],success:function(e){ms.CP_Label_PageBegin(ps,0,0,384,400,0),ms.CP_Label_DrawBox(ps,0,0,383,399,1,1);var t=ms.CP_Label_DrawImageFromFile(ps,0,0,384,0,e.tempFilePaths[0],2,0);ms.CP_Label_PagePrint(ps,1),ds.toast({message:t,duration:1.5})}})},CP_Label_DrawImageFromPixels(){var e=100,t=new Uint8Array(4e4);for(let s=0;s<100;++s)for(let o=0;o<e;++o){var a=s*e*4+4*o;o==s?(t[a]=0,t[a+1]=0,t[a+2]=0,t[a+3]=255):(t[a]=255,t[a+1]=255,t[a+2]=255,t[a+3]=255)}var o=uni.arrayBufferToBase64(t);ms.CP_Label_PageBegin(ps,0,0,384,400,0),ms.CP_Label_DrawBox(ps,0,0,383,399,1,1);var n=ms.CP_Label_DrawImageFromPixels(ps,0,0,o,e,100,400,7,2,0);ms.CP_Label_PagePrint(ps,1),ds.toast({message:n,duration:1.5})},CP_Label_DrawLine(){ms.CP_Label_PageBegin(ps,0,0,384,400,0),ms.CP_Label_DrawBox(ps,0,0,383,399,1,1);var e=ms.CP_Label_DrawLine(ps,20,20,100,300,1,1);ms.CP_Label_PagePrint(ps,1),ds.toast({message:e,duration:1.5})},CP_Label_DrawRect(){ms.CP_Label_PageBegin(ps,0,0,384,400,0),ms.CP_Label_DrawBox(ps,0,0,383,399,1,1);var e=ms.CP_Label_DrawRect(ps,20,20,200,10,1);ms.CP_Label_PagePrint(ps,1),ds.toast({message:e,duration:1.5})},CP_Label_DrawBox(){ms.CP_Label_PageBegin(ps,0,0,384,400,0),ms.CP_Label_DrawBox(ps,0,0,383,399,1,1);var e=ms.CP_Label_DrawBox(ps,30,30,300,200,1,1);ms.CP_Label_PagePrint(ps,1),ds.toast({message:e,duration:1.5})}}},[["render",function(t,a,o,n,s,i){const r=c(e.resolveDynamicComponent("uni-data-select"),Vn);return e.openBlock(),e.createElementBlock("view",null,[e.createElementVNode("radio-group",{onChange:a[6]||(a[6]=(...e)=>i.radioChange&&i.radioChange(...e))},[e.createElementVNode("label",{class:"uni-list-cell uni-list-cell-pd"},[e.createElementVNode("label",{class:"radio"},[e.createElementVNode("radio",{value:"rbBT2",checked:"true"}),e.createTextVNode("BT2.0 ")]),e.createVNode(r,{modelValue:s.udsBT2Value,"onUpdate:modelValue":a[0]||(a[0]=e=>s.udsBT2Value=e),localdata:s.udsBT2Range},null,8,["modelValue","localdata"])]),e.createElementVNode("label",{class:"uni-list-cell uni-list-cell-pd"},[e.createElementVNode("label",{class:"radio"},[e.createElementVNode("radio",{value:"rbNET"}),e.createTextVNode("NET ")]),e.createVNode(r,{modelValue:s.udsNETValue,"onUpdate:modelValue":a[1]||(a[1]=e=>s.udsNETValue=e),localdata:s.udsNETRange},null,8,["modelValue","localdata"])]),e.createElementVNode("label",{class:"uni-list-cell uni-list-cell-pd"},[e.createElementVNode("label",{class:"radio"},[e.createElementVNode("radio",{value:"rbUSB"}),e.createTextVNode("USB ")]),e.createVNode(r,{modelValue:s.udsUSBValue,"onUpdate:modelValue":a[2]||(a[2]=e=>s.udsUSBValue=e),localdata:s.udsUSBRange},null,8,["modelValue","localdata"])]),e.createElementVNode("label",{class:"uni-list-cell uni-list-cell-pd"},[e.createElementVNode("label",{class:"radio"},[e.createElementVNode("radio",{value:"rbCOM"}),e.createTextVNode("COM ")]),e.createVNode(r,{modelValue:s.udsCOMValue,"onUpdate:modelValue":a[3]||(a[3]=e=>s.udsCOMValue=e),localdata:s.udsCOMRange},null,8,["modelValue","localdata"]),e.createVNode(r,{modelValue:s.udsCOMBaudrateValue,"onUpdate:modelValue":a[4]||(a[4]=e=>s.udsCOMBaudrateValue=e),localdata:s.udsCOMBaudrateRange},null,8,["modelValue","localdata"]),e.createVNode(r,{modelValue:s.udsCOMFlowControlValue,"onUpdate:modelValue":a[5]||(a[5]=e=>s.udsCOMFlowControlValue=e),localdata:s.udsCOMFlowControlRange},null,8,["modelValue","localdata"])])],32),e.createElementVNode("view",{class:"uni-flex uni-row"},[e.createElementVNode("button",{type:"default",onClick:a[7]||(a[7]=(...e)=>i.enumPort&&i.enumPort(...e))},"Enum Port"),e.createElementVNode("button",{type:"default",onClick:a[8]||(a[8]=(...e)=>i.openPort&&i.openPort(...e)),disabled:s.btnOpenPortDisabled},"Open Port",8,["disabled"]),e.createElementVNode("button",{type:"default",onClick:a[9]||(a[9]=(...e)=>i.closePort&&i.closePort(...e)),disabled:s.btnClosePortDisabled},"Close Port",8,["disabled"])]),e.createElementVNode("view",null,[e.createElementVNode("button",{type:"primary",onClick:a[10]||(a[10]=(...e)=>i.Test_Label_SampleTicket_58MM_1&&i.Test_Label_SampleTicket_58MM_1(...e))}," Test_Label_SampleTicket_58MM_1 "),e.createElementVNode("button",{type:"primary",onClick:a[11]||(a[11]=(...e)=>i.Test_Label_SampleTicket_80MM_1&&i.Test_Label_SampleTicket_80MM_1(...e))}," Test_Label_SampleTicket_80MM_1 "),e.createElementVNode("button",{type:"primary",onClick:a[12]||(a[12]=(...e)=>i.GetPrinterResolutionInfo&&i.GetPrinterResolutionInfo(...e))},"GetPrinterResolutionInfo"),e.createElementVNode("button",{type:"primary",onClick:a[13]||(a[13]=(...e)=>i.GetPrinterFirmwareVersion&&i.GetPrinterFirmwareVersion(...e))},"GetPrinterFirmwareVersion"),e.createElementVNode("button",{type:"primary",onClick:a[14]||(a[14]=(...e)=>i.GetPrinterStatusInfo&&i.GetPrinterStatusInfo(...e))},"GetPrinterStatusInfo"),e.createElementVNode("button",{type:"primary",onClick:a[15]||(a[15]=(...e)=>i.CP_Pos_KickOutDrawer&&i.CP_Pos_KickOutDrawer(...e))},"CP_Pos_KickOutDrawer"),e.createElementVNode("button",{type:"primary",onClick:a[16]||(a[16]=(...e)=>i.CP_Pos_Beep&&i.CP_Pos_Beep(...e))},"CP_Pos_Beep"),e.createElementVNode("button",{type:"primary",onClick:a[17]||(a[17]=(...e)=>i.CP_Pos_PrintSelfTestPage&&i.CP_Pos_PrintSelfTestPage(...e))},"CP_Pos_PrintSelfTestPage"),e.createElementVNode("button",{type:"primary",onClick:a[18]||(a[18]=(...e)=>i.CP_Pos_ResetPrinter&&i.CP_Pos_ResetPrinter(...e))},"CP_Pos_ResetPrinter"),e.createElementVNode("button",{type:"primary",onClick:a[19]||(a[19]=(...e)=>i.CP_Pos_SetPrintSpeed_100&&i.CP_Pos_SetPrintSpeed_100(...e))},"CP_Pos_SetPrintSpeed_100"),e.createElementVNode("button",{type:"primary",onClick:a[20]||(a[20]=(...e)=>i.CP_Pos_SetPrintSpeed_150&&i.CP_Pos_SetPrintSpeed_150(...e))},"CP_Pos_SetPrintSpeed_150"),e.createElementVNode("button",{type:"primary",onClick:a[21]||(a[21]=(...e)=>i.CP_Pos_SetPrintDensity_7&&i.CP_Pos_SetPrintDensity_7(...e))},"CP_Pos_SetPrintDensity_7"),e.createElementVNode("button",{type:"primary",onClick:a[22]||(a[22]=(...e)=>i.CP_Pos_SetPrintDensity_15&&i.CP_Pos_SetPrintDensity_15(...e))},"CP_Pos_SetPrintDensity_15"),e.createElementVNode("button",{type:"primary",onClick:a[23]||(a[23]=(...e)=>i.CP_Label_EnableLabelMode&&i.CP_Label_EnableLabelMode(...e))},"CP_Label_EnableLabelMode"),e.createElementVNode("button",{type:"primary",onClick:a[24]||(a[24]=(...e)=>i.CP_Label_DisableLabelMode&&i.CP_Label_DisableLabelMode(...e))},"CP_Label_DisableLabelMode"),e.createElementVNode("button",{type:"primary",onClick:a[25]||(a[25]=(...e)=>i.CP_Label_CalibrateLabel&&i.CP_Label_CalibrateLabel(...e))},"CP_Label_CalibrateLabel"),e.createElementVNode("button",{type:"primary",onClick:a[26]||(a[26]=(...e)=>i.CP_Label_FeedLabel&&i.CP_Label_FeedLabel(...e))},"CP_Label_FeedLabel"),e.createElementVNode("button",{type:"primary",onClick:a[27]||(a[27]=(...e)=>i.CP_Label_PageBegin&&i.CP_Label_PageBegin(...e))},"CP_Label_PageBegin"),e.createElementVNode("button",{type:"primary",onClick:a[28]||(a[28]=(...e)=>i.CP_Label_PagePrint&&i.CP_Label_PagePrint(...e))},"CP_Label_PagePrint"),e.createElementVNode("button",{type:"primary",onClick:a[29]||(a[29]=(...e)=>i.CP_Label_DrawText&&i.CP_Label_DrawText(...e))},"CP_Label_DrawText"),e.createElementVNode("button",{type:"primary",onClick:a[30]||(a[30]=(...e)=>i.CP_Label_DrawTextInUTF8&&i.CP_Label_DrawTextInUTF8(...e))},"CP_Label_DrawTextInUTF8"),e.createElementVNode("button",{type:"primary",onClick:a[31]||(a[31]=(...e)=>i.CP_Label_DrawTextInGBK&&i.CP_Label_DrawTextInGBK(...e))},"CP_Label_DrawTextInGBK"),e.createElementVNode("button",{type:"primary",onClick:a[32]||(a[32]=(...e)=>i.CP_Label_DrawBarcode&&i.CP_Label_DrawBarcode(...e))},"CP_Label_DrawBarcode"),e.createElementVNode("button",{type:"primary",onClick:a[33]||(a[33]=(...e)=>i.CP_Label_DrawQRCode&&i.CP_Label_DrawQRCode(...e))},"CP_Label_DrawQRCode"),e.createElementVNode("button",{type:"primary",onClick:a[34]||(a[34]=(...e)=>i.CP_Label_DrawPDF417Code&&i.CP_Label_DrawPDF417Code(...e))},"CP_Label_DrawPDF417Code"),e.createElementVNode("button",{type:"primary",onClick:a[35]||(a[35]=(...e)=>i.CP_Label_DrawImageFromFile&&i.CP_Label_DrawImageFromFile(...e))},"CP_Label_DrawImageFromFile"),e.createElementVNode("button",{type:"primary",onClick:a[36]||(a[36]=(...e)=>i.CP_Label_DrawImageFromPixels&&i.CP_Label_DrawImageFromPixels(...e))}," CP_Label_DrawImageFromPixels "),e.createElementVNode("button",{type:"primary",onClick:a[37]||(a[37]=(...e)=>i.CP_Label_DrawLine&&i.CP_Label_DrawLine(...e))},"CP_Label_DrawLine"),e.createElementVNode("button",{type:"primary",onClick:a[38]||(a[38]=(...e)=>i.CP_Label_DrawRect&&i.CP_Label_DrawRect(...e))},"CP_Label_DrawRect"),e.createElementVNode("button",{type:"primary",onClick:a[39]||(a[39]=(...e)=>i.CP_Label_DrawBox&&i.CP_Label_DrawBox(...e))},"CP_Label_DrawBox")])])}]]),vs=a(e.defineComponent({__name:"logList",setup(t){const a=e.ref([]);return h((()=>{a.value=uni.getStorageSync("printLogHistory")})),(t,o)=>{const n=c(e.resolveDynamicComponent("uni-icons"),se);return e.openBlock(),e.createElementBlock("view",{class:"history"},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.value,((t,a)=>(e.openBlock(),e.createElementBlock("view",{class:"item",key:a},[e.createElementVNode("text",{class:"code",style:e.normalizeStyle({color:t.status?"green":"#666"})},e.toDisplayString(t.type)+" "+e.toDisplayString(t.order_code),5),t.status?(e.openBlock(),e.createBlock(n,{key:0,type:"checkmarkempty",class:"status",size:"16",color:"green"})):(e.openBlock(),e.createElementBlock("text",{key:1,class:"status fail"},"F")),e.createElementVNode("text",{style:{"margin-left":"10rpx","font-weight":"300"}},e.toDisplayString("\r\n"+t.createTime),1)])))),128)),0===a.value.length?(e.openBlock(),e.createElementBlock("view",{key:0,class:"is-empty"},"暂无历史")):e.createCommentVNode("",!0)])}}}),[["__scopeId","data-v-7ffe2343"]]),ks={en:{"uni-load-more.contentdown":"Pull up to show more","uni-load-more.contentrefresh":"loading...","uni-load-more.contentnomore":"No more data"},"zh-Hans":{"uni-load-more.contentdown":"上拉显示更多","uni-load-more.contentrefresh":"正在加载...","uni-load-more.contentnomore":"没有更多数据了"},"zh-Hant":{"uni-load-more.contentdown":"上拉顯示更多","uni-load-more.contentrefresh":"正在加載...","uni-load-more.contentnomore":"沒有更多數據了"}};let _s;setTimeout((()=>{_s=uni.getSystemInfoSync().platform}),16);const{t:ws}=es(ks);const bs=a({name:"UniLoadMore",emits:["clickLoadMore"],props:{status:{type:String,default:"more"},showIcon:{type:Boolean,default:!0},iconType:{type:String,default:"auto"},iconSize:{type:Number,default:24},color:{type:String,default:"#777777"},contentText:{type:Object,default:()=>({contentdown:"",contentrefresh:"",contentnomore:""})},showText:{type:Boolean,default:!0}},data:()=>({webviewHide:!1,platform:_s,imgBase64:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAYAAACqaXHeAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMy1jMDExIDY2LjE0NTY2MSwgMjAxMi8wMi8wNi0xNDo1NjoyNyAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNiAoV2luZG93cykiIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6QzlBMzU3OTlEOUM0MTFFOUI0NTZDNERBQURBQzI4RkUiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6QzlBMzU3OUFEOUM0MTFFOUI0NTZDNERBQURBQzI4RkUiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDpDOUEzNTc5N0Q5QzQxMUU5QjQ1NkM0REFBREFDMjhGRSIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDpDOUEzNTc5OEQ5QzQxMUU5QjQ1NkM0REFBREFDMjhGRSIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/Pt+ALSwAAA6CSURBVHja1FsLkFZVHb98LM+F5bHL8khA1iSeiyQBCRM+YGqKUnnJTDLGI0BGZlKDIU2MMglUiDApEZvSsZnQtBRJtKwQNKQMFYeRDR10WOLd8ljYXdh+v8v5fR3Od+797t1dnOnO/Ofce77z+J//+b/P+ZqtXbs2sJ9MJhNUV1cHJ06cCJo3bx7EPc2aNcvpy7pWrVoF+/fvDyoqKoI2bdoE9fX1F7TjN8a+EXBn/fkfvw942Tf+wYMHg9mzZwfjxo0LDhw4EPa1x2MbFw/fOGfPng1qa2tzcCkILsLDydq2bRsunpOTMM7TD/W/tZDZhPdeKD+yGxHhdu3aBV27dg3OnDlzMVANMheLAO3btw8KCwuDmpoaX5OxbgUIMEq7K8IcPnw4KCsrC/r37x8cP378/4cAXAB3vqSkJMuiDhTkw+XcuXNhOWbMmKBly5YhUT8xArhyFvP0BfwRsAuwxJZJsm/nzp2DTp06he/OU+cZ64K6o0ePBkOHDg2GDx8e6gEbJ5Q/NHNuAJQ1hgBeHUDlR7nVTkY8rQAvAi4z34vR/mPs1FoRsaCgIJThI0eOBC1atEiFGGV+5MiRoS45efJkqFjJFXV1dQuA012m2WcwTw98fy6CqBdsaiIO4CScrGPHjvk4odhavPquRtFWXEC25VgkREKOCh/qDSq+vn37htzD/mZTOmOc5U7zKzBPEedygWshcDyWvs30igAbU+6oyMgJBCFhwQE0fccxN60Ay9iebbjoDh06hMowjQxT4fXq1SskArmHZpkArvixp/kWzHdMeArExSJEaiXIjjRjRJ4DaAGWpibLzXN3Fm1vA5teBgh3j1Rv3bp1YgKwPdmf2p9zcyNYYgPKMfY0T5f5nNYdw158nJ8QawW4CLKwiOBSEgO/hok2eBydR+3dYH+PLxA5J8Vv0KBBwenTp0P2JWAx6+yFEBfs8lMY+y0SWMBNI9E4ThKi58VKTg3FQZS1RQF1cz27eC0QHMu+3E0SkUowjhVt5VdaWhp07949ZHv2Qd1EjDXM2cla1M0nl3GxAs3J9yREzyTdFVKVFOaE9qRA8GM0WebRuo9JGZKA7Mv2SeS/Z8+eoQ9BArMfFrLGo6jvxbhHbJZnKX2Rzz1O7QhJJ9Cs2ZMaWIyq/zhdeqPNfIoHd58clIQD+JSXl4dKlyIAuBdVXZwFVWKspSSoxE++h8x4k3uCnEhE4I5KwRiFWGOU0QWKiCYLbdoRMRKAu2kQ9vkfLU6dOhX06NEjlH+yMRZSinnuyWnYosVcji8CEA/6Cg2JF+IIUBqnGKUTCNwtwBN4f89RiK1R96DEgO2o0NDmtEdvVFdVVYV+P3UAPUEs6GFwV3PHmXkD4vh74iDFJysVI/MlaQhwKeBNTLYX5VuA8T4/gZxA4MRGFxDB6R7OmYPfyykGRJbyie+XnGYnQIC/coH9+vULiYrxrkL9ZA9+0ykaHIfEpM7ge8TiJ2CsHYwyMfafAF1yCGBHYIbCVDjDjKt7BeB51D+LgQa6OkG7IDYEEtvQ7lnXLKLtLdLuJBpE4gPUXcW2+PkZwOex+4cGDhwYDBkyRL7/HFcEwUGPo/8uWRUpYnfxGHco8HkewLHLyYmAawAPuIFZxhOpDfJQ8gbUv41yORAptMWBNr6oqMhWird5+u+iHmBb2nhjDV7HWBNQTgK8y11l5NetWzc5ULscAtSj7nbNI0skhWeUZCc0W4nyH/jO4Vz0u1IeYhbk4AiwM6tjxIWByHsoZ9qcIBPJd/y+DwPfBESOmCa/QF3WiZHucLlEDpNxcNhmheEOPgdQNx6/VZFQzFZ5TN08AHXQt2Ii3EdyFuUsPtTcGPhW5iMiCNELvz+Gdn9huG4HUJaW/w3g0wxV0XaG7arG2WeKiUWYM4Y7GO5ezshTARbbWGw/DvXkpp/ivVvE0JVoMxN4rpGzJMhE5Pl+xlATsDIqikP9F9D2z3h9nOksEUFhK+qO4rcPkoalMQ/HqJLIyb3F3JdjrCcw1yZ8joyJLR5gCo54etlag7qIoeNh1N1BRYj3DTFJ0elotxPlVzkGuYAmL0VSJVGAJA41c4Z6A3BzTLfn0HYwYKEI6CUAMzZEWvLsIcQOo1AmmyyM72nHJCfYsogflGV6jEk9vyQZXSuq6w4c16NsGcGZbwOPr+H1RkOk2LEzjNepxQkihHSCQ4ynAYNRx2zMKV92CQMWqj8J0BRE8EShxRFN6YrfCRhC0x3r/Zm4IbQCcmJoV0kMamllccR6FjHqUC5F2R/wS2dcymOlfAKOS4KmzQb5cpNC2MC7JhVn5wjXoJ44rYhLh8n0eXOCorJxa7POjbSlCGVczr34/RsAmrcvo9s+wGp3tzVhntxiXiJ4nvEYb4FJkf0O8HocAePmLvCxnL0AORraVekJk6TYjDabRVXfRE2lCN1h6ZQRN1+InUbsCpKwoBZHh0dODN9JBCUffItXxEavTQkUtnfTVAplCWL3JISz29h4NjotnuSsQKJCk8dF+kJR6RARjrqFVmfPnj3ZbK8cIJ0msd6jgHPGtfVTQ8VLmlvh4mct9sobRmPic0DyDQQnx/NlfYUgyz59+oScsH379pAwXABD32nTpoUHIToESeI5mnbE/UqDdyLcafEBf2MCqgC7NwxIbMREJQ0g4D4sfJwnD+AmRrII05cfMWJE+L1169bQr+fip06dGp4oJ83lmYd5wj/EmMa4TaHivo4EeCguYZBnkB5g2aWA69OIEnUHOaGysjIYMGBAMGnSpODYsWPZwCpFmm4lNq+4gSLQA7jcX8DwtjEyRC8wjabnXEx9kfWnTJkSJkAo90xpJVV+FmcVNeYAF5zWngS4C4O91MBxmAv8blLEpbjI5sz9MTdAhcgkCT1RO8mZkAjfiYpTEvStAS53Uw1vAiUGgZ3GpuQEYvoiBqlIan7kSDHnTwJQFNiPu0+5VxCVYhcZIjNrdXUDdp+Eq5AZ3Gkg8QAyVZRZIk4Tl4QAbF9cXJxNYZMAtAokgs4BrNxEpCtteXg7DDTMDKYNSuQdKsnJBek7HxewvxaosWxLYXtw+cJp18217wql4aKCfBNoEu0O5VU+PhctJ0YeXD4C6JQpyrlpSLTojpGGGN5YwNziChdIZLk4lvLcFJ9jMX3QdiImY9bmGQU+TRUL5CHITTRlgF8D9ouD1MfmLoEPl5xokIumZ2cfgMpHt47IW9N64Hsh7wQYYjyIugWuF5fCqYncXRd5vPMWyizzvhi/32+nvG0dZc9vR6fZOu0md5e+uC408FvKSIOZwXlGvxPv95izA2Vtvg1xKFWARI+vMX66HUhpQQb643uW1bSjuTWyw2SBvDrBvjFic1eGGlz5esq3ko9uSIlBRqPuFcCv8F4WIcN12nVaBd0SaYwI6PDDImR11JkqgHcPmQssjxIn6bUshygDFJUTxPMpHk+jfjPgupgdnYV2R/g7xSjtpah8RJBewhwf0gGK6XI92u4wXFEU40afJ4DN4h5LcAd+40HI3JgJecuT0c062W0i2hQJUTcxan3/CMW1PF2K6bbA+Daz4xRs1D3Br1Cm0OihKCqizW78/nXAF/G5TXrEcVzaNMH6CyMswqsAHqDyDLEyou8lwOXnKF8DjI6KjV3KzMBiXkDH8ij/H214J5A596ekrZ3F0zXlWeL7+P5eUrNo3/QwC15uxthuzidy7DzKRwEDaAViiDgKbTbz7CJnzo0bN7pIfIiid8SuPwn25o3QCmpnyjlZkyxPP8EomCJzrGb7GJMx7tNsq4MT2xMUYaiErZOluTzKsnz3gwCeCZyVRZJfYplNEokEjwrPtxlxjeYAk+F1F74VAzPxQRNYYdtpOUvWs8J1sGhBJMNsb7igN8plJs1eSmLIhLKE4rvaCX27gOhLpLOsIzJ7qn/i+wZzcvSOZ23/du8TZjwV8zHIXoP4R3ifBxiFz1dcVpa3aPntPE+c6TmIWE9EtcMmAcPdWAhYhAXxcLOQi9L1WhD1Sc8p1d2oL7XGiRKp8F4A2i8K/nfI+y/gsTDJ/YC/8+AD5Uh04KHiGl+cIFPnBDDrPMjwRGkLXyxO4VGbfQWnDH2v0bVWE3C9QOXlepbgjEfIJQI6XDG3z5ahD9cw2pS78ipB85wyScNTvsVzlzzhL8/jRrnmVjfFJK/m3m4nj9vbgQTguT8XZTjsm672R5uJKEaQmBI/c58gyus8ZDagLpEVSJBIyHp4jn++xqPV71OgQgJYEWOtZ/haxRtKmWOBu8xdBLftWltsY84zE6WIEy/eIOWL+BaayMx+KHtL7EAkqdNDLiEXmEMUHniedtJqg9HmZtfvt26vNi0BdG3Ft3g8ZOf7PAu59TxtzivLNIekyi+wD1i8CuUiD9FXAa8C+/xS3JPmZnomyc7H+fb4/Se0bk41Fel621r4cgVxbq91V4jVqwB7HTe2M7jgB+QWHavZkDRPmZcASoZEmBx6i75bGjPcMdL4/VKGFAGWZkGzPG0XAbdL9A81G5LOmUnC9hHKJeO7dcUMjblSl12867ElFTtaGl20xvvLGPdVz/8TVuU7y0x1PG7vtNg24oz9Uo/Z412++VFWI7Fcog9tu9Lm6gvRmIPv9x1xmQAu6RDkXtbOtlGEmpgD5Nvnyc0dcv0EE6cfdi1HmhMf9wDF3k3gtRvEedhxjpgfqPb9PU9iEJHnyOUA7bQUXh6kq/D7l2iTjWv7XOD530BDr8jIrus+srXjt4MzumJMHuTsBa63YKE1+RR5lBjEikCCnWKWiHdzOgKO+nRIBAF88za/IFmJ3eMZov4CYxGBabcpGL8EYx+SeMXJeRwHNsV/h+vdxeuhEpN3ZyNY78Gm2fknJxVGhyjixPiQvVkNzT1elD9Py/aTAL64Hb9vcYmC9zfdXdT/C1LeGbg4rnBaAihDFJH12W5ulfNCNe/xTsP3bp8ikzJs5BF+5PNfAQYAPaseTdsEcaYAAAAASUVORK5CYII="}),computed:{iconSnowWidth(){return 2*(Math.floor(this.iconSize/24)||1)},contentdownText(){return this.contentText.contentdown||ws("uni-load-more.contentdown")},contentrefreshText(){return this.contentText.contentrefresh||ws("uni-load-more.contentrefresh")},contentnomoreText(){return this.contentText.contentnomore||ws("uni-load-more.contentnomore")}},mounted(){var e=getCurrentPages(),t=e[e.length-1].$getAppWebview();t.addEventListener("hide",(()=>{this.webviewHide=!0})),t.addEventListener("show",(()=>{this.webviewHide=!1}))},methods:{onClick(){this.$emit("clickLoadMore",{detail:{status:this.status}})}}},[["render",function(t,a,o,n,s,i){return e.openBlock(),e.createElementBlock("view",{class:"uni-load-more",onClick:a[0]||(a[0]=(...e)=>i.onClick&&i.onClick(...e))},[!s.webviewHide&&("circle"===o.iconType||"auto"===o.iconType&&"android"===s.platform)&&"loading"===o.status&&o.showIcon?(e.openBlock(),e.createElementBlock("view",{key:0,style:e.normalizeStyle({width:o.iconSize+"px",height:o.iconSize+"px"}),class:"uni-load-more__img uni-load-more__img--android-MP"},[e.createElementVNode("view",{class:"uni-load-more__img-icon",style:e.normalizeStyle({borderTopColor:o.color,borderTopWidth:o.iconSize/12})},null,4),e.createElementVNode("view",{class:"uni-load-more__img-icon",style:e.normalizeStyle({borderTopColor:o.color,borderTopWidth:o.iconSize/12})},null,4),e.createElementVNode("view",{class:"uni-load-more__img-icon",style:e.normalizeStyle({borderTopColor:o.color,borderTopWidth:o.iconSize/12})},null,4)],4)):!s.webviewHide&&"loading"===o.status&&o.showIcon?(e.openBlock(),e.createElementBlock("view",{key:1,style:e.normalizeStyle({width:o.iconSize+"px",height:o.iconSize+"px"}),class:"uni-load-more__img uni-load-more__img--ios-H5"},[e.createElementVNode("image",{src:s.imgBase64,mode:"widthFix"},null,8,["src"])],4)):e.createCommentVNode("",!0),o.showText?(e.openBlock(),e.createElementBlock("text",{key:2,class:"uni-load-more__text",style:e.normalizeStyle({color:o.color})},e.toDisplayString("more"===o.status?i.contentdownText:"loading"===o.status?i.contentrefreshText:i.contentnomoreText),5)):e.createCommentVNode("",!0)])}],["__scopeId","data-v-88d0e980"]]),Ns={props:{localdata:{type:[Array,Object],default:()=>[]},spaceInfo:{type:Object,default:()=>({})},collection:{type:String,default:""},action:{type:String,default:""},field:{type:String,default:""},orderby:{type:String,default:""},where:{type:[String,Object],default:""},pageData:{type:String,default:"add"},pageCurrent:{type:Number,default:1},pageSize:{type:Number,default:500},getcount:{type:[Boolean,String],default:!1},getone:{type:[Boolean,String],default:!1},gettree:{type:[Boolean,String],default:!1},manual:{type:Boolean,default:!1},value:{type:[Array,String,Number],default:()=>[]},modelValue:{type:[Array,String,Number],default:()=>[]},preload:{type:Boolean,default:!1},stepSearh:{type:Boolean,default:!0},selfField:{type:String,default:""},parentField:{type:String,default:""},multiple:{type:Boolean,default:!1},map:{type:Object,default:()=>({text:"text",value:"value"})}},data(){return{loading:!1,errorMessage:"",loadMore:{contentdown:"",contentrefresh:"",contentnomore:""},dataList:[],selected:[],selectedIndex:0,page:{current:this.pageCurrent,size:this.pageSize,count:0}}},computed:{isLocalData(){return!this.collection.length},isCloudData(){return this.collection.length>0},isCloudDataList(){return this.isCloudData&&!this.parentField&&!this.selfField},isCloudDataTree(){return this.isCloudData&&this.parentField&&this.selfField},dataValue(){return(Array.isArray(this.modelValue)?this.modelValue.length>0:null!==this.modelValue||void 0!==this.modelValue)?this.modelValue:this.value},hasValue(){return"number"==typeof this.dataValue||null!=this.dataValue&&this.dataValue.length>0}},created(){this.$watch((()=>{var e=[];return["pageCurrent","pageSize","spaceInfo","value","modelValue","localdata","collection","action","field","orderby","where","getont","getcount","gettree"].forEach((t=>{e.push(this[t])})),e}),((e,t)=>{for(let a=2;a<e.length&&e[a]==t[a];a++);e[0]!=t[0]&&(this.page.current=this.pageCurrent),this.page.size=this.pageSize,this.onPropsChange()})),this._treeData=[]},methods:{onPropsChange(){this._treeData=[]},async loadData(){this.isLocalData?this.loadLocalData():this.isCloudDataList?this.loadCloudDataList():this.isCloudDataTree&&this.loadCloudDataTree()},async loadLocalData(){this._treeData=[],this._extractTree(this.localdata,this._treeData);let e=this.dataValue;void 0!==e&&(Array.isArray(e)&&(e=e[e.length-1],"object"==typeof e&&e[this.map.value]&&(e=e[this.map.value])),this.selected=this._findNodePath(e,this.localdata))},async loadCloudDataList(){if(!this.loading){this.loading=!0;try{let e=(await this.getCommand()).result.data;this._treeData=e,this._updateBindData(),this._updateSelected(),this.onDataChange()}catch(Qt){this.errorMessage=Qt}finally{this.loading=!1}}},async loadCloudDataTree(){if(!this.loading){this.loading=!0;try{let e={field:this._cloudDataPostField(),where:this._cloudDataTreeWhere()};this.gettree&&(e.startwith=`${this.selfField}=='${this.dataValue}'`);let t=(await this.getCommand(e)).result.data;this._treeData=t,this._updateBindData(),this._updateSelected(),this.onDataChange()}catch(Qt){this.errorMessage=Qt}finally{this.loading=!1}}},async loadCloudDataNode(e){if(!this.loading){this.loading=!0;try{let t={field:this._cloudDataPostField(),where:this._cloudDataNodeWhere()};e((await this.getCommand(t)).result.data)}catch(Qt){this.errorMessage=Qt}finally{this.loading=!1}}},getCloudDataValue(){return this.isCloudDataList?this.getCloudDataListValue():this.isCloudDataTree?this.getCloudDataTreeValue():void 0},getCloudDataListValue(){let e=[],t=this._getForeignKeyByField();return t&&e.push(`${t} == '${this.dataValue}'`),e=e.join(" || "),this.where&&(e=`(${this.where}) && (${e})`),this.getCommand({field:this._cloudDataPostField(),where:e}).then((e=>(this.selected=e.result.data,e.result.data)))},getCloudDataTreeValue(){return this.getCommand({field:this._cloudDataPostField(),getTreePath:{startWith:`${this.selfField}=='${this.dataValue}'`}}).then((e=>{let t=[];return this._extractTreePath(e.result.data,t),this.selected=t,t}))},getCommand(e={}){let t=Cn.database(this.spaceInfo);const a=e.action||this.action;a&&(t=t.action(a));const o=e.collection||this.collection;t=t.collection(o);const n=e.where||this.where;n&&Object.keys(n).length&&(t=t.where(n));const s=e.field||this.field;s&&(t=t.field(s));const i=e.orderby||this.orderby;i&&(t=t.orderBy(i));const r=void 0!==e.pageCurrent?e.pageCurrent:this.page.current,l=void 0!==e.pageSize?e.pageSize:this.page.size,c={getCount:void 0!==e.getcount?e.getcount:this.getcount,getTree:void 0!==e.gettree?e.gettree:this.gettree};return e.getTreePath&&(c.getTreePath=e.getTreePath),t=t.skip(l*(r-1)).limit(l).get(c),t},_cloudDataPostField(){let e=[this.field];return this.parentField&&e.push(`${this.parentField} as parent_value`),e.join(",")},_cloudDataTreeWhere(){let e=[],t=this.selected,a=this.parentField;if(a&&e.push(`${a} == null || ${a} == ""`),t.length)for(var o=0;o<t.length-1;o++)e.push(`${a} == '${t[o].value}'`);let n=[];return this.where&&n.push(`(${this.where})`),e.length&&n.push(`(${e.join(" || ")})`),n.join(" && ")},_cloudDataNodeWhere(){let e=[],t=this.selected;return t.length&&e.push(`${this.parentField} == '${t[t.length-1].value}'`),e=e.join(" || "),this.where?`(${this.where}) && (${e})`:e},_getWhereByForeignKey(){let e=[],t=this._getForeignKeyByField();return t&&e.push(`${t} == '${this.dataValue}'`),this.where?`(${this.where}) && (${e.join(" || ")})`:e.join(" || ")},_getForeignKeyByField(){let e=this.field.split(","),t=null;for(let a=0;a<e.length;a++){const o=e[a].split("as");if(!(o.length<2)&&"value"===o[1].trim()){t=o[0].trim();break}}return t},_updateBindData(e){const{dataList:t,hasNodes:a}=this._filterData(this._treeData,this.selected);let o=!1===this._stepSearh&&!a;return e&&(e.isleaf=o),this.dataList=t,this.selectedIndex=t.length-1,!o&&this.selected.length<t.length&&this.selected.push({value:null,text:"请选择"}),{isleaf:o,hasNodes:a}},_updateSelected(){let e=this.dataList,t=this.selected,a=this.map.text,o=this.map.value;for(let n=0;n<t.length;n++){let s=t[n].value,i=e[n];for(let e=0;e<i.length;e++){let r=i[e];if(r[o]===s){t[n].text=r[a];break}}}},_filterData(e,t){let a=[],o=!0;a.push(e.filter((e=>null===e.parent_value||void 0===e.parent_value||""===e.parent_value)));for(let n=0;n<t.length;n++){let s=t[n].value,i=e.filter((e=>e.parent_value===s));i.length?a.push(i):o=!1}return{dataList:a,hasNodes:o}},_extractTree(e,t,a){let o=this.map.value;for(let n=0;n<e.length;n++){let s=e[n],i={};for(let e in s)"children"!==e&&(i[e]=s[e]);null!=a&&""!==a&&(i.parent_value=a),t.push(i);let r=s.children;r&&this._extractTree(r,t,s[o])}},_extractTreePath(e,t){for(let a=0;a<e.length;a++){let o=e[a],n={};for(let e in o)"children"!==e&&(n[e]=o[e]);t.push(n);let s=o.children;s&&this._extractTreePath(s,t)}},_findNodePath(e,t,a=[]){let o=this.map.text,n=this.map.value;for(let s=0;s<t.length;s++){let i=t[s],r=i.children,l=i[o],c=i[n];if(a.push({value:c,text:l}),c===e)return a;if(r){const t=this._findNodePath(e,r,a);if(t.length)return t}a.pop()}return[]}}};const Es={name:"UniDataPicker",emits:["popupopened","popupclosed","nodeclick","input","change","update:modelValue"],mixins:[Ns],components:{DataPickerView:a({name:"UniDataPickerView",emits:["nodeclick","change","datachange","update:modelValue"],mixins:[Ns],props:{managedMode:{type:Boolean,default:!1},ellipsis:{type:Boolean,default:!0}},created(){this.managedMode||this.$nextTick((()=>{this.loadData()}))},methods:{onPropsChange(){this._treeData=[],this.selectedIndex=0,this.$nextTick((()=>{this.loadData()}))},handleSelect(e){this.selectedIndex=e},handleNodeClick(e,t,a){if(e.disable)return;const o=this.dataList[t][a],n=o[this.map.text],s=o[this.map.value];if(t<this.selected.length-1?(this.selected.splice(t,this.selected.length-t),this.selected.push({text:n,value:s})):t===this.selected.length-1&&this.selected.splice(t,1,{text:n,value:s}),o.isleaf)return void this.onSelectedChange(o,o.isleaf);const{isleaf:i,hasNodes:r}=this._updateBindData();this.isLocalData?this.onSelectedChange(o,!r||i):this.isCloudDataList?this.onSelectedChange(o,!0):this.isCloudDataTree&&(i?this.onSelectedChange(o,o.isleaf):r||this.loadCloudDataNode((e=>{e.length?(this._treeData.push(...e),this._updateBindData(o)):o.isleaf=!0,this.onSelectedChange(o,o.isleaf)})))},updateData(e){this._treeData=e.treeData,this.selected=e.selected,this._treeData.length?this._updateBindData():this.loadData()},onDataChange(){this.$emit("datachange")},onSelectedChange(e,t){t&&this._dispatchEvent(),e&&this.$emit("nodeclick",e)},_dispatchEvent(){this.$emit("change",this.selected.slice(0))}}},[["render",function(t,a,o,n,s,i){const r=c(e.resolveDynamicComponent("uni-load-more"),bs);return e.openBlock(),e.createElementBlock("view",{class:"uni-data-pickerview"},[t.isCloudDataList?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("scroll-view",{key:0,class:"selected-area","scroll-x":"true"},[e.createElementVNode("view",{class:"selected-list"},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.selected,((a,o)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[a.text?(e.openBlock(),e.createElementBlock("view",{key:0,class:e.normalizeClass(["selected-item",{"selected-item-active":o==t.selectedIndex}]),onClick:e=>i.handleSelect(o)},[e.createElementVNode("text",null,e.toDisplayString(a.text),1)],10,["onClick"])):e.createCommentVNode("",!0)],64)))),256))])])),e.createElementVNode("view",{class:"tab-c"},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.dataList,((a,o)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[o==t.selectedIndex?(e.openBlock(),e.createElementBlock("scroll-view",{class:"list",key:o,"scroll-y":!0},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a,((a,n)=>(e.openBlock(),e.createElementBlock("view",{class:e.normalizeClass(["item",{"is-disabled":!!a.disable}]),onClick:e=>i.handleNodeClick(a,o,n)},[e.createElementVNode("text",{class:"item-text"},e.toDisplayString(a[t.map.text]),1),t.selected.length>o&&a[t.map.value]==t.selected[o].value?(e.openBlock(),e.createElementBlock("view",{key:0,class:"check"})):e.createCommentVNode("",!0)],10,["onClick"])))),256))])):e.createCommentVNode("",!0)],64)))),256)),t.loading?(e.openBlock(),e.createElementBlock("view",{key:0,class:"loading-cover"},[e.createVNode(r,{class:"load-more",contentText:t.loadMore,status:"loading"},null,8,["contentText"])])):e.createCommentVNode("",!0),t.errorMessage?(e.openBlock(),e.createElementBlock("view",{key:1,class:"error-message"},[e.createElementVNode("text",{class:"error-text"},e.toDisplayString(t.errorMessage),1)])):e.createCommentVNode("",!0)])])}],["__scopeId","data-v-42507f03"]])},props:{options:{type:[Object,Array],default:()=>({})},popupTitle:{type:String,default:"请选择"},placeholder:{type:String,default:"请选择"},heightMobile:{type:String,default:""},readonly:{type:Boolean,default:!1},clearIcon:{type:Boolean,default:!0},border:{type:Boolean,default:!0},split:{type:String,default:"/"},ellipsis:{type:Boolean,default:!0}},data:()=>({isOpened:!1,inputSelected:[]}),created(){this.$nextTick((()=>{this.load()}))},methods:{clear(){this.modelValue=null,this._dispatchEvent([])},onPropsChange(){this._treeData=[],this.selectedIndex=0,this.load()},load(){this.readonly?this._processReadonly(this.localdata,this.dataValue):this.hasValue&&(this.isLocalData?(this.loadData(),this.inputSelected=this.selected.slice(0)):(this.isCloudDataList||this.isCloudDataTree)&&(this.loading=!0,this.getCloudDataValue().then((e=>{this.loading=!1,this.inputSelected=e})).catch((e=>{this.loading=!1,this.errorMessage=e}))))},show(){this.isOpened=!0,setTimeout((()=>{this.$refs.pickerView.updateData({treeData:this._treeData,selected:this.selected,selectedIndex:this.selectedIndex})}),200),this.$emit("popupopened")},hide(){this.isOpened=!1,this.$emit("popupclosed")},handleInput(){this.readonly||this.show()},handleClose(e){this.hide()},onnodeclick(e){this.$emit("nodeclick",e)},ondatachange(e){this._treeData=this.$refs.pickerView._treeData},onchange(e){this.hide(),this.$nextTick((()=>{this.inputSelected=e})),this._dispatchEvent(e)},_processReadonly(e,t){if(e.findIndex((e=>e.children))>-1){let e;return Array.isArray(t)?(e=t[t.length-1],"object"==typeof e&&e.value&&(e=e.value)):e=t,void(this.inputSelected=this._findNodePath(e,this.localdata))}if(!this.hasValue)return void(this.inputSelected=[]);let a=[];for(let s=0;s<t.length;s++){var o=t[s],n=e.find((e=>e.value==o));n&&a.push(n)}a.length&&(this.inputSelected=a)},_filterForArray(e,t){var a=[];for(let s=0;s<t.length;s++){var o=t[s],n=e.find((e=>e.value==o));n&&a.push(n)}return a},_dispatchEvent(e){let t={};if(e.length){for(var a=new Array(e.length),o=0;o<e.length;o++)a[o]=e[o].value;t=e[e.length-1]}else t.value="";this.formItem&&this.formItem.setValue(t.value),this.$emit("input",t.value),this.$emit("update:modelValue",t.value),this.$emit("change",{detail:{value:e}})}}};const xs=a(Es,[["render",function(t,a,o,n,s,i){const r=c(e.resolveDynamicComponent("uni-load-more"),bs),l=c(e.resolveDynamicComponent("uni-icons"),se),u=e.resolveComponent("data-picker-view");return e.openBlock(),e.createElementBlock("view",{class:"uni-data-tree"},[e.createElementVNode("view",{class:"uni-data-tree-input",onClick:a[1]||(a[1]=(...e)=>i.handleInput&&i.handleInput(...e))},[e.renderSlot(t.$slots,"default",{options:o.options,data:s.inputSelected,error:t.errorMessage},(()=>[e.createElementVNode("view",{class:e.normalizeClass(["input-value",{"input-value-border":o.border}])},[t.errorMessage?(e.openBlock(),e.createElementBlock("text",{key:0,class:"selected-area error-text"},e.toDisplayString(t.errorMessage),1)):t.loading&&!s.isOpened?(e.openBlock(),e.createElementBlock("view",{key:1,class:"selected-area"},[e.createVNode(r,{class:"load-more",contentText:t.loadMore,status:"loading"},null,8,["contentText"])])):s.inputSelected.length?(e.openBlock(),e.createElementBlock("scroll-view",{key:2,class:"selected-area","scroll-x":"true"},[e.createElementVNode("view",{class:"selected-list"},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s.inputSelected,((t,a)=>(e.openBlock(),e.createElementBlock("view",{class:"selected-item",key:a},[e.createElementVNode("text",{class:"text-color"},e.toDisplayString(t.text),1),a<s.inputSelected.length-1?(e.openBlock(),e.createElementBlock("text",{key:0,class:"input-split-line"},e.toDisplayString(o.split),1)):e.createCommentVNode("",!0)])))),128))])])):(e.openBlock(),e.createElementBlock("text",{key:3,class:"selected-area placeholder"},e.toDisplayString(o.placeholder),1)),o.clearIcon&&!o.readonly&&s.inputSelected.length?(e.openBlock(),e.createElementBlock("view",{key:4,class:"icon-clear",onClick:a[0]||(a[0]=e.withModifiers(((...e)=>i.clear&&i.clear(...e)),["stop"]))},[e.createVNode(l,{type:"clear",color:"#c0c4cc",size:"24"})])):e.createCommentVNode("",!0),o.clearIcon&&s.inputSelected.length||o.readonly?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("view",{key:5,class:"arrow-area"},[e.createElementVNode("view",{class:"input-arrow"})]))],2)]),!0)]),s.isOpened?(e.openBlock(),e.createElementBlock("view",{key:0,class:"uni-data-tree-cover",onClick:a[2]||(a[2]=(...e)=>i.handleClose&&i.handleClose(...e))})):e.createCommentVNode("",!0),s.isOpened?(e.openBlock(),e.createElementBlock("view",{key:1,class:"uni-data-tree-dialog"},[e.createElementVNode("view",{class:"uni-popper__arrow"}),e.createElementVNode("view",{class:"dialog-caption"},[e.createElementVNode("view",{class:"title-area"},[e.createElementVNode("text",{class:"dialog-title"},e.toDisplayString(o.popupTitle),1)]),e.createElementVNode("view",{class:"dialog-close",onClick:a[3]||(a[3]=(...e)=>i.handleClose&&i.handleClose(...e))},[e.createElementVNode("view",{class:"dialog-close-plus","data-id":"close"}),e.createElementVNode("view",{class:"dialog-close-plus dialog-close-rotate","data-id":"close"})])]),e.createVNode(u,{class:"picker-view",ref:"pickerView",modelValue:t.dataValue,"onUpdate:modelValue":a[4]||(a[4]=e=>t.dataValue=e),localdata:t.localdata,preload:t.preload,collection:t.collection,field:t.field,orderby:t.orderby,where:t.where,"step-searh":t.stepSearh,"self-field":t.selfField,"parent-field":t.parentField,"managed-mode":!0,map:t.map,ellipsis:o.ellipsis,onChange:i.onchange,onDatachange:i.ondatachange,onNodeclick:i.onnodeclick},null,8,["modelValue","localdata","preload","collection","field","orderby","where","step-searh","self-field","parent-field","map","ellipsis","onChange","onDatachange","onNodeclick"])])):e.createCommentVNode("",!0)])}],["__scopeId","data-v-d42fcb60"]]),Cs=e.defineComponent({__name:"scanLotno",setup(t){const a=e.ref(),o=e.ref(!1),n=e.ref(!1),s=e.ref(!0),i=e.ref(!1),r=e.ref(!1),u=e.ref([]),p=e.ref(),v=e.ref(),k=e.ref();let _;const w=e.ref({orderNum:"",weight:"",batchNum:"",palletNum:"0"}),b=e.reactive({orderNum:{rules:[{required:!0,errorMessage:"单号不能为空"}]}}),N=e.reactive({batch:[],pallet:[]}),E=async()=>{1===await On()&&uni.scanCode({success:e=>{w.value.orderNum=e.result,D()},fail:e=>{}})},x=()=>{o.value=!1,w.value.orderNum="",w.value.weight=""},C=()=>{w.value.batchNum?i.value=!0:(v.value="error",k.value="请选择批次号",p.value.open())},V=e.computed((()=>{const e=N.batch.find((e=>e.value===w.value.batchNum));return null==e?void 0:e.text})),S=()=>{w.value.palletNum?r.value=!0:(v.value="error",k.value="请选择托盘号",p.value.open())},B=e.computed((()=>{const e=function e(t,a){for(let o of t){if(o.value===a)return o.text;if(o.children&&o.children.length>0){const t=e(o.children,a);if(t)return`${o.text}/${t}`}}return null}(N.pallet,w.value.palletNum);return e})),T=async()=>{o.value=!0,uni.setStorageSync("waybills",[]);const e=await(t={order_no:w.value.orderNum,batch_number:w.value.batchNum,pallet_number:w.value.palletNum?P(N.pallet,w.value.palletNum):""},U({method:"POST",url:"/admin/order.scanOrder/getWaybills",data:t}));var t;o.value=!1,1==e.code?(v.value="success",k.value=e.msg,p.value.open(),uni.setStorageSync("waybills",e.data.waybills),uni.navigateTo({url:"/pages/scanLotno/waybillsList"})):(v.value="error",k.value=e.msg,p.value.open())},P=(e,t)=>{for(let a=0;a<e.length;a++){const o=e[a];if(o.id===t||o.value===t)return[o.id];if(o.children&&o.children.length>0){const e=P(o.children,t);if(null!==e)return e}}return null},D=async()=>{_&&clearTimeout(_),o.value=!0;const e=await(t={order_no:w.value.orderNum,reweighting:w.value.weight,batch_number:w.value.batchNum,pallet_number:w.value.palletNum?P(N.pallet,w.value.palletNum):""},U({method:"POST",url:"/admin/order.scanOrder/bindShipping",data:t}));var t;if(o.value=!1,1==e.code){v.value="success",k.value=e.msg,p.value.open(),e.data.labels&&e.data.labels.length>0&&l("log","at pages/scanLotno/scanLotno.vue:288","有打印面单");const t={orderNum:w.value.orderNum,createTime:new Date,type:w.value.batchNum?"绑定批次":"绑定托盘",status:!0};l("log","at pages/scanLotno/scanLotno.vue:300","scanLotnoHistory--",u),u.value.unshift(t),uni.setStorageSync("scanLotnoHistory",u.value),I()}else{v.value="error",k.value=e.msg,p.value.open();const t={orderNum:w.value.orderNum,createTime:new Date,type:w.value.batchNum?"绑定批次":"绑定托盘",status:!1};u.value.unshift(t),uni.setStorageSync("scanLotnoHistory",u.value),I()}_=setTimeout((()=>{x(),A(),_&&clearTimeout(_)}),1e3)},I=()=>{u.value=uni.getStorageSync("scanLotnoHistory")||[]},L=e=>{102===e.keyCode||103===e.keyCode||e.keyCode,66==e.keyCode&&D()};h((()=>{plus.key.addEventListener("keyup",L)})),g((()=>{plus.key.removeEventListener("keyup",L)})),m((()=>{n.value=!0,plus.key.removeEventListener("keyup",L)})),f((()=>{plus.key.removeEventListener("keyup",L)})),d((()=>{n.value=!1,O(),I()}));const A=()=>{n.value||(s.value=!1,e.nextTick((()=>{s.value=!0})))},O=async()=>{const e=await U({method:"GET",url:"/admin/order.scanOrder/getBindParams"});if(1===e.code){let t=function(e){return e.map((e=>{const{id:a,value:o,label:n,...s}=e;return{id:a||o,value:o,text:n,...s,children:e.children?t(e.children):[]}}))};N.batch=e.data.batch_number.map((e=>({text:e.name,value:e.id})));const a=t(e.data.shipping);l("log","at pages/scanLotno/scanLotno.vue:412","shipping",a),N.pallet=a}};return y((e=>{0===e.index&&uni.navigateTo({url:"/pages/scanLotno/logList"})})),(t,n)=>{const l=c(e.resolveDynamicComponent("uni-easyinput"),re),d=c(e.resolveDynamicComponent("uni-forms-item"),Ue),m=c(e.resolveDynamicComponent("uni-data-select"),Vn),h=c(e.resolveDynamicComponent("uni-data-picker"),xs),g=c(e.resolveDynamicComponent("uni-forms"),Ee),f=c(e.resolveDynamicComponent("uni-icons"),se),y=c(e.resolveDynamicComponent("uni-popup-message"),Bn),_=c(e.resolveDynamicComponent("uni-popup"),Fe);return e.openBlock(),e.createElementBlock("view",{class:"container"},[e.createVNode(g,{ref_key:"valiFormRef",ref:a,"label-align":"right","label-width":80,rules:b,modelValue:w.value},{default:e.withCtx((()=>[e.createVNode(d,{label:"运单号码",required:"",name:"orderNum"},{default:e.withCtx((()=>[e.createVNode(l,{modelValue:w.value.orderNum,"onUpdate:modelValue":n[0]||(n[0]=e=>w.value.orderNum=e),placeholder:"请输入单号",suffixIcon:"scan",focus:s.value,onIconClick:E},null,8,["modelValue","focus"])])),_:1}),e.createVNode(d,{label:"复称重量",name:"weight"},{default:e.withCtx((()=>[e.createVNode(l,{modelValue:w.value.weight,"onUpdate:modelValue":n[1]||(n[1]=e=>w.value.weight=e),placeholder:"请输入复称重量",oninput:"value=value.replace(/[^\\d.]/g,'').replace(/^\\./g, '').replace(/\\.{2,}/g, '').replace('.', '$#$').replace(/\\./g, '').replace('$#$', '.').match(/^\\d*(\\.?\\d{0,2})/g)[0] || null"},{right:e.withCtx((()=>[e.createElementVNode("view",{class:"weight-right"},"KG")])),_:1},8,["modelValue"])])),_:1}),e.createVNode(d,{label:"绑定批次号",name:"batchNum",class:"select-item"},{default:e.withCtx((()=>[i.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(m,{key:0,modelValue:w.value.batchNum,"onUpdate:modelValue":n[2]||(n[2]=e=>w.value.batchNum=e),placeholder:"请选择批次号",localdata:N.batch,clear:!1},null,8,["modelValue","localdata"])),i.value?(e.openBlock(),e.createBlock(l,{key:1,value:V.value,disabled:i.value},null,8,["value","disabled"])):e.createCommentVNode("",!0),i.value?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("button",{key:2,type:"primary",onClick:C},"确认")),i.value?(e.openBlock(),e.createElementBlock("button",{key:3,type:"primary",onClick:n[3]||(n[3]=e=>i.value=!1)},"修改")):e.createCommentVNode("",!0)])),_:1}),e.createVNode(d,{label:"绑定托盘号",name:"palletNum",class:"select-item"},{default:e.withCtx((()=>[r.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(h,{key:0,placeholder:"请选择托盘号","popup-title":"绑定托盘号",localdata:N.pallet,modelValue:w.value.palletNum,"onUpdate:modelValue":n[4]||(n[4]=e=>w.value.palletNum=e),"clear-icon":!1},null,8,["localdata","modelValue"])),r.value?(e.openBlock(),e.createBlock(l,{key:1,value:B.value,disabled:r.value},null,8,["value","disabled"])):e.createCommentVNode("",!0),r.value?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("button",{key:2,type:"primary",onClick:S},"确认")),r.value?(e.openBlock(),e.createElementBlock("button",{key:3,type:"primary",onClick:n[5]||(n[5]=e=>r.value=!1)},"修改")):e.createCommentVNode("",!0)])),_:1})])),_:1},8,["rules","modelValue"]),e.createElementVNode("view",{class:"button-group"},[e.createElementVNode("button",{type:"default",onClick:x},"重置"),e.createElementVNode("button",{type:"default",onClick:T,loading:o.value},[o.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(f,{key:0,type:"search",size:"18"})),e.createTextVNode(" 查看运单 ")],8,["loading"]),e.createElementVNode("button",{type:"primary",onClick:D,loading:o.value},[o.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(f,{key:0,type:"checkmarkempty",size:"18",color:"white"})),e.createTextVNode(" 提交 ")],8,["loading"])]),u.value.length>0?(e.openBlock(),e.createElementBlock("view",{key:0,class:"history"},[e.createElementVNode("text",{class:"title"},"记录(最近5条)")])):e.createCommentVNode("",!0),e.createElementVNode("view",{class:"history"},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(u.value.slice(0,5),((t,a)=>(e.openBlock(),e.createElementBlock("view",{class:"item",key:a},[e.createElementVNode("text",{class:"type"},e.toDisplayString(t.type),1),e.createElementVNode("text",{class:"code",style:e.normalizeStyle({color:t.status?"green":"#666"})},e.toDisplayString(t.orderNum),5),t.status?(e.openBlock(),e.createBlock(f,{key:0,type:"checkmarkempty",class:"status",size:"16",color:"green"})):(e.openBlock(),e.createElementBlock("text",{key:1,class:"status fail"},"F")),e.createElementVNode("text",{style:{"margin-left":"10rpx","font-weight":"300"}},e.toDisplayString("\r\n"+t.createTime),1)])))),128))]),e.createVNode(_,{ref_key:"messageRef",ref:p,type:"message"},{default:e.withCtx((()=>[e.createVNode(y,{type:v.value,message:k.value,duration:2e3},null,8,["type","message"])])),_:1},512)])}}}),Vs=a(e.defineComponent({__name:"logList",setup(t){const a=e.ref([]);return h((()=>{a.value=uni.getStorageSync("scanLotnoHistory")})),(t,o)=>{const n=c(e.resolveDynamicComponent("uni-icons"),se);return e.openBlock(),e.createElementBlock("view",{class:"history"},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.value,((t,a)=>(e.openBlock(),e.createElementBlock("view",{class:"item",key:a},[e.createElementVNode("text",{class:"type"},e.toDisplayString(t.type),1),e.createElementVNode("text",{class:"code",style:e.normalizeStyle({color:t.status?"green":"#666"})},e.toDisplayString(t.orderNum),5),t.status?(e.openBlock(),e.createBlock(n,{key:0,type:"checkmarkempty",class:"status",size:"16",color:"green"})):(e.openBlock(),e.createElementBlock("text",{key:1,class:"status fail"},"F")),e.createElementVNode("text",{style:{"margin-left":"10rpx","font-weight":"300"}},e.toDisplayString("\r\n"+t.createTime),1)])))),128)),0===a.value.length?(e.openBlock(),e.createElementBlock("view",{key:0,class:"is-empty"},"暂无历史")):e.createCommentVNode("",!0)])}}}),[["__scopeId","data-v-496d0a5c"]]);const Ss=a({name:"UniSection",emits:["click"],props:{type:{type:String,default:""},title:{type:String,required:!0,default:""},titleFontSize:{type:String,default:"14px"},titleColor:{type:String,default:"#333"},subTitle:{type:String,default:""},subTitleFontSize:{type:String,default:"12px"},subTitleColor:{type:String,default:"#999"},padding:{type:[Boolean,String],default:!1}},computed:{_padding(){return"string"==typeof this.padding?this.padding:this.padding?"10px":""}},watch:{title(e){uni.report&&""!==e&&uni.report("title",e)}},methods:{onClick(){this.$emit("click")}}},[["render",function(t,a,o,n,s,i){return e.openBlock(),e.createElementBlock("view",{class:"uni-section"},[e.createElementVNode("view",{class:"uni-section-header",onClick:a[0]||(a[0]=(...e)=>i.onClick&&i.onClick(...e))},[o.type?(e.openBlock(),e.createElementBlock("view",{key:0,class:e.normalizeClass(["uni-section-header__decoration",o.type])},null,2)):e.renderSlot(t.$slots,"decoration",{key:1},void 0,!0),e.createElementVNode("view",{class:"uni-section-header__content"},[e.createElementVNode("text",{style:e.normalizeStyle({"font-size":o.titleFontSize,color:o.titleColor}),class:e.normalizeClass(["uni-section__content-title",{distraction:!o.subTitle}])},e.toDisplayString(o.title),7),o.subTitle?(e.openBlock(),e.createElementBlock("text",{key:0,style:e.normalizeStyle({"font-size":o.subTitleFontSize,color:o.subTitleColor}),class:"uni-section-header__content-sub"},e.toDisplayString(o.subTitle),5)):e.createCommentVNode("",!0)]),e.createElementVNode("view",{class:"uni-section-header__slot-right"},[e.renderSlot(t.$slots,"right",{},void 0,!0)])]),e.createElementVNode("view",{class:"uni-section-content",style:e.normalizeStyle({padding:i._padding})},[e.renderSlot(t.$slots,"default",{},void 0,!0)],4)])}],["__scopeId","data-v-b442413a"]]),Bs=a(e.defineComponent({__name:"waybillsList",setup(t){const a=e.ref([]);return h((()=>{a.value=uni.getStorageSync("waybills")})),(t,o)=>{const n=c(e.resolveDynamicComponent("uni-section"),Ss);return e.openBlock(),e.createElementBlock("view",{class:"history"},[e.createVNode(n,{title:"数量: "+a.value.length},null,8,["title"]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.value,((t,a)=>(e.openBlock(),e.createElementBlock("view",{class:"item",key:a},[e.createElementVNode("text",{class:"code",style:{color:"#666"}},e.toDisplayString(t.order_box_no),1),e.createElementVNode("text",{class:"type"},"重量: "+e.toDisplayString(t.weight)+"KG",1),e.createElementVNode("view",{class:"sub-items"},[e.createElementVNode("view",{class:"sub-item"},[e.createElementVNode("text",{class:"type"},"批次/船航/托盘"),e.createElementVNode("text",{class:"type"},e.toDisplayString(t.batch_shipping_pallet),1)]),e.createElementVNode("view",{class:"sub-item"},[e.createElementVNode("text",{class:"type"},"末公里运单号"),e.createElementVNode("text",{class:"type"},e.toDisplayString(t.tracking_number||"无"),1)])])])))),128)),0===a.value.length?(e.openBlock(),e.createElementBlock("view",{key:0,class:"is-empty"},"暂无运单")):e.createCommentVNode("",!0)])}}}),[["__scopeId","data-v-9dde851b"]]),Ts=e.defineComponent({__name:"waybillNo",setup(t){const a=e.ref(!1),o=e.ref(!1),n=e.ref(!1),s=e.ref(!0),i=e.ref([]),r=e.ref(),l=e.ref(),u=e.ref();let p;const v=e.ref({code:"",space_id:""}),k=e.reactive({code:{rules:[{required:!0,errorMessage:"单号不能为空"}]}}),_=e.reactive({space:[]}),w=async()=>{1===await On()&&uni.scanCode({success:e=>{v.value.code=e.result},fail:e=>{}})},b=()=>{o.value=!1,v.value.code=""},N=()=>{v.value.space_id?(a.value=!0,B()):(l.value="error",u.value="请选择库位",r.value.open())},E=e.computed((()=>{const e=_.space.find((e=>e.value===v.value.space_id));return null==e?void 0:e.text})),x=async()=>{if(v.value.space_id&&v.value.code){p&&clearTimeout(p),o.value=!0;const t=await(e={code:v.value.code,space_id:v.value.space_id},U({method:"POST",url:"/admin/warehouse.waybillNo/add",data:e}));o.value=!1;const a=_.space.find((e=>e.value===v.value.space_id));if(1==t.code){l.value="success",u.value=t.msg,r.value.open();const e={code:v.value.code,createTime:new Date,type:"运单号",space:a.text,status:!0};i.value.unshift(e),uni.setStorageSync("waybillNoHistory",i.value),C()}else{l.value="error",u.value=t.msg,r.value.open();const e={code:v.value.code,createTime:new Date,type:"运单号",space:a.text,status:!1};i.value.unshift(e),uni.setStorageSync("waybillNoHistory",i.value),C()}p=setTimeout((()=>{b(),B(),p&&clearTimeout(p)}),1e3)}else v.value.space_id||(l.value="error",u.value="请选择库位",r.value.open()),v.value.code||(l.value="error",u.value="请填写运单号",r.value.open());var e},C=()=>{i.value=uni.getStorageSync("waybillNoHistory")||[]},V=e=>{102===e.keyCode||103===e.keyCode||e.keyCode,66==e.keyCode&&x()};h((()=>{plus.key.addEventListener("keyup",V)})),g((()=>{plus.key.removeEventListener("keyup",V)})),m((()=>{n.value=!0,plus.key.removeEventListener("keyup",V)})),f((()=>{plus.key.removeEventListener("keyup",V)})),d((()=>{n.value=!1,S(),C()}));const S=async()=>{const e=await U({method:"GET",url:"/admin/warehouse.waybillNo/getOptions"});if(1===e.code)for(let t in e.data.space_id)e.data.space_id.hasOwnProperty(t)&&_.space.push({text:e.data.space_id[t],value:t})},B=()=>{n.value||(s.value=!1,e.nextTick((()=>{s.value=!0})))};return y((e=>{0===e.index&&uni.navigateTo({url:"/pages/waybillNo/logList"})})),(t,n)=>{const d=c(e.resolveDynamicComponent("uni-data-select"),Vn),m=c(e.resolveDynamicComponent("uni-easyinput"),re),p=c(e.resolveDynamicComponent("uni-forms"),Ee),h=c(e.resolveDynamicComponent("uni-icons"),se),g=c(e.resolveDynamicComponent("uni-popup-message"),Bn),f=c(e.resolveDynamicComponent("uni-popup"),Fe);return e.openBlock(),e.createElementBlock("view",{class:"container"},[e.createVNode(p,{ref:"valiForm","label-align":"right","label-width":80,rules:k,modelValue:v.value},{default:e.withCtx((()=>[e.createElementVNode("view",{class:"space-select"},[a.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(d,{key:0,modelValue:v.value.space_id,"onUpdate:modelValue":n[0]||(n[0]=e=>v.value.space_id=e),placeholder:"请选择库位",localdata:_.space,clear:!1},null,8,["modelValue","localdata"])),a.value?(e.openBlock(),e.createBlock(m,{key:1,value:E.value,disabled:a.value},null,8,["value","disabled"])):e.createCommentVNode("",!0),a.value?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("button",{key:2,type:"primary",onClick:N},"确认")),a.value?(e.openBlock(),e.createElementBlock("button",{key:3,type:"primary",onClick:n[1]||(n[1]=e=>a.value=!1)},"修改")):e.createCommentVNode("",!0)]),e.createElementVNode("view",null,[e.createVNode(m,{modelValue:v.value.code,"onUpdate:modelValue":n[2]||(n[2]=e=>v.value.code=e),placeholder:"请输入运单号",suffixIcon:"scan",focus:s.value,onIconClick:w},null,8,["modelValue","focus"])])])),_:1},8,["rules","modelValue"]),e.createElementVNode("view",{class:"button-group"},[e.createElementVNode("button",{type:"default",onClick:b},"重置"),e.createElementVNode("button",{type:"primary",onClick:x,loading:o.value},[o.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(h,{key:0,type:"checkmarkempty",size:"18",color:"white"})),e.createTextVNode(" 提交 ")],8,["loading"])]),i.value.length>0?(e.openBlock(),e.createElementBlock("view",{key:0,class:"history"},[e.createElementVNode("text",{class:"title"},"记录(最近5条)")])):e.createCommentVNode("",!0),e.createElementVNode("view",{class:"history"},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(i.value.slice(0,5),((t,a)=>(e.openBlock(),e.createElementBlock("view",{class:"item",key:a},[e.createElementVNode("view",null,[e.createElementVNode("view",null,[e.createElementVNode("text",{class:"type"},"库位"),e.createElementVNode("text",{class:"code",style:e.normalizeStyle({color:t.status?"green":"#666"})},e.toDisplayString(t.space),5)]),e.createElementVNode("view",null,[e.createElementVNode("text",{class:"type"},"单号"),e.createElementVNode("text",{class:"code",style:e.normalizeStyle({color:t.status?"green":"#666"})},e.toDisplayString(t.code),5)]),e.createElementVNode("view",{class:"space-time"},[e.createElementVNode("text",null,e.toDisplayString(t.createTime),1)])]),e.createElementVNode("view",null,[t.status?(e.openBlock(),e.createBlock(h,{key:0,type:"checkmarkempty",class:"status",size:"16",color:"green"})):(e.openBlock(),e.createElementBlock("text",{key:1,class:"status fail"},"F"))])])))),128))]),e.createVNode(f,{ref_key:"messageRef",ref:r,type:"message"},{default:e.withCtx((()=>[e.createVNode(g,{type:l.value,message:u.value,duration:2e3},null,8,["type","message"])])),_:1},512)])}}}),Ps=a(e.defineComponent({__name:"logList",setup(t){const a=e.ref([]);return h((async()=>{await(async()=>{a.value=uni.getStorageSync("waybillNoHistory")})()})),(t,o)=>{const n=c(e.resolveDynamicComponent("uni-icons"),se);return e.openBlock(),e.createElementBlock("view",{class:"history"},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.value,((t,a)=>(e.openBlock(),e.createElementBlock("view",{class:"item",key:a},[e.createElementVNode("text",{class:"code",style:e.normalizeStyle({color:t.status?"green":"#666"})},[e.createTextVNode(e.toDisplayString(t.orderNum)+" ",1),t.batch_text?(e.openBlock(),e.createElementBlock("text",{key:0}," 单号 "+e.toDisplayString(t.batch_text),1)):e.createCommentVNode("",!0),t.space?(e.openBlock(),e.createElementBlock("text",{key:1}," 库位 "+e.toDisplayString(t.space),1)):e.createCommentVNode("",!0),e.createTextVNode(" "+e.toDisplayString(t.type),1)],4),t.status?(e.openBlock(),e.createBlock(n,{key:0,type:"checkmarkempty",class:"status",size:"16",color:"green"})):(e.openBlock(),e.createElementBlock("text",{key:1,class:"status fail"},"F")),e.createElementVNode("text",{style:{"margin-left":"10rpx","font-weight":"300"}},e.toDisplayString("\r\n"+t.createTime),1)])))),128)),0===a.value.length?(e.openBlock(),e.createElementBlock("view",{key:0,class:"is-empty"},"暂无历史")):e.createCommentVNode("",!0)])}}}),[["__scopeId","data-v-ceea7322"]]),Ds=e=>U({method:"GET",url:"/admin/pickup.waybillPickUpOrder/index",data:e}),Is=e=>U({method:"GET",url:"/admin/pickup.waybillPickUpOrder/getByWaybillNo",data:{waybill_no:e}});const Ls=a(e.defineComponent({__name:"waybillPickUpOrder",setup(t){const a=e.ref(!1);e.ref(!1);const o=e.ref(),n=e.ref([]),s=e.ref(),i=e.ref(),r=e.ref(),l=e.ref();e.ref();const u=e.reactive({page:1,limit:10}),m=e.ref(0),p=e.ref(0),h=e.ref(0),g=e.ref([{id:1,title:"全部",value:0},{id:2,title:"待取件",value:2},{id:3,title:"取件中",value:3},{id:4,title:"部分取件",value:4},{id:5,title:"全部取件",value:5},{id:6,title:"部分投递",value:6},{id:7,title:"全部投递",value:7}]);d((()=>{(async()=>{a.value=!0,u.page=1;const e=await Ds(u);a.value=!1,1==e.code?(n.value=e.data.list,s.value=e.data.total):(i.value="error",r.value=e.msg,l.value.open())})()})),e.onMounted((()=>{f()})),y((async e=>{if(0===e.index){const e=await Is("YTSEA2412080001GB01");1==e.code&&e.data.id?uni.navigateTo({url:`/pages/pickup/waybillPickUpDetail?waybill_no=${e.data.waybill_no}`}):(i.value="error",r.value="面单不存在",l.value.open())}}));const f=()=>{const t=e.getCurrentInstance(),a=uni.createSelectorQuery().in(t.proxy);a.select(".scroll-view").boundingClientRect((e=>{p.value=e.width})).exec(),a.selectAll(".scroll-item").boundingClientRect((e=>{let t=e.length-1;for(let a=0;a<t;a++)g.value[a].left=e[a].left||0,g.value[a].width=e[a].width})).exec()},v=async()=>{if(!(n.value.length<s.value))return uni.showToast({icon:"none",title:"没有更多数据了~"});u.page++;const e=await Ds(u);1==e.code&&(n.value.push(...e.data.list),s.value=e.data.total)};return(t,a)=>{const u=c(e.resolveDynamicComponent("uni-easyinput"),re),d=c(e.resolveDynamicComponent("uni-popup-message"),Bn),f=c(e.resolveDynamicComponent("uni-popup"),Fe);return e.openBlock(),e.createElementBlock("view",{class:"viewport"},[e.createElementVNode("view",{class:"inputfilter"},[e.createVNode(u,{modelValue:o.value,"onUpdate:modelValue":a[0]||(a[0]=e=>o.value=e),placeholder:"请输入单号",inputBorder:!1},null,8,["modelValue"]),e.createElementVNode("view",{class:"filter"},[e.createElementVNode("text",null,"筛选")])]),e.createElementVNode("view",{class:"center-cut-menu"},[e.createElementVNode("scroll-view",{"scroll-x":!0,"scroll-with-animation":!0,"show-scrollbar":!1,class:"scroll-view","scroll-left":m.value},[e.createElementVNode("view",{class:"scroll-item"},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(g.value,((t,a)=>(e.openBlock(),e.createElementBlock("view",{class:"scroll-item",key:t.id,onClick:e=>(e=>{h.value=e,m.value=g.value[e].left-p.value/2+g.value[e].width/2})(a)},[e.createElementVNode("text",{class:e.normalizeClass(["item-text",h.value==a?"active":""])},e.toDisplayString(t.title),3)],8,["onClick"])))),128))])],8,["scroll-left"])]),e.createElementVNode("scroll-view",{"enable-back-to-top":"","scroll-y":"",class:"scroll-view",onScrolltolower:v},[e.createElementVNode("view",{class:"orders"},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.value,((t,a)=>{var o,n,s,i,r,l;return e.openBlock(),e.createElementBlock("navigator",{"hover-class":"none",class:"navigator",key:a,url:`/pages/pickup/waybillPickUpDetails?id=${t.id}`},[e.createElementVNode("view",{class:"order_no_state"},[e.createElementVNode("view",{class:"order_no"},[e.createElementVNode("text",{class:"title"},"订单号"),e.createElementVNode("text",{class:"content"},e.toDisplayString(t.order_no),1)]),e.createElementVNode("view",{class:"order_state"},[e.createElementVNode("text",{class:e.normalizeClass(`state-${t.status}`)},e.toDisplayString(t.status_text),3)])]),e.createElementVNode("view",{class:"pick_up_date"},[e.createElementVNode("text",null,e.toDisplayString(t.pick_up_date),1)]),e.createElementVNode("view",{class:"segmentation-line"}),e.createElementVNode("view",{class:"address"},[e.createElementVNode("view",{class:"user-info"},[e.createElementVNode("text",{class:"user"},e.toDisplayString((null==(o=t.address)?void 0:o.first_name)+" "+(null==(n=t.address)?void 0:n.last_name)),1),e.createElementVNode("text",{class:"mobile"},"+"+e.toDisplayString((null==(s=t.address)?void 0:s.mobile_code)+" "+(null==(i=t.address)?void 0:i.mobile)),1)]),e.createElementVNode("view",{class:"address-info"},[e.createElementVNode("text",null,e.toDisplayString(null==(r=t.address)?void 0:r.city),1),e.createElementVNode("text",null,e.toDisplayString(null==(l=t.address)?void 0:l.zip_code),1)])]),e.createElementVNode("view",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.goods,(t=>(e.openBlock(),e.createElementBlock("view",{key:t.id,class:"goods"},[e.createElementVNode("text",{class:"item"},[e.createTextVNode(e.toDisplayString(t.name)+" ",1),e.createElementVNode("text",{class:"qty"}," x"+e.toDisplayString(t.qty),1)])])))),128))])],8,["url"])})),128))]),e.createElementVNode("view",{class:"loading-text"},e.toDisplayString(s.value===n.value.length?"没有更多数据了~":"正在加载..."),1)],32),e.createVNode(f,{ref_key:"messageRef",ref:l,type:"message"},{default:e.withCtx((()=>[e.createVNode(d,{type:i.value,message:r.value,duration:2e3},null,8,["type","message"])])),_:1},512)])}}}),[["__scopeId","data-v-24388756"]]),As=e.defineComponent({__name:"waybillPickUpDetails",props:{id:{}},setup(t){const{safeAreaInsets:a}=uni.getSystemInfoSync(),o=t,n=e.ref(),s=e.ref({type:"success",text:""}),i=e.ref(),r=async()=>{const e=await(t=o.id,U({method:"GET",url:"/admin/pickup.waybillPickUpOrder/detail",data:{pick_up_order_id:t}}));var t;i.value=e.data.details};d((()=>{r()}));const l=async(e,t)=>{switch(t){case"start_off":(a={id:e},U({method:"POST",url:"/admin/pickup.waybillPickUpOrder/startOff",data:a})).then((e=>{r(),s.value.text="发出成功",s.value.type="success",n.value.open()})).catch((()=>{s.value.text="发出失败,请稍后重试",s.value.type="error",n.value.open()}));break;case"collect":(function(e){return U({method:"POST",url:"/admin/pickup.waybillPickUpOrder/collect",data:e})})({id:e}).then((e=>{r(),s.value.text="揽收成功",s.value.type="success",n.value.open()})).catch((()=>{s.value.text="揽收失败,请稍后重试",s.value.type="error",n.value.open()}));break;case"arrive":(function(e){return U({method:"POST",url:"/admin/pickup.waybillPickUpOrder/delivered",data:e})})({id:e}).then((e=>{r(),s.value.text="修改成功",s.value.type="success",n.value.open()})).catch((()=>{s.value.text="修改失败,请稍后重试",s.value.type="error",n.value.open()}));break;case"delivery_to_the_courier_point":(function(e){return U({method:"POST",url:"/admin/pickup.waybillPickUpOrder/deliveryToTheCourierPoint",data:e})})({id:e,courier_point:"",images:[""]}).then((e=>{r(),s.value.text="修改成功",s.value.type="success",n.value.open()})).catch((()=>{s.value.text="修改失败,请稍后重试",s.value.type="error",n.value.open()}))}var a},u=()=>{uni.makePhoneCall({phoneNumber:"13200000000"})};return(t,o)=>{var r;const d=c(e.resolveDynamicComponent("uni-icons"),se),m=c(e.resolveDynamicComponent("uni-popup-message"),Bn),p=c(e.resolveDynamicComponent("uni-popup"),Fe);return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("scroll-view",{"enable-back-to-top":"","scroll-y":"",class:"viewport"},[e.createElementVNode("view",{class:"detail panel"},[e.createElementVNode("view",{class:"title"},[e.createElementVNode("text",null,"运单列表")]),e.createElementVNode("view",{class:"content"},[e.createElementVNode("view",{class:"properties"},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(i.value,(t=>(e.openBlock(),e.createElementBlock("view",{key:t.id,class:"item"},[e.createElementVNode("navigator",{url:`/pages/pickup/waybillPickUpDetail?waybill_no=${t.waybill_no}`},[e.createElementVNode("view",{class:"order_no_state"},[e.createElementVNode("view",null,[e.createElementVNode("text",null,e.toDisplayString(t.waybill_no),1)]),e.createElementVNode("view",{class:"order_state"},[e.createElementVNode("text",{class:e.normalizeClass("state-"+t.status)},e.toDisplayString(t.status_text),3)])])],8,["url"]),e.createElementVNode("view",{class:"info"},[e.createElementVNode("view",null,[e.createTextVNode(" 预估重量: "),e.createElementVNode("text",null,e.toDisplayString(t.estimated_weight)+"KG",1)]),e.createElementVNode("view",null,[e.createTextVNode(" Ups 取件码: "),e.createElementVNode("text",null,e.toDisplayString(t.ups_prn||"无"),1)]),e.createElementVNode("view",null,[e.createTextVNode(" Ups 准备时间: "),e.createElementVNode("text",null,e.toDisplayString(t.ups_ready_time||"无"),1)]),e.createElementVNode("view",null,[e.createTextVNode(" Ups 截止时间: "),e.createElementVNode("text",null,e.toDisplayString(t.ups_close_time||"无"),1)]),e.createElementVNode("view",{class:"label-info"},[e.createElementVNode("text",null,"面单"),0===t.labels.length?(e.openBlock(),e.createElementBlock("text",{key:0,class:"empty"},"暂未生成")):(e.openBlock(),e.createElementBlock("text",{key:1},[e.createTextVNode("("+e.toDisplayString(t.labels.length)+") ",1),e.createVNode(d,{type:"search",size:"16",color:"#007bff"})]))])]),e.createElementVNode("view",{class:"operations"},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.operations,(a=>(e.openBlock(),e.createElementBlock("view",{key:a.value},[e.createElementVNode("button",{class:"mini-btn",type:"primary",size:"mini",onClick:e=>l(t.id,a.value)},e.toDisplayString(a.text),9,["onClick"])])))),128))]),e.createElementVNode("view",{class:"title label"},[e.createElementVNode("text",null,[e.createTextVNode("物品清单 "),t.goods.length?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("text",{key:0,class:"bln"},"无"))])]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.goods,((t,a)=>(e.openBlock(),e.createElementBlock("view",{key:a,class:"goods"},[e.createElementVNode("view",null,[e.createTextVNode("类型: "),e.createElementVNode("text",null,e.toDisplayString(t.category_name),1)]),e.createElementVNode("view",null,[e.createTextVNode("名称: "),e.createElementVNode("text",null,e.toDisplayString(t.goods_name),1),e.createElementVNode("text",{style:{color:"#666666","font-size":"22rpx"}},e.toDisplayString(" x"+t.qty),1)]),e.createElementVNode("view",null,[e.createTextVNode("价格: "),e.createElementVNode("text",null,"£"+e.toDisplayString(t.price),1)]),e.createElementVNode("view",null,[e.createTextVNode("合计: "),e.createElementVNode("text",null,"£"+e.toDisplayString(t.amount),1)])])))),128))])))),128))])]),e.createVNode(p,{ref_key:"messageRef",ref:n,type:"message"},{default:e.withCtx((()=>[e.createVNode(m,{type:s.value.type,message:s.value.text,duration:2e3},null,8,["type","message"])])),_:1},512)])]),i.value?(e.openBlock(),e.createElementBlock("view",{key:0,class:"contact-client",style:e.normalizeStyle({paddingBottom:(null==(r=e.unref(a))?void 0:r.bottom)+"px"})},[e.createElementVNode("view",{class:"buttons"},[e.createElementVNode("view",{onClick:u,class:"payment"}," 联系客户 ")])],4)):e.createCommentVNode("",!0)],64)}}}),Os=e.defineComponent({__name:"waybillPickUpDetail",props:{waybill_no:{}},setup(t){const{safeAreaInsets:a}=uni.getSystemInfoSync(),o=t,n=e.ref();h((()=>{(async()=>{const e=await Is(o.waybill_no);n.value=e.data})()}));const s=()=>{uni.makePhoneCall({phoneNumber:"13200000000"})};return(t,o)=>{var i;return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("scroll-view",{"enable-back-to-top":"","scroll-y":"",class:"viewport"},[e.createElementVNode("view",{class:"detail panel"},[e.createElementVNode("view",{class:"content"},[e.createElementVNode("view",{class:"properties"},[n.value?(e.openBlock(),e.createElementBlock("view",{key:0,class:"item"},[e.createElementVNode("view",{class:"order_no_state"},[e.createElementVNode("view",null,[e.createElementVNode("text",null,e.toDisplayString(n.value.waybill_no),1)]),e.createElementVNode("view",{class:"order_state"},[e.createElementVNode("text",{class:e.normalizeClass("state-"+n.value.status)},e.toDisplayString(n.value.status_text),3)])]),e.createElementVNode("view",{class:"info"},[e.createElementVNode("view",null,[e.createTextVNode(" 预估重量: "),e.createElementVNode("text",null,e.toDisplayString(n.value.estimated_weight)+"KG",1)]),e.createElementVNode("view",null,[e.createTextVNode(" Ups 取件码: "),e.createElementVNode("text",null,e.toDisplayString(n.value.ups_prn||"无"),1)]),e.createElementVNode("view",null,[e.createTextVNode(" Ups 准备时间: "),e.createElementVNode("text",null,e.toDisplayString(n.value.ups_ready_time||"无"),1)]),e.createElementVNode("view",null,[e.createTextVNode(" Ups 截止时间: "),e.createElementVNode("text",null,e.toDisplayString(n.value.ups_close_time||"无"),1)]),e.createElementVNode("view",null," 面单 ")]),e.createElementVNode("view",{class:"title label"},[e.createElementVNode("text",null,[e.createTextVNode("物品清单 "),n.value.goods.length?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("text",{key:0,class:"bln"},"无"))])]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.value.goods,((t,a)=>(e.openBlock(),e.createElementBlock("view",{key:a,class:"goods"},[e.createElementVNode("view",null,[e.createTextVNode("类型: "),e.createElementVNode("text",null,e.toDisplayString(t.category_name),1)]),e.createElementVNode("view",null,[e.createTextVNode("名称: "),e.createElementVNode("text",null,e.toDisplayString(t.goods_name),1),e.createElementVNode("text",{style:{color:"#666666","font-size":"22rpx"}},e.toDisplayString(" x"+t.qty),1)]),e.createElementVNode("view",null,[e.createTextVNode("价格: "),e.createElementVNode("text",null,"£"+e.toDisplayString(t.price),1)]),e.createElementVNode("view",null,[e.createTextVNode("合计: "),e.createElementVNode("text",null,"£"+e.toDisplayString(t.amount),1)])])))),128))])):e.createCommentVNode("",!0)])])])]),t.details?(e.openBlock(),e.createElementBlock("view",{key:0,class:"contact-client",style:e.normalizeStyle({paddingBottom:(null==(i=e.unref(a))?void 0:i.bottom)+"px"})},[e.createElementVNode("view",{class:"buttons"},[e.createElementVNode("view",{onClick:s,class:"payment"}," 联系客户 ")])],4)):e.createCommentVNode("",!0)],64)}}});const Fs=a({name:"UniDrawer",components:{},emits:["change"],props:{mode:{type:String,default:""},mask:{type:Boolean,default:!0},maskClick:{type:Boolean,default:!0},width:{type:Number,default:220}},data:()=>({visibleSync:!1,showDrawer:!1,rightMode:!1,watchTimer:null,drawerWidth:220}),created(){this.drawerWidth=this.width,this.rightMode="right"===this.mode},methods:{clear(){},close(e){("mask"!==e||this.maskClick)&&this.visibleSync&&this._change("showDrawer","visibleSync",!1)},open(){this.visibleSync||this._change("visibleSync","showDrawer",!0)},_change(e,t,a){this[e]=a,this.watchTimer&&clearTimeout(this.watchTimer),this.watchTimer=setTimeout((()=>{this[t]=a,this.$emit("change",a)}),a?50:300)}}},[["render",function(t,a,o,n,s,i){return s.visibleSync?(e.openBlock(),e.createElementBlock("view",{key:0,class:e.normalizeClass([{"uni-drawer--visible":s.showDrawer},"uni-drawer"]),onTouchmove:a[1]||(a[1]=e.withModifiers(((...e)=>i.clear&&i.clear(...e)),["stop","prevent"]))},[e.createElementVNode("view",{class:e.normalizeClass(["uni-drawer__mask",{"uni-drawer__mask--visible":s.showDrawer&&o.mask}]),onClick:a[0]||(a[0]=e=>i.close("mask"))},null,2),e.createElementVNode("view",{class:e.normalizeClass(["uni-drawer__content",{"uni-drawer--right":s.rightMode,"uni-drawer--left":!s.rightMode,"uni-drawer__content--visible":s.showDrawer}]),style:e.normalizeStyle({width:s.drawerWidth+"px"})},[e.renderSlot(t.$slots,"default",{},void 0,!0)],6)],34)):e.createCommentVNode("",!0)}],["__scopeId","data-v-3e58ca0f"]]),Ms="/static/copy.png",Rs=a(e.defineComponent({__name:"waybillDeliveryOrder",setup(t){const a=e.ref(!1),o=e.ref(!1),n=e.ref(),s=e.ref(),i=e.ref([]),r=e.ref(),u=e.ref(),d=e.ref(),m=e.ref(),p=()=>{},g=()=>{m.value.close()},f=e=>{uni.setClipboardData({data:e,success:function(){uni.showToast({title:"复制成功",icon:"success",duration:2e3})},fail:function(){l("log","at pages/waybillDeliveryOrder/waybillDeliveryOrder.vue:121","复制失败")}})},v=async()=>{1===await On()&&uni.scanCode({success:e=>{},fail:e=>{}})},k=e=>{o.value=!0,uni.request({url:"",method:"POST",header:{batoken:n.value},data:e,success:({data:e})=>{o.value=!1,r.value="success",u.value="发出成功",d.value.open()},fail:e=>{o.value=!1,r.value="error",u.value="发出失败,请稍后重试",d.value.open()}})},_=e=>{o.value=!0,uni.request({url:"",method:"POST",header:{batoken:n.value},data:e,success:({data:e})=>{o.value=!1,r.value="success",u.value="确认送达成功",d.value.open()},fail:e=>{o.value=!1,r.value="error",u.value="确认送达失败,请稍后重试",d.value.open()}})},w=e=>{o.value=!0,uni.request({url:"",method:"POST",header:{batoken:n.value},data:e,success:({data:e})=>{o.value=!1,r.value="success",u.value="已拒绝签收",d.value.open()},fail:e=>{o.value=!1,r.value="error",u.value="修改失败,请稍后重试",d.value.open()}})},b=e=>{o.value=!0,uni.request({url:"",method:"POST",header:{batoken:n.value},data:e,success:({data:e})=>{o.value=!1,r.value="success",u.value="同步成功",d.value.open()},fail:e=>{o.value=!1,r.value="error",u.value="同步失败,请稍后重试",d.value.open()}})},N=e=>{o.value=!0,uni.request({url:"",method:"POST",header:{batoken:n.value},data:e,success:({data:e})=>{o.value=!1,r.value="success",u.value="操作成功",d.value.open()},fail:e=>{o.value=!1,r.value="error",u.value="操作失败,请稍后重试",d.value.open()}})};return h((()=>{n.value=uni.getStorageSync("token"),a.value=!0,uni.request({url:"/index",method:"GET",header:{batoken:n.value},success:({data:e})=>{a.value=!1,l("log","at pages/waybillDeliveryOrder/waybillDeliveryOrder.vue:336",e),1==e.code?i.value=e.data.list:(r.value="error",u.value=e.msg,d.value.open())},fail:e=>{a.value=!1}})})),y((e=>{0===e.index&&m.value.open()})),(t,a)=>{const o=c(e.resolveDynamicComponent("uni-easyinput"),re),n=c(e.resolveDynamicComponent("uni-popup-message"),Bn),h=c(e.resolveDynamicComponent("uni-popup"),Fe),y=c(e.resolveDynamicComponent("uni-drawer"),Fs);return e.openBlock(),e.createElementBlock("view",{class:"list"},[e.createVNode(o,{modelValue:s.value,"onUpdate:modelValue":a[0]||(a[0]=e=>s.value=e),placeholder:"请输入单号",suffixIcon:"scan",onIconClick:v},null,8,["modelValue"]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(i.value,((t,a)=>(e.openBlock(),e.createElementBlock("view",{class:"item",key:a,onClick:e=>(e=>{uni.setStorageSync("selectItem",e),uni.navigateTo({url:"/pages/waybillDeliveryOrder/orderInfo?id="+e.id})})(t)},[e.createElementVNode("view",{class:"order-no"},[e.createElementVNode("text",null," 派送单号: "+e.toDisplayString(t.order_no),1),e.createElementVNode("image",{onClick:e=>f(t.order_no),class:"icon",src:Ms,mode:"aspectFill"},null,8,["onClick"])]),e.createElementVNode("view",{class:"address-info"},[e.createElementVNode("view",{class:"info"},[e.createElementVNode("view",{class:"user"},[e.createElementVNode("text",null,e.toDisplayString(t.address.first_name+" "+t.address.last_name)+" "+e.toDisplayString("+"+t.address.mobile_code+" "+t.address.mobile),1),e.createElementVNode("image",{onClick:e=>{return l("log","at pages/waybillDeliveryOrder/waybillDeliveryOrder.vue:127",a=t.address.mobile_code+" "+t.address.mobile),void uni.makePhoneCall({phoneNumber:a,success:function(){l("log","at pages/waybillDeliveryOrder/waybillDeliveryOrder.vue:132","拨打电话成功!")},fail:function(){l("log","at pages/waybillDeliveryOrder/waybillDeliveryOrder.vue:135","拨打电话失败!")}});var a},class:"icon",src:"/static/call.png",mode:"aspectFill"},null,8,["onClick"])]),e.createElementVNode("view",null,[e.createElementVNode("text",{class:"address"},[e.createElementVNode("text",{class:"city"},e.toDisplayString(t.address.city),1),e.createTextVNode(" "+e.toDisplayString(t.address.zip_code),1)]),e.createElementVNode("image",{onClick:e=>f(t.address.zip_code),class:"icon",src:Ms,mode:"aspectFill"},null,8,["onClick"])])]),e.createElementVNode("view",{class:"info"})]),e.createElementVNode("view"),e.createElementVNode("view",{class:"operations"},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.operations,((a,o)=>(e.openBlock(),e.createElementBlock("button",{key:o,onClick:e=>(async(e,t)=>{"send_out"===t?k({id:e.id}):"delivered"===t?_({id:e.id}):"refuse"===t?w({id:e.id}):"create_track_pod"===t?b({id:e.id}):"edit"===t||"generate_label"===t||"fedex_appointment_pick_up"===t||"print_get_back_label"===t||"fedex_cancel_pick_up"===t&&N({id:e.id})})(t,a.value),type:"info",size:"mini"},e.toDisplayString(a.text),9,["onClick"])))),128))])],8,["onClick"])))),128)),0===i.value.length?(e.openBlock(),e.createElementBlock("view",{key:0,class:"is-empty"},"暂无派送单")):e.createCommentVNode("",!0),e.createVNode(h,{ref_key:"messageRef",ref:d,type:"message"},{default:e.withCtx((()=>[e.createVNode(n,{type:r.value,message:u.value,duration:2e3},null,8,["type","message"])])),_:1},512),e.createVNode(y,{ref_key:"showRightRef",ref:m,mode:"right","mask-click":!0},{default:e.withCtx((()=>[e.createElementVNode("scroll-view",{style:{height:"100%"},"scroll-y":"true"},[e.createElementVNode("view",{class:"button-group"},[e.createElementVNode("button",{onClick:p,type:"info"},"重置"),e.createElementVNode("button",{onClick:g,type:"primary"},"确认")])])])),_:1},512)])}}}),[["__scopeId","data-v-206eadb6"]]),$s=e.defineComponent({__name:"settings",setup(t){const a=O(),o=()=>{uni.showModal({content:"是否退出登录?",confirmColor:"#27BA9B",success:e=>{e.confirm&&(a.clearProfile(),uni.navigateBack())}})};return(t,n)=>(e.openBlock(),e.createElementBlock("view",{class:"viewport"},[e.unref(a).profile?(e.openBlock(),e.createElementBlock("view",{key:0,class:"list"},[e.createElementVNode("navigator",{url:"/pagesMember/address/address","hover-class":"none",class:"item arrow"}," 我的收货地址 ")])):e.createCommentVNode("",!0),e.createElementVNode("view",{class:"list"},[e.createElementVNode("button",{"hover-class":"none",class:"item arrow"},"关于英途仓库")]),e.unref(a).profile?(e.openBlock(),e.createElementBlock("view",{key:1,class:"action"},[e.createElementVNode("view",{onClick:o,class:"button"},"退出登录")])):e.createCommentVNode("",!0)]))}}),Us=e.defineComponent({__name:"profile",setup(t){const{safeAreaInsets:a}=uni.getSystemInfoSync(),o=e.ref({}),n=async()=>{const e=await U({method:"GET",url:"/member/profile"});o.value=e.result,s.profile.avatar=e.result.avatar,s.profile.nickname=e.result.nickname};h((()=>{n()}));const s=O(),i=()=>{uni.chooseImage({count:1,success:e=>{const t=e.tempFilePaths;r(t[0])}})},r=e=>{uni.uploadFile({url:"/member/profile/avatar",name:"file",filePath:e,success:e=>{if(200===e.statusCode){const t=JSON.parse(e.data).result.avatar;o.value.avatar=t,s.profile.avatar=t,uni.showToast({icon:"success",title:"更新成功"})}else uni.showToast({icon:"error",title:"出现错误"})}})},l=e=>{o.value.gender=e.detail.value},c=e=>{o.value.birthday=e.detail.value};let u=["","",""];const d=async()=>{const{nickname:e,gender:t,birthday:a}=o.value,n=await(i={nickname:e,gender:t,birthday:a,provinceCode:u[0],cityCode:u[1],countyCode:u[2]},U({method:"PUT",url:"/member/profile",data:i}));var i;s.profile.nickname=n.result.nickname,uni.showToast({icon:"success",title:"保存成功"}),setTimeout((()=>{uni.navigateBack()}),400)};return(t,n)=>{var s,r,u,m,p,h,g,f,y;return e.openBlock(),e.createElementBlock("view",{class:"viewport"},[e.createElementVNode("view",{class:"navbar",style:e.normalizeStyle({paddingTop:(null==(s=e.unref(a))?void 0:s.top)+"px"})},[e.createElementVNode("navigator",{"open-type":"navigateBack",class:"back icon-left","hover-class":"none"}),e.createElementVNode("view",{class:"title"},"个人信息")],4),e.createElementVNode("view",{class:"avatar"},[e.createElementVNode("view",{onClick:i,class:"avatar-content"},[e.createElementVNode("image",{class:"image",src:null==(r=o.value)?void 0:r.avatar,mode:"aspectFill"},null,8,["src"]),e.createElementVNode("text",{class:"text"},"点击修改头像")])]),e.createElementVNode("view",{class:"form"},[e.createElementVNode("view",{class:"form-content"},[e.createElementVNode("view",{class:"form-item"},[e.createElementVNode("text",{class:"label"},"账号"),e.createElementVNode("text",{class:"account placeholder"},e.toDisplayString(null==(u=o.value)?void 0:u.account),1)]),e.createElementVNode("view",{class:"form-item"},[e.createElementVNode("text",{class:"label"},"昵称"),e.withDirectives(e.createElementVNode("input",{class:"input",type:"text",placeholder:"请填写昵称","onUpdate:modelValue":n[0]||(n[0]=e=>o.value.nickname=e)},null,512),[[e.vModelText,o.value.nickname]])]),e.createElementVNode("view",{class:"form-item"},[e.createElementVNode("text",{class:"label"},"性别"),e.createElementVNode("radio-group",{onChange:l},[e.createElementVNode("label",{class:"radio"},[e.createElementVNode("radio",{value:"男",color:"#27ba9b",checked:"男"===(null==(m=o.value)?void 0:m.gender)},null,8,["checked"]),e.createTextVNode(" 男 ")]),e.createElementVNode("label",{class:"radio"},[e.createElementVNode("radio",{value:"女",color:"#27ba9b",checked:"女"===(null==(p=o.value)?void 0:p.gender)},null,8,["checked"]),e.createTextVNode(" 女 ")])],32)]),e.createElementVNode("view",{class:"form-item"},[e.createElementVNode("text",{class:"label"},"生日"),e.createElementVNode("picker",{onChange:c,mode:"date",class:"picker",value:null==(h=o.value)?void 0:h.birthday,start:"1900-01-01",end:e.unref(An)(new Date)},[(null==(g=o.value)?void 0:g.birthday)?(e.openBlock(),e.createElementBlock("view",{key:0},e.toDisplayString(null==(f=o.value)?void 0:f.birthday),1)):(e.openBlock(),e.createElementBlock("view",{key:1,class:"placeholder"},"请选择日期"))],40,["value","end"])]),e.createElementVNode("view",{class:"form-item"},[e.createElementVNode("text",{class:"label"},"职业"),e.createElementVNode("input",{class:"input",type:"text",placeholder:"请填写职业",value:null==(y=o.value)?void 0:y.profession},null,8,["value"])])]),e.createElementVNode("button",{onClick:d,class:"form-button"},"保 存")])])}}}),zs=P("address",(()=>{const t=e.ref();return{selectedAddress:t,changeSelectedAddress:e=>{t.value=e}}})),js=e.defineComponent({__name:"address",setup(t){const a=e.ref([]),o=async()=>{const e=await U({method:"GET",url:"/member/address"});a.value=e.result};d((()=>{o()}));const n=e=>{uni.showModal({content:"删除地址?",confirmColor:"#27BA9B",success:async t=>{t.confirm&&(await(e=>U({method:"DELETE",url:`/member/address/${e}`}))(e),o())}})};return(t,o)=>{const s=c(e.resolveDynamicComponent("uni-swipe-action-item"),K),i=c(e.resolveDynamicComponent("uni-swipe-action"),Y);return e.openBlock(),e.createElementBlock("view",{class:"viewport"},[e.createElementVNode("scroll-view",{"enable-back-to-top":"",class:"scroll-view","scroll-y":""},[a.value.length?(e.openBlock(),e.createElementBlock("view",{key:0,class:"address"},[e.createVNode(i,{class:"address-list"},{default:e.withCtx((()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.value,(t=>(e.openBlock(),e.createBlock(s,{class:"item",key:t.id},{right:e.withCtx((()=>[e.createElementVNode("button",{onClick:e=>n(t.id),class:"delete-button"},"删除",8,["onClick"])])),default:e.withCtx((()=>[e.createElementVNode("view",{class:"item-content",onClick:e=>(e=>{zs().changeSelectedAddress(e),uni.navigateBack()})(t)},[e.createElementVNode("view",{class:"user"},[e.createTextVNode(e.toDisplayString(t.receiver)+" ",1),e.createElementVNode("text",{class:"contact"},e.toDisplayString(t.contact),1),t.isDefault?(e.openBlock(),e.createElementBlock("text",{key:0,class:"badge"},"默认")):e.createCommentVNode("",!0)]),e.createElementVNode("view",{class:"locate"},e.toDisplayString(t.fullLocation)+" "+e.toDisplayString(t.address),1),e.createElementVNode("navigator",{class:"edit","hover-class":"none",url:`/pagesMember/address-form/address-form?id=${t.id}`,onClick:[e.withModifiers((()=>{}),["stop"]),e.withModifiers((()=>{}),["prevent"])]}," 修改 ",8,["url"])],8,["onClick"])])),_:2},1024)))),128))])),_:1})])):(e.openBlock(),e.createElementBlock("view",{key:1,class:"blank"},"暂无收货地址"))]),e.createElementVNode("view",{class:"add-btn"},[e.createElementVNode("navigator",{"hover-class":"none",url:"/pagesMember/address-form/address-form"}," 新建地址 ")])])}}}),qs=e.defineComponent({__name:"address-form",props:{id:{}},setup(t){const a=e.ref({receiver:"",contact:"",fullLocation:"",provinceCode:"",cityCode:"",countyCode:"",address:"",isDefault:0}),o=t,n=async()=>{if(o.id){const t=await(e=o.id,U({method:"GET",url:`/member/address/${e}`}));Object.assign(a.value,t.result)}var e};h((()=>{n()})),uni.setNavigationBarTitle({title:o.id?"修改地址":"新建地址"});const s=e=>{a.value.isDefault=e.detail.value?1:0},i={receiver:{rules:[{required:!0,errorMessage:"请输入收货人姓名"}]},contact:{rules:[{required:!0,errorMessage:"请输入联系方式"},{pattern:/^1[3-9]\d{9}$/,errorMessage:"手机号格式不正确"}]},countyCode:{rules:[{required:!0,errorMessage:"请选择所在地区"}]},address:{rules:[{required:!0,errorMessage:"请选择详细地址"}]}},r=e.ref(),l=async()=>{var e,t,n,s;try{await(null==(t=null==(e=r.value)?void 0:e.validate)?void 0:t.call(e)),o.id?await(n=o.id,s=a.value,U({method:"PUT",url:`/member/address/${n}`,data:s})):await(e=>U({method:"POST",url:"/member/address",data:e}))(a.value),uni.showToast({icon:"success",title:o.id?"修改成功":"添加成功"}),setTimeout((()=>{uni.navigateBack()}),400)}catch(i){uni.showToast({icon:"error",title:"请填写完整信息"})}},u=e=>{const[t,o,n]=e.detail.value;Object.assign(a.value,{provinceCode:t.value,cityCode:o.value,countyCode:n.value})};return(t,o)=>{const n=c(e.resolveDynamicComponent("uni-forms-item"),Ue),d=c(e.resolveDynamicComponent("uni-data-picker"),xs),m=c(e.resolveDynamicComponent("uni-forms"),Ee);return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("view",{class:"content"},[e.createVNode(m,{rules:i,model:a.value,ref_key:"formRef",ref:r},{default:e.withCtx((()=>[e.createVNode(n,{name:"receiver",class:"form-item"},{default:e.withCtx((()=>[e.createElementVNode("text",{class:"label"},"收货人"),e.withDirectives(e.createElementVNode("input",{class:"input",placeholder:"请填写收货人姓名","onUpdate:modelValue":o[0]||(o[0]=e=>a.value.receiver=e)},null,512),[[e.vModelText,a.value.receiver]])])),_:1}),e.createVNode(n,{name:"contact",class:"form-item"},{default:e.withCtx((()=>[e.createElementVNode("text",{class:"label"},"手机号码"),e.withDirectives(e.createElementVNode("input",{class:"input",placeholder:"请填写收货人手机号码",maxlength:11,"onUpdate:modelValue":o[1]||(o[1]=e=>a.value.contact=e)},null,512),[[e.vModelText,a.value.contact]])])),_:1}),e.createVNode(n,{name:"countyCode",class:"form-item"},{default:e.withCtx((()=>[e.createElementVNode("text",{class:"label"},"所在地区"),e.createVNode(d,{placeholder:"请选择地址","popup-title":"请选择城市",collection:"opendb-city-china",field:"code as value, name as text",orderby:"value asc","step-searh":!0,"self-field":"code","parent-field":"parent_code",onChange:u,"clear-icon":!1,modelValue:a.value.countyCode,"onUpdate:modelValue":o[2]||(o[2]=e=>a.value.countyCode=e)},null,8,["modelValue"])])),_:1}),e.createVNode(n,{name:"address",class:"form-item"},{default:e.withCtx((()=>[e.createElementVNode("text",{class:"label"},"详细地址"),e.withDirectives(e.createElementVNode("input",{class:"input",placeholder:"街道、楼牌号等信息","onUpdate:modelValue":o[3]||(o[3]=e=>a.value.address=e)},null,512),[[e.vModelText,a.value.address]])])),_:1}),e.createElementVNode("view",{class:"form-item"},[e.createElementVNode("label",{class:"label"},"设为默认地址"),e.createElementVNode("switch",{onChange:s,class:"switch",color:"#27ba9b",checked:1===a.value.isDefault},null,40,["checked"])])])),_:1},8,["model"])]),e.createElementVNode("button",{onClick:l,class:"button"},"保存并使用")],64)}}}),Hs=e=>U({method:"PUT",url:`/member/order/${e}/receipt`}),Gs=e=>U({method:"DELETE",url:"/member/order",data:e}),Js=e.defineComponent({__name:"create",props:{skuId:{},count:{},orderId:{}},setup(t){const{safeAreaInsets:a}=uni.getSystemInfoSync(),o=e.ref(""),n=e.ref([{type:1,text:"时间不限 (周一至周日)"},{type:2,text:"工作日送 (周一至周五)"},{type:3,text:"周末配送 (周六至周日)"}]),s=e.ref(0),i=e.computed((()=>n.value[s.value])),r=e=>{s.value=e.detail.value},l=t,c=e.ref(),u=async()=>{if(l.count&&l.skuId){const e=await(t={count:l.count,skuId:l.skuId},U({method:"GET",url:"/member/order/pre/now",data:t}));c.value=e.result}else if(l.orderId){const t=await(e=l.orderId,U({method:"GET",url:`/member/order/repurchase/${e}`}));c.value=t.result}else{const e=await U({method:"GET",url:"/member/order/pre"});c.value=e.result}var e,t};h((()=>{u()}));const d=zs(),m=e.computed((()=>{var e;return d.selectedAddress||(null==(e=c.value)?void 0:e.userAddresses.find((e=>e.isDefault)))})),p=async()=>{var e,t;if(!(null==(e=m.value)?void 0:e.id))return uni.showToast({icon:"none",title:"请选择收货地址"});const a=await(n={addressId:null==(t=m.value)?void 0:t.id,buyerMessage:o.value,deliveryTimeType:i.value.type,goods:c.value.goods.map((e=>({count:e.count,skuId:e.skuId}))),payChannel:2,payType:1},U({method:"POST",url:"/member/order",data:n}));var n;uni.redirectTo({url:`/pagesOrder/detail/detail?id=${a.result.id}`})};return(t,s)=>{var l,u,d,h,g,f;return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("scroll-view",{"enable-back-to-top":"","scroll-y":"",class:"viewport"},[m.value?(e.openBlock(),e.createElementBlock("navigator",{key:0,class:"shipment","hover-class":"none",url:"/pagesMember/address/address?from=order"},[e.createElementVNode("view",{class:"user"},e.toDisplayString(m.value.receiver)+" "+e.toDisplayString(m.value.contact),1),e.createElementVNode("view",{class:"address"},e.toDisplayString(m.value.fullLocation)+" "+e.toDisplayString(m.value.address),1),e.createElementVNode("text",{class:"icon icon-right"})])):(e.openBlock(),e.createElementBlock("navigator",{key:1,class:"shipment","hover-class":"none",url:"/pagesMember/address/address?from=order"},[e.createElementVNode("view",{class:"address"}," 请选择收货地址 "),e.createElementVNode("text",{class:"icon icon-right"})])),e.createElementVNode("view",{class:"goods"},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(null==(l=c.value)?void 0:l.goods,(t=>(e.openBlock(),e.createElementBlock("navigator",{key:t.skuId,url:`/pages/goods/goods?id=${t.id}`,class:"item","hover-class":"none"},[e.createElementVNode("image",{class:"picture",src:t.picture},null,8,["src"]),e.createElementVNode("view",{class:"meta"},[e.createElementVNode("view",{class:"name ellipsis"},e.toDisplayString(t.name),1),e.createElementVNode("view",{class:"attrs"},e.toDisplayString(t.attrsText),1),e.createElementVNode("view",{class:"prices"},[e.createElementVNode("view",{class:"pay-price symbol"},e.toDisplayString(t.payPrice),1),e.createElementVNode("view",{class:"price symbol"},e.toDisplayString(t.price),1)]),e.createElementVNode("view",{class:"count"},"x"+e.toDisplayString(t.count),1)])],8,["url"])))),128))]),e.createElementVNode("view",{class:"related"},[e.createElementVNode("view",{class:"item"},[e.createElementVNode("text",{class:"text"},"配送时间"),e.createElementVNode("picker",{range:n.value,"range-key":"text",onChange:r},[e.createElementVNode("view",{class:"icon-fonts picker"},e.toDisplayString(i.value.text),1)],40,["range"])]),e.createElementVNode("view",{class:"item"},[e.createElementVNode("text",{class:"text"},"订单备注"),e.withDirectives(e.createElementVNode("input",{class:"input","cursor-spacing":30,placeholder:"选题,建议留言前先与商家沟通确认","onUpdate:modelValue":s[0]||(s[0]=e=>o.value=e)},null,512),[[e.vModelText,o.value]])])]),e.createElementVNode("view",{class:"settlement"},[e.createElementVNode("view",{class:"item"},[e.createElementVNode("text",{class:"text"},"商品总价: "),e.createElementVNode("text",{class:"number symbol"},e.toDisplayString(null==(u=c.value)?void 0:u.summary.totalPrice.toFixed(2)),1)]),e.createElementVNode("view",{class:"item"},[e.createElementVNode("text",{class:"text"},"运费: "),e.createElementVNode("text",{class:"number symbol"},e.toDisplayString(null==(d=c.value)?void 0:d.summary.postFee.toFixed(2)),1)])])]),e.createElementVNode("view",{class:"toolbar",style:e.normalizeStyle({paddingBottom:(null==(h=e.unref(a))?void 0:h.bottom)+"px"})},[e.createElementVNode("view",{class:"total-pay symbol"},[e.createElementVNode("text",{class:"number"},e.toDisplayString(null==(g=c.value)?void 0:g.summary.totalPayPrice.toFixed(2)),1)]),e.createElementVNode("view",{class:e.normalizeClass(["button",{disabled:!(null==(f=m.value)?void 0:f.id)}]),onClick:p}," 提交订单 ",2)],4)],64)}}}),Ws={en:{"uni-countdown.day":"day","uni-countdown.h":"h","uni-countdown.m":"m","uni-countdown.s":"s"},"zh-Hans":{"uni-countdown.day":"天","uni-countdown.h":"时","uni-countdown.m":"分","uni-countdown.s":"秒"},"zh-Hant":{"uni-countdown.day":"天","uni-countdown.h":"時","uni-countdown.m":"分","uni-countdown.s":"秒"}},{t:Ks}=es(Ws);const Ys=a({name:"UniCountdown",emits:["timeup"],props:{showDay:{type:Boolean,default:!0},showColon:{type:Boolean,default:!0},start:{type:Boolean,default:!0},backgroundColor:{type:String,default:""},color:{type:String,default:"#333"},fontSize:{type:Number,default:14},splitorColor:{type:String,default:"#333"},day:{type:Number,default:0},hour:{type:Number,default:0},minute:{type:Number,default:0},second:{type:Number,default:0},timestamp:{type:Number,default:0}},data:()=>({timer:null,syncFlag:!1,d:"00",h:"00",i:"00",s:"00",leftTime:0,seconds:0}),computed:{dayText:()=>Ks("uni-countdown.day"),hourText:e=>Ks("uni-countdown.h"),minuteText:e=>Ks("uni-countdown.m"),secondText:e=>Ks("uni-countdown.s"),timeStyle(){const{color:e,backgroundColor:t,fontSize:a}=this;return{color:e,backgroundColor:t,fontSize:`${a}px`,width:22*a/14+"px",lineHeight:20*a/14+"px",borderRadius:3*a/14+"px"}},splitorStyle(){const{splitorColor:e,fontSize:t,backgroundColor:a}=this;return{color:e,fontSize:12*t/14+"px",margin:a?4*t/14+"px":""}}},watch:{day(e){this.changeFlag()},hour(e){this.changeFlag()},minute(e){this.changeFlag()},second(e){this.changeFlag()},start:{immediate:!0,handler(e,t){if(e)this.startData();else{if(!t)return;clearInterval(this.timer)}}}},created:function(e){this.seconds=this.toSeconds(this.timestamp,this.day,this.hour,this.minute,this.second),this.countDown()},unmounted(){clearInterval(this.timer)},methods:{toSeconds:(e,t,a,o,n)=>e?e-parseInt((new Date).getTime()/1e3,10):60*t*60*24+60*a*60+60*o+n,timeUp(){clearInterval(this.timer),this.$emit("timeup")},countDown(){let e=this.seconds,[t,a,o,n]=[0,0,0,0];e>0?(t=Math.floor(e/86400),a=Math.floor(e/3600)-24*t,o=Math.floor(e/60)-24*t*60-60*a,n=Math.floor(e)-24*t*60*60-60*a*60-60*o):this.timeUp(),t<10&&(t="0"+t),a<10&&(a="0"+a),o<10&&(o="0"+o),n<10&&(n="0"+n),this.d=t,this.h=a,this.i=o,this.s=n},startData(){if(this.seconds=this.toSeconds(this.timestamp,this.day,this.hour,this.minute,this.second),this.seconds<=0)return this.seconds=this.toSeconds(0,0,0,0,0),void this.countDown();clearInterval(this.timer),this.countDown(),this.timer=setInterval((()=>{this.seconds--,this.seconds<0?this.timeUp():this.countDown()}),1e3)},update(){this.startData()},changeFlag(){this.syncFlag||(this.seconds=this.toSeconds(this.timestamp,this.day,this.hour,this.minute,this.second),this.startData(),this.syncFlag=!0)}}},[["render",function(t,a,o,n,s,i){return e.openBlock(),e.createElementBlock("view",{class:"uni-countdown"},[o.showDay?(e.openBlock(),e.createElementBlock("text",{key:0,style:e.normalizeStyle([i.timeStyle]),class:"uni-countdown__number"},e.toDisplayString(s.d),5)):e.createCommentVNode("",!0),o.showDay?(e.openBlock(),e.createElementBlock("text",{key:1,style:e.normalizeStyle([i.splitorStyle]),class:"uni-countdown__splitor"},e.toDisplayString(i.dayText),5)):e.createCommentVNode("",!0),e.createElementVNode("text",{style:e.normalizeStyle([i.timeStyle]),class:"uni-countdown__number"},e.toDisplayString(s.h),5),e.createElementVNode("text",{style:e.normalizeStyle([i.splitorStyle]),class:"uni-countdown__splitor"},e.toDisplayString(o.showColon?":":i.hourText),5),e.createElementVNode("text",{style:e.normalizeStyle([i.timeStyle]),class:"uni-countdown__number"},e.toDisplayString(s.i),5),e.createElementVNode("text",{style:e.normalizeStyle([i.splitorStyle]),class:"uni-countdown__splitor"},e.toDisplayString(o.showColon?":":i.minuteText),5),e.createElementVNode("text",{style:e.normalizeStyle([i.timeStyle]),class:"uni-countdown__number"},e.toDisplayString(s.s),5),o.showColon?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("text",{key:2,style:e.normalizeStyle([i.splitorStyle]),class:"uni-countdown__splitor"},e.toDisplayString(i.secondText),5))])}],["__scopeId","data-v-37b71173"]]);var Qs=(e=>(e[e.DaiFuKuan=1]="DaiFuKuan",e[e.DaiFaHuo=2]="DaiFaHuo",e[e.DaiShouHuo=3]="DaiShouHuo",e[e.DaiPingJia=4]="DaiPingJia",e[e.YiWanCheng=5]="YiWanCheng",e[e.YiQuXiao=6]="YiQuXiao",e))(Qs||{});const Xs=[{id:0,text:""},{id:1,text:"待付款"},{id:2,text:"待发货"},{id:3,text:"待收货"},{id:4,text:"待评价"},{id:5,text:"已完成"},{id:6,text:"已取消"}];const Zs=a({},[["render",function(t,a){return e.openBlock(),e.createElementBlock("view",{class:"sk-container"},[e.createElementVNode("scroll-view",{"scroll-y":!0,class:"viewport sk-transparent",id:"scroller","enable-back-to-top":!0},[e.createElementVNode("view",{class:"overview sk-image",style:{"padding-top":"64px"}},[e.createElementVNode("view",{class:"status sk-transparent sk-text-0-0000-826 sk-text"},"待收货")]),e.createElementVNode("view",{class:"shipment"},[e.createElementVNode("navigator",{class:"logistics sk-image sk-pseudo sk-pseudo-circle","hover-class":"none"},[e.createElementVNode("view",{class:"message sk-transparent sk-text-14-2857-512 sk-text"},"小兔兔到了小福家里,请签收"),e.createElementVNode("view",{class:"date sk-transparent sk-text-14-2857-990 sk-text"},"2023-04-15 23:23:04")]),e.createElementVNode("view",{class:"locate sk-image"},[e.createElementVNode("view",{class:"user sk-transparent sk-text-14-2857-630 sk-text"},"苏东坡 13633336666"),e.createElementVNode("view",{class:"address sk-transparent sk-text-14-2857-606 sk-text"},"广东省 广州市 天河区吉山幼儿园")])]),e.createElementVNode("view",{class:"goods"},[e.createElementVNode("view",{class:"item"},[e.createElementVNode("navigator",{class:"navigator","hover-class":"none"},[e.createElementVNode("image",{class:"cover sk-image"}),e.createElementVNode("view",{class:"meta"},[e.createElementVNode("view",{class:"name ellipsis sk-transparent sk-text-14-2857-474 sk-text"},"厚厚一按就干爽,埃及进口长绒棉毛巾"),e.createElementVNode("view",{class:"type sk-transparent sk-text-22-2222-237 sk-text"},"超值4条装(灰蓝色+粉色+银灰+嫩黄)"),e.createElementVNode("view",{class:"price"},[e.createElementVNode("view",{class:"actual"},[e.createElementVNode("text",{class:"symbol sk-transparent sk-opacity"},"¥"),e.createElementVNode("text",{class:"sk-transparent sk-text-14-2857-102 sk-text"},"68")])]),e.createElementVNode("view",{class:"quantity sk-transparent sk-opacity"},"x1")])]),e.createElementVNode("navigator",{class:"navigator","hover-class":"none"},[e.createElementVNode("image",{class:"cover sk-image"}),e.createElementVNode("view",{class:"meta"},[e.createElementVNode("view",{class:"name ellipsis sk-transparent sk-text-14-2857-969 sk-text"},"KJE金属色系轻量电动车骑行盔男女通用"),e.createElementVNode("view",{class:"type sk-transparent sk-text-22-2222-510 sk-text"},"玫瑰金L"),e.createElementVNode("view",{class:"price"},[e.createElementVNode("view",{class:"actual"},[e.createElementVNode("text",{class:"symbol sk-transparent sk-opacity"},"¥"),e.createElementVNode("text",{class:"sk-transparent sk-text-14-2857-431 sk-text"},"120")])]),e.createElementVNode("view",{class:"quantity sk-transparent sk-opacity"},"x1")])]),e.createElementVNode("navigator",{class:"navigator","hover-class":"none"},[e.createElementVNode("image",{class:"cover sk-image"}),e.createElementVNode("view",{class:"meta"},[e.createElementVNode("view",{class:"name ellipsis sk-transparent sk-text-14-2857-130 sk-text"},"源自澳洲进口羊毛,儿童奢暖羊毛被升级款"),e.createElementVNode("view",{class:"type sk-transparent sk-text-22-2222-110 sk-text"},"春秋款, 100%羊毛款:150x200cm,适合1.2米/1.35米床"),e.createElementVNode("view",{class:"price"},[e.createElementVNode("view",{class:"actual"},[e.createElementVNode("text",{class:"symbol sk-transparent sk-opacity"},"¥"),e.createElementVNode("text",{class:"sk-transparent sk-text-14-2857-273 sk-text"},"289")])]),e.createElementVNode("view",{class:"quantity sk-transparent sk-opacity"},"x1")])])]),e.createElementVNode("view",{class:"total"},[e.createElementVNode("view",{class:"row"},[e.createElementVNode("view",{class:"text sk-transparent sk-text-0-0000-302 sk-text"},"商品总价: "),e.createElementVNode("view",{class:"symbol sk-transparent sk-text-0-0000-998 sk-text sk-pseudo sk-pseudo-circle"},"477")]),e.createElementVNode("view",{class:"row"},[e.createElementVNode("view",{class:"text sk-transparent sk-text-0-0000-912 sk-text"},"运费: "),e.createElementVNode("view",{class:"symbol sk-transparent sk-text-0-0000-208 sk-text sk-pseudo sk-pseudo-circle"},"2")]),e.createElementVNode("view",{class:"row"},[e.createElementVNode("view",{class:"text sk-transparent sk-text-0-0000-538 sk-text"},"应付金额: "),e.createElementVNode("view",{class:"symbol primary sk-transparent sk-text-0-0000-858 sk-text sk-pseudo sk-pseudo-circle"},"479")])])]),e.createElementVNode("view",{class:"detail"},[e.createElementVNode("view",{class:"title sk-transparent sk-text-0-0000-66 sk-text"},"订单信息"),e.createElementVNode("view",{class:"row"},[e.createElementVNode("view",{class:"item sk-transparent"},[e.createTextVNode(" 订单编号: 1645809639951962113 "),e.createElementVNode("text",{class:"copy sk-transparent sk-text-0-0000-522 sk-text"},"复制")]),e.createElementVNode("view",{class:"item sk-transparent sk-text-0-0000-353 sk-text"},"下单时间: 2023-04-11 23:22:50")])]),e.createElementVNode("view",{class:"toolbar",style:{"padding-bottom":"34px"}},[e.createElementVNode("view",{class:"button primary sk-transparent sk-text-31-9444-411 sk-text",style:{"background-position-x":"50%"}},"再次购买")])])])}],["__scopeId","data-v-31eaea46"]]),ei=e=>U({method:"GET",url:"/pay/mock",data:e}),ti=e.defineComponent({__name:"detail",props:{id:{}},setup(t){const{safeAreaInsets:a}=uni.getSystemInfoSync(),{guessRef:o,onScrolltolower:n}=X(),s=e.ref(),i=e.ref(["商品无货","不想要了","商品信息填错了","地址信息填写错误","商品降价","其它"]),r=e.ref(""),l=t,u=getCurrentPages(),d=e.ref(),m=async()=>{const e=await(t=l.id,U({method:"GET",url:`/member/order/${t}`}));var t;d.value=e.result,[Qs.DaiShouHuo,Qs.DaiPingJia,Qs.YiWanCheng].includes(d.value.orderState)&&g()},p=e.ref([]),g=async()=>{const e=await(t=l.id,U({method:"GET",url:`/member/order/${t}/logistics`}));var t;p.value=e.result.list};h((()=>{m()}));const f=()=>{d.value.orderState=Qs.YiQuXiao},y=async()=>{await ei({orderId:l.id}),uni.redirectTo({url:`/pagesOrder/payment/payment?id=${l.id}`})},v=async()=>{},k=()=>{uni.showModal({content:"为保障您的权益,请收到货并确认无误后,再确认收货",confirmColor:"#27BA9B",success:async e=>{if(e.confirm){const e=await Hs(l.id);d.value=e.result}}})},_=()=>{uni.showModal({content:"是否删除订单",confirmColor:"#27BA9B",success:async e=>{e.confirm&&(await Gs({ids:[l.id]}),uni.redirectTo({url:"/pagesOrder/list/list"}))}})},w=async()=>{var e;const t=await(a=l.id,o={cancelReason:r.value},U({method:"PUT",url:`/member/order/${a}/cancel`,data:o}));var a,o;d.value=t.result,null==(e=s.value)||e.close(),uni.showToast({icon:"none",title:"订单取消成功"})};return(t,m)=>{var h,g,b;const N=c(e.resolveDynamicComponent("uni-countdown"),Ys),E=c(e.resolveDynamicComponent("XtxGuess"),Q),x=c(e.resolveDynamicComponent("uni-popup"),Fe);return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("view",{class:"navbar",style:e.normalizeStyle({paddingTop:(null==(h=e.unref(a))?void 0:h.top)+"px"})},[e.createElementVNode("view",{class:"wrap"},[e.unref(u).length>1?(e.openBlock(),e.createElementBlock("navigator",{key:0,"open-type":"navigateBack",class:"back icon-left"})):(e.openBlock(),e.createElementBlock("navigator",{key:1,url:"/pages/index/index","open-type":"switchTab",class:"back icon-home"})),e.createElementVNode("view",{class:"title"},"订单详情")])],4),e.createElementVNode("scroll-view",{"enable-back-to-top":"","scroll-y":"",class:"viewport",id:"scroller",onScrolltolower:m[2]||(m[2]=(...t)=>e.unref(n)&&e.unref(n)(...t))},[d.value?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createElementVNode("view",{class:"overview",style:e.normalizeStyle({paddingTop:e.unref(a).top+20+"px"})},[d.value.orderState===e.unref(Qs).DaiFuKuan?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createElementVNode("view",{class:"status icon-clock"},"等待付款"),e.createElementVNode("view",{class:"tips"},[e.createElementVNode("text",{class:"money"},"应付金额: ¥ "+e.toDisplayString(d.value.payMoney),1),e.createElementVNode("text",{class:"time"},"支付剩余"),e.createVNode(N,{second:d.value.countdown,color:"#fff","splitor-color":"#fff","show-day":!1,"show-colon":!1,onTimeup:f},null,8,["second"])]),e.createElementVNode("view",{class:"button",onClick:y},"去支付")],64)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createElementVNode("view",{class:"status"},e.toDisplayString(e.unref(Xs)[d.value.orderState].text),1),e.createElementVNode("view",{class:"button-group"},[e.createElementVNode("navigator",{class:"button",url:`/pagesOrder/create/create?orderId=${l.id}`,"hover-class":"none"}," 再次购买 ",8,["url"]),e.unref(false)&&d.value.orderState==e.unref(Qs).DaiFaHuo?(e.openBlock(),e.createElementBlock("view",{key:0,onClick:v,class:"button"}," 模拟发货 ")):e.createCommentVNode("",!0),d.value.orderState===e.unref(Qs).DaiShouHuo?(e.openBlock(),e.createElementBlock("view",{key:1,onClick:k,class:"button"}," 确认收货 ")):e.createCommentVNode("",!0)])],64))],4),e.createElementVNode("view",{class:"shipment"},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(p.value,(t=>(e.openBlock(),e.createElementBlock("view",{key:t.id,class:"item"},[e.createElementVNode("view",{class:"message"},e.toDisplayString(t.text),1),e.createElementVNode("view",{class:"date"},e.toDisplayString(t.time),1)])))),128)),e.createElementVNode("view",{class:"locate"},[e.createElementVNode("view",{class:"user"},e.toDisplayString(d.value.receiverContact)+" "+e.toDisplayString(d.value.receiverMobile),1),e.createElementVNode("view",{class:"address"},e.toDisplayString(d.value.receiverAddress),1)])]),e.createElementVNode("view",{class:"goods"},[e.createElementVNode("view",{class:"item"},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.value.skus,(t=>(e.openBlock(),e.createElementBlock("navigator",{class:"navigator",key:t.id,url:`/pages/goods/goods?id=${t.spuId}`,"hover-class":"none"},[e.createElementVNode("image",{class:"cover",src:t.image},null,8,["src"]),e.createElementVNode("view",{class:"meta"},[e.createElementVNode("view",{class:"name ellipsis"},e.toDisplayString(t.name),1),e.createElementVNode("view",{class:"type"},e.toDisplayString(t.attrsText),1),e.createElementVNode("view",{class:"price"},[e.createElementVNode("view",{class:"actual"},[e.createElementVNode("text",{class:"symbol"},"¥"),e.createElementVNode("text",null,e.toDisplayString(t.curPrice),1)])]),e.createElementVNode("view",{class:"quantity"},"x"+e.toDisplayString(t.quantity),1)])],8,["url"])))),128)),d.value.orderState===e.unref(Qs).DaiPingJia?(e.openBlock(),e.createElementBlock("view",{key:0,class:"action"},[e.createElementVNode("view",{class:"button primary"},"申请售后"),e.createElementVNode("navigator",{url:"",class:"button"}," 去评价 ")])):e.createCommentVNode("",!0)]),e.createElementVNode("view",{class:"total"},[e.createElementVNode("view",{class:"row"},[e.createElementVNode("view",{class:"text"},"商品总价: "),e.createElementVNode("view",{class:"symbol"},e.toDisplayString(d.value.totalMoney),1)]),e.createElementVNode("view",{class:"row"},[e.createElementVNode("view",{class:"text"},"运费: "),e.createElementVNode("view",{class:"symbol"},e.toDisplayString(d.value.postFee),1)]),e.createElementVNode("view",{class:"row"},[e.createElementVNode("view",{class:"text"},"应付金额: "),e.createElementVNode("view",{class:"symbol primary"},e.toDisplayString(d.value.payMoney),1)])])]),e.createElementVNode("view",{class:"detail"},[e.createElementVNode("view",{class:"title"},"订单信息"),e.createElementVNode("view",{class:"row"},[e.createElementVNode("view",{class:"item"},[e.createTextVNode(" 订单编号: "+e.toDisplayString(l.id)+" ",1),e.createElementVNode("text",{class:"copy",onClick:m[0]||(m[0]=e=>{return t=l.id,void uni.setClipboardData({data:t});var t})},"复制")]),e.createElementVNode("view",{class:"item"},"下单时间: "+e.toDisplayString(d.value.createTime),1)])]),e.createVNode(E,{ref_key:"guessRef",ref:o},null,512),e.createElementVNode("view",{class:"toolbar-height",style:e.normalizeStyle({paddingBottom:(null==(g=e.unref(a))?void 0:g.bottom)+"px"})},null,4),e.createElementVNode("view",{class:"toolbar",style:e.normalizeStyle({paddingBottom:(null==(b=e.unref(a))?void 0:b.bottom)+"px"})},[d.value.orderState===e.unref(Qs).DaiFuKuan?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createElementVNode("view",{class:"button primary",onClick:y}," 去支付 "),e.createElementVNode("view",{class:"button",onClick:m[1]||(m[1]=e=>{var t,a;return null==(a=null==(t=s.value)?void 0:t.open)?void 0:a.call(t)})}," 取消订单 ")],64)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createElementVNode("navigator",{class:"button secondary",url:`/pagesOrder/create/create?orderId=${l.id}`,"hover-class":"none"}," 再次购买 ",8,["url"]),d.value.orderState===e.unref(Qs).DaiShouHuo?(e.openBlock(),e.createElementBlock("view",{key:0,class:"button primary",onClick:k}," 确认收货 ")):e.createCommentVNode("",!0),d.value.orderState===e.unref(Qs).DaiPingJia?(e.openBlock(),e.createElementBlock("view",{key:1,class:"button"}," 去评价 ")):e.createCommentVNode("",!0),d.value.orderState>=e.unref(Qs).DaiPingJia?(e.openBlock(),e.createElementBlock("view",{key:2,class:"button delete",onClick:_}," 删除订单 ")):e.createCommentVNode("",!0)],64))],4)],64)):(e.openBlock(),e.createBlock(Zs,{key:1}))],32),e.createVNode(x,{ref_key:"popup",ref:s,type:"bottom","background-color":"#fff"},{default:e.withCtx((()=>[e.createElementVNode("view",{class:"popup-root"},[e.createElementVNode("view",{class:"title"},"订单取消"),e.createElementVNode("view",{class:"description"},[e.createElementVNode("view",{class:"tips"},"请选择取消订单的原因:"),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(i.value,(t=>(e.openBlock(),e.createElementBlock("view",{class:"cell",key:t,onClick:e=>r.value=t},[e.createElementVNode("text",{class:"text"},e.toDisplayString(t),1),e.createElementVNode("text",{class:e.normalizeClass(["icon",{checked:t===r.value}])},null,2)],8,["onClick"])))),128))]),e.createElementVNode("view",{class:"footer"},[e.createElementVNode("view",{class:"button",onClick:m[3]||(m[3]=e=>{var t,a;return null==(a=null==(t=s.value)?void 0:t.close)?void 0:a.call(t)})},"取消"),e.createElementVNode("view",{class:"button primary",onClick:w},"确认")])])])),_:1},512)],64)}}}),ai=e.defineComponent({__name:"payment",props:{id:{}},setup(t){const a=t,{guessRef:o,onScrolltolower:n}=X();return(t,s)=>{const i=c(e.resolveDynamicComponent("XtxGuess"),Q);return e.openBlock(),e.createElementBlock("scroll-view",{"enable-back-to-top":"",class:"viewport","scroll-y":"",onScrolltolower:s[0]||(s[0]=(...t)=>e.unref(n)&&e.unref(n)(...t))},[e.createElementVNode("view",{class:"overview"},[e.createElementVNode("view",{class:"status icon-checked"},"支付成功"),e.createElementVNode("view",{class:"buttons"},[e.createElementVNode("navigator",{"hover-class":"none",class:"button navigator",url:"/pages/index/index","open-type":"switchTab"}," 返回首页 "),e.createElementVNode("navigator",{"hover-class":"none",class:"button navigator",url:`/pagesOrder/detail/detail?id=${a.id}`,"open-type":"redirect"}," 查看订单 ",8,["url"])])]),e.createVNode(i,{ref_key:"guessRef",ref:o},null,512)],32)}}}),oi=a(e.defineComponent({__name:"OrderList",props:{orderState:{}},setup(t){const{safeAreaInsets:a}=uni.getSystemInfoSync(),o={page:1,pageSize:5,orderState:t.orderState},n=e.ref([]),s=e.ref(!1),i=async()=>{if(s.value)return;if(!0===r.value)return uni.showToast({icon:"none",title:"没有更多数据~"});s.value=!0;const e=await(t=o,U({method:"GET",url:"/member/order",data:t}));var t;s.value=!1,n.value.push(...e.result.items),o.page<e.result.pages?o.page++:r.value=!0};e.onMounted((()=>{i()}));const r=e.ref(!1),l=e.ref(!1),c=async()=>{l.value=!0,o.page=1,n.value=[],r.value=!1,await i(),l.value=!1};return(t,o)=>{var s;return e.openBlock(),e.createElementBlock("scroll-view",{"enable-back-to-top":"","scroll-y":"",class:"orders","refresher-enabled":"","refresher-triggered":l.value,onRefresherrefresh:c,onScrolltolower:i},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.value,(t=>(e.openBlock(),e.createElementBlock("view",{class:"card",key:t.id},[e.createElementVNode("view",{class:"status"},[e.createElementVNode("text",{class:"date"},e.toDisplayString(t.createTime),1),e.createElementVNode("text",null,e.toDisplayString(e.unref(Xs)[t.orderState].text),1),t.orderState>=e.unref(Qs).DaiPingJia?(e.openBlock(),e.createElementBlock("text",{key:0,class:"icon-delete",onClick:e=>{return a=t.id,void uni.showModal({content:"你确定要删除该订单?",confirmColor:"#27BA9B",success:async e=>{if(e.confirm){await Gs({ids:[a]});const e=n.value.findIndex((e=>e.id===a));n.value.splice(e,1)}}});var a}},null,8,["onClick"])):e.createCommentVNode("",!0)]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.skus,(a=>(e.openBlock(),e.createElementBlock("navigator",{key:a.id,class:"goods",url:`/pagesOrder/detail/detail?id=${t.id}`,"hover-class":"none"},[e.createElementVNode("view",{class:"cover"},[e.createElementVNode("image",{class:"image",mode:"aspectFit",src:a.image},null,8,["src"])]),e.createElementVNode("view",{class:"meta"},[e.createElementVNode("view",{class:"name ellipsis"},e.toDisplayString(a.name),1),e.createElementVNode("view",{class:"type"},e.toDisplayString(a.attrsText),1)])],8,["url"])))),128)),e.createElementVNode("view",{class:"payment"},[e.createElementVNode("text",{class:"quantity"},"共"+e.toDisplayString(t.totalNum)+"件商品",1),e.createElementVNode("text",null,"实付"),e.createElementVNode("text",{class:"amount"},[e.createElementVNode("text",{class:"symbol"},"¥"),e.createTextVNode(e.toDisplayString(t.payMoney),1)])]),e.createElementVNode("view",{class:"action"},[t.orderState===e.unref(Qs).DaiFuKuan?(e.openBlock(),e.createElementBlock("view",{key:0,class:"button primary",onClick:e=>(async e=>{await ei({orderId:e}),uni.showToast({title:"支付成功"}),n.value.find((t=>t.id===e)).orderState=Qs.DaiFaHuo})(t.id)},"去支付",8,["onClick"])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createElementVNode("navigator",{class:"button secondary",url:`/pagesOrder/create/create?orderId=${t.id}`,"hover-class":"none"}," 再次购买 ",8,["url"]),t.orderState===e.unref(Qs).DaiShouHuo?(e.openBlock(),e.createElementBlock("view",{key:0,class:"button primary",onClick:e=>{return a=t.id,void uni.showModal({content:"为保障您的权益,请收到货并确认无误后,再确认收货",confirmColor:"#27BA9B",success:async e=>{e.confirm&&(await Hs(a),uni.showToast({icon:"success",title:"确认收货成功"}),n.value.find((e=>e.id===a)).orderState=Qs.DaiPingJia)}});var a}}," 确认收货 ",8,["onClick"])):e.createCommentVNode("",!0)],64))])])))),128)),e.createElementVNode("view",{class:"loading-text",style:e.normalizeStyle({paddingBottom:(null==(s=e.unref(a))?void 0:s.bottom)+"px"})},e.toDisplayString(r.value?"没有更多数据~":"正在加载..."),5)],40,["refresher-triggered"])}}}),[["__scopeId","data-v-57ac1114"]]),ni=e.defineComponent({__name:"list",props:{type:{}},setup(t){const a=t,o=e.ref([{orderState:0,title:"全部",isRender:!1},{orderState:1,title:"待付款",isRender:!1},{orderState:2,title:"待发货",isRender:!1},{orderState:3,title:"待收货",isRender:!1},{orderState:4,title:"待评价",isRender:!1}]),n=e.ref(o.value.findIndex((e=>e.orderState===Number(a.type))));return o.value[n.value].isRender=!0,(t,a)=>(e.openBlock(),e.createElementBlock("view",{class:"viewport"},[e.createElementVNode("view",{class:"tabs"},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.value,((t,a)=>(e.openBlock(),e.createElementBlock("text",{class:"item",key:t.title,onClick:()=>{n.value=a,t.isRender=!0}},e.toDisplayString(t.title),9,["onClick"])))),128)),e.createElementVNode("view",{class:"cursor",style:e.normalizeStyle({left:20*n.value+"%"})},null,4)]),e.createElementVNode("swiper",{class:"swiper",current:n.value,onChange:a[0]||(a[0]=e=>n.value=e.detail.current)},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.value,(t=>(e.openBlock(),e.createElementBlock("swiper-item",{key:t.title},[t.isRender?(e.openBlock(),e.createBlock(oi,{key:0,"order-state":t.orderState},null,8,["order-state"])):e.createCommentVNode("",!0)])))),128))],40,["current"])]))}});__definePage("pages/index/index",s),__definePage("pages/category/category",j),__definePage("pages/cart/cart",te),__definePage("pages/cart/cart2",ae),__definePage("pages/my/my",oe),__definePage("pages/login/login",xe),__definePage("pages/hot/hot",Ve),__definePage("pages/goods/goods",$e),__definePage("pages/inbound/inbound",Un),__definePage("pages/inbound/logList",zn),__definePage("pages/weigh/weigh",ns),__definePage("pages/weigh/logList",ss),__definePage("pages/outbound/outbound",is),__definePage("pages/outbound/logList",rs),__definePage("pages/warehouseScan/warehouseScan",cs),__definePage("pages/warehouseScan/logList",us),__definePage("pages/printer/printer",ys),__definePage("pages/printer/logList",vs),__definePage("pages/scanLotno/scanLotno",Cs),__definePage("pages/scanLotno/logList",Vs),__definePage("pages/scanLotno/waybillsList",Bs),__definePage("pages/waybillNo/waybillNo",Ts),__definePage("pages/waybillNo/logList",Ps),__definePage("pages/pickup/waybillPickUpOrder",Ls),__definePage("pages/pickup/waybillPickUpDetails",As),__definePage("pages/pickup/waybillPickUpDetail",Os),__definePage("pages/waybillDeliveryOrder/waybillDeliveryOrder",Rs),__definePage("pagesMember/settings/settings",$s),__definePage("pagesMember/profile/profile",Us),__definePage("pagesMember/address/address",js),__definePage("pagesMember/address-form/address-form",qs),__definePage("pagesOrder/create/create",Js),__definePage("pagesOrder/detail/detail",ti),__definePage("pagesOrder/payment/payment",ai),__definePage("pagesOrder/list/list",ni);const si=e.defineComponent({__name:"App",setup:e=>(p((()=>{l("log","at App.vue:5","App Launch")})),d((()=>{l("log","at App.vue:8","App Show")})),m((()=>{l("log","at App.vue:11","App Hide")})),()=>{})});const{app:ii,Vuex:ri,Pinia:li}=function(){const t=e.createVueApp(si);return t.use(F),{app:t}}();uni.Vuex=ri,uni.Pinia=li,ii.provide("__globalStyles",__uniConfig.styles),ii._component.mpType="app",ii._component.render=()=>{},ii.mount("#app")}(Vue);
|