"use strict";const e=require("../../../common/vendor.js");require("../../../sheep/index.js");const r=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"),!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 i={__name:"detail",setup(i){const n=e.reactive({id:"",buyPrice:"",bargainInfo:{},bgColor:{bgColor:"#333333",Color:"#fff",width:"44rpx",timeTxtwidth:"16rpx",isDay:!0},bargainUserHelpList:[],couponsHidden:!0});function a(e){return(e/100).toFixed(2)}return e.onLoad((function(e){e.hasOwnProperty("id")&&(e.id?n.id=e.id:n.id=""),async function(){let{data:e,code:i}=await r.BargainApi.getBargainActivityDetail({id:n.id});0==i&&(n.bargainInfo=e,n.buyPrice=n.bargainInfo.bargainFirstPrice)}()})),(r,i)=>e.e({a:n.bargainInfo.picUrl,b:e.t(n.bargainInfo.name),c:e.t(a(n.bargainInfo.bargainMinPrice)),d:e.t(n.bargainInfo.stock),e:e.t(n.bargainInfo.unitName),f:e.t(a(n.buyPrice)),g:n.bargainInfo.endTime>(new Date).getTime()&&n.bargainInfo.stock>0},n.bargainInfo.endTime>(new Date).getTime()&&n.bargainInfo.stock>0?{h:e.p({tipText:" ",bgColor:n.bgColor,dayText:":",hourText:":",minuteText:":",secondText:" ",datatime:n.bargainInfo.endTime/1e3,isDay:!0})}:n.bargainInfo.endTime<=(new Date).getTime()?{j:e.o(((...e)=>r.currentBargainUser&&r.currentBargainUser(...e)))}:n.bargainInfo.stock<=0?{l:e.o(((...e)=>r.currentBargainUser&&r.currentBargainUser(...e)))}:{},{i:n.bargainInfo.endTime<=(new Date).getTime(),k:n.bargainInfo.stock<=0,m:e.o(((...e)=>r.goProduct&&r.goProduct(...e))),n:n.bargainUserHelpList.length>0},n.bargainUserHelpList.length>0?e.e({o:r.index<3||!n.couponsHidden},r.index<3||!n.couponsHidden?{p:e.f(n.bargainUserHelpList,((i,n,s)=>({a:i.avatar,b:e.t(i.nickname),c:e.t(r.formatDate(i.createTime)),d:e.t(a(i.reducePrice)),e:n})))}:{},{q:n.bargainUserHelpList.length>3},n.bargainUserHelpList.length>3?{r:e.t(n.couponsHidden?"展开更多":"关闭展开"),s:e.n(n.couponsHidden?"icon-xiangxia":"icon-xiangshang"),t:e.o(((...e)=>r.openTap&&r.openTap(...e)))}:{}):{},{v:0===n.bargainUserHelpList.length},(n.bargainUserHelpList.length,{}),{w:e.p({title:"砍价详情"})})}},n=e._export_sfc(i,[["__scopeId","data-v-71338be0"]]);wx.createPage(n);
