From 055405bb172900b2887c35d921736643cccf16d9 Mon Sep 17 00:00:00 2001 From: weipengfei <2187978347@qq.com> Date: Sat, 6 Apr 2024 18:09:02 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- build/assets/index-B6_QV493.js | 1 + build/assets/index-BMa-TBcV.js | 1 - build/assets/index-BrCjw-63.css | 1 - build/assets/{index-CYe0fsqn.css => index-C1LWyo4d.css} | 2 +- build/assets/{index-Kpqof_vT.js => index-C5vLbzKJ.js} | 2 +- build/assets/index-C__UFXHW.css | 1 + build/assets/index-CynSMInU.js | 1 - build/assets/{index-DuksirLs.js => index-D67ocowL.js} | 2 +- build/assets/index-D8e3NTsi.js | 1 + .../index-Cyl0NOj8.js => build/assets/index-DRLE3jIL.js | 2 +- build/assets/{index-B2__Qpg4.js => index-RWPP8R9O.js} | 4 ++-- build/assets/{indexList-iy3NgRSb.js => indexList-DfKrIu-v.js} | 2 +- build/assets/{padding-DEl9__MX.js => padding-O48_hooA.js} | 2 +- build/assets/{pay-Cgx_q9r2.js => pay-B0gj_XLh.js} | 2 +- build/assets/{shop-BcSslevs.js => shop-CGwgqzwI.js} | 2 +- build/index.html | 2 +- dist/assets/index-5_UKU06R.js | 1 - dist/assets/index-B4pghAyb.js | 1 + dist/assets/index-B6NJAtmD.js | 1 + dist/assets/{index-C83qaAAW.js => index-BSmo2Z__.js} | 2 +- dist/assets/index-BrCjw-63.css | 1 - dist/assets/{index-NZ184J6H.js => index-C-KLbSdz.js} | 2 +- dist/assets/{index-CYe0fsqn.css => index-C1LWyo4d.css} | 2 +- dist/assets/index-C__UFXHW.css | 1 + dist/assets/{index-VTp4Jfxm.js => index-D5pSuA5u.js} | 4 ++-- dist/assets/index-DPgzG1u8.js | 1 - .../assets/index-BS5vZtdS.js => dist/assets/index-y31P2_LV.js | 2 +- dist/assets/{indexList-DsYS9nsj.js => indexList-Czsm3GIz.js} | 2 +- dist/assets/{padding-DEByEsBs.js => padding-UtAMRAsR.js} | 2 +- dist/assets/{pay-wwG0X046.js => pay-5Jv4r2r0.js} | 2 +- dist/assets/{shop-DNaPVhN4.js => shop-DjLHIKgd.js} | 2 +- dist/index.html | 2 +- 32 files changed, 28 insertions(+), 28 deletions(-) create mode 100644 build/assets/index-B6_QV493.js delete mode 100644 build/assets/index-BMa-TBcV.js delete mode 100644 build/assets/index-BrCjw-63.css rename build/assets/{index-CYe0fsqn.css => index-C1LWyo4d.css} (79%) rename build/assets/{index-Kpqof_vT.js => index-C5vLbzKJ.js} (95%) create mode 100644 build/assets/index-C__UFXHW.css delete mode 100644 build/assets/index-CynSMInU.js rename build/assets/{index-DuksirLs.js => index-D67ocowL.js} (96%) create mode 100644 build/assets/index-D8e3NTsi.js rename dist/assets/index-Cyl0NOj8.js => build/assets/index-DRLE3jIL.js (92%) rename build/assets/{index-B2__Qpg4.js => index-RWPP8R9O.js} (99%) rename build/assets/{indexList-iy3NgRSb.js => indexList-DfKrIu-v.js} (96%) rename build/assets/{padding-DEl9__MX.js => padding-O48_hooA.js} (65%) rename build/assets/{pay-Cgx_q9r2.js => pay-B0gj_XLh.js} (98%) rename build/assets/{shop-BcSslevs.js => shop-CGwgqzwI.js} (75%) delete mode 100644 dist/assets/index-5_UKU06R.js create mode 100644 dist/assets/index-B4pghAyb.js create mode 100644 dist/assets/index-B6NJAtmD.js rename dist/assets/{index-C83qaAAW.js => index-BSmo2Z__.js} (96%) delete mode 100644 dist/assets/index-BrCjw-63.css rename dist/assets/{index-NZ184J6H.js => index-C-KLbSdz.js} (95%) rename dist/assets/{index-CYe0fsqn.css => index-C1LWyo4d.css} (79%) create mode 100644 dist/assets/index-C__UFXHW.css rename dist/assets/{index-VTp4Jfxm.js => index-D5pSuA5u.js} (99%) delete mode 100644 dist/assets/index-DPgzG1u8.js rename build/assets/index-BS5vZtdS.js => dist/assets/index-y31P2_LV.js (92%) rename dist/assets/{indexList-DsYS9nsj.js => indexList-Czsm3GIz.js} (96%) rename dist/assets/{padding-DEByEsBs.js => padding-UtAMRAsR.js} (65%) rename dist/assets/{pay-wwG0X046.js => pay-5Jv4r2r0.js} (98%) rename dist/assets/{shop-DNaPVhN4.js => shop-DjLHIKgd.js} (75%) diff --git a/build/assets/index-B6_QV493.js b/build/assets/index-B6_QV493.js new file mode 100644 index 0000000..0617e7e --- /dev/null +++ b/build/assets/index-B6_QV493.js @@ -0,0 +1 @@ +import{c as W,a as X,b as B,d as Y,p as Z,o as ee}from"./pay-B0gj_XLh.js";import{_ as U,r as u,a as _,o as y,c as q,w as k,b as e,d as n,e as m,t as V,f as A,F as O,g as M,h as j,i as te,j as G,k as J,p as K,l as T,m as oe,n as se,u as ae}from"./index-RWPP8R9O.js";import{p as le}from"./padding-O48_hooA.js";import{g as ne,s as ce}from"./shop-CGwgqzwI.js";const ie={class:"price"},re={class:"flex"},ue={style:{margin:"10px","padding-bottom":"40px"}},de={style:{color:"#f5222d","font-weight":"bold","margin-left":"1rem"}},_e={class:"dialog-footer"},pe={__name:"price",emits:["submit"],setup(w,{expose:x,emit:b}){const s=u(!1),l=u(0),o=(g,v=0)=>{s.value=g,l.value=v},c=u({nowPrice:"",percentage:""}),p=g=>{c.value.percentage=(g/l.value*100).toFixed(2)},$=g=>{c.value.nowPrice=(l.value*g/100).toFixed(2)},f=b,L=()=>{f("submit",c.value.nowPrice),s.value=!1};return x({show:o}),(g,v)=>{const P=_("el-input"),h=_("el-button"),I=_("el-dialog");return y(),q(I,{modelValue:s.value,"onUpdate:modelValue":v[2]||(v[2]=r=>s.value=r),title:"订单改价",width:"650"},{footer:k(()=>[e("div",_e,[n(h,{class:"ok-btn",type:"primary",onClick:L},{default:k(()=>[m(" 确定 ")]),_:1})])]),default:k(()=>[e("div",ie,[e("div",re,[n(P,{style:{flex:"3",margin:"10px",height:"2.5rem"},modelValue:c.value.nowPrice,"onUpdate:modelValue":v[0]||(v[0]=r=>c.value.nowPrice=r),placeholder:"请输入改价后的价格",onInput:p},{suffix:k(()=>[m("元")]),_:1},8,["modelValue"]),n(P,{style:{flex:"2",margin:"10px",height:"2.5rem"},modelValue:c.value.percentage,"onUpdate:modelValue":v[1]||(v[1]=r=>c.value.percentage=r),placeholder:"请输入比例",onInput:$},{suffix:k(()=>[m("%")]),_:1},8,["modelValue"])]),e("div",ue,[m("改价后金额: "),e("span",de,"¥"+V(c.value.nowPrice||l.value||" - - "),1)])])]),_:1},8,["modelValue"])}}},ve=U(pe,[["__scopeId","data-v-518d9bc5"]]),me={class:"my-order"},he={class:"header-nav"},fe={class:"nav-item"},ge={class:"order-list"},ye={class:"order-item-info"},ke={class:"order-item-title"},be={class:"title"},$e=["onClick"],we={class:"order-item-sku"},xe=["onClick"],Ie={class:"order-item-price"},Ce={class:"order-footer"},Ve={class:"order-total"},Ae={class:"price"},Pe={class:"total-item"},Se={style:{"font-size":"1.4rem"}},Le={class:"total-item"},Fe={class:"update-price"},De={class:"order-btn"},Re={__name:"order",emits:["goPay","editAttr"],setup(w,{expose:x,emit:b}){const s=u([]),l=u(0),o=u(0),c=()=>{let a=[];s.value.map(t=>{a.push(t.cart_id)}),a.length!=0&&$(a)},p=a=>{s.value=s.value.filter(t=>t.cart_id!=a),$([a])},$=a=>{W({cart_id:a}).then(t=>{console.log(t),f()})},f=()=>{l.value=0,o.value=0,X({source:300}).then(a=>{var t,i;((i=(t=a.data)==null?void 0:t.list)==null?void 0:i.length)>0?(s.value=a.data.list[0].list,s.value.forEach(d=>{l.value+=d.productAttr.price*d.cart_num})):s.value=[]})};f();const L=b,g=()=>{L("goPay")},v=(a,t)=>{B(a.cart_id,{cart_num:a.cart_num}).then(i=>{l.value=0,s.value.forEach(d=>{l.value+=d.productAttr.price*d.cart_num})})},P=a=>{L("editPupop",a)},h=(a,t)=>{B(a,t).then(i=>{f()})},I=a=>{o.value=l.value-a,l.value=+a};u(0);const r=u(null),C=()=>{r.value.show(!0,l.value)};return x({getList:f,list:s,editItem:h,discounts:o,allPrice:l}),(a,t)=>{const i=_("Delete"),d=_("el-icon"),D=_("el-empty"),R=_("el-image"),F=_("ArrowDown"),E=_("el-input-number"),N=_("el-button");return y(),A("div",me,[e("div",he,[e("div",fe,[m(" 已选购 "),e("span",null,V(s.value.length),1),m(" 件 ")]),e("div",{class:"nav-item-clear",onClick:c},[n(d,null,{default:k(()=>[n(i)]),_:1}),m("清空 ")])]),e("div",ge,[s.value.length==0?(y(),q(D,{key:0,description:"请点击右侧添加商品"})):(y(!0),A(O,{key:1},M(s.value,(S,Q)=>(y(),A("div",{class:"order-item",key:Q},[n(R,{loading:"lazy",class:"order-item-img",src:S.productAttr&&S.productAttr.image||S.product.image},null,8,["src"]),e("div",ye,[e("div",ke,[e("div",be,V(S.spu.store_name),1),e("div",{class:"delete",onClick:z=>p(S.cart_id)},"删除",8,$e)]),e("div",we,[e("span",{style:{display:"flex","align-items":"center"},onClick:z=>P(S)},[m("商品规格: "+V(S.productAttr.sku||"默认规格"),1),n(d,{size:"16",style:{"margin-left":"0.2rem"}},{default:k(()=>[n(F)]),_:1})],8,xe)]),e("div",Ie,[e("div",null,[m(" ¥"),e("span",null,V(S.productAttr.price),1)]),e("div",null,[n(E,{modelValue:S.cart_num,"onUpdate:modelValue":z=>S.cart_num=z,"step-strictly":"",min:1,step:1,onChange:z=>v(S)},null,8,["modelValue","onUpdate:modelValue","onChange"])])])])]))),128))]),e("div",Ce,[e("div",Ve,[e("div",Ae,[e("div",Pe,[m(" 实付: "),e("span",null,[m("¥"),e("span",Se,V(l.value.toFixed(2)),1)])]),e("div",Le,[m(" 优惠: "),e("span",null,[m("¥"),e("span",null,V(o.value.toFixed(2)),1)])])]),e("div",Fe,[n(N,{class:"btn",type:"primary",onClick:C},{default:k(()=>[m("改价")]),_:1})])]),e("div",De,[n(N,{class:"btn",type:"primary",onClick:g,disabled:s.value.length==0},{default:k(()=>[m("立即结账")]),_:1},8,["disabled"])])]),n(ve,{ref_key:"priceRef",ref:r,onSubmit:I},null,512)])}}},ze=U(Re,[["__scopeId","data-v-19078e04"]]),H=w=>(K("data-v-b06e04b9"),w=w(),T(),w),Ue={class:"my-order"},Ee={class:"header-nav"},Ne=H(()=>e("div",{class:"nav-item-label"},"搜索",-1)),qe={class:"nav-item-input"},Oe={class:"shop-list","infinite-scroll-distance":"100","infinite-scroll-delay":"500",style:{overflow:"auto"}},Me=["onClick"],Be={class:"shop-name"},je={class:"shop-price"},Ge={key:0,class:"no-stock"},Je=H(()=>e("div",null,[e("span",null,"暂无"),e("span",null,"库存")],-1)),Ke=[Je],Te={__name:"shop",props:{storeList:{type:Array,default:()=>[]}},emits:["getStoreList","changeItem","loadMore"],setup(w,{expose:x,emit:b}){const s=b,l=u(""),o=()=>{s("loadMore",{bar_code:l.value})},c=$=>{s("changeItem",$)},p=()=>{s("getStoreList",{bar_code:l.value})};return x({bar_code:l}),($,f)=>{const L=_("el-input"),g=_("Search"),v=_("el-icon"),P=_("el-button"),h=_("el-image"),I=_("el-space"),r=j("infinite-scroll");return y(),A("div",Ue,[e("div",Ee,[Ne,e("div",qe,[n(L,{modelValue:l.value,"onUpdate:modelValue":f[0]||(f[0]=C=>l.value=C),placeholder:"搜索商品名称/ID/唯一码或点击聚焦扫码",clearable:"",onKeyup:te(p,["enter"]),onClear:p},null,8,["modelValue"])]),e("div",{class:"nav-item-btn",onClick:p},[n(P,{class:"btn",type:"primary"},{default:k(()=>[n(v,null,{default:k(()=>[n(g)]),_:1})]),_:1})])]),G((y(),A("div",Oe,[n(I,{wrap:"",size:20},{default:k(()=>[(y(!0),A(O,null,M(w.storeList,(C,a)=>(y(),A("div",{class:"shop-item",key:a,onClick:t=>c(C)},[n(h,{loading:"lazy",src:C.image},null,8,["src"]),e("div",Be,V(C.store_name),1),e("div",je,[m(" ¥"),e("span",null,V(C.price),1)]),C.stock==0?(y(),A("div",Ge,Ke)):J("",!0)],8,Me))),128))]),_:1})])),[[r,o]])])}}},He=U(Te,[["__scopeId","data-v-b06e04b9"]]),Qe=w=>(K("data-v-9ba07525"),w=w(),T(),w),We={class:"shop"},Xe={key:0,class:"shop-info"},Ye={class:"shop-info-left"},Ze={class:"shop-info-right"},et={class:"shop-info-right-top"},tt={class:"shop-info-right-center"},ot={class:"shop-info-right-price"},st={class:"shop-sku"},at=Qe(()=>e("div",{class:"title"},"产品",-1)),lt={class:"sku"},nt=["onClick"],ct={class:"dialog-footer"},it={__name:"pupop",emits:["changeItem"],setup(w,{expose:x,emit:b}){const s=u(!1),l=h=>{s.value=h},o=u({}),c=u(null),p=u(!1),$=u("add"),f=u({}),L=(h,I="add")=>{$.value=I,I=="add"?(o.value=h,c.value=h.attr[0]):(p.value=!0,f.value=h,ne(h.product_id).then(r=>{r.data.attrValue=JSON.parse(JSON.stringify(r.data.attr)),r.data.attr=Object.keys(r.data.sku),o.value=r.data,c.value=r.data.attr[0],p.value=!1}).catch(r=>{p.value=!1}))},g=b,v=()=>{$.value=="add"?g("changeItem",o.value,c.value):g("editItem",f.value.cart_id,{cart_num:f.value.cart_num,product_attr_unique:o.value.sku[c.value].unique}),s.value=!1},P=h=>{c.value=h};return x({show:l,setForm:L}),(h,I)=>{const r=_("el-image"),C=_("el-space"),a=_("el-button"),t=_("el-dialog"),i=j("loading");return y(),q(t,{modelValue:s.value,"onUpdate:modelValue":I[0]||(I[0]=d=>s.value=d),title:"商品规格",width:"650"},oe({default:k(()=>{var d,D,R;return[G((y(),A("div",We,[o.value.sku?(y(),A("div",Xe,[e("div",Ye,[n(r,{loading:"lazy",src:((d=o.value.sku[c.value])==null?void 0:d.image)||o.value.image},null,8,["src"])]),e("div",Ze,[e("div",et,V(o.value.store_name),1),e("div",tt,"库存"+V(((D=o.value.sku[c.value])==null?void 0:D.stock)||0),1),e("div",ot,[m("¥"),e("span",null,V(((R=o.value.sku[c.value])==null?void 0:R.price)||o.value.price),1)])])])):J("",!0),e("div",st,[at,e("div",lt,[n(C,{wrap:"",size:20},{default:k(()=>[(y(!0),A(O,null,M(o.value.attr,(F,E)=>(y(),A("div",{class:se(["sku-item",{"sku-item_active":c.value==F}]),onClick:N=>P(F),key:E},V(F||"默认规格"),11,nt))),128))]),_:1})])])])),[[i,p.value]])]}),_:2},[$.value!="add"&&o.value.attr&&o.value.attr.length==1?void 0:{name:"footer",fn:k(()=>[e("div",ct,[n(a,{class:"ok-btn",type:"primary",onClick:v},{default:k(()=>[m(" 确定 ")]),_:1})])]),key:"0"}]),1032,["modelValue"])}}},rt=U(it,[["__scopeId","data-v-9ba07525"]]),ut={class:"my-card"},mt={__name:"index",setup(w){const x=u(null),b=u(null),s=u(null),l=u(null),o=u([]),c=ae(),p=u({page:0,limit:30}),$=t=>{p.value={source:300,...p.value,...t},t.bar_code&&g(t.bar_code)&&(o.value=[],p.value.page=1),ce(c.userInfo.service.mer_id,p.value).then(i=>{var D,R;((R=(D=i.data)==null?void 0:D.list)==null?void 0:R.length)
{if(!o._listeners)return;let a=o._listeners.length;for(;a-- >0;)o._listeners[a](r);o._listeners=null}),this.promise.then=r=>{let a;const l=new Promise(s=>{o.subscribe(s),a=s}).then(r);return l.cancel=function(){o.unsubscribe(a)},l},t(function(a,l,s){o.reason||(o.reason=new $i(a,l,s),n(o.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const n=this._listeners.indexOf(t);n!==-1&&this._listeners.splice(n,1)}static source(){let t;return{token:new iv(function(r){t=r}),cancel:t}}}const wce=iv;function Cce(e){return function(n){return e.apply(null,n)}}function Sce(e){return Ve.isObject(e)&&e.isAxiosError===!0}const W0={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(W0).forEach(([e,t])=>{W0[t]=e});const kce=W0;function Mb(e){const t=new Bu(e),n=sb(Bu.prototype.request,t);return Ve.extend(n,Bu.prototype,t,{allOwnKeys:!0}),Ve.extend(n,t,null,{allOwnKeys:!0}),n.create=function(r){return Mb(Hl(e,r))},n}const sn=Mb(lv);sn.Axios=Bu;sn.CanceledError=$i;sn.CancelToken=wce;sn.isCancel=Sb;sn.VERSION=xb;sn.toFormData=pd;sn.AxiosError=Rt;sn.Cancel=sn.CanceledError;sn.all=function(t){return Promise.all(t)};sn.spread=Cce;sn.isAxiosError=Sce;sn.mergeConfig=Hl;sn.AxiosHeaders=or;sn.formToJSON=e=>Cb(Ve.isHTMLForm(e)?new FormData(e):e);sn.getAdapter=Eb.getAdapter;sn.HttpStatusCode=kce;sn.default=sn;const Ti=sn.create({baseURL:"https://shop.lihaink.cn/api",timeout:1e4});Ti.interceptors.request.use(e=>{const t=localStorage.getItem("Token");return t&&(e.headers["X-Token"]="Bearer "+t),e},e=>(console.error(e),Promise.reject(e)));Ti.interceptors.response.use(e=>{if((e.data.status===401||e.data.status===4e4)&&(Ms({message:e.data.message,type:"error"}),setTimeout(()=>{const t=nv();t.setUserInfo({}),t.setToken(""),Tb.push("/login")},700)),e.data.status===400)throw Ms({message:e.data.message,type:"error"}),new Error(e.data.message);return e.data},e=>{var t,n;return console.error(e),Ms({message:((n=(t=e.response)==null?void 0:t.data)==null?void 0:n.message)||e,type:"error"}),Promise.reject(e)});function Xce(e){return Ti.post("auth/login",e)}function Jce(e){return Ti.get("user",e)}function Ece(){return Ti.post("logout")}const uv=(e,t)=>{const n=e.__vccOpts||e;for(const[o,r]of t)n[o]=r;return n},xce=e=>(W4("data-v-28f3f43a"),e=e(),j4(),e),Mce={class:"my-card"},$ce={class:"card-header"},Tce=xce(()=>k("div",{class:"card-title"},"里海收银系统",-1)),Oce={class:"card-body"},Ace={class:"el-dropdown-link"},Nce={class:"info"},Rce={style:{"margin-left":"0.3rem"}},Ice={__name:"myHeader",setup(e){const t=nv(),n=P({});n.value=t.userInfo.mer_info;const o=P({});o.value=t.userInfo.service;const r=nb(),a=()=>{Ece().then(()=>{t.setUserInfo({}),t.setToken(""),r.push("/login")}).catch(()=>{Ms({message:"退出失败",type:"error"})})};return(l,s)=>{const u=Ze("el-image"),c=Ze("el-avatar"),f=Ze("arrow-down"),d=Ze("el-icon"),p=Ze("el-dropdown-item"),h=Ze("el-dropdown-menu"),m=Ze("el-dropdown");return _(),M("div",Mce,[k("div",$ce,[W(u,{style:{height:"3rem",width:"3rem"},src:"https://lihai001.oss-cn-chengdu.aliyuncs.com/def/56a52202404051428413664.png"}),Tce]),k("div",Oce,[W(m,{trigger:"hover"},{dropdown:J(()=>[W(h,null,{default:J(()=>[W(p,{onClick:a},{default:J(()=>[gt("退出登录")]),_:1})]),_:1})]),default:J(()=>[k("div",Ace,[W(c,{src:o.value.avatar,icon:"user-filled"},null,8,["src"]),k("div",Nce,[k("div",null,[gt(Te(o.value.nickname)+" ",1),k("span",Rce,"("+Te(n.value.company_name||n.value.mer_name)+")",1)]),k("div",null,Te(i(t).userInfo.account),1)]),W(d,{class:"el-icon--right"},{default:J(()=>[W(f)]),_:1})])]),_:1})])])}}},Pce=uv(Ice,[["__scopeId","data-v-28f3f43a"]]),cv=e=>(W4("data-v-60ad4a9d"),e=e(),j4(),e),Lce={class:"my-card"},Vce=cv(()=>k("div",null,"收银",-1)),Bce=cv(()=>k("div",null,"订单",-1)),zce=cv(()=>k("div",null,"商品",-1)),Hce={__name:"myAside",setup(e){const t=nb(),n=eue(),o=r=>{t.push({name:r})};return(r,a)=>{const l=Ze("Sell"),s=Ze("el-icon"),u=Ze("DataLine"),c=Ze("ShoppingBag");return _(),M("div",Lce,[k("div",{class:T(["list-item",{active:i(n).name=="home"}]),onClick:a[0]||(a[0]=f=>o("home"))},[W(s,{size:"30"},{default:J(()=>[W(l)]),_:1}),Vce],2),k("div",{class:T(["list-item",{active:i(n).name=="order"}]),onClick:a[1]||(a[1]=f=>o("order"))},[W(s,{size:"30"},{default:J(()=>[W(u)]),_:1}),Bce],2),k("div",{class:T(["list-item",{active:i(n).name=="shop"}]),onClick:a[2]||(a[2]=f=>o("shop"))},[W(s,{size:"30"},{default:J(()=>[W(c)]),_:1}),zce],2)])}}},Dce=uv(Hce,[["__scopeId","data-v-60ad4a9d"]]),Fce={class:"common-layout"},Kce={__name:"index",setup(e){return(t,n)=>{const o=Ze("el-header"),r=Ze("el-aside"),a=Ze("router-view"),l=Ze("el-main"),s=Ze("el-container");return _(),M("div",Fce,[W(s,null,{default:J(()=>[W(o,null,{default:J(()=>[W(Pce)]),_:1}),W(s,null,{default:J(()=>[W(r,{width:"100px"},{default:J(()=>[W(Dce)]),_:1}),W(l,null,{default:J(()=>[W(a,{class:"my-main"},{default:J(({Component:u})=>[W(tn,{name:"el-fade-in-linear"},{default:J(()=>[(_(),le(it(u)))]),_:2},1024)]),_:1})]),_:1})]),_:1})]),_:1})])}}},Wce=uv(Kce,[["__scopeId","data-v-b7511b8b"]]),jce=[{path:"/",name:"layout",component:Wce,redirect:"/home",children:[{path:"/home",name:"home",component:()=>Qa(()=>import("./index-BMa-TBcV.js"),__vite__mapDeps([0,1,2,3,4,5]),import.meta.url)},{path:"/order",name:"order",component:()=>Qa(()=>import("./index-CynSMInU.js"),__vite__mapDeps([6,1,2,3,7]),import.meta.url)},{path:"/orderList",name:"orderList",component:()=>Qa(()=>import("./indexList-iy3NgRSb.js"),__vite__mapDeps([8,1,2,9]),import.meta.url)},{path:"/shop",name:"shop",component:()=>Qa(()=>import("./index-Kpqof_vT.js"),__vite__mapDeps([10,4,11]),import.meta.url)}]},{path:"/login",name:"login",component:()=>Qa(()=>import("./index-DuksirLs.js"),__vite__mapDeps([12,13]),import.meta.url)},{path:"/:catchAll(.*)",name:"notFound",component:()=>Qa(()=>import("./index-BS5vZtdS.js"),__vite__mapDeps([]),import.meta.url)}],$b=Zie({history:Mie(),routes:jce});$b.beforeEach((e,t,n)=>{const o=nv();e.name!=="login"&&!o.Token?n({name:"login"}):n()});const Tb=$b,Oi=Tg(J5);for(const[e,t]of Object.entries(xL))Oi.component(e,t);const qce=nue();Oi.use(Tb);Oi.use(qce);Oi.use(qse,{locale:Use});Oi.mount("#app");export{Jce as A,Ms as E,Ke as F,uv as _,Ze as a,k as b,le as c,W as d,gt as e,M as f,ht as g,kc as h,Mt as i,et as j,ne as k,j4 as l,rr as m,T as n,_ as o,W4 as p,nb as q,P as r,Ti as s,Te as t,nv as u,S as v,J as w,We as x,tt as y,Xce as z}; +`+a):o.stack=a}throw o}}_request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=Hl(this.defaults,n);const{transitional:o,paramsSerializer:r,headers:a}=n;o!==void 0&&K0.assertOptions(o,{silentJSONParsing:kr.transitional(kr.boolean),forcedJSONParsing:kr.transitional(kr.boolean),clarifyTimeoutError:kr.transitional(kr.boolean)},!1),r!=null&&(Ve.isFunction(r)?n.paramsSerializer={serialize:r}:K0.assertOptions(r,{encode:kr.function,serialize:kr.function},!0)),n.method=(n.method||this.defaults.method||"get").toLowerCase();let l=a&&Ve.merge(a.common,a[n.method]);a&&Ve.forEach(["delete","get","head","post","put","patch","common"],m=>{delete a[m]}),n.headers=or.concat(l,a);const s=[];let u=!0;this.interceptors.request.forEach(function(v){typeof v.runWhen=="function"&&v.runWhen(n)===!1||(u=u&&v.synchronous,s.unshift(v.fulfilled,v.rejected))});const c=[];this.interceptors.response.forEach(function(v){c.push(v.fulfilled,v.rejected)});let f,d=0,p;if(!u){const m=[f4.bind(this),void 0];for(m.unshift.apply(m,s),m.push.apply(m,c),p=m.length,f=Promise.resolve(n);d
{if(!o._listeners)return;let a=o._listeners.length;for(;a-- >0;)o._listeners[a](r);o._listeners=null}),this.promise.then=r=>{let a;const l=new Promise(s=>{o.subscribe(s),a=s}).then(r);return l.cancel=function(){o.unsubscribe(a)},l},t(function(a,l,s){o.reason||(o.reason=new $i(a,l,s),n(o.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const n=this._listeners.indexOf(t);n!==-1&&this._listeners.splice(n,1)}static source(){let t;return{token:new iv(function(r){t=r}),cancel:t}}}const wce=iv;function Cce(e){return function(n){return e.apply(null,n)}}function Sce(e){return Ve.isObject(e)&&e.isAxiosError===!0}const W0={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(W0).forEach(([e,t])=>{W0[t]=e});const kce=W0;function Mb(e){const t=new Bu(e),n=sb(Bu.prototype.request,t);return Ve.extend(n,Bu.prototype,t,{allOwnKeys:!0}),Ve.extend(n,t,null,{allOwnKeys:!0}),n.create=function(r){return Mb(Hl(e,r))},n}const sn=Mb(lv);sn.Axios=Bu;sn.CanceledError=$i;sn.CancelToken=wce;sn.isCancel=Sb;sn.VERSION=xb;sn.toFormData=pd;sn.AxiosError=Rt;sn.Cancel=sn.CanceledError;sn.all=function(t){return Promise.all(t)};sn.spread=Cce;sn.isAxiosError=Sce;sn.mergeConfig=Hl;sn.AxiosHeaders=or;sn.formToJSON=e=>Cb(Ve.isHTMLForm(e)?new FormData(e):e);sn.getAdapter=Eb.getAdapter;sn.HttpStatusCode=kce;sn.default=sn;const Ti=sn.create({baseURL:"https://shop.lihaink.cn/api",timeout:1e4});Ti.interceptors.request.use(e=>{const t=localStorage.getItem("Token");return t&&(e.headers["X-Token"]="Bearer "+t),e},e=>(console.error(e),Promise.reject(e)));Ti.interceptors.response.use(e=>{if((e.data.status===401||e.data.status===4e4)&&(Ms({message:e.data.message,type:"error"}),setTimeout(()=>{const t=nv();t.setUserInfo({}),t.setToken(""),Tb.push("/login")},700)),e.data.status===400)throw Ms({message:e.data.message,type:"error"}),new Error(e.data.message);return e.data},e=>{var t,n;return console.error(e),Ms({message:((n=(t=e.response)==null?void 0:t.data)==null?void 0:n.message)||e,type:"error"}),Promise.reject(e)});function Xce(e){return Ti.post("auth/login",e)}function Jce(e){return Ti.get("user",e)}function Ece(){return Ti.post("logout")}const uv=(e,t)=>{const n=e.__vccOpts||e;for(const[o,r]of t)n[o]=r;return n},xce=e=>(W4("data-v-28f3f43a"),e=e(),j4(),e),Mce={class:"my-card"},$ce={class:"card-header"},Tce=xce(()=>k("div",{class:"card-title"},"里海收银系统",-1)),Oce={class:"card-body"},Ace={class:"el-dropdown-link"},Nce={class:"info"},Rce={style:{"margin-left":"0.3rem"}},Ice={__name:"myHeader",setup(e){const t=nv(),n=P({});n.value=t.userInfo.mer_info;const o=P({});o.value=t.userInfo.service;const r=nb(),a=()=>{Ece().then(()=>{t.setUserInfo({}),t.setToken(""),r.push("/login")}).catch(()=>{Ms({message:"退出失败",type:"error"})})};return(l,s)=>{const u=Ze("el-image"),c=Ze("el-avatar"),f=Ze("arrow-down"),d=Ze("el-icon"),p=Ze("el-dropdown-item"),h=Ze("el-dropdown-menu"),m=Ze("el-dropdown");return _(),M("div",Mce,[k("div",$ce,[W(u,{style:{height:"3rem",width:"3rem"},src:"https://lihai001.oss-cn-chengdu.aliyuncs.com/def/56a52202404051428413664.png"}),Tce]),k("div",Oce,[W(m,{trigger:"hover"},{dropdown:J(()=>[W(h,null,{default:J(()=>[W(p,{onClick:a},{default:J(()=>[gt("退出登录")]),_:1})]),_:1})]),default:J(()=>[k("div",Ace,[W(c,{src:o.value.avatar,icon:"user-filled"},null,8,["src"]),k("div",Nce,[k("div",null,[gt(Te(o.value.nickname)+" ",1),k("span",Rce,"("+Te(n.value.company_name||n.value.mer_name)+")",1)]),k("div",null,Te(i(t).userInfo.account),1)]),W(d,{class:"el-icon--right"},{default:J(()=>[W(f)]),_:1})])]),_:1})])])}}},Pce=uv(Ice,[["__scopeId","data-v-28f3f43a"]]),cv=e=>(W4("data-v-60ad4a9d"),e=e(),j4(),e),Lce={class:"my-card"},Vce=cv(()=>k("div",null,"收银",-1)),Bce=cv(()=>k("div",null,"订单",-1)),zce=cv(()=>k("div",null,"商品",-1)),Hce={__name:"myAside",setup(e){const t=nb(),n=eue(),o=r=>{t.push({name:r})};return(r,a)=>{const l=Ze("Sell"),s=Ze("el-icon"),u=Ze("DataLine"),c=Ze("ShoppingBag");return _(),M("div",Lce,[k("div",{class:T(["list-item",{active:i(n).name=="home"}]),onClick:a[0]||(a[0]=f=>o("home"))},[W(s,{size:"30"},{default:J(()=>[W(l)]),_:1}),Vce],2),k("div",{class:T(["list-item",{active:i(n).name=="order"}]),onClick:a[1]||(a[1]=f=>o("order"))},[W(s,{size:"30"},{default:J(()=>[W(u)]),_:1}),Bce],2),k("div",{class:T(["list-item",{active:i(n).name=="shop"}]),onClick:a[2]||(a[2]=f=>o("shop"))},[W(s,{size:"30"},{default:J(()=>[W(c)]),_:1}),zce],2)])}}},Dce=uv(Hce,[["__scopeId","data-v-60ad4a9d"]]),Fce={class:"common-layout"},Kce={__name:"index",setup(e){return(t,n)=>{const o=Ze("el-header"),r=Ze("el-aside"),a=Ze("router-view"),l=Ze("el-main"),s=Ze("el-container");return _(),M("div",Fce,[W(s,null,{default:J(()=>[W(o,null,{default:J(()=>[W(Pce)]),_:1}),W(s,null,{default:J(()=>[W(r,{width:"100px"},{default:J(()=>[W(Dce)]),_:1}),W(l,null,{default:J(()=>[W(a,{class:"my-main"},{default:J(({Component:u})=>[W(tn,{name:"el-fade-in-linear"},{default:J(()=>[(_(),le(it(u)))]),_:2},1024)]),_:1})]),_:1})]),_:1})]),_:1})])}}},Wce=uv(Kce,[["__scopeId","data-v-b7511b8b"]]),jce=[{path:"/",name:"layout",component:Wce,redirect:"/home",children:[{path:"/home",name:"home",component:()=>Qa(()=>import("./index-B6_QV493.js"),__vite__mapDeps([0,1,2,3,4,5]),import.meta.url)},{path:"/order",name:"order",component:()=>Qa(()=>import("./index-D8e3NTsi.js"),__vite__mapDeps([6,1,2,3,7]),import.meta.url)},{path:"/orderList",name:"orderList",component:()=>Qa(()=>import("./indexList-DfKrIu-v.js"),__vite__mapDeps([8,1,2,9]),import.meta.url)},{path:"/shop",name:"shop",component:()=>Qa(()=>import("./index-C5vLbzKJ.js"),__vite__mapDeps([10,4,11]),import.meta.url)}]},{path:"/login",name:"login",component:()=>Qa(()=>import("./index-D67ocowL.js"),__vite__mapDeps([12,13]),import.meta.url)},{path:"/:catchAll(.*)",name:"notFound",component:()=>Qa(()=>import("./index-DRLE3jIL.js"),__vite__mapDeps([]),import.meta.url)}],$b=Zie({history:Mie(),routes:jce});$b.beforeEach((e,t,n)=>{const o=nv();e.name!=="login"&&!o.Token?n({name:"login"}):n()});const Tb=$b,Oi=Tg(J5);for(const[e,t]of Object.entries(xL))Oi.component(e,t);const qce=nue();Oi.use(Tb);Oi.use(qce);Oi.use(qse,{locale:Use});Oi.mount("#app");export{Jce as A,Ms as E,Ke as F,uv as _,Ze as a,k as b,le as c,W as d,gt as e,M as f,ht as g,kc as h,Mt as i,et as j,ne as k,j4 as l,rr as m,T as n,_ as o,W4 as p,nb as q,P as r,Ti as s,Te as t,nv as u,S as v,J as w,We as x,tt as y,Xce as z}; diff --git a/build/assets/indexList-iy3NgRSb.js b/build/assets/indexList-DfKrIu-v.js similarity index 96% rename from build/assets/indexList-iy3NgRSb.js rename to build/assets/indexList-DfKrIu-v.js index 10fd5cc..9496535 100644 --- a/build/assets/indexList-iy3NgRSb.js +++ b/build/assets/indexList-DfKrIu-v.js @@ -1 +1 @@ -import{e as F,a as G,p as J,g as K,f as Q}from"./pay-Cgx_q9r2.js";import{_ as W,u as X,r as s,q as Y,a as d,h as Z,j as ee,f as m,d as t,w as o,o as c,e as r,t as te,b as I,c as V,E as h,p as ae,l as oe}from"./index-B2__Qpg4.js";const le=v=>(ae("data-v-f71c3ce9"),v=v(),oe(),v),se={"element-loading-text":"加载中",class:"my-order"},ne={key:0},re={key:1,style:{color:"#ff4a00"}},ie={key:0},de={key:1,class:"flex"},ce=le(()=>I("span",null,"提单前请清空购物车, 避免提单的商品与购物车商品混合, 请确保购物车内无数据后再进行提单",-1)),ue={class:"dialog-footer"},pe={__name:"indexList",setup(v){const P=X(),k=s([]),C=Y(),g=s(1),f=s(null),n=s({page:1,limit:20}),y=s(!1),b=s(0),i=()=>{y.value=!0,g.value==1&&(n.value.paid=null),g.value==2&&(n.value.paid=0),F(P.userInfo.service.mer_id,n.value).then(e=>{k.value=e.data.list,b.value=e.data.count,y.value=!1})};i();const w=s(0);(()=>{G({source:300}).then(e=>{var a;w.value=(a=e.data.list)==null?void 0:a.length})})();const A=e=>{n.value.page=1,i()},B=e=>{n.value.page=e,i()},D=e=>{n.value.page=e,i()},N=e=>{n.value.page=e,i()},R=()=>{i()},$=e=>{f.value.setRePay({price:e.pay_price,order_id:e.group_order_id}),f.value.drawer=!0},E=e=>{K({order_sn:e}).then(a=>{a.data.paid==1||a.message=="支付成功"?(h({message:a.message,type:"success"}),i()):h({message:a.message,type:"error"})}).catch(a=>{})},x=s(""),U=()=>{_.value=!1,Q({order_sn:x.value}).then(e=>{h({message:e.message,type:"success"}),C.push({name:"home"})})},_=s(!1),z=e=>{x.value=e,_.value=!0},O=()=>{C.push({name:"home"})};return(e,a)=>{const L=d("el-radio-button"),T=d("el-radio-group"),u=d("el-table-column"),p=d("el-button"),j=d("el-table"),q=d("el-pagination"),H=d("el-dialog"),M=Z("loading");return ee((c(),m("div",se,[t(T,{modelValue:g.value,"onUpdate:modelValue":a[0]||(a[0]=l=>g.value=l),style:{"margin-bottom":"30px"},onChange:A},{default:o(()=>[t(L,{value:1},{default:o(()=>[r("全部")]),_:1}),t(L,{value:2},{default:o(()=>[r("未支付")]),_:1})]),_:1},8,["modelValue"]),t(j,{data:k.value,style:{width:"100%"}},{default:o(()=>[t(u,{prop:"group_order_id",label:"ID",width:"100"}),t(u,{prop:"order_sn",label:"订单号",width:"260"}),t(u,{prop:"total_price",label:"订单金额"}),t(u,{prop:"paid",label:"支付状态"},{default:o(l=>[l.row.paid==1?(c(),m("span",ne,"已支付")):(c(),m("span",re,"未支付"))]),_:1}),t(u,{prop:"create_time",label:"订单创建时间"}),t(u,{prop:"pay_time",label:"订单支付时间"},{default:o(l=>[l.row.pay_time?(c(),m("span",ie,te(l.row.pay_time),1)):(c(),m("div",de,[t(p,{type:"primary",link:"",onClick:S=>$(l.row)},{default:o(()=>[r("重新支付")]),_:2},1032,["onClick"]),t(p,{type:"primary",link:"",onClick:S=>E(l.row.order_sn)},{default:o(()=>[r("检测状态")]),_:2},1032,["onClick"]),t(p,{type:"primary",link:"",onClick:S=>z(l.row.order_sn)},{default:o(()=>[r("提单")]),_:2},1032,["onClick"])]))]),_:1})]),_:1},8,["data"]),t(q,{"page-size":n.value.limit,layout:"prev, pager, next",total:b.value,onPrevClick:B,onNextClick:D,onCurrentChange:N},null,8,["page-size","total"]),t(J,{ref_key:"payRef",ref:f,onPaySuccess:R},null,512),t(H,{modelValue:_.value,"onUpdate:modelValue":a[2]||(a[2]=l=>_.value=l),title:"提示",width:"500"},{footer:o(()=>[I("div",ue,[t(p,{onClick:a[1]||(a[1]=l=>_.value=!1)},{default:o(()=>[r("取消")]),_:1}),w.value>0?(c(),V(p,{key:0,onClick:O},{default:o(()=>[r(" 前去清空购物车 ")]),_:1})):(c(),V(p,{key:1,type:"primary",onClick:U},{default:o(()=>[r(" 确认提单 ")]),_:1}))])]),default:o(()=>[ce]),_:1},8,["modelValue"])])),[[M,y.value]])}}},ge=W(pe,[["__scopeId","data-v-f71c3ce9"]]);export{ge as default}; +import{e as F,a as G,p as J,g as K,f as Q}from"./pay-B0gj_XLh.js";import{_ as W,u as X,r as s,q as Y,a as d,h as Z,j as ee,f as m,d as t,w as o,o as c,e as r,t as te,b as I,c as V,E as h,p as ae,l as oe}from"./index-RWPP8R9O.js";const le=v=>(ae("data-v-f71c3ce9"),v=v(),oe(),v),se={"element-loading-text":"加载中",class:"my-order"},ne={key:0},re={key:1,style:{color:"#ff4a00"}},ie={key:0},de={key:1,class:"flex"},ce=le(()=>I("span",null,"提单前请清空购物车, 避免提单的商品与购物车商品混合, 请确保购物车内无数据后再进行提单",-1)),ue={class:"dialog-footer"},pe={__name:"indexList",setup(v){const P=X(),k=s([]),C=Y(),g=s(1),f=s(null),n=s({page:1,limit:20}),y=s(!1),b=s(0),i=()=>{y.value=!0,g.value==1&&(n.value.paid=null),g.value==2&&(n.value.paid=0),F(P.userInfo.service.mer_id,n.value).then(e=>{k.value=e.data.list,b.value=e.data.count,y.value=!1})};i();const w=s(0);(()=>{G({source:300}).then(e=>{var a;w.value=(a=e.data.list)==null?void 0:a.length})})();const A=e=>{n.value.page=1,i()},B=e=>{n.value.page=e,i()},D=e=>{n.value.page=e,i()},N=e=>{n.value.page=e,i()},R=()=>{i()},$=e=>{f.value.setRePay({price:e.pay_price,order_id:e.group_order_id}),f.value.drawer=!0},E=e=>{K({order_sn:e}).then(a=>{a.data.paid==1||a.message=="支付成功"?(h({message:a.message,type:"success"}),i()):h({message:a.message,type:"error"})}).catch(a=>{})},x=s(""),U=()=>{_.value=!1,Q({order_sn:x.value}).then(e=>{h({message:e.message,type:"success"}),C.push({name:"home"})})},_=s(!1),z=e=>{x.value=e,_.value=!0},O=()=>{C.push({name:"home"})};return(e,a)=>{const L=d("el-radio-button"),T=d("el-radio-group"),u=d("el-table-column"),p=d("el-button"),j=d("el-table"),q=d("el-pagination"),H=d("el-dialog"),M=Z("loading");return ee((c(),m("div",se,[t(T,{modelValue:g.value,"onUpdate:modelValue":a[0]||(a[0]=l=>g.value=l),style:{"margin-bottom":"30px"},onChange:A},{default:o(()=>[t(L,{value:1},{default:o(()=>[r("全部")]),_:1}),t(L,{value:2},{default:o(()=>[r("未支付")]),_:1})]),_:1},8,["modelValue"]),t(j,{data:k.value,style:{width:"100%"}},{default:o(()=>[t(u,{prop:"group_order_id",label:"ID",width:"100"}),t(u,{prop:"order_sn",label:"订单号",width:"260"}),t(u,{prop:"total_price",label:"订单金额"}),t(u,{prop:"paid",label:"支付状态"},{default:o(l=>[l.row.paid==1?(c(),m("span",ne,"已支付")):(c(),m("span",re,"未支付"))]),_:1}),t(u,{prop:"create_time",label:"订单创建时间"}),t(u,{prop:"pay_time",label:"订单支付时间"},{default:o(l=>[l.row.pay_time?(c(),m("span",ie,te(l.row.pay_time),1)):(c(),m("div",de,[t(p,{type:"primary",link:"",onClick:S=>$(l.row)},{default:o(()=>[r("重新支付")]),_:2},1032,["onClick"]),t(p,{type:"primary",link:"",onClick:S=>E(l.row.order_sn)},{default:o(()=>[r("检测状态")]),_:2},1032,["onClick"]),t(p,{type:"primary",link:"",onClick:S=>z(l.row.order_sn)},{default:o(()=>[r("提单")]),_:2},1032,["onClick"])]))]),_:1})]),_:1},8,["data"]),t(q,{"page-size":n.value.limit,layout:"prev, pager, next",total:b.value,onPrevClick:B,onNextClick:D,onCurrentChange:N},null,8,["page-size","total"]),t(J,{ref_key:"payRef",ref:f,onPaySuccess:R},null,512),t(H,{modelValue:_.value,"onUpdate:modelValue":a[2]||(a[2]=l=>_.value=l),title:"提示",width:"500"},{footer:o(()=>[I("div",ue,[t(p,{onClick:a[1]||(a[1]=l=>_.value=!1)},{default:o(()=>[r("取消")]),_:1}),w.value>0?(c(),V(p,{key:0,onClick:O},{default:o(()=>[r(" 前去清空购物车 ")]),_:1})):(c(),V(p,{key:1,type:"primary",onClick:U},{default:o(()=>[r(" 确认提单 ")]),_:1}))])]),default:o(()=>[ce]),_:1},8,["modelValue"])])),[[M,y.value]])}}},ge=W(pe,[["__scopeId","data-v-f71c3ce9"]]);export{ge as default}; diff --git a/build/assets/padding-DEl9__MX.js b/build/assets/padding-O48_hooA.js similarity index 65% rename from build/assets/padding-DEl9__MX.js rename to build/assets/padding-O48_hooA.js index 929563c..9814041 100644 --- a/build/assets/padding-DEl9__MX.js +++ b/build/assets/padding-O48_hooA.js @@ -1 +1 @@ -import{_ as e,o as t,f as c}from"./index-B2__Qpg4.js";const o={},n={style:{width:"20px",height:"100%"}};function s(r,_){return t(),c("div",n)}const i=e(o,[["render",s]]);export{i as p}; +import{_ as e,o as t,f as c}from"./index-RWPP8R9O.js";const o={},n={style:{width:"20px",height:"100%"}};function s(r,_){return t(),c("div",n)}const i=e(o,[["render",s]]);export{i as p}; diff --git a/build/assets/pay-Cgx_q9r2.js b/build/assets/pay-B0gj_XLh.js similarity index 98% rename from build/assets/pay-Cgx_q9r2.js rename to build/assets/pay-B0gj_XLh.js index 9ccd94c..07ed866 100644 --- a/build/assets/pay-Cgx_q9r2.js +++ b/build/assets/pay-B0gj_XLh.js @@ -1 +1 @@ -import{s as v,_ as le,r as l,v as ne,a as E,h as ce,o as f,c as K,w as m,b as o,n as M,e as L,t as B,j as re,f as b,d as w,i as ue,F as de,g as ie,x as $,E as C,p as ve,l as pe}from"./index-B2__Qpg4.js";function qe(s){return v.post("user/cart/create",s)}function Oe(s){return v.get("user/cart/lst",{params:s})}function Re(s,p){return v.post(`user/cart/change/${s}`,p)}function Ue(s){return v.post("v2/order/check",s)}function Ke(s){return v.post("user/cart/delete",s)}function G(s){return v.post("v2/order/create",s)}function _e(s,p){return v.post(`order/pay/${s}`,p)}function fe(s){return v.get("micropay_query",{params:s})}function Me(s,p){return v.get(`admin/${s}/order_list`,{params:p})}function Ge(s){return v.get("order_lading",{params:s})}const P=s=>{let p=new window.SpeechSynthesisUtterance(s);window.speechSynthesis.speak(p)},q=s=>(ve("data-v-517a591d"),s=s(),pe(),s),me=q(()=>o("h4",null,"选择支付方式",-1)),ye={class:"dra-body"},ge={class:"header"},he=q(()=>o("div",{style:{color:"#999",padding:"2rem 0 0.3rem 0"}},"应收金额(元):",-1)),ke={style:{color:"#f5222d","padding-bottom":"2rem"}},be={style:{"font-size":"1.6rem"}},we={key:0,"element-loading-text":"支付中",class:"card1"},Ce=q(()=>o("div",{class:"tips"},null,-1)),xe={key:1,class:"card2"},Se={class:"drawer-body"},Ae={class:"counter"},Le={class:"received"},Ve={key:0},De={key:1,style:{"font-size":"1rem",color:"#999"}},Ee={key:0,class:"balance"},$e={class:"money"},je={key:1,class:"balance"},Be={class:"keypad"},Pe={class:"left"},Te={class:"right"},ze={style:{width:"100%",display:"flex","justify-content":"center"}},Fe={__name:"pay",emits:["paySuccess"],setup(s,{expose:p,emit:H}){const h=l(!1),k=l(1),_=l(""),y=l(""),J=()=>{A()},Q=()=>{$(()=>{setTimeout(()=>{var e;c.value=!1,_.value="",F.value=!0,(e=y.value)==null||e.focus(),T(k.value)},300)})},T=e=>{k.value=e,k.value==2?document.addEventListener("keydown",N):document.removeEventListener("keydown",N)},x=l({}),z=l([]),W=e=>{x.value=e.data,z.value=e.cart_id},X=e=>{x.value.order_price=e.price,u.value=e.order_id},Y=H,F=l(!1),Z=l(["1","2","3","4","5","6","7","8","9","0","00","."]);let S=0;const u=l(""),ee=()=>{c.value=!0,y.value.blur(),u.value?O(u.value):G({address_id:"",key:x.value.key,cart_id:z.value,pay_type:"micropay",auth_code:_.value,source:300}).then(e=>{if(e.status==200&&e.message=="支付成功")h.value=!1,C({message:e.message,type:"success"}),P(e.data.message),A();else if(e.data.group_order_sn)u.value=e.data.group_order_id,V.value=0,S=0,j(e.data.group_order_sn);else return u.value=e.data.result.order_id,c.value=!1,C({message:e.message,type:"error"})}).catch(e=>{c.value=!1,$(()=>{var a;(a=y.value)==null||a.focus()})})},O=e=>{let a;k.value==1?a={type:"micropay",auth_code:_.value}:a={type:"cash_payment"},_e(e,a).then(t=>{t.status==200&&t.message=="支付成功"?(h.value=!1,C({message:t.message,type:"success"}),P(t.data.message),A()):(u.value=t.data.group_order_id,V.value=0,S=0,j(t.data.group_order_sn))}).catch(t=>{_.value="",c.value=!1,$(()=>{var g;(g=y.value)==null||g.focus()})})},V=l(0),j=e=>{e&&(V.value++,S+=5e3,fe({order_sn:e}).then(a=>{a.data.paid==1||a.message=="支付成功"?(C({message:a.message,type:"success"}),P(a.data.message),A()):(C({message:a.message,type:"error"}),_.value="",c.value=!1,$(()=>{var t;(t=y.value)==null||t.focus()}))}).catch(a=>{F.value&&V.value<3?setTimeout(()=>{j(e)},15e3-S>0?15e3-S:0):(_.value="",c.value=!1,$(()=>{var t;(t=y.value)==null||t.focus()}))}))},A=()=>{var e;F.value=!1,c.value=!1,_.value="",r.value="",d.value=[],(e=y.value)==null||e.blur(),document.removeEventListener("keydown",N),Y("paySuccess"),h.value=!1},c=l(!1);p({drawer:h,setForm:W,setRePay:X});const d=l([]),r=l(""),D=ne(()=>+r.value>0?(r.value-x.value.order_price).toFixed(2):-1),R=l(!1),I=e=>{e===-1?d.value=[]:d.value.pop(),r.value=d.value.length?d.value.join(""):0},n=e=>{R.value===!1&&(r.value="",R.value=!0);let a=String(r.value).indexOf(".")+1,t=String(r.value).length-a;console.log(a,t),(a===0||t<2)&&(d.value.join("")<=9999999&&d.value.push(e),r.value=d.value.join("")>99999999?99999999:d.value.join(""))},U=()=>{D.value===""||D.value===null||D.value===void 0||(u.value?O(u.value):G({address_id:"",key:x.value.key,cart_id:z.value,pay_type:"cash_payment",source:300}).then(e=>{if(e.status==200&&e.message=="支付成功")h.value=!1,C({message:e.message,type:"success"}),P(e.data.message),A();else if(e.data.group_order_sn)u.value=e.data.group_order_id,V.value=0,S=0,j(e.data.group_order_sn);else return u.value=e.data.result.order_id,r.value="",d.value=[],c.value=!1,C({message:e.message,type:"error"})}).catch(e=>{c.value=!1}))},N=e=>{let t=(e||window.event).keyCode;switch(e.stopPropagation(),e.preventDefault(),t){case 96:case 48:n(0);break;case 97:case 49:n(1);break;case 98:case 50:n(2);break;case 99:case 51:n(3);break;case 100:case 52:n(4);break;case 101:case 53:n(5);break;case 102:case 54:n(6);break;case 103:case 55:n(7);break;case 104:case 56:n(8);break;case 105:case 57:n(9);break;case 110:n(".");break;case 190:n(".");break;case 8:I();break;case 13:U();break}};return(e,a)=>{const t=E("el-input"),g=E("el-button"),ae=E("Delete"),se=E("el-icon"),te=E("el-drawer"),oe=ce("loading");return f(),K(te,{size:800,modelValue:h.value,"onUpdate:modelValue":a[4]||(a[4]=i=>h.value=i),direction:"rtl",onOpen:Q,"before-close":A},{header:m(()=>[me]),default:m(()=>[o("div",ye,[o("div",ge,[o("div",{class:M(["left",{active:k.value==1}]),onClick:a[0]||(a[0]=i=>T(1))}," 微信 ",2),o("div",{class:M(["right",{active:k.value==2}]),onClick:a[1]||(a[1]=i=>T(2))}," 现金收款 ",2)]),he,o("div",ke,[L(" ¥"),o("span",be,B(x.value.order_price),1)]),k.value==1?re((f(),b("div",we,[w(t,{ref_key:"codeRef",ref:y,modelValue:_.value,"onUpdate:modelValue":a[2]||(a[2]=i=>_.value=i),autofocus:"",class:"code-input",placeholder:"请点击输入框聚焦扫码或输入编码号",onKeyup:ue(ee,["enter"])},null,8,["modelValue"]),Ce])),[[oe,c.value]]):(f(),b("div",xe,[o("div",Se,[o("div",Ae,[o("div",Le,[r.value?(f(),b("span",Ve,B(r.value),1)):(f(),b("span",De,"按下键盘输入客户支付金额"))]),D.value>=0?(f(),b("div",Ee,[L(" 需找零(元):"),o("span",$e,"¥"+B(D.value),1)])):(f(),b("div",je,"不够找零, 请支付更多金额")),o("div",Be,[o("div",Pe,[(f(!0),b(de,null,ie(Z.value,i=>(f(),K(g,{key:i,onClick:Ie=>n(i)},{default:m(()=>[L(B(i),1)]),_:2},1032,["onClick"]))),128))]),o("div",Te,[w(g,{onClick:I},{default:m(()=>[w(se,null,{default:m(()=>[w(ae)]),_:1})]),_:1}),w(g,{onClick:a[3]||(a[3]=i=>I(-1))},{default:m(()=>[L("C")]),_:1}),w(g,{class:"enter",onClick:U},{default:m(()=>[L("确认")]),_:1})])])])])]))])]),footer:m(()=>[o("div",ze,[w(g,{class:"cancel-btn",onClick:J},{default:m(()=>[L("取消收款")]),_:1})])]),_:1},8,["modelValue"])}}},He=le(Fe,[["__scopeId","data-v-517a591d"]]);export{Oe as a,Re as b,Ke as c,qe as d,Me as e,Ge as f,fe as g,Ue as o,He as p}; +import{s as v,_ as le,r as l,v as ne,a as E,h as ce,o as f,c as K,w as m,b as o,n as M,e as L,t as B,j as re,f as b,d as w,i as ue,F as de,g as ie,x as $,E as C,p as ve,l as pe}from"./index-RWPP8R9O.js";function qe(s){return v.post("user/cart/create",s)}function Oe(s){return v.get("user/cart/lst",{params:s})}function Re(s,p){return v.post(`user/cart/change/${s}`,p)}function Ue(s){return v.post("v2/order/check",s)}function Ke(s){return v.post("user/cart/delete",s)}function G(s){return v.post("v2/order/create",s)}function _e(s,p){return v.post(`order/pay/${s}`,p)}function fe(s){return v.get("micropay_query",{params:s})}function Me(s,p){return v.get(`admin/${s}/order_list`,{params:p})}function Ge(s){return v.get("order_lading",{params:s})}const P=s=>{let p=new window.SpeechSynthesisUtterance(s);window.speechSynthesis.speak(p)},q=s=>(ve("data-v-517a591d"),s=s(),pe(),s),me=q(()=>o("h4",null,"选择支付方式",-1)),ye={class:"dra-body"},ge={class:"header"},he=q(()=>o("div",{style:{color:"#999",padding:"2rem 0 0.3rem 0"}},"应收金额(元):",-1)),ke={style:{color:"#f5222d","padding-bottom":"2rem"}},be={style:{"font-size":"1.6rem"}},we={key:0,"element-loading-text":"支付中",class:"card1"},Ce=q(()=>o("div",{class:"tips"},null,-1)),xe={key:1,class:"card2"},Se={class:"drawer-body"},Ae={class:"counter"},Le={class:"received"},Ve={key:0},De={key:1,style:{"font-size":"1rem",color:"#999"}},Ee={key:0,class:"balance"},$e={class:"money"},je={key:1,class:"balance"},Be={class:"keypad"},Pe={class:"left"},Te={class:"right"},ze={style:{width:"100%",display:"flex","justify-content":"center"}},Fe={__name:"pay",emits:["paySuccess"],setup(s,{expose:p,emit:H}){const h=l(!1),k=l(1),_=l(""),y=l(""),J=()=>{A()},Q=()=>{$(()=>{setTimeout(()=>{var e;c.value=!1,_.value="",F.value=!0,(e=y.value)==null||e.focus(),T(k.value)},300)})},T=e=>{k.value=e,k.value==2?document.addEventListener("keydown",N):document.removeEventListener("keydown",N)},x=l({}),z=l([]),W=e=>{x.value=e.data,z.value=e.cart_id},X=e=>{x.value.order_price=e.price,u.value=e.order_id},Y=H,F=l(!1),Z=l(["1","2","3","4","5","6","7","8","9","0","00","."]);let S=0;const u=l(""),ee=()=>{c.value=!0,y.value.blur(),u.value?O(u.value):G({address_id:"",key:x.value.key,cart_id:z.value,pay_type:"micropay",auth_code:_.value,source:300}).then(e=>{if(e.status==200&&e.message=="支付成功")h.value=!1,C({message:e.message,type:"success"}),P(e.data.message),A();else if(e.data.group_order_sn)u.value=e.data.group_order_id,V.value=0,S=0,j(e.data.group_order_sn);else return u.value=e.data.result.order_id,c.value=!1,C({message:e.message,type:"error"})}).catch(e=>{c.value=!1,$(()=>{var a;(a=y.value)==null||a.focus()})})},O=e=>{let a;k.value==1?a={type:"micropay",auth_code:_.value}:a={type:"cash_payment"},_e(e,a).then(t=>{t.status==200&&t.message=="支付成功"?(h.value=!1,C({message:t.message,type:"success"}),P(t.data.message),A()):(u.value=t.data.group_order_id,V.value=0,S=0,j(t.data.group_order_sn))}).catch(t=>{_.value="",c.value=!1,$(()=>{var g;(g=y.value)==null||g.focus()})})},V=l(0),j=e=>{e&&(V.value++,S+=5e3,fe({order_sn:e}).then(a=>{a.data.paid==1||a.message=="支付成功"?(C({message:a.message,type:"success"}),P(a.data.message),A()):(C({message:a.message,type:"error"}),_.value="",c.value=!1,$(()=>{var t;(t=y.value)==null||t.focus()}))}).catch(a=>{F.value&&V.value<3?setTimeout(()=>{j(e)},15e3-S>0?15e3-S:0):(_.value="",c.value=!1,$(()=>{var t;(t=y.value)==null||t.focus()}))}))},A=()=>{var e;F.value=!1,c.value=!1,_.value="",r.value="",d.value=[],(e=y.value)==null||e.blur(),document.removeEventListener("keydown",N),Y("paySuccess"),h.value=!1},c=l(!1);p({drawer:h,setForm:W,setRePay:X});const d=l([]),r=l(""),D=ne(()=>+r.value>0?(r.value-x.value.order_price).toFixed(2):-1),R=l(!1),I=e=>{e===-1?d.value=[]:d.value.pop(),r.value=d.value.length?d.value.join(""):0},n=e=>{R.value===!1&&(r.value="",R.value=!0);let a=String(r.value).indexOf(".")+1,t=String(r.value).length-a;console.log(a,t),(a===0||t<2)&&(d.value.join("")<=9999999&&d.value.push(e),r.value=d.value.join("")>99999999?99999999:d.value.join(""))},U=()=>{D.value===""||D.value===null||D.value===void 0||(u.value?O(u.value):G({address_id:"",key:x.value.key,cart_id:z.value,pay_type:"cash_payment",source:300}).then(e=>{if(e.status==200&&e.message=="支付成功")h.value=!1,C({message:e.message,type:"success"}),P(e.data.message),A();else if(e.data.group_order_sn)u.value=e.data.group_order_id,V.value=0,S=0,j(e.data.group_order_sn);else return u.value=e.data.result.order_id,r.value="",d.value=[],c.value=!1,C({message:e.message,type:"error"})}).catch(e=>{c.value=!1}))},N=e=>{let t=(e||window.event).keyCode;switch(e.stopPropagation(),e.preventDefault(),t){case 96:case 48:n(0);break;case 97:case 49:n(1);break;case 98:case 50:n(2);break;case 99:case 51:n(3);break;case 100:case 52:n(4);break;case 101:case 53:n(5);break;case 102:case 54:n(6);break;case 103:case 55:n(7);break;case 104:case 56:n(8);break;case 105:case 57:n(9);break;case 110:n(".");break;case 190:n(".");break;case 8:I();break;case 13:U();break}};return(e,a)=>{const t=E("el-input"),g=E("el-button"),ae=E("Delete"),se=E("el-icon"),te=E("el-drawer"),oe=ce("loading");return f(),K(te,{size:800,modelValue:h.value,"onUpdate:modelValue":a[4]||(a[4]=i=>h.value=i),direction:"rtl",onOpen:Q,"before-close":A},{header:m(()=>[me]),default:m(()=>[o("div",ye,[o("div",ge,[o("div",{class:M(["left",{active:k.value==1}]),onClick:a[0]||(a[0]=i=>T(1))}," 微信 ",2),o("div",{class:M(["right",{active:k.value==2}]),onClick:a[1]||(a[1]=i=>T(2))}," 现金收款 ",2)]),he,o("div",ke,[L(" ¥"),o("span",be,B(x.value.order_price),1)]),k.value==1?re((f(),b("div",we,[w(t,{ref_key:"codeRef",ref:y,modelValue:_.value,"onUpdate:modelValue":a[2]||(a[2]=i=>_.value=i),autofocus:"",class:"code-input",placeholder:"请点击输入框聚焦扫码或输入编码号",onKeyup:ue(ee,["enter"])},null,8,["modelValue"]),Ce])),[[oe,c.value]]):(f(),b("div",xe,[o("div",Se,[o("div",Ae,[o("div",Le,[r.value?(f(),b("span",Ve,B(r.value),1)):(f(),b("span",De,"按下键盘输入客户支付金额"))]),D.value>=0?(f(),b("div",Ee,[L(" 需找零(元):"),o("span",$e,"¥"+B(D.value),1)])):(f(),b("div",je,"不够找零, 请支付更多金额")),o("div",Be,[o("div",Pe,[(f(!0),b(de,null,ie(Z.value,i=>(f(),K(g,{key:i,onClick:Ie=>n(i)},{default:m(()=>[L(B(i),1)]),_:2},1032,["onClick"]))),128))]),o("div",Te,[w(g,{onClick:I},{default:m(()=>[w(se,null,{default:m(()=>[w(ae)]),_:1})]),_:1}),w(g,{onClick:a[3]||(a[3]=i=>I(-1))},{default:m(()=>[L("C")]),_:1}),w(g,{class:"enter",onClick:U},{default:m(()=>[L("确认")]),_:1})])])])])]))])]),footer:m(()=>[o("div",ze,[w(g,{class:"cancel-btn",onClick:J},{default:m(()=>[L("取消收款")]),_:1})])]),_:1},8,["modelValue"])}}},He=le(Fe,[["__scopeId","data-v-517a591d"]]);export{Oe as a,Re as b,Ke as c,qe as d,Me as e,Ge as f,fe as g,Ue as o,He as p}; diff --git a/build/assets/shop-BcSslevs.js b/build/assets/shop-CGwgqzwI.js similarity index 75% rename from build/assets/shop-BcSslevs.js rename to build/assets/shop-CGwgqzwI.js index 6e13b88..60a7489 100644 --- a/build/assets/shop-BcSslevs.js +++ b/build/assets/shop-CGwgqzwI.js @@ -1 +1 @@ -import{s as e}from"./index-B2__Qpg4.js";function u(r,t){return e.get(`server/${r}/product/lst`,{params:t})}function a(r,t){return e.get(`store/product/detail/${r}`,{params:t})}function o(r,t){return e.post(`user_free_trial/${r}`,t)}export{a as g,u as s,o as u}; +import{s as e}from"./index-RWPP8R9O.js";function u(r,t){return e.get(`server/${r}/product/lst`,{params:t})}function a(r,t){return e.get(`store/product/detail/${r}`,{params:t})}function o(r,t){return e.post(`user_free_trial/${r}`,t)}export{a as g,u as s,o as u}; diff --git a/build/index.html b/build/index.html index 0e8b9e2..eaa06b6 100644 --- a/build/index.html +++ b/build/index.html @@ -5,7 +5,7 @@
{if(!o._listeners)return;let a=o._listeners.length;for(;a-- >0;)o._listeners[a](r);o._listeners=null}),this.promise.then=r=>{let a;const l=new Promise(s=>{o.subscribe(s),a=s}).then(r);return l.cancel=function(){o.unsubscribe(a)},l},t(function(a,l,s){o.reason||(o.reason=new $i(a,l,s),n(o.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const n=this._listeners.indexOf(t);n!==-1&&this._listeners.splice(n,1)}static source(){let t;return{token:new iv(function(r){t=r}),cancel:t}}}const wce=iv;function Cce(e){return function(n){return e.apply(null,n)}}function Sce(e){return Ve.isObject(e)&&e.isAxiosError===!0}const W0={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(W0).forEach(([e,t])=>{W0[t]=e});const kce=W0;function Mb(e){const t=new Bu(e),n=sb(Bu.prototype.request,t);return Ve.extend(n,Bu.prototype,t,{allOwnKeys:!0}),Ve.extend(n,t,null,{allOwnKeys:!0}),n.create=function(r){return Mb(Hl(e,r))},n}const sn=Mb(lv);sn.Axios=Bu;sn.CanceledError=$i;sn.CancelToken=wce;sn.isCancel=Sb;sn.VERSION=xb;sn.toFormData=pd;sn.AxiosError=Rt;sn.Cancel=sn.CanceledError;sn.all=function(t){return Promise.all(t)};sn.spread=Cce;sn.isAxiosError=Sce;sn.mergeConfig=Hl;sn.AxiosHeaders=or;sn.formToJSON=e=>Cb(Ve.isHTMLForm(e)?new FormData(e):e);sn.getAdapter=Eb.getAdapter;sn.HttpStatusCode=kce;sn.default=sn;const Ti=sn.create({baseURL:"https://crmeb-test.shop.lihaink.cn/api",timeout:1e4});Ti.interceptors.request.use(e=>{const t=localStorage.getItem("Token");return t&&(e.headers["X-Token"]="Bearer "+t),e},e=>(console.error(e),Promise.reject(e)));Ti.interceptors.response.use(e=>{if((e.data.status===401||e.data.status===4e4)&&(Ms({message:e.data.message,type:"error"}),setTimeout(()=>{const t=nv();t.setUserInfo({}),t.setToken(""),Tb.push("/login")},700)),e.data.status===400)throw Ms({message:e.data.message,type:"error"}),new Error(e.data.message);return e.data},e=>{var t,n;return console.error(e),Ms({message:((n=(t=e.response)==null?void 0:t.data)==null?void 0:n.message)||e,type:"error"}),Promise.reject(e)});function Xce(e){return Ti.post("auth/login",e)}function Jce(e){return Ti.get("user",e)}function Ece(){return Ti.post("logout")}const uv=(e,t)=>{const n=e.__vccOpts||e;for(const[o,r]of t)n[o]=r;return n},xce=e=>(W4("data-v-28f3f43a"),e=e(),j4(),e),Mce={class:"my-card"},$ce={class:"card-header"},Tce=xce(()=>k("div",{class:"card-title"},"里海收银系统",-1)),Oce={class:"card-body"},Ace={class:"el-dropdown-link"},Nce={class:"info"},Rce={style:{"margin-left":"0.3rem"}},Ice={__name:"myHeader",setup(e){const t=nv(),n=P({});n.value=t.userInfo.mer_info;const o=P({});o.value=t.userInfo.service;const r=nb(),a=()=>{Ece().then(()=>{t.setUserInfo({}),t.setToken(""),r.push("/login")}).catch(()=>{Ms({message:"退出失败",type:"error"})})};return(l,s)=>{const u=Ze("el-image"),c=Ze("el-avatar"),f=Ze("arrow-down"),d=Ze("el-icon"),p=Ze("el-dropdown-item"),h=Ze("el-dropdown-menu"),m=Ze("el-dropdown");return _(),M("div",Mce,[k("div",$ce,[W(u,{style:{height:"3rem",width:"3rem"},src:"https://lihai001.oss-cn-chengdu.aliyuncs.com/def/56a52202404051428413664.png"}),Tce]),k("div",Oce,[W(m,{trigger:"hover"},{dropdown:J(()=>[W(h,null,{default:J(()=>[W(p,{onClick:a},{default:J(()=>[gt("退出登录")]),_:1})]),_:1})]),default:J(()=>[k("div",Ace,[W(c,{src:o.value.avatar,icon:"user-filled"},null,8,["src"]),k("div",Nce,[k("div",null,[gt(Te(o.value.nickname)+" ",1),k("span",Rce,"("+Te(n.value.company_name||n.value.mer_name)+")",1)]),k("div",null,Te(i(t).userInfo.account),1)]),W(d,{class:"el-icon--right"},{default:J(()=>[W(f)]),_:1})])]),_:1})])])}}},Pce=uv(Ice,[["__scopeId","data-v-28f3f43a"]]),cv=e=>(W4("data-v-60ad4a9d"),e=e(),j4(),e),Lce={class:"my-card"},Vce=cv(()=>k("div",null,"收银",-1)),Bce=cv(()=>k("div",null,"订单",-1)),zce=cv(()=>k("div",null,"商品",-1)),Hce={__name:"myAside",setup(e){const t=nb(),n=eue(),o=r=>{t.push({name:r})};return(r,a)=>{const l=Ze("Sell"),s=Ze("el-icon"),u=Ze("DataLine"),c=Ze("ShoppingBag");return _(),M("div",Lce,[k("div",{class:T(["list-item",{active:i(n).name=="home"}]),onClick:a[0]||(a[0]=f=>o("home"))},[W(s,{size:"30"},{default:J(()=>[W(l)]),_:1}),Vce],2),k("div",{class:T(["list-item",{active:i(n).name=="order"}]),onClick:a[1]||(a[1]=f=>o("order"))},[W(s,{size:"30"},{default:J(()=>[W(u)]),_:1}),Bce],2),k("div",{class:T(["list-item",{active:i(n).name=="shop"}]),onClick:a[2]||(a[2]=f=>o("shop"))},[W(s,{size:"30"},{default:J(()=>[W(c)]),_:1}),zce],2)])}}},Dce=uv(Hce,[["__scopeId","data-v-60ad4a9d"]]),Fce={class:"common-layout"},Kce={__name:"index",setup(e){return(t,n)=>{const o=Ze("el-header"),r=Ze("el-aside"),a=Ze("router-view"),l=Ze("el-main"),s=Ze("el-container");return _(),M("div",Fce,[W(s,null,{default:J(()=>[W(o,null,{default:J(()=>[W(Pce)]),_:1}),W(s,null,{default:J(()=>[W(r,{width:"100px"},{default:J(()=>[W(Dce)]),_:1}),W(l,null,{default:J(()=>[W(a,{class:"my-main"},{default:J(({Component:u})=>[W(tn,{name:"el-fade-in-linear"},{default:J(()=>[(_(),le(it(u)))]),_:2},1024)]),_:1})]),_:1})]),_:1})]),_:1})])}}},Wce=uv(Kce,[["__scopeId","data-v-b7511b8b"]]),jce=[{path:"/",name:"layout",component:Wce,redirect:"/home",children:[{path:"/home",name:"home",component:()=>Qa(()=>import("./index-5_UKU06R.js"),__vite__mapDeps([0,1,2,3,4,5]),import.meta.url)},{path:"/order",name:"order",component:()=>Qa(()=>import("./index-DPgzG1u8.js"),__vite__mapDeps([6,1,2,3,7]),import.meta.url)},{path:"/orderList",name:"orderList",component:()=>Qa(()=>import("./indexList-DsYS9nsj.js"),__vite__mapDeps([8,1,2,9]),import.meta.url)},{path:"/shop",name:"shop",component:()=>Qa(()=>import("./index-NZ184J6H.js"),__vite__mapDeps([10,4,11]),import.meta.url)}]},{path:"/login",name:"login",component:()=>Qa(()=>import("./index-C83qaAAW.js"),__vite__mapDeps([12,13]),import.meta.url)},{path:"/:catchAll(.*)",name:"notFound",component:()=>Qa(()=>import("./index-Cyl0NOj8.js"),__vite__mapDeps([]),import.meta.url)}],$b=Zie({history:Mie(),routes:jce});$b.beforeEach((e,t,n)=>{const o=nv();e.name!=="login"&&!o.Token?n({name:"login"}):n()});const Tb=$b,Oi=Tg(J5);for(const[e,t]of Object.entries(xL))Oi.component(e,t);const qce=nue();Oi.use(Tb);Oi.use(qce);Oi.use(qse,{locale:Use});Oi.mount("#app");export{Jce as A,Ms as E,Ke as F,uv as _,Ze as a,k as b,le as c,W as d,gt as e,M as f,ht as g,kc as h,Mt as i,et as j,ne as k,j4 as l,rr as m,T as n,_ as o,W4 as p,nb as q,P as r,Ti as s,Te as t,nv as u,S as v,J as w,We as x,tt as y,Xce as z}; +`+a):o.stack=a}throw o}}_request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=Hl(this.defaults,n);const{transitional:o,paramsSerializer:r,headers:a}=n;o!==void 0&&K0.assertOptions(o,{silentJSONParsing:kr.transitional(kr.boolean),forcedJSONParsing:kr.transitional(kr.boolean),clarifyTimeoutError:kr.transitional(kr.boolean)},!1),r!=null&&(Ve.isFunction(r)?n.paramsSerializer={serialize:r}:K0.assertOptions(r,{encode:kr.function,serialize:kr.function},!0)),n.method=(n.method||this.defaults.method||"get").toLowerCase();let l=a&&Ve.merge(a.common,a[n.method]);a&&Ve.forEach(["delete","get","head","post","put","patch","common"],m=>{delete a[m]}),n.headers=or.concat(l,a);const s=[];let u=!0;this.interceptors.request.forEach(function(v){typeof v.runWhen=="function"&&v.runWhen(n)===!1||(u=u&&v.synchronous,s.unshift(v.fulfilled,v.rejected))});const c=[];this.interceptors.response.forEach(function(v){c.push(v.fulfilled,v.rejected)});let f,d=0,p;if(!u){const m=[f4.bind(this),void 0];for(m.unshift.apply(m,s),m.push.apply(m,c),p=m.length,f=Promise.resolve(n);d
{if(!o._listeners)return;let a=o._listeners.length;for(;a-- >0;)o._listeners[a](r);o._listeners=null}),this.promise.then=r=>{let a;const l=new Promise(s=>{o.subscribe(s),a=s}).then(r);return l.cancel=function(){o.unsubscribe(a)},l},t(function(a,l,s){o.reason||(o.reason=new $i(a,l,s),n(o.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const n=this._listeners.indexOf(t);n!==-1&&this._listeners.splice(n,1)}static source(){let t;return{token:new iv(function(r){t=r}),cancel:t}}}const wce=iv;function Cce(e){return function(n){return e.apply(null,n)}}function Sce(e){return Ve.isObject(e)&&e.isAxiosError===!0}const W0={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(W0).forEach(([e,t])=>{W0[t]=e});const kce=W0;function Mb(e){const t=new Bu(e),n=sb(Bu.prototype.request,t);return Ve.extend(n,Bu.prototype,t,{allOwnKeys:!0}),Ve.extend(n,t,null,{allOwnKeys:!0}),n.create=function(r){return Mb(Hl(e,r))},n}const sn=Mb(lv);sn.Axios=Bu;sn.CanceledError=$i;sn.CancelToken=wce;sn.isCancel=Sb;sn.VERSION=xb;sn.toFormData=pd;sn.AxiosError=Rt;sn.Cancel=sn.CanceledError;sn.all=function(t){return Promise.all(t)};sn.spread=Cce;sn.isAxiosError=Sce;sn.mergeConfig=Hl;sn.AxiosHeaders=or;sn.formToJSON=e=>Cb(Ve.isHTMLForm(e)?new FormData(e):e);sn.getAdapter=Eb.getAdapter;sn.HttpStatusCode=kce;sn.default=sn;const Ti=sn.create({baseURL:"http://192.168.1.22:8324/api",timeout:1e4});Ti.interceptors.request.use(e=>{const t=localStorage.getItem("Token");return t&&(e.headers["X-Token"]="Bearer "+t),e},e=>(console.error(e),Promise.reject(e)));Ti.interceptors.response.use(e=>{if((e.data.status===401||e.data.status===4e4)&&(Ms({message:e.data.message,type:"error"}),setTimeout(()=>{const t=nv();t.setUserInfo({}),t.setToken(""),Tb.push("/login")},700)),e.data.status===400)throw Ms({message:e.data.message,type:"error"}),new Error(e.data.message);return e.data},e=>{var t,n;return console.error(e),Ms({message:((n=(t=e.response)==null?void 0:t.data)==null?void 0:n.message)||e,type:"error"}),Promise.reject(e)});function Xce(e){return Ti.post("auth/login",e)}function Jce(e){return Ti.get("user",e)}function Ece(){return Ti.post("logout")}const uv=(e,t)=>{const n=e.__vccOpts||e;for(const[o,r]of t)n[o]=r;return n},xce=e=>(W4("data-v-28f3f43a"),e=e(),j4(),e),Mce={class:"my-card"},$ce={class:"card-header"},Tce=xce(()=>k("div",{class:"card-title"},"里海收银系统",-1)),Oce={class:"card-body"},Ace={class:"el-dropdown-link"},Nce={class:"info"},Rce={style:{"margin-left":"0.3rem"}},Ice={__name:"myHeader",setup(e){const t=nv(),n=P({});n.value=t.userInfo.mer_info;const o=P({});o.value=t.userInfo.service;const r=nb(),a=()=>{Ece().then(()=>{t.setUserInfo({}),t.setToken(""),r.push("/login")}).catch(()=>{Ms({message:"退出失败",type:"error"})})};return(l,s)=>{const u=Ze("el-image"),c=Ze("el-avatar"),f=Ze("arrow-down"),d=Ze("el-icon"),p=Ze("el-dropdown-item"),h=Ze("el-dropdown-menu"),m=Ze("el-dropdown");return _(),M("div",Mce,[k("div",$ce,[W(u,{style:{height:"3rem",width:"3rem"},src:"https://lihai001.oss-cn-chengdu.aliyuncs.com/def/56a52202404051428413664.png"}),Tce]),k("div",Oce,[W(m,{trigger:"hover"},{dropdown:J(()=>[W(h,null,{default:J(()=>[W(p,{onClick:a},{default:J(()=>[gt("退出登录")]),_:1})]),_:1})]),default:J(()=>[k("div",Ace,[W(c,{src:o.value.avatar,icon:"user-filled"},null,8,["src"]),k("div",Nce,[k("div",null,[gt(Te(o.value.nickname)+" ",1),k("span",Rce,"("+Te(n.value.company_name||n.value.mer_name)+")",1)]),k("div",null,Te(i(t).userInfo.account),1)]),W(d,{class:"el-icon--right"},{default:J(()=>[W(f)]),_:1})])]),_:1})])])}}},Pce=uv(Ice,[["__scopeId","data-v-28f3f43a"]]),cv=e=>(W4("data-v-60ad4a9d"),e=e(),j4(),e),Lce={class:"my-card"},Vce=cv(()=>k("div",null,"收银",-1)),Bce=cv(()=>k("div",null,"订单",-1)),zce=cv(()=>k("div",null,"商品",-1)),Hce={__name:"myAside",setup(e){const t=nb(),n=eue(),o=r=>{t.push({name:r})};return(r,a)=>{const l=Ze("Sell"),s=Ze("el-icon"),u=Ze("DataLine"),c=Ze("ShoppingBag");return _(),M("div",Lce,[k("div",{class:T(["list-item",{active:i(n).name=="home"}]),onClick:a[0]||(a[0]=f=>o("home"))},[W(s,{size:"30"},{default:J(()=>[W(l)]),_:1}),Vce],2),k("div",{class:T(["list-item",{active:i(n).name=="order"}]),onClick:a[1]||(a[1]=f=>o("order"))},[W(s,{size:"30"},{default:J(()=>[W(u)]),_:1}),Bce],2),k("div",{class:T(["list-item",{active:i(n).name=="shop"}]),onClick:a[2]||(a[2]=f=>o("shop"))},[W(s,{size:"30"},{default:J(()=>[W(c)]),_:1}),zce],2)])}}},Dce=uv(Hce,[["__scopeId","data-v-60ad4a9d"]]),Fce={class:"common-layout"},Kce={__name:"index",setup(e){return(t,n)=>{const o=Ze("el-header"),r=Ze("el-aside"),a=Ze("router-view"),l=Ze("el-main"),s=Ze("el-container");return _(),M("div",Fce,[W(s,null,{default:J(()=>[W(o,null,{default:J(()=>[W(Pce)]),_:1}),W(s,null,{default:J(()=>[W(r,{width:"100px"},{default:J(()=>[W(Dce)]),_:1}),W(l,null,{default:J(()=>[W(a,{class:"my-main"},{default:J(({Component:u})=>[W(tn,{name:"el-fade-in-linear"},{default:J(()=>[(_(),le(it(u)))]),_:2},1024)]),_:1})]),_:1})]),_:1})]),_:1})])}}},Wce=uv(Kce,[["__scopeId","data-v-b7511b8b"]]),jce=[{path:"/",name:"layout",component:Wce,redirect:"/home",children:[{path:"/home",name:"home",component:()=>Qa(()=>import("./index-B6NJAtmD.js"),__vite__mapDeps([0,1,2,3,4,5]),import.meta.url)},{path:"/order",name:"order",component:()=>Qa(()=>import("./index-B4pghAyb.js"),__vite__mapDeps([6,1,2,3,7]),import.meta.url)},{path:"/orderList",name:"orderList",component:()=>Qa(()=>import("./indexList-Czsm3GIz.js"),__vite__mapDeps([8,1,2,9]),import.meta.url)},{path:"/shop",name:"shop",component:()=>Qa(()=>import("./index-C-KLbSdz.js"),__vite__mapDeps([10,4,11]),import.meta.url)}]},{path:"/login",name:"login",component:()=>Qa(()=>import("./index-BSmo2Z__.js"),__vite__mapDeps([12,13]),import.meta.url)},{path:"/:catchAll(.*)",name:"notFound",component:()=>Qa(()=>import("./index-y31P2_LV.js"),__vite__mapDeps([]),import.meta.url)}],$b=Zie({history:Mie(),routes:jce});$b.beforeEach((e,t,n)=>{const o=nv();e.name!=="login"&&!o.Token?n({name:"login"}):n()});const Tb=$b,Oi=Tg(J5);for(const[e,t]of Object.entries(xL))Oi.component(e,t);const qce=nue();Oi.use(Tb);Oi.use(qce);Oi.use(qse,{locale:Use});Oi.mount("#app");export{Jce as A,Ms as E,Ke as F,uv as _,Ze as a,k as b,le as c,W as d,gt as e,M as f,ht as g,kc as h,Mt as i,et as j,ne as k,j4 as l,rr as m,T as n,_ as o,W4 as p,nb as q,P as r,Ti as s,Te as t,nv as u,S as v,J as w,We as x,tt as y,Xce as z};
diff --git a/dist/assets/index-DPgzG1u8.js b/dist/assets/index-DPgzG1u8.js
deleted file mode 100644
index c22d9ba..0000000
--- a/dist/assets/index-DPgzG1u8.js
+++ /dev/null
@@ -1 +0,0 @@
-import{_ as M,u as T,r,a as g,h as U,o as i,f as a,b as e,d as l,w as f,e as h,i as J,j,F as z,g as F,n as A,t as d,c as O,k as b,p as q,l as H,q as Q,E as N}from"./index-VTp4Jfxm.js";import{e as W,p as X,f as Y,g as Z}from"./pay-wwG0X046.js";import{p as ee}from"./padding-DEByEsBs.js";function te(n){return{all:n=n||new Map,on:function(p,t){var _=n.get(p);_?_.push(t):n.set(p,[t])},off:function(p,t){var _=n.get(p);_&&(t?_.splice(_.indexOf(t)>>>0,1):n.set(p,[]))},emit:function(p,t){var _=n.get(p);_&&_.slice().map(function(u){u(t)}),(_=n.get("*"))&&_.slice().map(function(u){u(p,t)})}}}const K=te(),se=n=>(q("data-v-b34b92e4"),n=n(),H(),n),oe={class:"my-order"},ie={class:"header-nav"},ae=se(()=>e("div",{class:"nav-item"},"订单列表",-1)),le={class:"nav-item-clear"},ne={class:"header-input"},ce={class:"order-list","infinite-scroll-distance":"300","infinite-scroll-delay":"500",style:{overflow:"auto"}},de=["onClick"],re={class:"top"},_e={class:"create-time"},ue={class:"shop"},ve={key:0,class:"left"},fe={key:0,class:"shop-name"},pe={class:"right"},me={class:"money"},he={class:"count"},ye={class:"bottom"},ge={class:"pay"},ke={key:0},be={key:1,style:{color:"#ff4a00"}},$e={key:0,class:"cashier"},Ce={key:1,class:"cashier"},we={key:0,class:"load-end"},Ve={key:1,class:"load-end"},Se={__name:"order",setup(n){const p=T();r([]);const t=r(1),_=C=>{u.value.page=1,y.value=!1,v.value=!1,$.value=[],V(!0)};r(null);const u=r({page:1,limit:20,search_info:""}),v=r(!1),L=r(0),S=r(0),y=r(!1),$=r([]),V=(C=!1)=>{if(C)u.value.page=1;else if(y.value||v.value)return;v.value=!0,t.value==1&&(u.value.paid=null),t.value==2&&(u.value.paid=0),W(p.userInfo.service.mer_id,u.value).then(o=>{C?$.value=o.data.list:$.value=[...$.value,...o.data.list],o.data.list.length