pages-activity-groupon-list.0ec7bb52.js 3.2 KB

1
  1. import{s as a,v as t,x as s,o,e,f as n,w as l,l as i,j as r,y as c,k as u,r as p,F as g,p as d,t as m,g as _,B as y,i as f,C as b,m as v,S as h,a1 as x,u as j,D as S}from"./index-9880b451.js";import{_ as k}from"./s-goods-column.2324341a.js";import{_ as C}from"./uni-load-more.aac4524a.js";import{_ as w}from"./s-layout.dfc5b0b5.js";import{C as D}from"./combination.bbc1e13b.js";import{_ as $}from"./_plugin-vue_export-helper.1b428a4d.js";import"./useGoods.bdd1c2ea.js";import"./index.df38848e.js";/* empty css *//* empty css *//* empty css */const N=$({__name:"list",setup($){y((a=>({d8a49dda:j(F)})));const{safeAreaInsets:N,safeArea:z}=a.$platform.device,A=a.$platform.navbar,B=2*a.$platform.device.statusBarHeight,E=2*(z.height+N.bottom)+B-A-350,F=a.$url.css("/static/img/shop/goods/groupon-header.png"),I=t({pagination:{list:[],total:0,pageNo:1,pageSize:10},loadStatus:"",summaryData:{}});async function M(){I.loadStatus="loading";const{data:a}=await D.getCombinationActivityPage({pageNo:I.pagination.pageNo,pageSize:I.pagination.pageSize});a.list.forEach((a=>{I.pagination.list.push({...a,price:a.combinationPrice})})),I.pagination.total=a.total,I.loadStatus=I.pagination.list.length<I.pagination.total?"more":"noMore"}function P(){"noMore"!==I.loadStatus&&(I.pagination.pageNo++,M())}return s((()=>P())),o((()=>{(async()=>{const{data:a}=await D.getCombinationRecordSummary();I.summaryData=a})(),M()})),(t,s)=>{const o=f,y=b,D=S,$=i(v("s-goods-column"),k),N=i(v("uni-load-more"),C),z=h,A=i(v("s-layout"),w);return e(),n(A,{navbar:"inner",bgStyle:{color:"#FE832A"}},{default:l((()=>[r(o,{class:"page-bg",style:c([{marginTop:"-"+Number(B+88)+"rpx"}])},null,8,["style"]),r(o,{class:"list-content"},{default:l((()=>[r(o,{class:"content-header ss-flex-col ss-col-center ss-row-center"},{default:l((()=>[r(o,{class:"content-header-title ss-flex ss-row-center"},{default:l((()=>[(e(!0),u(g,null,p(I.summaryData.avatars,((a,t)=>(e(),n(o,{key:t,class:"picture",style:c(6===t?"position: relative":"position: static")},{default:l((()=>[x("span",{class:"avatar",style:c(`background-image: url(${a})`)},null,4),6===t&&I.summaryData.avatars.length>3?(e(),u("span",{key:0,class:"mengceng"},[x("i",null,"···")])):_("",!0)])),_:2},1032,["style"])))),128)),r(y,{class:"pic_count"},{default:l((()=>[d(m(I.summaryData.userCount||0)+"人参与",1)])),_:1})])),_:1})])),_:1}),r(z,{class:"scroll-box",style:c({height:E+"rpx"}),"scroll-y":"true","scroll-with-animation":!1,"enable-back-to-top":!0},{default:l((()=>[(e(!0),u(g,null,p(I.pagination.list,(t=>(e(),n(o,{class:"goods-box ss-m-b-20",key:t.id},{default:l((()=>[r($,{class:"",size:"lg",data:t,grouponTag:!0,onClick:s=>j(a).$router.go("/pages/goods/groupon",{id:t.id})},{cart:l((()=>[r(D,{class:"ss-reset-button cart-btn"},{default:l((()=>[d("去拼团")])),_:1})])),_:2},1032,["data","onClick"])])),_:2},1024)))),128)),I.pagination.total>0?(e(),n(N,{key:0,status:I.loadStatus,"content-text":{contentdown:"上拉加载更多"},onClick:P},null,8,["status"])):_("",!0)])),_:1},8,["style"])])),_:1})])),_:1})}}},[["__scopeId","data-v-f8777e6a"]]);export{N as default};