1 |
- import{z as t,o as a,A as s,b as e,d as o,f as i,g as n,w as r,a8 as l,_ as u,m as d,k as p,i as c,l as m,r as g,F as _,n as f,j as b,u as y,v as j,E as k,x as v,s as x,J as S}from"./index-a116b7fa.js";import{_ as C}from"./su-tabs.cd675673.js";import{_ as h}from"./su-sticky.41b75182.js";import{_ as w}from"./s-empty.4d7f5239.js";import{_ as z}from"./s-goods-item.e5b69bb0.js";import{_ as T}from"./uni-load-more.2682655d.js";import{_ as N}from"./s-layout.4ae51839.js";import{r as G,k as I}from"./useGoods.6b315a78.js";import{_ as M}from"./_plugin-vue_export-helper.1b428a4d.js";import"./uni-badge.9d757a16.js";/* empty css */import"./points.c381a8e1.js";/* empty css */import"./phone-international-input.b9f6c8e6.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){G(B.pagination),B.currentTab=t.index,A()}async function A(){B.loadStatus="loading";const{code:t,data:a}=await l.getCombinationRecordPage({pageNo:B.pagination.pageNo,pageSize:B.pagination.pageSize,status:P[B.currentTab].value});0===t&&(B.pagination.list=u.concat(B.pagination.list,a.list),B.pagination.total=a.total,B.loadStatus=B.pagination.list.length<B.pagination.total?"more":"noMore")}function E(){"noMore"!==B.loadStatus&&(B.pagination.pageNo++,A())}return a((t=>{t.type&&(B.currentTab=t.type),A()})),s((()=>{E()})),e((()=>{A(),setTimeout((function(){o()}),800)})),(t,a)=>{const s=d(f("su-tabs"),C),e=d(f("su-sticky"),h),o=d(f("s-empty"),w),l=b,u=d(f("s-goods-item"),z),G=S,M=d(f("uni-load-more"),T),A=d(f("s-layout"),N);return i(),n(A,{title:"我的拼团"},{default:r((()=>[p(e,{bgColor:"#fff"},{default:r((()=>[p(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"})):c("",!0),B.pagination.total>0?(i(),n(l,{key:1},{default:r((()=>[(i(!0),m(_,null,g(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((()=>[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(I)(t)])},{default:r((()=>[y(j(P.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),B.pagination.total>0?(i(),n(M,{key:2,status:B.loadStatus,"content-text":{contentdown:"上拉加载更多"},onClick:E},null,8,["status"])):c("",!0)])),_:1})}}},[["__scopeId","data-v-820b17f8"]]);export{B as default};
|