glhcp/server/public/_nuxt/f931045.js

1 line
23 KiB
JavaScript
Raw Normal View History

2023-08-23 02:48:59 +00:00
(window.webpackJsonp=window.webpackJsonp||[]).push([[55,9,11,18],{488:function(e,t,r){var content=r(491);content.__esModule&&(content=content.default),"string"==typeof content&&(content=[[e.i,content,""]]),content.locals&&(e.exports=content.locals);(0,r(18).default)("d7ac674a",content,!0,{sourceMap:!1})},489:function(e,t,r){"use strict";r.r(t);r(300);var o={data:function(){return{priceSlice:{}}},components:{},props:{firstSize:{type:Number,default:14},secondSize:{type:Number,default:14},color:{type:String},weight:{type:[String,Number],default:400},price:{type:[String,Number],default:""},showSubscript:{type:Boolean,default:!0},subscriptSize:{type:Number,default:14},lineThrough:{type:Boolean,default:!1}},created:function(){this.priceFormat()},watch:{price:function(e){this.priceFormat()}},methods:{priceFormat:function(){var e=this.price,t={};null!==e&&(e=String(e).split("."),t.first=e[0],t.second=e[1],this.priceSlice=t)}}},n=(r(490),r(9)),component=Object(n.a)(o,(function(){var e=this,t=e._self._c;return t("span",{class:(e.lineThrough?"line-through":"")+"price-format",style:{color:e.color,"font-weight":e.weight}},[e.showSubscript?t("span",{style:{"font-size":e.subscriptSize+"px","margin-right":"1px"}},[e._v("¥")]):e._e(),e._v(" "),t("span",{style:{"font-size":e.firstSize+"px","margin-right":"1px"}},[e._v(e._s(e.priceSlice.first))]),e._v(" "),e.priceSlice.second?t("span",{style:{"font-size":e.secondSize+"px"}},[e._v("."+e._s(e.priceSlice.second))]):e._e()])}),[],!1,null,null,null);t.default=component.exports},490:function(e,t,r){"use strict";r(488)},491:function(e,t,r){var o=r(17)((function(i){return i[1]}));o.push([e.i,".price-format{align-items:baseline;display:flex}",""]),o.locals={},e.exports=o},496:function(e,t,r){"use strict";r.r(t);r(300),r(87),r(63),r(12),r(47),r(39),r(88);var o=6e4,n=36e5,d=24*n;function l(e){return(0+e.toString()).slice(-2)}var c={components:{},props:{isSlot:{type:Boolean,default:!1},time:{type:Number,default:0},format:{type:String,default:"hh:mm:ss"},autoStart:{type:Boolean,default:!0}},watch:{time:{immediate:!0,handler:function(e){e&&this.reset()}}},data:function(){return{timeObj:{},formateTime:0}},created:function(){},computed:{},methods:{createTimer:function(e){return setTimeout(e,100)},isSameSecond:function(e,t){return Math.floor(e)===Math.floor(t)},start:function(){this.counting||(this.counting=!0,this.endTime=Date.now()+1e3*this.remain,this.setTimer())},setTimer:function(){var e=this;this.tid=this.createTimer((function(){var t=e.getRemain();e.isSameSecond(t,e.remain)&&0!==t||e.setRemain(t),0!==e.remain&&e.setTimer()}))},getRemain:function(){return Math.max(this.endTime-Date.now(),0)},pause:function(){this.counting=!1,clearTimeout(this.tid)},reset:function(){this.pause(),this.remain=this.time,this.setRemain(this.remain),this.autoStart&&this.start()},setRemain:function(e){var t=this.format;this.remain=e;var time,r=(time=e,{days:Math.floor(time/d),hours:l(Math.floor(time%d/n)),minutes:l(Math.floor(time%n/o)),seconds:l(Math.floor(time%o/1e3))});this.formateTime=function(e,t){var r=t.days,o=t.hours,n=t.minutes,d=t.seconds;return-1!==e.indexOf("dd")&&(e=e.replace("dd",r)),-1!==e.indexOf("hh")&&(e=e.replace("hh",l(o))),-1!==e.indexOf("mm")&&(e=e.replace("mm",l(n))),-1!==e.indexOf("ss")&&(e=e.replace("ss",l(d))),e}(t,r),this.$emit("change",r),0===e&&(this.pause(),this.$emit("finish"))}}},v=r(9),component=Object(v.a)(c,(function(){var e=this,t=e._self._c;return e.time>=0?t("div",[t("client-only",[e.isSlot?e._t("default"):t("span",[e._v(e._s(e.formateTime))])],2)],1):e._e()}),[],!1,null,null,null);t.default=component.exports},497:function(e,t,r){"use strict";r.d(t,"b",(function(){return n})),r.d(t,"a",(function(){return d}));r(47),r(30),r(65),r(48),r(39),r(20),r(66),r(67),r(49);var o=r(22);r(109),r(63),r(12);var n=function(e){var time=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1e3,t=arguments.length>2?arguments[2]:void 0,r=new Date(0).getTime();return function(){var o=(new Date).getTime();if(o-r>time){for(var n=arguments.length,d=new Array(n),l=0;l<n;l++)d[l]=arguments[l];e.apply(t,d),r=o