(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["components/page-component/app-diy-goods-list/app-goods-timer"],{"94ba":function(e,t,n){},"9b0f":function(e,t,n){"use strict";n.r(t);var r=n("f982"),i=n("ca1c");for(var a in i)"default"!==a&&function(e){n.d(t,e,(function(){return i[e]}))}(a);n("ccd7");var c,s=n("f0c5"),u=Object(s["a"])(i["default"],r["b"],r["c"],!1,null,"d182717e",null,!1,r["a"],c);t["default"]=u.exports},a7a4d:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=n("2f62");function i(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function a(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?i(Object(n),!0).forEach((function(t){c(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):i(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function c(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var s={name:"app-goods-timer",props:{startDateTime:String,endDateTime:String,listStyle:{type:Number,default:function(){return-1}},sign:String,pageHide:Boolean},data:function(){return{timeInterval:null,timer:null,timerStr:null}},computed:a({},(0,r.mapState)({theme:function(e){return e.mallConfig.theme}}),{time:function(){return{startDateTime:this.startDateTime,endDateTime:this.endDateTime,pageHide:this.pageHide}},listClass:function(){return 1===this.listStyle?"background":2===this.listStyle?"background main-center":""},signName:function(){var e="";return"miaosha"===this.sign?e="秒杀":"bargain"===this.sign?e="砍价":"lottery"===this.sign?e="抽奖":"advance"===this.sign&&(e="预售"),e}}),watch:{time:{handler:function(e){var t=this;if(this.pageHide)clearInterval(this.timeInterval);else{var n=this.startDateTime,r=this.endDateTime;n=n.replace(/-/g,"/"),r=r.replace(/-/g,"/");var i=null,a=this.$utils.timeDifference((new Date).getTime(),new Date(n).getTime());a&&(this.timer="距开始 ",i=(a["d"]>0?a["d"]+"天":"")+a["h"]+":"+a["m"]+":"+a["s"]);var c=null;i||(c=this.$utils.timeDifference((new Date).getTime(),new Date(r).getTime()),c&&(this.timer="距结束 ",i=(c["d"]>0?c["d"]+"天":"")+c["h"]+":"+c["m"]+":"+c["s"])),i||(this.timer="活动已结束"),this.timerStr=i,this.timeInterval=setInterval((function(){var e=null,i=t.$utils.timeDifference((new Date).getTime(),new Date(n).getTime());i&&(t.timer="距开始 ",e=(i["d"]>0?i["d"]+"天":"")+i["h"]+":"+i["m"]+":"+i["s"]);var a=null;e||(a=t.$utils.timeDifference((new Date).getTime(),new Date(r).getTime()),a&&(t.timer="距结束 ",e=(a["d"]>0?a["d"]+"天":"")+a["h"]+":"+a["m"]+":"+a["s"])),e||(t.timer="活动已结束",clearInterval(t.timeInterval)),t.timerStr=e}),1e3)}},immediate:!0}},beforeDestroy:function(){clearInterval(this.timeInterval)}};t.default=s},ca1c:function(e,t,n){"use strict";n.r(t);var r=n("a7a4d"),i=n.n(r);for(var a in r)"default"!==a&&function(e){n.d(t,e,(function(){return r[e]}))}(a);t["default"]=i.a},ccd7:function(e,t,n){"use strict";var r=n("94ba"),i=n.n(r);i.a},f982:function(e,t,n){"use strict";var r,i=function(){var e=this,t=e.$createElement;e._self._c},a=[];n.d(t,"b",(function(){return i})),n.d(t,"c",(function(){return a})),n.d(t,"a",(function(){return r}))}}]);
;(global["webpackJsonp"] = global["webpackJsonp"] || []).push([
    'components/page-component/app-diy-goods-list/app-goods-timer-create-component',
    {
        'components/page-component/app-diy-goods-list/app-goods-timer-create-component':(function(module, exports, __webpack_require__){
            __webpack_require__('543d')['createComponent'](__webpack_require__("9b0f"))
        })
    },
    [['components/page-component/app-diy-goods-list/app-goods-timer-create-component']]
]);
