pages-activity-groupon-order.88449fcf.js 3.6 KB

1
  1. import{v as t,o as a,x 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 c,k as p,r as m,F as g,m as _,i as f,p as b,t as y,z as j,u as x,s as v,D as k}from"./index-9880b451.js";import{_ as C}from"./su-tabs.1ce39404.js";import{_ as S}from"./su-sticky.84aef901.js";import{_ as w}from"./s-empty.74111684.js";import{_ as h}from"./s-goods-item.f5d79fd7.js";import{_ as T}from"./uni-load-more.aac4524a.js";import{_ as z}from"./s-layout.dfc5b0b5.js";import{j as N}from"./useGoods.bdd1c2ea.js";import{r as G}from"./index.df38848e.js";import{C as I}from"./combination.bbc1e13b.js";import{_ as M}from"./_plugin-vue_export-helper.1b428a4d.js";/* empty css *//* empty css */const P=M({__name:"order",setup(M){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 B(t){G(P.pagination),P.currentTab=t.index,D()}async function D(){P.loadStatus="loading";const{code:t,data:a}=await I.getCombinationRecordPage({pageNo:P.pagination.pageNo,pageSize:P.pagination.pageSize,status:$[P.currentTab].value});0===t&&(P.pagination.list=l.concat(P.pagination.list,a.list),P.pagination.total=a.total,P.loadStatus=P.pagination.list.length<P.pagination.total?"more":"noMore")}function F(){"noMore"!==P.loadStatus&&(P.pagination.pageNo++,D())}return a((t=>{t.type&&(P.currentTab=t.type),D()})),s((()=>{F()})),e((()=>{D(),setTimeout((function(){o()}),800)})),(t,a)=>{const s=u(_("su-tabs"),C),e=u(_("su-sticky"),S),o=u(_("s-empty"),w),l=f,G=u(_("s-goods-item"),h),I=k,M=u(_("uni-load-more"),T),D=u(_("s-layout"),z);return i(),n(D,{title:"我的拼团"},{default:r((()=>[d(e,{bgColor:"#fff"},{default:r((()=>[d(s,{list:$,scrollable:!1,onChange:B,current:P.currentTab},null,8,["current"])])),_:1}),0===P.pagination.total?(i(),n(o,{key:0,icon:"/static/goods-empty.png"})):c("",!0),P.pagination.total>0?(i(),n(l,{key:1},{default:r((()=>[(i(!0),p(g,null,m(P.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",x(N)(t)])},{default:r((()=>[b(y($.find((a=>a.value===t.status)).name),1)])),_:2},1032,["class"])])),_:2},1024),d(l,{class:"border-bottom"},{default:r((()=>[d(G,{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=>x(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=>x(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})):c("",!0),P.pagination.total>0?(i(),n(M,{key:2,status:P.loadStatus,"content-text":{contentdown:"上拉加载更多"},onClick:F},null,8,["status"])):c("",!0)])),_:1})}}},[["__scopeId","data-v-820b17f8"]]);export{P as default};