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