require('../../common/vendor.js');(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["plugin/bargain/public/bargain"],{"4de2":function(t,e,n){"use strict";var i=n("47a9");Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r=i(n("7ca3")),a=i(n("0127")),o=n("8f59");function c(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,i)}return n}var u={name:"bargain",mixins:[a.default],props:{kanjiaData:{type:Object,default:function(){return{}}},hasVideo:{type:Boolean,default:!1}},data:function(){return{countdownList:["00","00","00"],kanjiaPrice:"0",originalPrice:"0",remainCount:0,viewCount:0,cutPrice:"0",cutCount:0,timer:null,endTime:0,isReady:!1}},computed:function(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?c(Object(n),!0).forEach((function(e){(0,r.default)(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):c(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}({},(0,o.mapGetters)(["base"])),watch:{kanjiaData:{handler:function(t){t&&Object.keys(t).length>0&&this.updateData(t)},immediate:!0,deep:!0}},mounted:function(){this.updateData(this.kanjiaData),this.isReady=!0},beforeDestroy:function(){this.timer&&clearInterval(this.timer)},methods:{updateData:function(t){if(void 0!==t.price&&(this.kanjiaPrice=t.price),void 0!==t.s_price&&(this.originalPrice=t.s_price),void 0!==t.stock&&(this.remainCount=t.stock),void 0!==t.check_num&&(this.viewCount=t.check_num),void 0!==t.bargain_price&&(this.cutPrice=t.bargain_price),void 0!==t.bargain_count&&(this.cutCount=t.bargain_count),void 0!==t.e_price&&void 0!==t.s_price)parseFloat(t.s_price),parseFloat(t.bargain_price);void 0!==t.downtime&&(this.endTime=t.downtime,this.startCountdown(t.downtime))},startCountdown:function(t){var e=this;this.timer&&clearInterval(this.timer);var n=parseInt(t)||0,i=function(){if(n<=0)return clearInterval(e.timer),void(e.countdownList=["00","00","00"]);n--;var t=Math.floor(n/3600),i=Math.floor(n%3600/60),r=n%60;e.countdownList=[String(t).padStart(2,"0"),String(i).padStart(2,"0"),String(r).padStart(2,"0")]};i(),this.timer=setInterval(i,1e3)}}};e.default=u},"4e89":function(t,e,n){"use strict";n.r(e);var i=n("4de2"),r=n.n(i);for(var a in i)["default"].indexOf(a)<0&&function(t){n.d(e,t,(function(){return i[t]}))}(a);e["default"]=r.a},6178:function(t,e,n){"use strict";n.r(e);var i=n("6cd7"),r=n("4e89");for(var a in r)["default"].indexOf(a)<0&&function(t){n.d(e,t,(function(){return r[t]}))}(a);n("e777");var o=n("828b"),c=Object(o["a"])(r["default"],i["b"],i["c"],!1,null,"975c27c6",null,!1,i["a"],void 0);e["default"]=c.exports},"6cd7":function(t,e,n){"use strict";n.d(e,"b",(function(){return i})),n.d(e,"c",(function(){return r})),n.d(e,"a",(function(){}));var i=function(){var t=this.$createElement;this._self._c},r=[]},dbff:function(t,e,n){},e777:function(t,e,n){"use strict";var i=n("dbff"),r=n.n(i);r.a}}]);
;(global["webpackJsonp"] = global["webpackJsonp"] || []).push([
    'plugin/bargain/public/bargain-create-component',
    {
        'plugin/bargain/public/bargain-create-component':(function(module, exports, __webpack_require__){
            __webpack_require__('df3c')['createComponent'](__webpack_require__("6178"))
        })
    },
    [['plugin/bargain/public/bargain-create-component']]
]);
