pages-activity-bargain-detail.X4Ru1uq3.js 5.2 KB

1
  1. import{v as a,o as e,a as t,b as s,d as n,w as i,c7 as o,e as r,f as l,g as c,j as d,z as u,x as f,y as p,F as _,J as g,l as b,i as x,c8 as m,k as y}from"./index-rA9LQu-Z.js";import{_ as w}from"./s-count-down.BgYz6Iqm.js";import{_ as k}from"./s-layout.B9qvEa4L.js";import{_ as h}from"./_plugin-vue_export-helper.BCo6x5W8.js";import"./s-menu-tools.DS1kA6Tz.js";import"./s-layout.vue_vue_type_style_index_0_scoped_d5f7c468_lang.DsLhC4_3.js";import"./phone-international-input.vue_vue_type_style_index_0_scoped_a793e264_lang.BKCNw0rf.js";import"./s-tabbar.DG8GxPLd.js";import"./useGoods.BijVnshj.js";import"./phone-international-input.xRkWv9wR.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 o.getBargainActivityDetail({id:C.id});0==e&&(C.bargainInfo=a,C.buyPrice=C.bargainInfo.bargainFirstPrice)}()})),(a,e)=>{const o=b,h=x,T=m,j=y,v=t(s("s-count-down"),w),H=t(s("s-layout"),k);return r(),n(H,{title:"砍价详情"},{default:i((()=>[l(h,{class:"bargain"},{default:i((()=>[l(h,{class:"header"},{default:i((()=>[l(T,{url:"/pages/activity/bargainingList","hover-class":"none"},{default:i((()=>[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:i((()=>[l(o,{class:"iconfont icon-xiangzuo"}),c(" 返回砍价列表 ")])),_:1})])),_:1})])),_:1}),l(h,{class:"pad30",style:{"padding-bottom":"30rpx"}},{default:i((()=>[l(h,{class:"wrapper"},{default:i((()=>[l(h,{class:"pictxt acea-row row-between",onClick:a.goProduct,style:{display:"flex","box-sizing":"border-box"}},{default:i((()=>[l(h,{class:"pictrue"},{default:i((()=>[l(j,{src:C.bargainInfo.picUrl},null,8,["src"])])),_:1}),l(h,{class:"text acea-row row-column-around",style:{"margin-left":"10rpx"}},{default:i((()=>[l(h,{class:"line1"},{default:i((()=>[c(d(C.bargainInfo.name),1)])),_:1}),l(h,{class:"surplus"},{default:i((()=>[c("最低价:¥"+d(I(C.bargainInfo.bargainMinPrice)),1)])),_:1}),l(h,{class:"surplus"},{default:i((()=>[c("剩余:"+d(C.bargainInfo.stock)+" "+d(C.bargainInfo.unitName),1)])),_:1}),l(h,{class:"money font-color-red",style:{color:"red"}},{default:i((()=>[c(" 当前: ¥ "),l(o,{class:"num"},{default:i((()=>[c(d(I(C.buyPrice)),1)])),_:1})])),_:1}),C.bargainInfo.endTime>(new Date).getTime()&&C.bargainInfo.stock>0?(r(),n(h,{key:0,class:"acea-row",style:{display:"flex"}},{default:i((()=>[l(v,{tipText:" ",bgColor:C.bgColor,dayText:":",hourText:":",minuteText:":",secondText:" ",datatime:C.bargainInfo.endTime/1e3,isDay:!0},null,8,["bgColor","datatime"]),l(o,{style:{"font-size":"22rpx","margin-left":"4rpx","line-height":"36rpx"}},{default:i((()=>[c("后结束")])),_:1})])),_:1})):C.bargainInfo.endTime<=(new Date).getTime()?(r(),n(h,{key:1},{default:i((()=>[l(h,{style:{"font-size":"22rpx"},onClick:a.currentBargainUser},{default:i((()=>[c("已结束")])),_:1},8,["onClick"])])),_:1})):C.bargainInfo.stock<=0?(r(),n(h,{key:2},{default:i((()=>[l(h,{style:{"font-size":"22rpx"},onClick:a.currentBargainUser},{default:i((()=>[c("已售罄")])),_:1},8,["onClick"])])),_:1})):u("",!0)])),_:1}),l(o,{class:"iconfont icon-jiantou iconfonts"})])),_:1},8,["onClick"])])),_:1}),l(h,{class:"title font-color acea-row row-center-wrapper"},{default:i((()=>[l(h,{class:"pictrue"}),l(h,{class:"tits"},{default:i((()=>[l(h,{class:"titleCon"},{default:i((()=>[c("砍价记录")])),_:1}),l(h,{class:"line"})])),_:1}),l(h,{class:"pictrue on"})])),_:1}),l(h,{class:"bargainGang borRadius14"},{default:i((()=>[C.bargainUserHelpList.length>0?(r(),n(h,{key:0,class:"list"},{default:i((()=>[a.index<3||!C.couponsHidden?(r(!0),f(_,{key:0},p(C.bargainUserHelpList,((e,t)=>(r(),n(h,{key:t,class:"item acea-row row-between-wrapper"},{default:i((()=>[l(h,{class:"pictxt acea-row row-between-wrapper"},{default:i((()=>[l(h,{class:"pictrue"},{default:i((()=>[l(j,{src:e.avatar},null,8,["src"])])),_:2},1024),l(h,{class:"text"},{default:i((()=>[l(h,{class:"name line1"},{default:i((()=>[c(d(e.nickname),1)])),_:2},1024),l(h,{class:"line1"},{default:i((()=>[c(d(a.formatDate(e.createTime)),1)])),_:2},1024)])),_:2},1024)])),_:2},1024),l(h,{class:"money"},{default:i((()=>[c(" 已砍 "),l(o,{class:"font-color-red"},{default:i((()=>[c(d(I(e.reducePrice)),1)])),_:2},1024),c("元 ")])),_:2},1024)])),_:2},1024)))),128)):u("",!0),C.bargainUserHelpList.length>3?(r(),n(h,{key:1,class:"open acea-row row-center-wrapper",onClick:a.openTap},{default:i((()=>[c(d(C.couponsHidden?"展开更多":"关闭展开")+" ",1),l(o,{class:g(["iconfont",C.couponsHidden?"icon-xiangxia":"icon-xiangshang"])},null,8,["class"])])),_:1},8,["onClick"])):u("",!0)])),_:1})):u("",!0),0===C.bargainUserHelpList.length?(r(),n(h,{key:1,class:"contentNo"},{default:i((()=>[l(o,{class:"iconfont icon-xiaolian mr8"}),c(" 暂无助力记录 ")])),_:1})):u("",!0)])),_:1})])),_:1})])),_:1})])),_:1})}}},[["__scopeId","data-v-5d36dd93"]]);export{C as default};