(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["plugins/bargain/order-list/order-list"],{"0aba":function(t,n,a){"use strict";a.r(n);var e=a("ed13"),i=a("95c9");for(var o in i)"default"!==o&&function(t){a.d(n,t,(function(){return i[t]}))}(o);a("1bbc");var r,u=a("f0c5"),c=Object(u["a"])(i["default"],e["b"],e["c"],!1,null,"e00488f8",null,!1,e["a"],r);n["default"]=c.exports},"1bbc":function(t,n,a){"use strict";var e=a("9835"),i=a.n(e);i.a},"8c25":function(t,n,a){"use strict";(function(t){a("8748");e(a("66fd"));var n=e(a("0aba"));function e(t){return t&&t.__esModule?t:{default:t}}t(n.default)}).call(this,a("543d")["createPage"])},"95c9":function(t,n,a){"use strict";a.r(n);var e=a("c452"),i=a.n(e);for(var o in e)"default"!==o&&function(t){a.d(n,t,(function(){return e[t]}))}(o);n["default"]=i.a},9835:function(t,n,a){},c452:function(t,n,a){"use strict";(function(t){Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var e=function(){Promise.all([a.e("common/vendor"),a.e("plugins/bargain/common-buttom")]).then(function(){return resolve(a("5baa"))}.bind(null,a)).catch(a.oe)},i={name:"order-list",components:{commonButtom:e},data:function(){var t;return{integral:t,list:null,args:!1,page:1,load:!1}},onReachBottom:function(){var t=this;if(!t.args&&!t.load){t.load=!0;var n=t.page+1;t.$request({url:t.$api.bargain.list,data:{page:n}}).then((function(a){if(0===a.code){var e=[n,0===a.data.list.length];t.page=e[0],t.args=e[1],t.getIntegral(t.list.concat(a.data.list))}t.load=!1}))}},onShow:function(){var t=this;t.$showLoading(),t.$request({url:t.$api.bargain.list}).then((function(n){t.$hideLoading(),0===n.code&&t.getIntegral(n.data.list),t.args=!1,t.page=1})).catch((function(n){t.$hideLoading()}))},onUnload:function(){clearInterval(this.integral)},methods:{navGoods:function(n){t.navigateTo({url:"/plugins/bargain/goods/goods?goods_id="+n.goods_id})},goto:function(n){t.navigateTo({url:"/plugins/bargain/activity/activity?id="+n.bargain_order_id})},getIntegral:function(t){var n=this;clearInterval(n.integral);var a=function(){t.forEach((function(t,n,a){if(!t.status){var e=t.finish_at.replace(/-/g,"/"),i=parseInt((new Date(e).getTime()-(new Date).getTime())/1e3),o=0,r=0,u=0,c=0;i>0?(o=Math.floor(i/86400),r=Math.floor(i/3600)-24*o,u=Math.floor(i/60)-24*o*60-60*r,c=Math.floor(i)-24*o*60*60-60*r*60-60*u,t.times={day:o,hour:r,minute:u,second:c}):t.times=c}})),n.list=t};a(t),n.integral=setInterval((function(){a(t)}),1e3)},submit:function(n){var a=[{mch_id:0,bargain_order_id:n.bargain_order_id,goods_list:[{id:n.goods_id,attr:[],num:1,cart_id:0,goods_attr_id:n.goods_attr_id}]}];t.navigateTo({url:"/pages/order-submit/order-submit?mch_list="+JSON.stringify(a)+"&preview_url="+encodeURIComponent(this.$api.bargain.order_preview)+"&submit_url="+encodeURIComponent(this.$api.bargain.order_submit)})}}};n.default=i}).call(this,a("543d")["default"])},ed13:function(t,n,a){"use strict";var e,i=function(){var t=this,n=t.$createElement;t._self._c},o=[];a.d(n,"b",(function(){return i})),a.d(n,"c",(function(){return o})),a.d(n,"a",(function(){return e}))}},[["8c25","common/runtime","common/vendor"]]]);