import{y as t,o as a,z as s,a as e,b as o,e as i,f as n,w as r,_ as l,l as u,j as d,g as p,k as c,r as m,F as g,m as f,i as _,t as b,u as y,B as j,v as x,s as v,G as k}from"./index-9aa72eed.js";import{_ as C}from"./su-tabs.801f7709.js";import{_ as S}from"./su-sticky.8fbea04e.js";import{_ as w}from"./s-empty.3adf8b58.js";import{_ as h}from"./s-goods-item.61fdff9d.js";import{_ as T}from"./uni-load-more.93dce372.js";import{_ as z}from"./s-layout.bffb18b8.js";import{r as N,j as G}from"./useGoods.ce02ada2.js";import{C as I}from"./combination.2ca2f38a.js";import{_ as M}from"./_plugin-vue_export-helper.1b428a4d.js";import"./uni-badge.cc270d88.js";/* empty css                                                                *//* empty css                                                                     */import"./form.c66b5271.js";const B=M({__name:"order",setup(M){const B=t({currentTab:0,pagination:{list:[],total:0,pageNo:1,pageSize:5},loadStatus:"",deleteOrderId:0}),P=[{name:"全部"},{name:"进行中",value:0},{name:"拼团成功",value:1},{name:"拼团失败",value:2}];function $(t){N(B.pagination),B.currentTab=t.index,F()}async function F(){B.loadStatus="loading";const{code:t,data:a}=await I.getCombinationRecordPage({pageNo:B.pagination.pageNo,pageSize:B.pagination.pageSize,status:P[B.currentTab].value});0===t&&(B.pagination.list=l.concat(B.pagination.list,a.list),B.pagination.total=a.total,B.loadStatus=B.pagination.list.length<B.pagination.total?"more":"noMore")}function O(){"noMore"!==B.loadStatus&&(B.pagination.pageNo++,F())}return a((t=>{t.type&&(B.currentTab=t.type),F()})),s((()=>{O()})),e((()=>{F(),setTimeout((function(){o()}),800)})),(t,a)=>{const s=u(f("su-tabs"),C),e=u(f("su-sticky"),S),o=u(f("s-empty"),w),l=_,N=u(f("s-goods-item"),h),I=k,M=u(f("uni-load-more"),T),F=u(f("s-layout"),z);return i(),n(F,{title:"我的拼团"},{default:r((()=>[d(e,{bgColor:"#fff"},{default:r((()=>[d(s,{list:P,scrollable:!1,onChange:$,current:B.currentTab},null,8,["current"])])),_:1}),0===B.pagination.total?(i(),n(o,{key:0,icon:"/static/goods-empty.png"})):p("",!0),B.pagination.total>0?(i(),n(l,{key:1},{default:r((()=>[(i(!0),c(g,null,m(B.pagination.list,(t=>(i(),n(l,{class:"order-list-card-box bg-white ss-r-10 ss-m-t-14 ss-m-20",key:t.id},{default:r((()=>[d(l,{class:"order-card-header ss-flex ss-col-center ss-row-between ss-p-x-20"},{default:r((()=>[d(l,{class:"order-no"},{default:r((()=>[b("拼团编号："+y(t.id),1)])),_:2},1024),d(l,{class:j(["ss-font-26",x(G)(t)])},{default:r((()=>[b(y(P.find((a=>a.value===t.status)).name),1)])),_:2},1032,["class"])])),_:2},1024),d(l,{class:"border-bottom"},{default:r((()=>[d(N,{img:t.picUrl,title:t.spuName,price:t.combinationPrice},{groupon:r((()=>[d(l,{class:"ss-flex"},{default:r((()=>[d(l,{class:"sales-title"},{default:r((()=>[b(y(t.userSize)+" 人团 ",1)])),_:2},1024)])),_:2},1024)])),_:2},1032,["img","title","price"])])),_:2},1024),d(l,{class:"order-card-footer ss-flex ss-row-right ss-p-x-20"},{default:r((()=>[d(I,{class:"detail-btn ss-reset-button",onClick:a=>x(v).$router.go("/pages/order/detail",{id:t.orderId})},{default:r((()=>[b(" 订单详情 ")])),_:2},1032,["onClick"]),d(I,{class:j(["tool-btn ss-reset-button",{"ui-BG-Main-Gradient":0===t.status}]),onClick:a=>x(v).$router.go("/pages/activity/groupon/detail",{id:t.id})},{default:r((()=>[b(y(0===t.status?"邀请拼团":"拼团详情"),1)])),_:2},1032,["class","onClick"])])),_:2},1024)])),_:2},1024)))),128))])),_:1})):p("",!0),B.pagination.total>0?(i(),n(M,{key:2,status:B.loadStatus,"content-text":{contentdown:"上拉加载更多"},onClick:O},null,8,["status"])):p("",!0)])),_:1})}}},[["__scopeId","data-v-820b17f8"]]);export{B as default};
