show-result.js 4.0 KB

12345678910
  1. (global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["components/show-result"],{5899:function(t,n,e){"use strict";e.r(n);var i=e("67df"),a=e("cef1");for(var o in a)"default"!==o&&function(t){e.d(n,t,(function(){return a[t]}))}(o);e("6205");var r,u=e("f0c5"),c=Object(u["a"])(a["default"],i["b"],i["c"],!1,null,null,null,!1,i["a"],r);n["default"]=c.exports},6205:function(t,n,e){"use strict";var i=e("b667"),a=e.n(i);a.a},"67df":function(t,n,e){"use strict";e.d(n,"b",(function(){return a})),e.d(n,"c",(function(){return o})),e.d(n,"a",(function(){return i}));var i={uniPopup:function(){return e.e("uni_modules/uni-popup/components/uni-popup/uni-popup").then(e.bind(null,"0ea2"))}},a=function(){var t=this,n=t.$createElement,e=(t._self._c,0!=t.mode?t.__map(t.prizedata.prizeInfo,(function(n,e){var i=t.__get_orig(n),a=t.tagFun(n),o=t.tagImgFun(n),r=t.tagTextFun(n);return{$orig:i,m0:a,m1:o,m2:r}})):null);t.$mp.data=Object.assign({},{$root:{l0:e}})},o=[]},b667:function(t,n,e){},cef1:function(t,n,e){"use strict";e.r(n);var i=e("e0fc"),a=e.n(i);for(var o in i)"default"!==o&&function(t){e.d(n,t,(function(){return i[t]}))}(o);n["default"]=a.a},e0fc:function(t,n,e){"use strict";(function(t){Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var e={name:"show-result",props:{num:Number,type:{type:Number,default:0}},data:function(){return{prizedata:[],scale:!1,openLoading:!0,boxImg:"https://chaomd.liuniu946.com/image/result/box.png",boxAnimation:{},animationTime:100,explode:!1,hide:!1}},computed:{mode:function(){switch(this.num){case 5:return 1;case 9:return 2}return 0},currPrizedata:function(){return this.prizedata?!this.prizedata.prizeInfo||this.prizedata.length<1?null:this.prizedata.prizeInfo[0]:null},tag:function(){return this.tagFun(this.currPrizedata)},tagText:function(){return this.tagTextFun(this.currPrizedata)},tagImg:function(){return this.tagImgFun(this.currPrizedata)}},methods:{open:function(t){t.boxImg&&(this.boxImg=t.boxImg),this.startAudio(),this.$refs.prize.open(),this.prizedata=t,this.showAnimation()},startAudio:function(){setTimeout((function(){var t=document.getElementById("result-audio").querySelector("audio");t.play()}))},showAnimation:function(){var n=this;this.boxAnimation=this.animation.export(),setTimeout((function(){if(n.explode=!0,n.hideAnimation(),"normal"!=n.tag)try{t.vibrate({success:function(){console.log("震动")}})}catch(e){console.log(e)}}),this.animationTime)},hideAnimation:function(){var t=this;setTimeout((function(){t.hide=!0}),1300)},close:function(){this.$emit("close"),this.$refs.prize.close()},tagFun:function(t){return t?t.tag:null},tagTextFun:function(t){return t?"normal"==t.tag?"普通":"rare"==t.tag?"稀有":"supreme"==t.tag?"史诗":"legend"==t.tag?"传说":void 0:null},tagImgFun:function(t){return t?"normal"==t.tag?"/pagesA/static/tag-1.png":"rare"==t.tag?"/pagesA/static/tag-2.png":"supreme"==t.tag?"/pagesA/static/tag-3.png":"legend"==t.tag?"/pagesA/static/tag-4.png":void 0:null},recycle:function(){var n=this;this.$refs.prize.close(),t.showModal({cancelText:"取消",confirmText:"确认",title:"一键回收",content:"是否确认一键回收?",success:function(t){t.confirm&&n.$emit("recycle",n.prizedata)}})}},created:function(){var n=t.createAnimation();this.animationTime+=i(n),this.animationTime+=a(n),this.animationTime+=o(n),this.animation=n},onLoad:function(){}};function i(t){for(var n=0,e=90,i=0;i<20;i++){var a=-10,o=1.1;i%2!=0&&(a=0,o=1),t.rotate(a).scaleY(o).step({duration:e}),n+=e}return n}function a(t){var n=100;return t.translateY("5vh").scaleY(.9).scaleX(1.2).step({duration:n}),n}function o(t){var n=150;return t.translateY("-30vh").scaleY(1.1).scaleX(.9).step({duration:n}),n}n.default=e}).call(this,e("543d")["default"])}}]);
  2. ;(global["webpackJsonp"] = global["webpackJsonp"] || []).push([
  3. 'components/show-result-create-component',
  4. {
  5. 'components/show-result-create-component':(function(module, exports, __webpack_require__){
  6. __webpack_require__('543d')['createComponent'](__webpack_require__("5899"))
  7. })
  8. },
  9. [['components/show-result-create-component']]
  10. ]);