(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["components/lottery/components/process"],{"273d":function(t,n,e){"use strict";var r=e("c76e"),i=e.n(r);i.a},"32e9":function(t,n,e){"use strict";e.d(n,"b",(function(){return i})),e.d(n,"c",(function(){return o})),e.d(n,"a",(function(){return r}));var r={uIcon:function(){return Promise.all([e.e("common/vendor"),e.e("uni_modules/uview-ui/components/u-icon/u-icon")]).then(e.bind(null,"b248"))}},i=function(){var t=this.$createElement;this._self._c},o=[]},"885b":function(t,n,e){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var r={name:"LotteryProcess",props:{prizes:{type:Array,default:function(){return[]}},winnerIndex:{type:Number,default:4},duration:{type:Number,default:50},loopCount:{type:Number,default:2}},data:function(){return{currentIndex:0,isFinished:!1,timer:null,currentLoop:0,gridData:[]}},mounted:function(){this.gridData=this.prizes,this.startLottery()},beforeDestroy:function(){this.stopLottery()},methods:{startLottery:function(){var t=this;this.isFinished=!1,this.currentIndex=0,this.currentLoop=0;var n=this.duration,e=0,r=this.gridData.length*this.loopCount+this.winnerIndex+1;(function i(){var o;do{o=Math.floor(Math.random()*t.gridData.length)}while(o===t.currentIndex&&t.gridData.length>1);if(t.currentIndex=o,e%t.gridData.length===0&&e>0&&t.currentLoop++,e++,e>=r)return t.currentIndex=t.winnerIndex,t.isFinished=!0,void setTimeout((function(){t.$emit("finish",t.gridData[t.winnerIndex])}),500);e>r-8?n+=30:t.currentLoop>=t.loopCount-1&&(n+=10),t.timer=setTimeout(i,n)})()},stopLottery:function(){this.timer&&(clearTimeout(this.timer),this.timer=null)}}};n.default=r},"8b32":function(t,n,e){"use strict";e.r(n);var r=e("32e9"),i=e("c3df");for(var o in i)["default"].indexOf(o)<0&&function(t){e.d(n,t,(function(){return i[t]}))}(o);e("273d");var u=e("828b"),a=Object(u["a"])(i["default"],r["b"],r["c"],!1,null,"7fa27fab",null,!1,r["a"],void 0);n["default"]=a.exports},c3df:function(t,n,e){"use strict";e.r(n);var r=e("885b"),i=e.n(r);for(var o in r)["default"].indexOf(o)<0&&function(t){e.d(n,t,(function(){return r[t]}))}(o);n["default"]=i.a},c76e:function(t,n,e){}}]);
;(global["webpackJsonp"] = global["webpackJsonp"] || []).push([
    'components/lottery/components/process-create-component',
    {
        'components/lottery/components/process-create-component':(function(module, exports, __webpack_require__){
            __webpack_require__('df3c')['createComponent'](__webpack_require__("8b32"))
        })
    },
    [['components/lottery/components/process-create-component']]
]);
