pages-activity-bargain-list.1ab76c64.js 4.3 KB

1
  1. import{z as a,o as t,A as e,f as s,g as l,w as i,bY as o,_ as n,m as r,k as c,B as d,i as u,l as g,r as f,F as p,u as _,v as m,j as y,I as b,at as x,n as w,x as k,s as h,y as T,au as v}from"./index-0faec82b.js";import{_ as C}from"./s-count-down.77a790a5.js";import{_ as j}from"./s-layout.88d8cb8b.js";import{f as L}from"./useGoods.b071619b.js";import{_ as B}from"./_plugin-vue_export-helper.1b428a4d.js";import"./phone-international-input.38423d06.js";const S=B({__name:"list",setup(B){const S=a({navH:"",returnShow:!0,bargainTotal:0,bargainSuccessList:[],bargainList:[],page:1,limit:10,loading:!1,loadend:!1,bgColor:{bgColor:"#E93323",Color:"#fff",width:"44rpx",timeTxtwidth:"16rpx",isDay:!0},loadTitle:"加载更多"});async function z(){if(S.loadend||S.loading)return;S.loading=!0,S.loadTitle="";let{data:a,code:t}=await o.getBargainActivityPage({pageNo:S.page,pageSize:S.limit});if(0==t){const t=a.list;n.concat(S.bargainList,t);const e=t.length<S.limit;S.loadend=e,S.loading=!1,S.loadTitle=e?"已全部加载":"加载更多",S.bargainList=a.list,S.page=S.page+1}else S.loading=!1,S.loadTitle="加载更多"}function N(a){console.log("跳转"),console.log(a),h.$router.go(a)}return t((function(){!async function(){let{code:a,data:t}=await o.getBargainRecordSummary();0==a?(S.bargainTotal=t.successUserCount,S.bargainSuccessList=t.successList):S.$util.Tips({title:t})}(),z()})),e((()=>{z()})),(a,t)=>{const e=y,o=T,n=b,h=v,B=x,z=r(w("s-count-down"),C),U=r(w("s-layout"),j);return s(),l(U,{navbar:"inner",title:"砍价列表"},{default:i((()=>[c(e,{style:{"background-color":"red",height:"100vh"}},{default:i((()=>[c(e,{class:"bargain-list"},{default:i((()=>[S.returnShow?(s(),l(e,{key:0,class:"iconfont icon-xiangzuo",onClick:a.goBack,style:d("top:"+S.navH/2+"rpx")},null,8,["onClick","style"])):u("",!0),c(e,{class:"header"},{default:i((()=>[c(e,{class:"pic"},{default:i((()=>[c(e,{class:"swipers"},{default:i((()=>[c(B,{"indicator-dots":"true",autoplay:"true",interval:"2500",duration:"500",vertical:"true",circular:"true"},{default:i((()=>[(s(!0),g(p,null,f(S.bargainSuccessList,((a,t)=>(s(),l(h,{key:t},{default:i((()=>[c(e,{class:"acea-row row-middle",style:{display:"flex"}},{default:i((()=>[c(o,{src:a.avatar,class:"mr9"},null,8,["src"]),c(e,{class:"mr9 nickName"},{default:i((()=>[_(m(a.nickname),1)])),_:2},1024),c(n,{class:"mr9"},{default:i((()=>[_("拿了")])),_:1}),c(e,{class:"line1"},{default:i((()=>[_(m(a.activityName),1)])),_:2},1024)])),_:2},1024)])),_:2},1024)))),128))])),_:1})])),_:1})])),_:1}),c(e,{class:"tit"},{default:i((()=>[_("已有"+m(S.bargainTotal)+"人砍成功",1)])),_:1})])),_:1}),c(e,{class:"list"},{default:i((()=>[(s(!0),g(p,null,f(S.bargainList,((t,r)=>(s(),l(e,{key:r,style:{display:"flex"},class:"item acea-row row-between-wrapper",onClick:a=>N("/pages/activity/bargain/detail?id="+t.id)},{default:i((()=>[c(e,{class:"pictrue"},{default:i((()=>[c(o,{src:t.picUrl},null,8,["src"])])),_:2},1024),c(e,{class:"text acea-row row-column-around"},{default:i((()=>[c(e,{class:"name line2"},{default:i((()=>[_(m(t.name),1)])),_:2},1024),c(e,{class:"acea-row",style:{"margin-bottom":"14rpx",display:"flex"}},{default:i((()=>[c(z,{tipText:" ",bgColor:S.bgColor,dayText:":",hourText:":",minuteText:":",secondText:" ",datatime:t.endTime/1e3,isDay:!0},null,8,["bgColor","datatime"]),c(n,{class:"txt"},{default:i((()=>[_("后结束")])),_:1})])),_:2},1024),0===t.stock?(s(),l(e,{key:0},{default:i((()=>[c(e,{style:{"font-size":"22rpx"},onClick:e=>N("/pages/activity/goods_bargain_details/index?id="+t.id+"&startBargainUid="+a.uid)},{default:i((()=>[_(" 已售罄")])),_:2},1032,["onClick"])])),_:2},1024)):u("",!0),c(e,{class:"money font-color"},{default:i((()=>[_("最低: ¥"),c(n,{class:"price"},{default:i((()=>[_(m(k(L)(t.bargainMinPrice)),1)])),_:2},1024)])),_:2},1024)])),_:2},1024),t.stock>0?(s(),l(e,{key:0,class:"cutBnt bg-color"},{default:i((()=>[_("参与砍价")])),_:1})):u("",!0),0===t.stock?(s(),l(e,{key:1,class:"cutBnt bg-color-hui"},{default:i((()=>[_("已售罄")])),_:1})):u("",!0)])),_:2},1032,["onClick"])))),128)),S.bargainList.length>0?(s(),l(e,{key:0,class:"loadingicon acea-row row-center-wrapper",style:{"text-align":"center"}},{default:i((()=>[c(n,{class:"loading iconfont icon-jiazai",hidden:!a.loading},null,8,["hidden"]),_(m(S.loadTitle),1)])),_:1})):u("",!0)])),_:1})])),_:1})])),_:1})])),_:1})}}},[["__scopeId","data-v-c77a1c67"]]);export{S as default};