1 |
- import{v as a,o as t,m as e,a as s,b as l,d as i,w as o,cd as n,_ as r,e as c,f as d,n as u,z as _,x as g,y as p,F as f,g as m,j as y,i as b,l as x,ay as k,u as w,s as v,k as h,az as T}from"./index-CRW3onsz.js";import{_ as j}from"./s-count-down.DG7vmg-r.js";import{_ as C}from"./s-layout.DKC65HXL.js";import{f as L}from"./useGoods.Dxoq0xk-.js";import{_ as z}from"./_plugin-vue_export-helper.BCo6x5W8.js";import"./s-menu-tools.CNNsOrh3.js";import"./s-search-block.vue_vue_type_style_index_0_scoped_f692e81a_lang.CiL8L9B_.js";import"./uni-icons.CkO1HN9g.js";import"./s-layout.vue_vue_type_style_index_0_scoped_c1143e8c_lang.HuwOimZj.js";import"./phone-international-input.vue_vue_type_style_index_0_scoped_0f0268ff_lang.Dctrwx6t.js";import"./s-search-block.9OtJrST_.js";import"./phone-international-input.vKvR7wTz.js";const S=z({__name:"list",setup(z){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 B(){if(S.loadend||S.loading)return;S.loading=!0,S.loadTitle="";let{data:a,code:t}=await n.getBargainActivityPage({pageNo:S.page,pageSize:S.limit});if(0==t){const t=a.list;r.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),v.$router.go(a)}return t((function(){!async function(){let{code:a,data:t}=await n.getBargainRecordSummary();0==a?(S.bargainTotal=t.successUserCount,S.bargainSuccessList=t.successList):S.$util.Tips({title:t})}(),B()})),e((()=>{B()})),(a,t)=>{const e=b,n=h,r=x,v=T,z=k,B=s(l("s-count-down"),j),P=s(l("s-layout"),C);return c(),i(P,{navbar:"inner",title:"砍价列表"},{default:o((()=>[d(e,{style:{"background-color":"red",height:"100vh"}},{default:o((()=>[d(e,{class:"bargain-list"},{default:o((()=>[S.returnShow?(c(),i(e,{key:0,class:"iconfont icon-xiangzuo",onClick:a.goBack,style:u("top:"+S.navH/2+"rpx")},null,8,["onClick","style"])):_("",!0),d(e,{class:"header"},{default:o((()=>[d(e,{class:"pic"},{default:o((()=>[d(e,{class:"swipers"},{default:o((()=>[d(z,{"indicator-dots":"true",autoplay:"true",interval:"2500",duration:"500",vertical:"true",circular:"true"},{default:o((()=>[(c(!0),g(f,null,p(S.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(S.bargainTotal)+"人砍成功",1)])),_:1})])),_:1}),d(e,{class:"list"},{default:o((()=>[(c(!0),g(f,null,p(S.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(B,{tipText:" ",bgColor:S.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)):_("",!0),d(e,{class:"money font-color"},{default:o((()=>[m("最低: ¥"),d(r,{class:"price"},{default:o((()=>[m(y(w(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})):_("",!0),0===t.stock?(c(),i(e,{key:1,class:"cutBnt bg-color-hui"},{default:o((()=>[m("已售罄")])),_:1})):_("",!0)])),_:2},1032,["onClick"])))),128)),S.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(S.loadTitle),1)])),_:1})):_("",!0)])),_:1})])),_:1})])),_:1})])),_:1})}}},[["__scopeId","data-v-73aa0294"]]);export{S as default};
|