require('../../common/vendor.js');(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["pages/goods/lottery/wheel/index"],{7096:function(t,e,n){"use strict";n.r(e);var a=n("94c2"),i=n("d64d");for(var o in i)["default"].indexOf(o)<0&&function(t){n.d(e,t,(function(){return i[t]}))}(o);n("c857");var r=n("828b"),u=Object(r["a"])(i["default"],a["b"],a["c"],!1,null,"10df7f2b",null,!1,a["a"],void 0);e["default"]=u.exports},"94c2":function(t,e,n){"use strict";n.d(e,"b",(function(){return a})),n.d(e,"c",(function(){return i})),n.d(e,"a",(function(){}));var a=function(){var t=this,e=t.$createElement,n=(t._self._c,t.userList.length),a=t.userList.length,i=t.myList.length;t._isMounted||(t.e0=function(e){t.rulesShow=!0},t.e1=function(e){t.rulesShow=!1}),t.$mp.data=Object.assign({},{$root:{g0:n,g1:a,g2:i}})},i=[]},bd41:function(t,e,n){"use strict";(function(t){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var a=n("bf77"),i=n("bad7"),o={components:{noticeBar:function(){n.e("pages/goods/lottery/components/noticeBar").then(function(){return resolve(n("2fed"))}.bind(null,n)).catch(n.oe)},lotteryAleart:function(){n.e("pages/goods/components/lotteryAleart/index").then(function(){return resolve(n("a3df"))}.bind(null,n)).catch(n.oe)}},data:function(){return{imgHost:i.HTTP_REQUEST_URL,wr7s:!1,userList:[],myList:[],rulesShow:!1,rotateAngle:0,angleList:[],prizeList:[],winingIndex:0,lottery_num:0,id:0,type:"1",aleartStatus:!1,addressModel:!1,H5ShareBox:!1,aleartType:0,alData:{},htmlData:"",factor:0}},computed:{},onLoad:function(){for(var t=0;t<8;t++){var e=-(45*t+22.5);this.angleList.push(e)}this.getLotteryData(this.type)},methods:{getLotteryData:function(e){var n=this;t.showLoading({title:"获取抽奖信息"}),(0,a.getLotteryData)(e).then((function(e){t.hideLoading();var a=e.data.lottery;n.id=e.data.lottery.id,n.prizeList=a.prize,n.lottery_num=e.data.lottery_num,n.userList=e.data.all_record,n.myList=e.data.user_record,n.htmlData=e.data.lottery.content,n.factor=e.data.lottery.factor})).catch((function(e){t.hideLoading(),n.$util.Tips({title:e})}))},getWiningIndex:function(){var t=this;(0,a.startLottery)({id:this.id,type:this.type}).then((function(e){t.alData=e.data;var n=t.prizeList.findIndex((function(e){return e.id==t.alData.id}));t.winingIndex=n,t.rotating()})).catch((function(e){t.$util.Tips({title:e})}))},random:function(t,e){return parseInt(Math.random()*(e-t+1)+t)},rotating:function(){var t=this,e={duration:5e3,circle:8,mode:"ease-in-out"},n=this.rotateAngle+360*e.circle+this.angleList[this.winingIndex]-this.rotateAngle%360;this.rotateAngle=n,setTimeout((function(){t.luck_draw_finish()}),e.duration+500)},luck_draw_finish:function(t){this.aleartType=2,this.aleartStatus=!0},closeLottery:function(t){this.aleartStatus=!1,this.getLotteryData(this.type)},moveHandle:function(){}}};e.default=o}).call(this,n("df3c")["default"])},c857:function(t,e,n){"use strict";var a=n("fd57"),i=n.n(a);i.a},d64d:function(t,e,n){"use strict";n.r(e);var a=n("bd41"),i=n.n(a);for(var o in a)["default"].indexOf(o)<0&&function(t){n.d(e,t,(function(){return a[t]}))}(o);e["default"]=i.a},dc49:function(t,e,n){"use strict";(function(t,e){var a=n("47a9");n("7561");a(n("3240"));var i=a(n("7096"));t.__webpack_require_UNI_MP_PLUGIN__=n,e(i.default)}).call(this,n("3223")["default"],n("df3c")["createPage"])},fd57:function(t,e,n){}},[["dc49","common/runtime","common/vendor","pages/goods/common/vendor"]]]);