import{B as t,o as a,C as s,b as e,d as o,f as i,g as n,w as r,aa as l,_ as u,q as d,n as p,i as c,p as m,r as g,F as _,u as f,l as b,m as y,t as j,H as k,z as v,s as x,L as C}from"./index-007bf156.js";import{_ as S}from"./su-tabs.6f882e3d.js";import{_ as h}from"./su-sticky.42fb87b3.js";import{_ as w}from"./s-empty.df9577ad.js";import{_ as z}from"./s-goods-item.8ceb696e.js";import{_ as T}from"./uni-load-more.4c025ab2.js";import{_ as N}from"./s-layout.19bedb43.js";import{r as G,k as B}from"./useGoods.ac3bf93e.js";import{_ as I}from"./_plugin-vue_export-helper.1b428a4d.js";import"./uni-badge.cf8b6051.js";/* empty css                                                                */import"./points.c381a8e1.js";/* empty css                                                                     */import"./phone-international-input.3617e4e0.js";const M=I({__name:"order",setup(I){const M=t({currentTab:0,pagination:{list:[],total:0,pageNo:1,pageSize:5},loadStatus:"",deleteOrderId:0}),H=[{name:"全部"},{name:"进行中",value:0},{name:"拼团成功",value:1},{name:"拼团失败",value:2}];function P(t){G(M.pagination),M.currentTab=t.index,$()}async function $(){M.loadStatus="loading";const{code:t,data:a}=await l.getCombinationRecordPage({pageNo:M.pagination.pageNo,pageSize:M.pagination.pageSize,status:H[M.currentTab].value});0===t&&(M.pagination.list=u.concat(M.pagination.list,a.list),M.pagination.total=a.total,M.loadStatus=M.pagination.list.length<M.pagination.total?"more":"noMore")}function q(){"noMore"!==M.loadStatus&&(M.pagination.pageNo++,$())}return a((t=>{t.type&&(M.currentTab=t.type),$()})),s((()=>{q()})),e((()=>{$(),setTimeout((function(){o()}),800)})),(t,a)=>{const s=d(f("su-tabs"),S),e=d(f("su-sticky"),h),o=d(f("s-empty"),w),l=b,u=d(f("s-goods-item"),z),G=C,I=d(f("uni-load-more"),T),$=d(f("s-layout"),N);return i(),n($,{title:"我的拼团"},{default:r((()=>[p(e,{bgColor:"#fff"},{default:r((()=>[p(s,{list:H,scrollable:!1,onChange:P,current:M.currentTab},null,8,["current"])])),_:1}),0===M.pagination.total?(i(),n(o,{key:0,icon:"/static/goods-empty.png"})):c("",!0),M.pagination.total>0?(i(),n(l,{key:1},{default:r((()=>[(i(!0),m(_,null,g(M.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((()=>[p(l,{class:"order-card-header ss-flex ss-col-center ss-row-between ss-p-x-20"},{default:r((()=>[p(l,{class:"order-no"},{default:r((()=>[y("拼团编号："+j(t.id),1)])),_:2},1024),p(l,{class:k(["ss-font-26",v(B)(t)])},{default:r((()=>[y(j(H.find((a=>a.value===t.status)).name),1)])),_:2},1032,["class"])])),_:2},1024),p(l,{class:"border-bottom"},{default:r((()=>[p(u,{img:t.picUrl,title:t.spuName,price:t.combinationPrice},{groupon:r((()=>[p(l,{class:"ss-flex"},{default:r((()=>[p(l,{class:"sales-title"},{default:r((()=>[y(j(t.userSize)+" 人团 ",1)])),_:2},1024)])),_:2},1024)])),_:2},1032,["img","title","price"])])),_:2},1024),p(l,{class:"order-card-footer ss-flex ss-row-right ss-p-x-20"},{default:r((()=>[p(G,{class:"detail-btn ss-reset-button",onClick:a=>v(x).$router.go("/pages/order/detail",{id:t.orderId})},{default:r((()=>[y(" 订单详情 ")])),_:2},1032,["onClick"]),p(G,{class:k(["tool-btn ss-reset-button",{"ui-BG-Main-Gradient":0===t.status}]),onClick:a=>v(x).$router.go("/pages/activity/groupon/detail",{id:t.id})},{default:r((()=>[y(j(0===t.status?"邀请拼团":"拼团详情"),1)])),_:2},1032,["class","onClick"])])),_:2},1024)])),_:2},1024)))),128))])),_:1})):c("",!0),M.pagination.total>0?(i(),n(I,{key:2,status:M.loadStatus,"content-text":{contentdown:"上拉加载更多"},onClick:q},null,8,["status"])):c("",!0)])),_:1})}}},[["__scopeId","data-v-820b17f8"]]);export{M as default};
