detail.js 3.2 KB

1
  1. (global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["plugins/lottery/detail/detail"],{"11c8":function(t,e,i){},2859:function(t,e,i){"use strict";i.r(e);var n=i("6bd7"),o=i("548d");for(var r in o)"default"!==r&&function(t){i.d(e,t,(function(){return o[t]}))}(r);i("a19a");var a,l=i("f0c5"),s=Object(l["a"])(o["default"],n["b"],n["c"],!1,null,"30b0527f",null,!1,n["a"],a);e["default"]=s.exports},"548d":function(t,e,i){"use strict";i.r(e);var n=i("afcd"),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},"5b48":function(t,e,i){"use strict";(function(t){i("8748");n(i("66fd"));var e=n(i("2859"));function n(t){return t&&t.__esModule?t:{default:t}}t(e.default)}).call(this,i("543d")["createPage"])},"6bd7":function(t,e,i){"use strict";var n,o=function(){var t=this,e=t.$createElement;t._self._c},r=[];i.d(e,"b",(function(){return o})),i.d(e,"c",(function(){return r})),i.d(e,"a",(function(){return n}))},a19a:function(t,e,i){"use strict";var n=i("11c8"),o=i.n(n);o.a},afcd:function(t,e,i){"use strict";(function(t){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var i={name:"detail",components:{},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)})).catch((function(t){console.log(t)}))},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"])}},[["5b48","common/runtime","common/vendor"]]]);