pages-activity-groupon-order.Cnl6jysm.js 3.8 KB

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