import{B as a,o as e,f as t,g as s,w as n,c3 as i,q as r,n as l,m as o,t as c,i as d,p as u,r as f,F as p,H as g,K as _,l as b,c4 as x,A as m,u as y}from"./index-007bf156.js";import{_ as w}from"./s-count-down.0127df6f.js";import{_ as k}from"./s-layout.19bedb43.js";import{_ as h}from"./_plugin-vue_export-helper.1b428a4d.js";import"./phone-international-input.3617e4e0.js";import"./useGoods.ac3bf93e.js";const C=h({__name:"detail",setup(h){const C=a({id:"",buyPrice:"",bargainInfo:{},bgColor:{bgColor:"#333333",Color:"#fff",width:"44rpx",timeTxtwidth:"16rpx",isDay:!0},bargainUserHelpList:[],couponsHidden:!0});function I(a){return(a/100).toFixed(2)}return e((function(a){a.hasOwnProperty("id")&&(a.id?C.id=a.id:C.id=""),async function(){let{data:a,code:e}=await i.getBargainActivityDetail({id:C.id});0==e&&(C.bargainInfo=a,C.buyPrice=C.bargainInfo.bargainFirstPrice)}()})),(a,e)=>{const i=_,h=b,T=x,H=m,P=r(y("s-count-down"),w),j=r(y("s-layout"),k);return t(),s(j,{title:"砍价详情"},{default:n((()=>[l(h,{class:"bargain"},{default:n((()=>[l(h,{class:"header"},{default:n((()=>[l(T,{url:"/pages/activity/bargainingList","hover-class":"none"},{default:n((()=>[l(h,{class:"back",style:{width:"234rpx",height:"54rpx",background:"linear-gradient(233deg,#ffd169,#fe960f)",opacity:"1","border-radius":"0 26rpx 26rpx 0","line-height":"54rpx","text-align":"center",color:"#6e3f00","font-size":"25rpx"}},{default:n((()=>[l(i,{class:"iconfont icon-xiangzuo"}),o(" 返回砍价列表 ")])),_:1})])),_:1})])),_:1}),l(h,{class:"pad30",style:{"padding-bottom":"30rpx"}},{default:n((()=>[l(h,{class:"wrapper"},{default:n((()=>[l(h,{class:"pictxt acea-row row-between",onClick:a.goProduct,style:{display:"flex","box-sizing":"border-box"}},{default:n((()=>[l(h,{class:"pictrue"},{default:n((()=>[l(H,{src:C.bargainInfo.picUrl},null,8,["src"])])),_:1}),l(h,{class:"text acea-row row-column-around",style:{"margin-left":"10rpx"}},{default:n((()=>[l(h,{class:"line1"},{default:n((()=>[o(c(C.bargainInfo.name),1)])),_:1}),l(h,{class:"surplus"},{default:n((()=>[o("最低价：￥"+c(I(C.bargainInfo.bargainMinPrice)),1)])),_:1}),l(h,{class:"surplus"},{default:n((()=>[o("剩余："+c(C.bargainInfo.stock)+" "+c(C.bargainInfo.unitName),1)])),_:1}),l(h,{class:"money font-color-red",style:{color:"red"}},{default:n((()=>[o(" 当前: ￥ "),l(i,{class:"num"},{default:n((()=>[o(c(I(C.buyPrice)),1)])),_:1})])),_:1}),C.bargainInfo.endTime>(new Date).getTime()&&C.bargainInfo.stock>0?(t(),s(h,{key:0,class:"acea-row",style:{display:"flex"}},{default:n((()=>[l(P,{tipText:" ",bgColor:C.bgColor,dayText:":",hourText:":",minuteText:":",secondText:" ",datatime:C.bargainInfo.endTime/1e3,isDay:!0},null,8,["bgColor","datatime"]),l(i,{style:{"font-size":"22rpx","margin-left":"4rpx","line-height":"36rpx"}},{default:n((()=>[o("后结束")])),_:1})])),_:1})):C.bargainInfo.endTime<=(new Date).getTime()?(t(),s(h,{key:1},{default:n((()=>[l(h,{style:{"font-size":"22rpx"},onClick:a.currentBargainUser},{default:n((()=>[o("已结束")])),_:1},8,["onClick"])])),_:1})):C.bargainInfo.stock<=0?(t(),s(h,{key:2},{default:n((()=>[l(h,{style:{"font-size":"22rpx"},onClick:a.currentBargainUser},{default:n((()=>[o("已售罄")])),_:1},8,["onClick"])])),_:1})):d("",!0)])),_:1}),l(i,{class:"iconfont icon-jiantou iconfonts"})])),_:1},8,["onClick"])])),_:1}),l(h,{class:"title font-color acea-row row-center-wrapper"},{default:n((()=>[l(h,{class:"pictrue"}),l(h,{class:"tits"},{default:n((()=>[l(h,{class:"titleCon"},{default:n((()=>[o("砍价记录")])),_:1}),l(h,{class:"line"})])),_:1}),l(h,{class:"pictrue on"})])),_:1}),l(h,{class:"bargainGang borRadius14"},{default:n((()=>[C.bargainUserHelpList.length>0?(t(),s(h,{key:0,class:"list"},{default:n((()=>[a.index<3||!C.couponsHidden?(t(!0),u(p,{key:0},f(C.bargainUserHelpList,((e,r)=>(t(),s(h,{key:r,class:"item acea-row row-between-wrapper"},{default:n((()=>[l(h,{class:"pictxt acea-row row-between-wrapper"},{default:n((()=>[l(h,{class:"pictrue"},{default:n((()=>[l(H,{src:e.avatar},null,8,["src"])])),_:2},1024),l(h,{class:"text"},{default:n((()=>[l(h,{class:"name line1"},{default:n((()=>[o(c(e.nickname),1)])),_:2},1024),l(h,{class:"line1"},{default:n((()=>[o(c(a.formatDate(e.createTime)),1)])),_:2},1024)])),_:2},1024)])),_:2},1024),l(h,{class:"money"},{default:n((()=>[o(" 已砍 "),l(i,{class:"font-color-red"},{default:n((()=>[o(c(I(e.reducePrice)),1)])),_:2},1024),o("元 ")])),_:2},1024)])),_:2},1024)))),128)):d("",!0),C.bargainUserHelpList.length>3?(t(),s(h,{key:1,class:"open acea-row row-center-wrapper",onClick:a.openTap},{default:n((()=>[o(c(C.couponsHidden?"展开更多":"关闭展开")+" ",1),l(i,{class:g(["iconfont",C.couponsHidden?"icon-xiangxia":"icon-xiangshang"])},null,8,["class"])])),_:1},8,["onClick"])):d("",!0)])),_:1})):d("",!0),0===C.bargainUserHelpList.length?(t(),s(h,{key:1,class:"contentNo"},{default:n((()=>[l(i,{class:"iconfont icon-xiaolian mr8"}),o(" 暂无助力记录 ")])),_:1})):d("",!0)])),_:1})])),_:1})])),_:1})])),_:1})}}},[["__scopeId","data-v-a25ee8da"]]);export{C as default};
