acdr-ui/dist/build/mp-weixin/pages/order/index.js

2 lines
1.7 KiB
JavaScript

"use strict";var e=(e,r,t)=>new Promise(((s,a)=>{var o=e=>{try{i(t.next(e))}catch(r){a(r)}},n=e=>{try{i(t.throw(e))}catch(r){a(r)}},i=e=>e.done?s(e.value):Promise.resolve(e.value).then(o,n);i((t=t.apply(e,r)).next())}));const r=require("../../common/vendor.js"),t=require("../../utils/http.js");if(!Array){r.resolveComponent("layout-default-uni")()}Math||(s+a)();const s=()=>"./components/OrderItem.js",a=()=>"../../components/EmptyState.js",o={__name:"index",setup(s){const a={"待付款":"待支付","待接单":"已支付","已预约":"已接单","待评价":"已完成"},o=r.ref("全部"),n=["全部","待付款","待接单","已预约","待评价"],i=r.ref([]),c=()=>e(this,null,(function*(){try{const e=yield t.httpPost("/order/query",{current:1,size:1e3},{state:a[o.value]||null});200!==e.code&&204!==e.code||(i.value=e.records)}catch(e){}})),d=r=>e(this,null,(function*(){o.value=r,yield c()}));return r.onLoad((()=>e(this,null,(function*(){yield c()})))),(e,t)=>r.e({a:r.f(n,((e,t,s)=>r.e({a:r.t(e),b:o.value===e},(o.value,{}),{c:e,d:r.n({"text-yellow-500":o.value===e}),e:r.o((r=>d(e)),e)}))),b:r.f(i.value,((e,t,s)=>({a:r.o(c,e.id),b:e.id,c:e.id,d:"3b76b624-1-"+s+",3b76b624-0",e:r.p({id:e.id,userId:e.userId,reservationTime:e.reservationTime,serviceHours:e.serviceHours,personalServiceId:e.personalServiceId,personalServiceUserId:e.personalServiceUserId,price:e.price,isPay:e.isPay,feedback:e.feedback,star:e.star,state:e.state,paymentMethod:e.paymentMethod,qrcode:e.qrcode,createTime:e.createTime,updateTime:e.updateTime,address:e.address,pet:e.pet,user:e.user,psUser:e.psUser,serviceInfo:e.serviceInfo}),f:e.id}))),c:0===i.value.length},(i.value.length,{}))}},n=r._export_sfc(o,[["__scopeId","data-v-3b76b624"]]);wx.createPage(n);