1 |
- (global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["plugins/lottery/index/index"],{"2f07":function(t,e,n){"use strict";n.r(e);var a=n("fceb"),i=n("5770");for(var o in i)"default"!==o&&function(t){n.d(e,t,(function(){return i[t]}))}(o);n("db3e");var r,l=n("f0c5"),s=Object(l["a"])(i["default"],a["b"],a["c"],!1,null,"1daa2601",null,!1,a["a"],r);e["default"]=s.exports},"47cd":function(t,e,n){"use strict";(function(t){n("8748");a(n("66fd"));var e=a(n("2f07"));function a(t){return t&&t.__esModule?t:{default:t}}t(e.default)}).call(this,n("543d")["createPage"])},5770:function(t,e,n){"use strict";n.r(e);var a=n("9d14"),i=n.n(a);for(var o in a)"default"!==o&&function(t){n.d(e,t,(function(){return a[t]}))}(o);e["default"]=i.a},"8f74":function(t,e,n){},"9d14":function(t,e,n){"use strict";(function(t){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var a=function(){n.e("components/page-component/app-swiper/app-swiper").then(function(){return resolve(n("de77"))}.bind(null,n)).catch(n.oe)},i=function(){Promise.all([n.e("common/vendor"),n.e("plugins/lottery/common-buttom")]).then(function(){return resolve(n("3937"))}.bind(null,n)).catch(n.oe)},o={name:"index",components:{appSwiper:a,commonButtom:i},data:function(){var t;return{integral:t,args:!1,load:!1,page:1,list:null,times:null,title:"幸运抽奖",banner_list:null,setting:null,template_message:null}},onHide:function(){clearInterval(this.integral)},onUnload:function(){clearInterval(this.integral)},onLoad:function(e){var n=this;n.$request({url:n.$api.lottery.setting}).then((function(e){0===e.code&&(n.setting=e.data.setting,t.setNavigationBarTitle({title:n.setting.title}),n.title=n.setting.title)}))},onReachBottom:function(){var t=this;if(!t.args&&!t.load){t.load=!0;var e=t.page+1;t.$request({url:t.$api.lottery.index,data:{page:e}}).then((function(n){if(0===n.code){var a=[e,0===n.data.list.length,t.list.concat(n.data.list)];t.page=a[0],t.args=a[1],t.list=a[2];var i=t.list.map((function(t){return 2==t.new_status?t.start_at:t.end_at}));t.setTimeStart(i)}t.load=!1}))}},onShow:function(){var t=this;t.$showLoading({title:"加载中"}),t.$request({url:t.$api.lottery.index}).then((function(e){if(t.$hideLoading(),0===e.code){var n=[e.data.banner_list,e.data.list,e.data.banner_list,e.data.template_message];t.banner_list=n[0],t.list=n[1],t.banner_list=n[2],t.template_message=n[3];var a=[1,!1];t.page=a[0],t.args=a[1];var i=t.list.map((function(t){return 2==t.new_status?t.start_at:t.end_at}));t.setTimeStart(i)}})).catch((function(e){t.$hideLoading()}))},onShareAppMessage:function(){return this.$shareAppMessage({title:this.title,path:"/plugins/lottery/index/index",params:{}})},methods:{qrcode:function(){t.navigateTo({url:"/plugins/lottery/qrcode/qrcode"})},goods:function(e){t.navigateTo({url:"/plugins/lottery/goods/goods?lottery_id=".concat(e.id)})},detail:function(e){var n=this;this.$subscribe(this.template_message).then((function(a){var i=n.template_message[0];"accept"===a[i]?t.showModal({title:"提示",content:"订阅成功",showCancel:!1,success:function(n){t.navigateTo({url:"/plugins/lottery/detail/detail?lottery_id="+e})}}):t.showModal({title:"提示",content:"取消订阅",showCancel:!1,success:function(n){t.navigateTo({url:"/plugins/lottery/detail/detail?lottery_id="+e})}})})).catch((function(n){t.navigateTo({url:"/plugins/lottery/detail/detail?lottery_id="+e})}))},setTimeStart:function(t){var e=this;clearInterval(e.integral);var n=function(t){var n=[];t.map((function(t,e,a){var i=t.replace(/-/g,"/"),o=parseInt((new Date(i).getTime()-(new Date).getTime())/1e3),r=0,l=0,s=0,u=0;o>0&&(r=Math.floor(o/86400),l=Math.floor(o/3600)-24*r,s=Math.floor(o/60)-24*r*60-60*l,u=Math.floor(o)-24*r*60*60-60*l*60-60*s),n[e]={day:r,hour:l,minute:s,second:u}})),e.times=n};n(t),e.integral=setInterval((function(){n(t)}),1e3)}}};e.default=o}).call(this,n("543d")["default"])},db3e:function(t,e,n){"use strict";var a=n("8f74"),i=n.n(a);i.a},fceb:function(t,e,n){"use strict";var a,i=function(){var t=this,e=t.$createElement;t._self._c},o=[];n.d(e,"b",(function(){return i})),n.d(e,"c",(function(){return o})),n.d(e,"a",(function(){return a}))}},[["47cd","common/runtime","common/vendor"]]]);
|