"use strict";const e=require("../../../common/vendor.js"),i=require("../../../sheep/index.js"),r=require("../../../sheep/hooks/useGoods.js"),s=require("../../../sheep/api/promotion/bargain.js");if(require("../../../sheep/url/index.js"),require("../../../sheep/store/index.js"),require("../../../sheep/store/app.js"),require("../../../sheep/api/promotion/diy.js"),require("../../../sheep/request/index.js"),require("../../../sheep/config/index.js"),require("../../../sheep/platform/index.js"),require("../../../sheep/platform/provider/wechat/index.js"),require("../../../sheep/platform/provider/wechat/miniProgram.js"),require("../../../sheep/api/member/auth.js"),require("../../../sheep/api/member/social.js"),require("../../../sheep/api/member/user.js"),require("../../../sheep/platform/provider/apple/index.js"),require("../../../sheep/platform/share.js"),require("../../../sheep/router/index.js"),require("../../../sheep/hooks/useModal.js"),require("../../../sheep/helper/index.js"),require("../../../sheep/helper/test.js"),require("../../../sheep/helper/digit.js"),require("../../../sheep/api/member/signin.js"),require("../../../sheep/helper/throttle.js"),require("../../../sheep/platform/pay.js"),require("../../../sheep/api/pay/order.js"),require("../../../sheep/store/user.js"),require("../../../sheep/store/cart.js"),require("../../../sheep/api/trade/cart.js"),require("../../../sheep/api/pay/wallet.js"),require("../../../sheep/api/trade/order.js"),require("../../../sheep/api/promotion/coupon.js"),require("../../../sheep/store/sys.js"),require("../../../sheep/store/modal.js"),require("../../../sheep/config/zIndex.js"),require("../../../sheep/util/index.js"),!Array){(e.resolveComponent("s-count-down")+e.resolveComponent("s-layout"))()}Math||((()=>"../../../sheep/components/s-count-down/s-count-down.js")+(()=>"../../../sheep/components/s-layout/s-layout.js"))();const a={__name:"list",setup(a){const t=e.reactive({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 o(){if(t.loadend||t.loading)return;t.loading=!0,t.loadTitle="";let{data:i,code:r}=await s.BargainApi.getBargainActivityPage({pageNo:t.page,pageSize:t.limit});if(0==r){const r=i.list;e._.concat(t.bargainList,r);const s=r.length<t.limit;t.loadend=s,t.loading=!1,t.loadTitle=s?"已全部加载":"加载更多",t.bargainList=i.list,t.page=t.page+1}else t.loading=!1,t.loadTitle="加载更多"}function n(e){console.log("跳转"),console.log(e),i.sheep.$router.go(e)}return e.onLoad((function(){!async function(){let{code:e,data:i}=await s.BargainApi.getBargainRecordSummary();0==e?(t.bargainTotal=i.successUserCount,t.bargainSuccessList=i.successList):t.$util.Tips({title:i})}(),o()})),e.onReachBottom((()=>{o()})),(i,s)=>e.e({a:e.f(t.bargainSuccessList,((i,r,s)=>({a:i.avatar,b:e.t(i.nickname),c:e.t(i.activityName),d:r}))),b:e.t(t.bargainTotal),c:e.f(t.bargainList,((s,a,o)=>e.e({a:s.picUrl,b:e.t(s.name),c:"75fdc373-1-"+o+",75fdc373-0",d:e.p({tipText:" ",bgColor:t.bgColor,dayText:":",hourText:":",minuteText:":",secondText:" ",datatime:s.endTime/1e3,isDay:!0}),e:0===s.stock},0===s.stock?{f:e.o((e=>n("/pages/activity/goods_bargain_details/index?id="+s.id+"&startBargainUid="+i.uid)),a)}:{},{g:e.t(e.unref(r.fen2yuan)(s.bargainMinPrice)),h:s.stock>0},(s.stock,{}),{i:0===s.stock},(s.stock,{}),{j:e.o((e=>n("/pages/activity/bargain/detail?id="+s.id)),a),k:a}))),d:t.bargainList.length>0},t.bargainList.length>0?{e:!i.loading,f:e.t(t.loadTitle)}:{},{g:e.p({navbar:"inner",title:"砍价列表"})})}},t=e._export_sfc(a,[["__scopeId","data-v-75fdc373"]]);wx.createPage(t);
