import{e as t,f as o,w as e,t as l,u as a,g as s,A as r,j as i,B as d,E as n,i as u,Z as y}from"./index-9aa72eed.js";import{_ as c}from"./_plugin-vue_export-helper.1b428a4d.js";const g=c({name:"countDown",props:{justifyLeft:{type:String,default:""},tipText:{type:String,default:"倒计时"},dayText:{type:String,default:"天"},hourText:{type:String,default:"时"},minuteText:{type:String,default:"分"},secondText:{type:String,default:"秒"},datatime:{type:Number,default:0},isDay:{type:Boolean,default:!0},isCol:{type:Boolean,default:!1},bgColor:{type:Object,default:null}},data:function(){return{day:"00",hour:"00",minute:"00",second:"00"}},created:function(){this.show_time()},mounted:function(){},methods:{show_time:function(){let t=this;function o(){let o=t.datatime-Date.parse(new Date)/1e3,e=0,l=0,a=0,s=0;o>0?(e=!0===t.isDay?Math.floor(o/86400):0,l=Math.floor(o/3600)-24*e,a=Math.floor(o/60)-24*e*60-60*l,s=Math.floor(o)-24*e*60*60-60*l*60-60*a,l<=9&&(l="0"+l),a<=9&&(a="0"+a),s<=9&&(s="0"+s),t.day=e,t.hour=l,t.minute=a,t.second=s):(t.day="00",t.hour="00",t.minute="00",t.second="00")}o(),setInterval(o,1e3)}}},[["render",function(y,c,g,m,C,f){const b=n,h=u;return t(),o(h,{class:"time",style:r(g.justifyLeft)},{default:e((()=>[g.tipText?(t(),o(b,{key:0,class:""},{default:e((()=>[l(a(g.tipText),1)])),_:1})):s("",!0),!0===g.isDay?(t(),o(b,{key:1,class:"styleAll p6",style:r({background:g.bgColor.bgColor,color:g.bgColor.Color})},{default:e((()=>[l(a(y.day)+a(g.bgColor.isDay?"天":""),1)])),_:1},8,["style"])):s("",!0),g.dayText?(t(),o(b,{key:2,class:"timeTxt",style:r({width:g.bgColor.timeTxtwidth,color:g.bgColor.bgColor})},{default:e((()=>[l(a(g.dayText),1)])),_:1},8,["style"])):s("",!0),i(b,{class:d(["styleAll",g.isCol?"timeCol":""]),style:r({background:g.bgColor.bgColor,color:g.bgColor.Color,width:g.bgColor.width})},{default:e((()=>[l(a(y.hour),1)])),_:1},8,["class","style"]),g.hourText?(t(),o(b,{key:3,class:d(["timeTxt",g.isCol?"whit":""]),style:r({width:g.bgColor.timeTxtwidth,color:g.bgColor.bgColor})},{default:e((()=>[l(a(g.hourText),1)])),_:1},8,["class","style"])):s("",!0),i(b,{class:d(["styleAll",g.isCol?"timeCol":""]),style:r({background:g.bgColor.bgColor,color:g.bgColor.Color,width:g.bgColor.width})},{default:e((()=>[l(a(y.minute),1)])),_:1},8,["class","style"]),g.minuteText?(t(),o(b,{key:4,class:d(["timeTxt",g.isCol?"whit":""]),style:r({width:g.bgColor.timeTxtwidth,color:g.bgColor.bgColor})},{default:e((()=>[l(a(g.minuteText),1)])),_:1},8,["class","style"])):s("",!0),i(b,{class:d(["styleAll",g.isCol?"timeCol":""]),style:r({background:g.bgColor.bgColor,color:g.bgColor.Color,width:g.bgColor.width})},{default:e((()=>[l(a(y.second),1)])),_:1},8,["class","style"]),g.secondText?(t(),o(b,{key:5,class:"timeTxt"},{default:e((()=>[l(a(g.secondText),1)])),_:1})):s("",!0)])),_:1},8,["style"])}],["__scopeId","data-v-cfad19b9"]]),m={getBargainRecordSummary:()=>y({url:"/promotion/bargain-record/get-summary",method:"GET"}),getBargainActivityPage:()=>y({url:"/promotion/bargain-activity/page",method:"GET"}),getBargainActivityDetail:t=>y({url:"/promotion/bargain-activity/get-detail",method:"GET",params:t})};export{m as B,g as _};
