1 |
- import{v as t,o as s,m as a,p as e,q as o,a as i,b as n,d as l,w as r,aa as u,_ as p,e as d,f as c,z as _,x as m,y as g,F as f,i as y,g as b,j,J as v,u as x,s as k,M as h}from"./index-CIHXBJK6.js";import{_ as C}from"./su-tabs.NcbPNEXM.js";import{_ as S}from"./su-sticky.BXThrqP3.js";import{_ as w}from"./s-empty.DFelyBfT.js";import{_ as z}from"./s-goods-item.aywIWGqs.js";import{_ as T}from"./uni-load-more.DLKkFol3.js";import{_ as N}from"./s-layout.DsRVkhyD.js";import{r as G,k as M}from"./useGoods.BMh-0Uau.js";import{_ as I}from"./_plugin-vue_export-helper.BCo6x5W8.js";import"./uni-badge.CBhCW0hV.js";/* empty css */import"./points.DDTOnulC.js";/* empty css */import"./s-menu-tools.Di3ooeY2.js";import"./s-search-block.vue_vue_type_style_index_0_scoped_f692e81a_lang.XupmRtHT.js";import"./uni-icons.Dn5XuiUW.js";import"./s-layout.vue_vue_type_style_index_0_scoped_d5f7c468_lang.X__YG5gI.js";import"./phone-international-input.vue_vue_type_style_index_0_scoped_a793e264_lang._Ymtd1hH.js";import"./s-search-block.Bj2KQbpW.js";import"./phone-international-input.11CX4hdU.js";const P=I({__name:"order",setup(I){const P=t({currentTab:0,pagination:{list:[],total:0,pageNo:1,pageSize:5},loadStatus:"",deleteOrderId:0}),q=[{name:"全部"},{name:"进行中",value:0},{name:"拼团成功",value:1},{name:"拼团失败",value:2}];function B(t){G(P.pagination),P.currentTab=t.index,J()}async function J(){P.loadStatus="loading";const{code:t,data:s}=await u.getCombinationRecordPage({pageNo:P.pagination.pageNo,pageSize:P.pagination.pageSize,status:q[P.currentTab].value});0===t&&(P.pagination.list=p.concat(P.pagination.list,s.list),P.pagination.total=s.total,P.loadStatus=P.pagination.list.length<P.pagination.total?"more":"noMore")}function U(){"noMore"!==P.loadStatus&&(P.pagination.pageNo++,J())}return s((t=>{t.type&&(P.currentTab=t.type),J()})),a((()=>{U()})),e((()=>{J(),setTimeout((function(){o()}),800)})),(t,s)=>{const a=i(n("su-tabs"),C),e=i(n("su-sticky"),S),o=i(n("s-empty"),w),u=y,p=i(n("s-goods-item"),z),G=h,I=i(n("uni-load-more"),T),J=i(n("s-layout"),N);return d(),l(J,{title:"我的拼团"},{default:r((()=>[c(e,{bgColor:"#fff"},{default:r((()=>[c(a,{list:q,scrollable:!1,onChange:B,current:P.currentTab},null,8,["current"])])),_:1}),0===P.pagination.total?(d(),l(o,{key:0,icon:"/static/goods-empty.png"})):_("",!0),P.pagination.total>0?(d(),l(u,{key:1},{default:r((()=>[(d(!0),m(f,null,g(P.pagination.list,(t=>(d(),l(u,{class:"order-list-card-box bg-white ss-r-10 ss-m-t-14 ss-m-20",key:t.id},{default:r((()=>[c(u,{class:"order-card-header ss-flex ss-col-center ss-row-between ss-p-x-20"},{default:r((()=>[c(u,{class:"order-no"},{default:r((()=>[b("拼团编号:"+j(t.id),1)])),_:2},1024),c(u,{class:v(["ss-font-26",x(M)(t)])},{default:r((()=>[b(j(q.find((s=>s.value===t.status)).name),1)])),_:2},1032,["class"])])),_:2},1024),c(u,{class:"border-bottom"},{default:r((()=>[c(p,{img:t.picUrl,title:t.spuName,price:t.combinationPrice},{groupon:r((()=>[c(u,{class:"ss-flex"},{default:r((()=>[c(u,{class:"sales-title"},{default:r((()=>[b(j(t.userSize)+" 人团 ",1)])),_:2},1024)])),_:2},1024)])),_:2},1032,["img","title","price"])])),_:2},1024),c(u,{class:"order-card-footer ss-flex ss-row-right ss-p-x-20"},{default:r((()=>[c(G,{class:"detail-btn ss-reset-button",onClick:s=>x(k).$router.go("/pages/order/detail",{id:t.orderId})},{default:r((()=>[b(" 订单详情 ")])),_:2},1032,["onClick"]),c(G,{class:v(["tool-btn ss-reset-button",{"ui-BG-Main-Gradient":0===t.status}]),onClick:s=>x(k).$router.go("/pages/activity/groupon/detail",{id:t.id})},{default:r((()=>[b(j(0===t.status?"邀请拼团":"拼团详情"),1)])),_:2},1032,["class","onClick"])])),_:2},1024)])),_:2},1024)))),128))])),_:1})):_("",!0),P.pagination.total>0?(d(),l(I,{key:2,status:P.loadStatus,"content-text":{contentdown:"上拉加载更多"},onClick:U},null,8,["status"])):_("",!0)])),_:1})}}},[["__scopeId","data-v-cc6fc41b"]]);export{P as default};
|