"use strict";const e=require("../../common/vendor.js"),o=require("../../api/index.js"),t=require("../../utils/fun.js");if(!Array){(e.resolveComponent("wd-navbar")+e.resolveComponent("z-paging"))()}Math||((()=>"../../uni_modules/wot-design-uni/components/wd-navbar/wd-navbar.js")+(()=>"../../uni_modules/z-paging/components/z-paging/z-paging.js"))();const a=e.defineComponent({__name:"order",setup(a){const r=e.ref(null),d=e.ref([]),n=e.ref({orderType:1,payStatus:"",orderStatus:""}),u=e=>{n.value.orderStatus=e,r.value.reload()},s=(e,t)=>{o.api.orderPage({pageNo:e,pageSize:t,...n.value}).then((e=>{r.value.complete(e.list)})).catch((e=>{r.value.complete(!1)}))};return(o,a)=>({a:e.p({title:"订单",safeAreaInsetTop:!0}),b:e.n(""===n.value.orderStatus?"active":""),c:e.o((e=>u(""))),d:e.n(0===n.value.orderStatus?"active":""),e:e.o((e=>u(0))),f:e.n(1==n.value.orderStatus?"active":""),g:e.o((e=>u(1))),h:e.n(2==n.value.orderStatus?"active":""),i:e.o((e=>u(2))),j:e.f(d.value,((o,a,r)=>e.e({a:e.t(o.orderNo),b:0===o.orderStatus},(o.orderStatus,{}),{c:1==o.orderStatus},(o.orderStatus,{}),{d:o.goods.cover,e:e.t(o.goods.name),f:e.t(o.goods.specs),g:e.t(o.goodsNum),h:o.deductionAmount},o.deductionAmount?{i:e.t(o.deductionAmount)}:{},{j:e.t(o.payableAmount),k:e.t(e.unref(t.timeFormat)(o.createTime,"yyyy-MM-dd hh:mm:ss")),l:1==o.orderStatus},1==o.orderStatus?{m:e.o((t=>{return a=o.goodsId,void e.index.navigateTo({url:"/pages/goods/goods?id="+a});var a}),a)}:{},{n:a}))),k:e.sr(r,"c72dbade-0",{k:"paging"}),l:e.o(s),m:e.o((e=>d.value=e)),n:e.p({modelValue:d.value})})}}),r=e._export_sfc(a,[["__scopeId","data-v-c72dbade"]]);wx.createPage(r);
