pages-activity-groupon-order.b185ffe7.js 3.6 KB

1
  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 x,x as k,s as v,J as S}from"./index-0faec82b.js";import{_ as C}from"./su-tabs.e1f9e515.js";import{_ as h}from"./su-sticky.7f287b60.js";import{_ as w}from"./s-empty.9ea3b407.js";import{_ as T}from"./s-goods-item.19ab5cc0.js";import{_ as z}from"./uni-load-more.860cfa8a.js";import{_ as N}from"./s-layout.88d8cb8b.js";import{r as G,j as I}from"./useGoods.b071619b.js";import{_ as M}from"./_plugin-vue_export-helper.1b428a4d.js";import"./uni-badge.40ec8b65.js";/* empty css */import"./points.c381a8e1.js";/* empty css */import"./phone-international-input.38423d06.js";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 q(t){G(P.pagination),P.currentTab=t.index,A()}async function A(){P.loadStatus="loading";const{code:t,data:a}=await l.getCombinationRecordPage({pageNo:P.pagination.pageNo,pageSize:P.pagination.pageSize,status:$[P.currentTab].value});0===t&&(P.pagination.list=u.concat(P.pagination.list,a.list),P.pagination.total=a.total,P.loadStatus=P.pagination.list.length<P.pagination.total?"more":"noMore")}function B(){"noMore"!==P.loadStatus&&(P.pagination.pageNo++,A())}return a((t=>{t.type&&(P.currentTab=t.type),A()})),s((()=>{B()})),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"),T),G=S,M=d(f("uni-load-more"),z),A=d(f("s-layout"),N);return i(),n(A,{title:"我的拼团"},{default:r((()=>[p(e,{bgColor:"#fff"},{default:r((()=>[p(s,{list:$,scrollable:!1,onChange:q,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),m(_,null,g(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((()=>[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:x(["ss-font-26",k(I)(t)])},{default:r((()=>[y(j($.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=>k(v).$router.go("/pages/order/detail",{id:t.orderId})},{default:r((()=>[y(" 订单详情 ")])),_:2},1032,["onClick"]),p(G,{class:x(["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((()=>[y(j(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:B},null,8,["status"])):c("",!0)])),_:1})}}},[["__scopeId","data-v-820b17f8"]]);export{P as default};