"use strict";const e=require("../../../common/vendor.js"),o=require("../../../sheep/index.js"),t=require("../../../sheep/hooks/useGoods.js"),r=require("../../../sheep/util/index.js"),s=require("../../../sheep/api/promotion/combination.js");if(require("../../../sheep/url/index.js"),require("../../../sheep/store/index.js"),require("../../../sheep/store/app.js"),require("../../../sheep/api/promotion/diy.js"),require("../../../sheep/request/index.js"),require("../../../sheep/config/index.js"),require("../../../sheep/platform/index.js"),require("../../../sheep/platform/provider/wechat/index.js"),require("../../../sheep/platform/provider/wechat/miniProgram.js"),require("../../../sheep/api/member/auth.js"),require("../../../sheep/api/member/social.js"),require("../../../sheep/api/member/user.js"),require("../../../sheep/platform/provider/apple/index.js"),require("../../../sheep/platform/share.js"),require("../../../sheep/router/index.js"),require("../../../sheep/hooks/useModal.js"),require("../../../sheep/helper/index.js"),require("../../../sheep/helper/test.js"),require("../../../sheep/helper/digit.js"),require("../../../sheep/api/member/signin.js"),require("../../../sheep/helper/throttle.js"),require("../../../sheep/platform/pay.js"),require("../../../sheep/api/pay/order.js"),require("../../../sheep/store/user.js"),require("../../../sheep/store/cart.js"),require("../../../sheep/api/trade/cart.js"),require("../../../sheep/api/pay/wallet.js"),require("../../../sheep/api/trade/order.js"),require("../../../sheep/api/promotion/coupon.js"),require("../../../sheep/store/sys.js"),require("../../../sheep/store/modal.js"),require("../../../sheep/config/zIndex.js"),!Array){(e.resolveComponent("su-tabs")+e.resolveComponent("su-sticky")+e.resolveComponent("s-empty")+e.resolveComponent("s-goods-item")+e.resolveComponent("uni-load-more")+e.resolveComponent("s-layout"))()}Math||((()=>"../../../sheep/ui/su-tabs/su-tabs.js")+(()=>"../../../sheep/ui/su-sticky/su-sticky.js")+(()=>"../../../sheep/components/s-empty/s-empty.js")+(()=>"../../../sheep/components/s-goods-item/s-goods-item.js")+(()=>"../../../uni_modules/uni-load-more/components/uni-load-more/uni-load-more.js")+(()=>"../../../sheep/components/s-layout/s-layout.js"))();const i={__name:"order",setup(i){const a=e.reactive({currentTab:0,pagination:{list:[],total:0,pageNo:1,pageSize:5},loadStatus:"",deleteOrderId:0}),n=[{name:"全部"},{name:"进行中",value:0},{name:"拼团成功",value:1},{name:"拼团失败",value:2}];function p(e){r.resetPagination(a.pagination),a.currentTab=e.index,u()}async function u(){a.loadStatus="loading";const{code:o,data:t}=await s.CombinationApi.getCombinationRecordPage({pageNo:a.pagination.pageNo,pageSize:a.pagination.pageSize,status:n[a.currentTab].value});0===o&&(a.pagination.list=e._.concat(a.pagination.list,t.list),a.pagination.total=t.total,a.loadStatus=a.pagination.list.length<a.pagination.total?"more":"noMore")}function l(){"noMore"!==a.loadStatus&&(a.pagination.pageNo++,u())}return e.onLoad((e=>{e.type&&(a.currentTab=e.type),u()})),e.onReachBottom((()=>{l()})),e.onPullDownRefresh((()=>{u(),setTimeout((function(){e.index.stopPullDownRefresh()}),800)})),(r,s)=>e.e({a:e.o(p),b:e.p({list:n,scrollable:!1,current:a.currentTab}),c:e.p({bgColor:"#fff"}),d:0===a.pagination.total},0===a.pagination.total?{e:e.p({icon:"/static/goods-empty.png"})}:{},{f:a.pagination.total>0},a.pagination.total>0?{g:e.f(a.pagination.list,((r,s,i)=>({a:e.t(r.id),b:e.t(n.find((e=>e.value===r.status)).name),c:e.n(e.unref(t.formatOrderColor)(r)),d:e.t(r.userSize),e:"820b17f8-4-"+i+",820b17f8-0",f:e.p({img:r.picUrl,title:r.spuName,price:r.combinationPrice}),g:e.o((t=>e.unref(o.sheep).$router.go("/pages/order/detail",{id:r.orderId})),r.id),h:e.t(0===r.status?"邀请拼团":"拼团详情"),i:0===r.status?1:"",j:e.o((t=>e.unref(o.sheep).$router.go("/pages/activity/groupon/detail",{id:r.id})),r.id),k:r.id})))}:{},{h:a.pagination.total>0},a.pagination.total>0?{i:e.o(l),j:e.p({status:a.loadStatus,"content-text":{contentdown:"上拉加载更多"}})}:{},{k:e.p({title:"我的拼团"})})}},a=e._export_sfc(i,[["__scopeId","data-v-820b17f8"]]);wx.createPage(a);
