1 |
- 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 _,i as f,t as b,u as y,B as j,v as k,s as v,G as x}from"./index-b48a414d.js";import{_ as C}from"./su-tabs.a383f815.js";import{_ as S}from"./su-sticky.aabc6a00.js";import{_ as h}from"./s-empty.6d3471cc.js";import{_ as w}from"./s-goods-item.13120f93.js";import{_ as z}from"./uni-load-more.647920f4.js";import{r as T,_ as N,m as G}from"./s-layout.d6dcdc81.js";import{C as I}from"./combination.1281dd6d.js";import{_ as M}from"./_plugin-vue_export-helper.1b428a4d.js";import"./uni-badge.78cdef34.js";/* empty css */import"./points.c381a8e1.js";/* empty css */import"./phone-international-input.feef99c7.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){T(B.pagination),B.currentTab=t.index,A()}async function A(){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 F(){"noMore"!==B.loadStatus&&(B.pagination.pageNo++,A())}return a((t=>{t.type&&(B.currentTab=t.type),A()})),s((()=>{F()})),e((()=>{A(),setTimeout((function(){o()}),800)})),(t,a)=>{const s=u(_("su-tabs"),C),e=u(_("su-sticky"),S),o=u(_("s-empty"),h),l=f,T=u(_("s-goods-item"),w),I=x,M=u(_("uni-load-more"),z),A=u(_("s-layout"),N);return i(),n(A,{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",k(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(T,{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=>k(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=>k(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:F},null,8,["status"])):p("",!0)])),_:1})}}},[["__scopeId","data-v-820b17f8"]]);export{B as default};
|