(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["pages/order/MyOrder/index"],{"0f62":function(t,e,a){"use strict";a.r(e);var n=a("381a"),r=a.n(n);for(var i in n)"default"!==i&&function(t){a.d(e,t,(function(){return n[t]}))}(i);e["default"]=r.a},"381a":function(t,e,a){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n=a("2d3a"),r=a("c7f0"),i=a("2f62"),o=a("b6d1"),s=function(){a.e("components/Loading").then(function(){return resolve(a("624a"))}.bind(null,a)).catch(a.oe)},d=function(){a.e("components/Payment").then(function(){return resolve(a("0010"))}.bind(null,a)).catch(a.oe)},u=function(){a.e("components/DataFormat").then(function(){return resolve(a("f080"))}.bind(null,a)).catch(a.oe)},c=["待付款","待发货","待收货","待评价","已完成","","","","","待付款"],f="MyOrder",p={name:f,data:function(){return{offlinePayStatus:2,orderData:{},type:0,page:1,limit:20,loaded:!1,loading:!1,orderList:[],pay:!1,payType:["yue","weixin"],from:this.$deviceType}},components:{Loading:s,Payment:d,DataFormat:u},computed:(0,i.mapGetters)(["userInfo"]),onShow:function(){console.log(this),this.type=parseInt(this.$yroute.query.type)||0,this.changeType(this.type),this.getOrderData(),this.getOrderList()},onHide:function(){this.orderList=[],this.page=1,this.limit=20,this.loaded=!1,this.loading=!1},methods:{goLogistics:function(t){this.$yrouter.push({path:"/pages/order/Logistics/index",query:{id:t.orderId}})},goOrderDetails:function(t){this.$yrouter.push({path:"/pages/order/OrderDetails/index",query:{id:t.orderId}})},dataFormat:o.dataFormat,setOfflinePayStatus:function(t){var e=this;e.offlinePayStatus=t,1===t&&e.payType.indexOf("offline")<0&&e.payType.push("offline")},getOrderData:function(){var t=this;(0,n.getOrderData)().then((function(e){t.orderData=e.data}))},takeOrder:function(t){var e=this;(0,r.takeOrderHandle)(t.orderId).finally((function(){e.reload(),e.getOrderData()}))},reload:function(){this.changeType(this.type)},changeType:function(t){this.type=t,this.orderList=[],this.page=1,this.loaded=!1,this.loading=!1,this.getOrderList()},getOrderList:function(){var t=this;if(!this.loading&&!this.loaded){this.loading=!0;var e=this.page,a=this.limit,r=this.type;(0,n.getOrderList)({page:e,limit:a,type:r}).then((function(e){t.orderList=t.orderList.concat(e.data),t.page++,t.loaded=e.data.length0||t.bargainId>0||t.seckillId>0||a.setOfflinePayStatus(t.offlinePayStatus),this.pay=!0,this.toPay=function(n){(0,r.payOrderHandle)(t.orderId,n,a.from).then((function(){var t=parseInt(e.$yroute.query.type)||0;a.changeType(t),a.getOrderData()})).catch((function(){var t=parseInt(a.$yroute.query.type)||0;a.changeType(t),a.getOrderData()}))}},toPay:function(){}},mounted:function(){},onReachBottom:function(){!this.loading&&this.getOrderList()}};e.default=p},"61f6":function(t,e,a){},"6a00":function(t,e,a){"use strict";(function(t){a("ef82");n(a("66fd"));var e=n(a("a782"));function n(t){return t&&t.__esModule?t:{default:t}}t(e.default)}).call(this,a("543d")["createPage"])},a782:function(t,e,a){"use strict";a.r(e);var n=a("f979"),r=a("0f62");for(var i in r)"default"!==i&&function(t){a.d(e,t,(function(){return r[t]}))}(i);a("dba4");var o,s=a("f0c5"),d=Object(s["a"])(r["default"],n["b"],n["c"],!1,null,"f4dd7844",null,!1,n["a"],o);e["default"]=d.exports},dba4:function(t,e,a){"use strict";var n=a("61f6"),r=a.n(n);r.a},f979:function(t,e,a){"use strict";var n;a.d(e,"b",(function(){return r})),a.d(e,"c",(function(){return i})),a.d(e,"a",(function(){return n}));var r=function(){var t=this,e=t.$createElement,a=(t._self._c,t.__map(t.orderList,(function(e,a){var n=t.__get_orig(e),r=t.getStatus(e);return{$orig:n,m0:r}})));t._isMounted||(t.e0=function(e,a){var n=arguments[arguments.length-1].currentTarget.dataset,r=n.eventParams||n["event-params"];a=r.cart;return e.stopPropagation(),t.$yrouter.push({path:"/pages/shop/GoodsCon/index",query:{id:a.productInfo.id}})},t.e1=function(e,a){var n=arguments[arguments.length-1].currentTarget.dataset,r=n.eventParams||n["event-params"];a=r.cart;return e.stopPropagation(),t.$yrouter.push({path:"/pages/activity/GroupDetails/index",query:{id:a.combinationId}})},t.e2=function(e,a){var n=arguments[arguments.length-1].currentTarget.dataset,r=n.eventParams||n["event-params"];a=r.cart;return e.stopPropagation(),t.$yrouter.push({path:"/pages/activity/DargainDetails/index",query:{id:a.bargainId}})},t.e3=function(e,a){var n=arguments[arguments.length-1].currentTarget.dataset,r=n.eventParams||n["event-params"];a=r.cart;return e.stopPropagation(),t.$yrouter.push({path:"/pages/activity/SeckillDetails/index",query:{id:a.seckillId}})}),t.$mp.data=Object.assign({},{$root:{l0:a}})},i=[]}},[["6a00","common/runtime","common/vendor"]]]);