(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["plugins/scratch/prize/prize"],{4045:function(t,a,n){"use strict";(function(t){Object.defineProperty(a,"__esModule",{value:!0}),a.default=void 0;var n={name:"prize",components:{},data:function(){return{list:[],page:1,args:!1,load:!1}},onShow:function(){var t=this;t.$showLoading({title:"加载中"}),t.$request({url:t.$api.scratch.prize,data:{page:1}}).then((function(a){t.$hideLoading(),0===a.code&&(t.list=a.data)})).catch((function(a){t.$hideLoading()}))},onReachBottom:function(){var t=this;if(!t.args&&!t.load){t.load=!0;var a=t.page+1;t.$request({url:t.$api.scratch.prize,data:{page:a}}).then((function(n){if(0===n.code){var e=[a,0===n.data.length,t.list.concat(n.data)];t.page=e[0],t.args=e[1],t.list=e[2]}t.load=!1}))}},methods:{submit:function(a){var n=[{mch_id:0,scratch_id:a.id,goods_list:[{id:a.goods.id,attr:a.attr_list,num:1,cart_id:0,goods_attr_id:a.attr_id}]}];t.navigateTo({url:"/pages/order-submit/order-submit?mch_list="+JSON.stringify(n)+"&preview_url="+encodeURIComponent(this.$api.scratch.order_preview)+"&submit_url="+encodeURIComponent(this.$api.scratch.order_submit)})}}};a.default=n}).call(this,n("543d")["default"])},"52d1":function(t,a,n){"use strict";var e;n.d(a,"b",(function(){return i})),n.d(a,"c",(function(){return r})),n.d(a,"a",(function(){return e}));var i=function(){var t=this,a=t.$createElement;t._self._c},r=[]},6197:function(t,a,n){"use strict";n.r(a);var e=n("4045"),i=n.n(e);for(var r in e)"default"!==r&&function(t){n.d(a,t,(function(){return e[t]}))}(r);a["default"]=i.a},ac15:function(t,a,n){"use strict";var e=n("fa21"),i=n.n(e);i.a},b845:function(t,a,n){"use strict";n.r(a);var e=n("52d1"),i=n("6197");for(var r in i)"default"!==r&&function(t){n.d(a,t,(function(){return i[t]}))}(r);n("ac15");var o,c=n("f0c5"),u=Object(c["a"])(i["default"],e["b"],e["c"],!1,null,"272a220e",null,!1,e["a"],o);a["default"]=u.exports},e503:function(t,a,n){"use strict";(function(t){n("2d0a");e(n("66fd"));var a=e(n("b845"));function e(t){return t&&t.__esModule?t:{default:t}}t(a.default)}).call(this,n("543d")["createPage"])},fa21:function(t,a,n){}},[["e503","common/runtime","common/vendor"]]]);