drawlottery.js
3.4 KB
(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["pages/homepage/drawlottery"],{"0234":function(t,n,o){},"0504":function(t,n,o){"use strict";var c=o("0234"),i=o.n(c);i.a},"34aa":function(t,n,o){"use strict";o.r(n);var c=o("524e"),i=o("c7eb");for(var a in i)"default"!==a&&function(t){o.d(n,t,function(){return i[t]})}(a);o("0504");var e=o("2877"),u=Object(e["a"])(i["default"],c["a"],c["b"],!1,null,null,null);n["default"]=u.exports},"524e":function(t,n,o){"use strict";var c=function(){var t=this,n=t.$createElement;t._self._c},i=[];o.d(n,"a",function(){return c}),o.d(n,"b",function(){return i})},c7eb:function(t,n,o){"use strict";o.r(n);var c=o("f14e"),i=o.n(c);for(var a in c)"default"!==a&&function(t){o.d(n,t,function(){return c[t]})}(a);n["default"]=i.a},e71c:function(t,n,o){"use strict";(function(t){o("2679"),o("921b");c(o("66fd"));var n=c(o("34aa"));function c(t){return t&&t.__esModule?t:{default:t}}t(n.default)}).call(this,o("6e42")["createPage"])},f14e:function(t,n,o){"use strict";(function(t){Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var o=null,c=50,i={data:function(){return{color:[{opa:.5,name:"积分"},{opa:.5,name:"零食大礼包"},{opa:.5,name:"大礼包"},{opa:.5,name:"大礼包"},{opa:.5,name:"大礼包"},{opa:.5,name:"大礼包"},{opa:.5,name:"大礼包"},{opa:.5,name:"大礼包"}],tab:2,images:["../../static/jichange.png","../../static/add.png","../../static/add.png","../../static/add.png","../../static/add.png","../../static/add.png","../../static/add.png","../../static/add.png","../../static/doorin.png"],btnconfirm:"../../static/dianjichoujiangd.png",clickLuck:"clickLuck",luckPosition:0,giftshow:!1}},methods:{tabchange:function(t){this.tab=t.currentTarget.dataset.id},hidegift:function(){this.giftshow=!1},input:function(t){var n=Number(t.detail.value);this.luckPosition=n},mygift:function(){t.navigateTo({url:"/pages/homepage/mygift"})},clickLucks:function(){if("clickLuck"==this.clickLuck){var n=this;if(n.giftshow=!1,null==n.luckPosition||isNaN(n.luckPosition)||n.luckPosition>7)return void t.showModal({title:"提示",content:"请填写正确数值",showCancel:!1,success:function(t){},fail:function(){},complete:function(){}});n.btnconfirm="../../static/sherpa-jiugonggedianjichoujiangd.png",n.clickLuck="",clearInterval(o);var i=0;o=setInterval(function(){i>7?(i=0,n.color[7].opa=.5):0!=i&&(n.color[i-1].opa=.5),n.color[i].opa=1,i++},c);var a=2e3;setTimeout(function(){n.stop(n.luckPosition)},a)}},stop:function(t){var n=this;clearInterval(o);for(var i=-1,a=n.color,e=0;e<a.length;e++)1==a[e].opa&&(i=e);var u=i+1;n.stopLuck(t,u,c,10)},stopLuck:function(n,o,c,i){var a=this;setTimeout(function(){o>7?(o=0,a.color[7].opa=.5):0!=o&&(a.color[o-1].opa=.5),a.color[o].opa=1,c<400||o!=n?(i++,c+=i,o++,a.stopLuck(n,o,c,i)):setTimeout(function(){0==n?(a.giftshow=!0,a.clickLuck="clickLuck"):t.showModal({content:"很遗憾未中奖",showCancel:!1,confirmColor:"#F8C219",success:function(t){t.confirm&&(a.btnconfirm="../../static/sherpa-jiugonggedianjichoujiang.png",a.clickLuck="clickLuck",a.loadAnimation())},fail:function(){},complete:function(){}})},1e3)},c)},loadAnimation:function(){var t=this,n=0;null==o&&(o=setInterval(function(){n>7?(n=0,t.color[7].opa=.5):0!=n&&(t.color[n-1].opa=.5),t.color[n].opa=1,n++},1e3))}},onLoad:function(){t.hideLoading(),this.loadAnimation()}};n.default=i}).call(this,o("6e42")["default"])}},[["e71c","common/runtime","common/vendor"]]]);