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