(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["plugins/lottery/detail/detail"],{"58db":function(t,e,i){"use strict";(function(t){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var i={name:"detail",data:function(){return{page:1,load:!1,args:!1,title:"抽奖",list:null,num:"",user_list:null,setting:null}},onShareAppMessage:function(t){return this.$shareAppMessage({title:this.title,path:"/plugins/lottery/goods/goods",params:{lottery_id:this.list.lottery_id}})},onLoad:function(e){var i=this;i.getSetting(),i.$showLoading(),i.$request({url:i.$api.lottery.detail,data:{id:e.id?e.id:0,lottery_id:e.lottery_id?e.lottery_id:0},method:"POST"}).then((function(e){if(i.$hideLoading(),0===e.code){var n=[e.data.list,e.data.num,e.data.user_list];i.list=n[0],i.num=n[1],i.user_list=n[2]}else t.showModal({title:"提示",content:e.msg,showCancel:!1,success:function(e){e.confirm&&t.navigateBack({delta:1})}})})).catch((function(t){i.$hideLoading()}))},methods:{userload:function(){var t=this;if(!t.args&&!t.load){t.load=!0;var e=t.page+1;t.$request({url:t.$api.lottery.detail,data:{page:e,lottery_id:t.list.lottery_id}}).then((function(i){if(0===i.code){var n=[e,i.data.user_list.length<6,t.user_list.concat(i.data.user_list)];t.page=n[0],t.args=n[1],t.user_list=n[2]}t.load=!1}))}},getSetting:function(){var t=this;t.$request({url:t.$api.lottery.setting}).then((function(e){0===e.code&&(t.setting=e.data.setting)}))},navGoods:function(){t.navigateTo({url:"/plugins/lottery/goods/goods?lottery_id="+this.list.lottery_id})},qrcode:function(){t.navigateTo({url:"/plugins/lottery/qrcode/qrcode"})},prize:function(){t.navigateTo({url:"/plugins/lottery/lucky-code/lucky-code?lottery_id="+this.list.lottery_id})},moreLottery:function(){t.redirectTo({url:"/plugins/lottery/index/index"})},submit:function(){var e=this.list,i=[{mch_id:0,lottery_log_id:e.id,goods_list:[{id:e.goods.id,attr:e.attr.attr_list,num:1,cart_id:0,goods_attr_id:e.goods.attr_id}]}];t.navigateTo({url:"/pages/order-submit/order-submit?mch_list="+JSON.stringify(i)+"&preview_url="+encodeURIComponent(this.$api.lottery.order_preview)+"&submit_url="+encodeURIComponent(this.$api.lottery.order_submit)})}}};e.default=i}).call(this,i("543d")["default"])},ba9a:function(t,e,i){},bf5b:function(t,e,i){"use strict";i.r(e);var n=i("d40f"),o=i("f858");for(var r in o)"default"!==r&&function(t){i.d(e,t,(function(){return o[t]}))}(r);i("e67a");var a,l=i("f0c5"),s=Object(l["a"])(o["default"],n["b"],n["c"],!1,null,"163355c5",null,!1,n["a"],a);e["default"]=s.exports},bf82:function(t,e,i){"use strict";(function(t){i("b8bc");n(i("66fd"));var e=n(i("bf5b"));function n(t){return t&&t.__esModule?t:{default:t}}t(e.default)}).call(this,i("543d")["createPage"])},d40f:function(t,e,i){"use strict";var n;i.d(e,"b",(function(){return o})),i.d(e,"c",(function(){return r})),i.d(e,"a",(function(){return n}));var o=function(){var t=this,e=t.$createElement;t._self._c},r=[]},e67a:function(t,e,i){"use strict";var n=i("ba9a"),o=i.n(n);o.a},f858:function(t,e,i){"use strict";i.r(e);var n=i("58db"),o=i.n(n);for(var r in n)"default"!==r&&function(t){i.d(e,t,(function(){return n[t]}))}(r);e["default"]=o.a}},[["bf82","common/runtime","common/vendor"]]]);