(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-51d4878e"],{2546:function(t,s,e){"use strict";var i=e("dd4b"),n=e.n(i);n.a},"285b":function(t,s,e){"use strict";e("e13e")},"2fd4":function(t,s,e){t.exports=e.p+"img/ticket.92182c9f.png"},4325:function(t,s,e){t.exports=e.p+"img/myNoBtn.9ccda9c7.png"},"4cc2":function(t,s,e){t.exports=e.p+"img/workBtn.a1903dc2.png"},5443:function(t,s,e){"use strict";e.r(s);var i=function(){var t=this,s=t.$createElement,e=t._self._c||s;return e("div",{staticClass:"lottoPage"},[e("div",{staticClass:"lottoMain"},["ios"==t.device?e("div",{style:"height:"+t.top_height+"px"}):t._e(),e("section",{staticClass:"letoBody"},[e("div",{staticClass:"bannerBox flexc",style:"background-image:url("+t.bannerBg+")"},t._l(t.prizeList,(function(s,i){return e("div",{key:i,staticClass:"flexc"},[e("img",{staticClass:"prizeImg",attrs:{src:s.source}}),e("span",[t._v(t._s(s.name))])])})),0),e("div",{staticClass:"bodymiddle flexc"},[e("div",{staticClass:"conTit"},[t._v("您还可以领取"+t._s(t.chanceNum)+"个抽奖码")]),e("span",{staticClass:"conTxt"},[t._v("参加赋能会并发表感悟可领取抽奖码")])]),e("div",{staticClass:"bodyTai flexr"},[e("img",{staticClass:"rowLeft",attrs:{src:t.rowLeft},on:{click:t.switchPrize}}),e("div",{staticClass:"workBtn",class:t.is_down?"workBtnedbg":"workBtnbg",on:{click:t.fun_animate}}),e("img",{staticClass:"rowRight",attrs:{src:t.rowRight},on:{click:t.switchPrize}}),e("div",{directives:[{name:"show",rawName:"v-show",value:t.is_show,expression:"is_show"}],ref:"ticket",staticClass:"ticketBox flexc"},[e("span",{staticClass:"ticketTxt1"},[t._v("您的抽奖码")]),e("span",{staticClass:"ticketTxt2"},[t._v(t._s(t.no))]),e("span",{staticClass:"ticketTxt3"},[t._v(t._s(t.lotteryTime)+"开奖")]),e("span",{staticClass:"ticketTxt4"},[t._v("抽奖码与中奖码一致时中奖")])])])]),e("div",{staticClass:"myNoBtn"},[e("img",{staticClass:"myNoImg",attrs:{src:t.myNoBtn},on:{click:t.myLotteryCode}})])]),e("div",{directives:[{name:"show",rawName:"v-show",value:t.msgInfo.isShow,expression:"msgInfo.isShow"}],staticClass:"msgMode"},[e("div",{staticClass:"window",staticStyle:{"min-height":"270px"}},[e("div",{staticClass:"winTop"},[e("img",{attrs:{src:t.msgInfo.topBg}})]),e("div",{staticClass:"winContent",staticStyle:{"font-size":"15px","text-align":"center","text-indent":"0px","margin-bottom":"20px","margin-top":"20px"}},[t._v(t._s(t.msgInfo.content))]),e("div",{staticClass:"btnDiv"},[e("button",{on:{click:function(s){return t.swicthMsg()}}},[t._v("确定")])])])])])},n=[],o=(e("4917"),e("28a5"),e("76a0")),c=e("5f87"),a=e("285b"),r=e("62a8"),g=e.n(r),l=e("7ba6"),m=e.n(l),f=e("7284"),d=e.n(f),p=e("c155"),h=e.n(p),u={name:"letto",components:{},data:function(){return{vmeshou:e("8a7f"),rowLeft:e("fbfd"),workBtn:e("4cc2"),workBtned:e("4cc2"),rowRight:e("7760"),ticket:e("2fd4"),myNoBtn:e("4325"),accessToken:this.$route.params.accessToken,device:"android",backImg:g.a,is_show:!1,is_down:!1,bannerBg:m.a,chanceNum:0,lotteryTime:"",prizeList:[],no:"",msgInfo:{content:"加载失败",isShow:!1,goBack:!1,topBg:e("a9b3")},top_height:0}},mounted:function(){this.appSource(),this.top_height=localStorage.getItem("top_height");var t=this;setTimeout((function(s){t.initInfo("small","no")}),1e3)},created:function(){var t=this,s=this.$route.params.accessToken;if(!s||void 0==s)return t.msgInfo.content="token丢失,无权访问",t.msgInfo.goBack=!0,t.swicthMsg();Object(c["c"])({access_token:s},1),t.initInfo("small","no")},methods:{initInfo:function(t,s){o["Indicator"].open({text:"加载中...",spinnerType:"fading-circle"});var e=this;return new Promise((function(i,n){Object(a["initLetto"])(t,s).then((function(s){if(o["Indicator"].close(),s.resp_code)return e.msgInfo.content=s.resp_msg,e.msgInfo.goBack=!0,e.swicthMsg();e.prizeList=s.datas.prizeList,e.chanceNum=s.datas.count,"small"==t?e.bannerBg=m.a:"medium"==t?e.bannerBg=d.a:"big"==t&&(e.bannerBg=h.a)})).catch((function(t){return o["Indicator"].close(),t.resp_msg?(console.log(t.resp_msg),e.msgInfo.content=t.resp_msg,e.msgInfo.goBack=!0,e.swicthMsg()):(console.log(t),e.msgInfo.content=t.resp_msg,e.msgInfo.goBack=!0,e.swicthMsg())}))}))},fun_animate:function(){var t=this;if(!this.chanceNum)return Object(o["Toast"])("该奖池您暂无抽奖码可领取哦!",3e5);var s=this;this.$refs.ticket.style.height=0,s.is_show&&(s.is_show=!1),setTimeout((function(e){s.is_show=!s.is_show,s.is_down=!s.is_down,s.is_show?t.$refs.ticket.style.height="134px":t.$refs.ticket.style.height="0"}),200),setTimeout((function(t){s.is_down=!1}),1e3);var e={};this.bannerBg==m.a?e.scale="small":this.bannerBg==d.a?e.scale="medium":this.bannerBg==h.a&&(e.scale="big"),this.toDraw(e)},toDraw:function(t){o["Indicator"].open({text:"领取中...",spinnerType:"fading-circle"});var s=this;return new Promise((function(e,i){Object(a["toLetto"])(t).then((function(e){if(console.log(e),o["Indicator"].close(),1==e.resp_code)Object(o["MessageBox"])(e.resp_msg);else{Object(o["Toast"])("领取成功"),s.chanceNum=e.datas.count,s.no=e.datas.no;var i=e.datas.lotteryTime;s.lotteryTime=s.myTime(i),s.initInfo(t.scale,"no")}})).catch((function(t){return o["Indicator"].close(),t.resp_msg?(console.log(t.resp_msg),s.msgInfo.content=t.resp_msg,s.msgInfo.goBack=!0,s.swicthMsg()):(console.log(t),s.msgInfo.content=t.resp_msg,s.msgInfo.goBack=!0,s.swicthMsg())}))}))},myTime:function(t){var s=t.split("T"),e=s[0],i=e.split("-"),n=s[1],o=n.split(".000"),c=o[0].split(":"),a=parseInt(i[0])+"-"+parseInt(i[1])+"-"+parseInt(i[2])+" "+parseInt(c[0])+":"+c[1];return a},switchPrize:function(){this.bannerBg==m.a&&this.initInfo("medium","no"),this.bannerBg==d.a&&this.initInfo("big","no"),this.bannerBg==h.a&&this.initInfo("small","no")},back:function(){if("ios"==this.device)window.webkit.messageHandlers.closePage.postMessage("ios");else{var t=JSON.stringify({});window.WebViewJavascriptBridge.callHandler("closePage",t,(function(t){console.log("APP返回的响应结果",t)}))}},appSource:function(){var t=navigator.userAgent,s=!!t.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/);s?(this.device="ios",this.$bridge.registerhandler("backApp",(function(t,s){s(t)})),this.$bridge.registerhandler("toMyLottery",(function(t,s){s(t)}))):this.device="andriod"},myLotteryCode:function(){"ios"==this.device?window.webkit.messageHandlers.toMyLottery.postMessage("ios"):this.toMyLottery()},toMyLottery:function(){if("ios"==this.device)this.$bridge.callhandler("toMyLottery",{},(function(t){console.log(t)}));else{var t=JSON.stringify({});window.WebViewJavascriptBridge.callHandler("toMyLottery",t,(function(t){console.log("=========APP返回的响应结果======="),console.log(t)}))}console.log(this.device)},swicthMsg:function(){var t=this;return t.msgInfo.isShow?t.msgInfo.goBack?t.back():void(t.msgInfo.isShow=!1):t.msgInfo.isShow=!0}}},w=u,v=(e("2546"),e("2877")),b=Object(v["a"])(w,i,n,!1,null,null,null);s["default"]=b.exports},"62a8":function(t,s){t.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACgAAAAoCAYAAACM/rhtAAAB/UlEQVRYR9XYv6vPURzH8eeLxB2UmAzKaLiTRRE301UMsogYFCOD0p0oJlkUm8LiDmJQBotBV6yU8AdQNmTC4KVTn1tvZ7nf8/l87ve+nfXz4zw+55z3+/M+RyRvSu5jKkDbpZ+9wFdJH1sGZdWBttcDj4GjwB/grKT7kyKnAbwDnAugJUlzKYC2rwBXK8yipFNrDrR9BrgL/6zzL8AeSZ/WFGh7HngKbAiQH8CcpLeT4sp9o69B27uBF8DmAPkNHJb0vAU3OtD2TuA1sD1ADJyWtNiKGxVoeyvwCthVQRYk3eiDGw1oexNQpm9fBbkt6UJf3ChA2+uAR8CxClKS83FJJTn3boODxPYt4HwlWALmJf3sLeseHAS0fQmo19d7YL+kb0Nxg6bY9gngAVCmeLl9LkVBSyJe6SN6jaDtg8AzYGPo4DtwQNK7lTptud4MtD0LvAS2hI5+AYcklQQ9amsC2t4GvAF2BEWJ0pOSHo4q6xMktheA6xXkoqSbq4FrDpL/AZh7isuQpw6S5XWWOs0EZN5EHZB5f3UBmbdY6IImd7nVIfMWrGGq85b8AZl30xSQebedAZl34x6QeY8+AvIycK0qxXIcHgVk3uO3LkeWA8wnwJFSDHUHmPcmLXCbSv5JX1rfZ3sGKGvyQ+u+ZSrAvh/WXPIP6ajvs38BCYDMKVwm8qQAAAAASUVORK5CYII="},7284:function(t,s,e){t.exports=e.p+"img/medium.a0442ed8.png"},7760:function(t,s,e){t.exports=e.p+"img/right.22b7dee5.png"},"7ba6":function(t,s,e){t.exports=e.p+"img/small.720d8ab3.png"},"8a7f":function(t,s,e){t.exports=e.p+"img/vmeshou.81fc409a.png"},a9b3:function(t,s,e){t.exports=e.p+"img/win_bg.c84ec232.png"},c155:function(t,s,e){t.exports=e.p+"img/big.3936d5c7.png"},dd4b:function(t,s,e){},fbfd:function(t,s,e){t.exports=e.p+"img/left.ff911570.png"}}]);