(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["plugins/lottery/goods/goods"],{"0252":function(t,e,n){"use strict";(function(t){n("2d0a");o(n("66fd"));var e=o(n("7baa4"));function o(t){return t&&t.__esModule?t:{default:t}}t(e.default)}).call(this,n("543d")["createPage"])},"06ad":function(t,e,n){},"261a":function(t,e,n){"use strict";var o;n.d(e,"b",(function(){return i})),n.d(e,"c",(function(){return r})),n.d(e,"a",(function(){return o}));var i=function(){var t=this,e=t.$createElement;t._self._c},r=[]},"5a82":function(t,e,n){"use strict";var o=n("06ad"),i=n.n(o);i.a},"7baa4":function(t,e,n){"use strict";n.r(e);var o=n("261a"),i=n("9efc");for(var r in i)"default"!==r&&function(t){n.d(e,t,(function(){return i[t]}))}(r);n("5a82");var a,s=n("f0c5"),l=Object(s["a"])(i["default"],o["b"],o["c"],!1,null,"3e3e7528",null,!1,o["a"],a);e["default"]=l.exports},"9efc":function(t,e,n){"use strict";n.r(e);var o=n("b116"),i=n.n(o);for(var r in o)"default"!==r&&function(t){n.d(e,t,(function(){return o[t]}))}(r);e["default"]=i.a},b116:function(t,e,n){"use strict";(function(t){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var o=n("2f62");function i(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);e&&(o=o.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,o)}return n}function r(t){for(var e=1;e0&&void 0!==arguments[0]&&arguments[0];return this.$shareAppMessage({title:this.goods.app_share_title?this.goods.app_share_title:this.goods.name,imageUrl:this.goods.app_share_pic?this.goods.app_share_pic:this.goods.pic_url[0].pic_url,path:"/plugins/lottery/goods/goods",desc:this.goods.subtitle,params:{lottery_id:this.lottery.id}},t)},qrcode:function(){t.navigateTo({url:"/plugins/lottery/qrcode/qrcode"})},validateIntegral:function(){var t=Number(this.lottery.deplete_integral_num);t>0?this.$refs.integralModel.showModel():this.subscribe()},prize:function(){t.navigateTo({url:"/plugins/lottery/detail/detail?lottery_id="+this.lottery.id}),clearInterval(this.lotteryInter),this.award_bg=!1},rule:function(){t.navigateTo({url:"/pages/rules/index?url=".concat(encodeURIComponent(this.$api.lottery.setting),"&keys=").concat(JSON.stringify(["setting","rule"]))})},catchTouchMove:function(){return!1},getSetting:function(){var t=this;t.$request({url:t.$api.lottery.setting}).then((function(e){0===e.code&&(t.setting=e.data.setting)}))},clerk:function(t){var e=this;t&&e.$request({url:e.$api.lottery.clerk,data:{user_id:t,lottery_id:e.lottery_id},method:"POST"})},setTimeStart:function(t){var e=this;clearInterval(e.integral_time);var n=function(t){var n=t.replace(/-/g,"/"),o=parseInt((new Date(n).getTime()-(new Date).getTime())/1e3),i=0,r=0,a=0,s=0;o>0&&(i=Math.floor(o/86400),r=Math.floor(o/3600)-24*i,a=Math.floor(o/60)-24*i*60-60*r,s=Math.floor(o)-24*i*60*60-60*r*60-60*a),e.times={day:i,hour:r,minute:a,second:s},e.times<=0&&clearInterval(e.integral_time)};n(t),e.integral_time=setInterval((function(){n(t)}),1e3)},subscribe:function(){if(!this.award_bg){var t=this;t.$subscribe(this.template_message).then((function(e){t.buyZero()})).catch((function(e){t.buyZero()}))}},buyZero:function(){var e=this;e.award_bg=!e.award_bg,setTimeout((function(){var n=t.createAnimation({duration:500,timingFunction:"linear",delay:0,transformOrigin:"50% 50%"});e.award_bg?n.width("".concat(t.upx2px(360),"px")).height("".concat(t.upx2px(314),"px")).step():n.scale(0,0).opacity(0).step(),e.animation_trans_lottery=n.export(),setTimeout((function(){var t=0;e.integral_animation=setInterval((function(){t%2===0?n.scale(.9).opacity(1).step():n.scale(1).opacity(1).step(),e.animation_trans_lottery=n.export(),t++,500===t&&(t=0)}),500)}),500)}),50)},detail:function(){clearInterval(this.integral_animation),this.award_bg=!1},onImageListClick:function(e){var n=[],o=e.currentTarget.dataset.index;for(var i in this.goods.pic_url)n.push(this.goods.pic_url[i].pic_url);t.previewImage({urls:n,current:n[o]})},buyNow:function(){t.navigateTo({url:"/pages/goods/goods?id="+this.lottery.buy_goods_id})},shareClick:function(){this.shareShow=!0}}};e.default=g}).call(this,n("543d")["default"])}},[["0252","common/runtime","common/vendor"]]]);