"use strict";const e=require("../../common/vendor.js"),a=require("../../api/api.js");if(!Array){(e.resolveComponent("statusBar")+e.resolveComponent("z-paging")+e.resolveComponent("cc-myTabbar"))()}Math||((()=>"../../components/statusBar/statusBar.js")+(()=>"../../uni_modules/z-paging/components/z-paging/z-paging.js")+(()=>"../../uni_modules/cc-myTabbar/components/cc-myTabbar/cc-myTabbar.js"))();const t={__name:"order",setup(t){const o=e.ref(null);let r=e.ref([]);e.ref([]);let n=e.ref(1),s=e.ref([{name:"全部",type:""},{name:"进行中",type:1},{name:"已完成",type:2},{name:"待支付",type:3}]),c=e=>{n.value=e,o.value.reload()};e.onLoad((async()=>{}));let u=a=>{2!=a.status&&3!=a.status&&4!=a.status||e.index.navigateTo({url:`/pageOrder/recharge/recharge?transactionNo=${a.transactionNo}&type=order`})},l=()=>!o.value;e.onPullDownRefresh((()=>{l()||o.value.reload().catch((()=>{}))})),e.onPageScroll((e=>{l()||(o.value.updatePageScrollTop(e.scrollTop),e.scrollTop<10&&o.value.doChatRecordLoadMore())})),e.onReachBottom((()=>{l()||o.value.pageReachBottom()}));const p=(e,t)=>{const r={current:e,pageSize:t,type:n.value};a.ordersList(r).then((e=>{o.value.complete(e)})).catch((e=>{o.value.complete(!1)}))};return(a,t)=>({a:e.f(e.unref(s),((a,t,o)=>e.e({a:e.t(a.name),b:a.type==e.unref(n)},(a.type,e.unref(n),{}),{c:e.o((t=>e.unref(c)(a.type)),t),d:t,e:e.n(e.unref(n)==a.type?"order_header_active":"")}))),b:e.f(e.unref(r),((a,t,o)=>({a:e.t(a.orderNo),b:e.t(a.startTime),c:e.t(a.endTime),d:e.t(a.useDegree),e:e.t(a.serviceAmount),f:e.t(a.electricityAmount),g:e.t(a.preAmount),h:e.t(a.actuallyAmount),i:t,j:e.o((t=>e.unref(u)(a)),t)}))),c:e.sr(o,"2fb2318d-0",{k:"paging"}),d:e.o(p),e:e.o((a=>e.isRef(r)?r.value=a:r=a)),f:e.p({"use-page-scroll":!0,modelValue:e.unref(r)}),g:e.p({tabBarShow:3})})}},o=e._export_sfc(t,[["__scopeId","data-v-2fb2318d"]]);t.__runtimeHooks=1,wx.createPage(o);
