(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["components/page-component/app-diy-goods-list/app-goods-timer"],{"02b7":function(e,t,n){"use strict";var i;n.d(t,"b",(function(){return r})),n.d(t,"c",(function(){return a})),n.d(t,"a",(function(){return i}));var r=function(){var e=this,t=e.$createElement;e._self._c},a=[]},2794:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=n("2f62");function r(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,i)}return n}function a(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?r(Object(n),!0).forEach((function(t){s(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):r(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function s(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var u={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(a({},(0,i.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,i=this.endDateTime;n=n.replace(/-/g,"/"),i=i.replace(/-/g,"/");var r=null,a=this.$utils.timeDifference((new Date).getTime(),new Date(n).getTime());a&&(this.timer="距开始 ",r=(a["d"]>0?a["d"]+"天":"")+a["h"]+":"+a["m"]+":"+a["s"]);var s=null;r||(s=this.$utils.timeDifference((new Date).getTime(),new Date(i).getTime()),s&&(this.timer="距结束 ",r=(s["d"]>0?s["d"]+"天":"")+s["h"]+":"+s["m"]+":"+s["s"])),r||(this.timer="活动已结束"),this.timerStr=r,this.timeInterval=setInterval((function(){var e=null,r=t.$utils.timeDifference((new Date).getTime(),new Date(n).getTime());r&&(t.timer="距开始 ",e=(r["d"]>0?r["d"]+"天":"")+r["h"]+":"+r["m"]+":"+r["s"]);var a=null;e||(a=t.$utils.timeDifference((new Date).getTime(),new Date(i).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=u},"52c9":function(e,t,n){"use strict";n.r(t);var i=n("2794"),r=n.n(i);for(var a in i)["default"].indexOf(a)<0&&function(e){n.d(t,e,(function(){return i[e]}))}(a);t["default"]=r.a},5917:function(e,t,n){"use strict";n.r(t);var i=n("02b7"),r=n("52c9");for(var a in r)["default"].indexOf(a)<0&&function(e){n.d(t,e,(function(){return r[e]}))}(a);n("bf8a");var s,u=n("f0c5"),c=Object(u["a"])(r["default"],i["b"],i["c"],!1,null,"3a7e79ac",null,!1,i["a"],s);t["default"]=c.exports},b2bb:function(e,t,n){},bf8a:function(e,t,n){"use strict";var i=n("b2bb"),r=n.n(i);r.a}}]);
;(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__("5917"))
        })
    },
    [['components/page-component/app-diy-goods-list/app-goods-timer-create-component']]
]);
