You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
1 lines
4.9 KiB
1 lines
4.9 KiB
(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["pages/order/MyOrder/index"],{"142d":function(t,e,n){},1506:function(t,e,n){"use strict";n.r(e);var a=n("919d"),r=n("62c0");for(var i in r)"default"!==i&&function(t){n.d(e,t,(function(){return r[t]}))}(i);n("63f9");var o,s=n("f0c5"),d=Object(s["a"])(r["default"],a["b"],a["c"],!1,null,"a71ec916",null,!1,a["a"],o);e["default"]=d.exports},"4b1f":function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var a=n("2559"),r=n("0510"),i=n("2f62"),o=n("8c38"),s=function(){n.e("components/Loading").then(function(){return resolve(n("df82"))}.bind(null,n)).catch(n.oe)},d=function(){n.e("components/Payment").then(function(){return resolve(n("f012"))}.bind(null,n)).catch(n.oe)},u=function(){n.e("components/DataFormat").then(function(){return resolve(n("7671"))}.bind(null,n)).catch(n.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,a.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,n=this.limit,r=this.type;(0,a.getOrderList)({page:e,limit:n,type:r}).then((function(e){t.orderList=t.orderList.concat(e.data),t.page++,t.loaded=e.data.length<t.limit,t.loading=!1}))}},getStatus:function(t){return c[t._status._type]},cancelOrder:function(t){var e=this;(0,r.cancelOrderHandle)(t.orderId).then((function(){e.getOrderData(),e.orderList.splice(e.orderList.indexOf(t),1)})).catch((function(){e.reload()}))},paymentTap:function(t){var e=this,n=this;t.combinationId>0||t.bargainId>0||t.seckillId>0||n.setOfflinePayStatus(t.offlinePayStatus),this.pay=!0,this.toPay=function(a){(0,r.payOrderHandle)(t.orderId,a,n.from).then((function(){var t=parseInt(e.$yroute.query.type)||0;n.changeType(t),n.getOrderData()})).catch((function(){var t=parseInt(n.$yroute.query.type)||0;n.changeType(t),n.getOrderData()}))}},toPay:function(){}},mounted:function(){},onReachBottom:function(){!this.loading&&this.getOrderList()}};e.default=p},"62c0":function(t,e,n){"use strict";n.r(e);var a=n("4b1f"),r=n.n(a);for(var i in a)"default"!==i&&function(t){n.d(e,t,(function(){return a[t]}))}(i);e["default"]=r.a},"63f9":function(t,e,n){"use strict";var a=n("142d"),r=n.n(a);r.a},"919d":function(t,e,n){"use strict";var a;n.d(e,"b",(function(){return r})),n.d(e,"c",(function(){return i})),n.d(e,"a",(function(){return a}));var r=function(){var t=this,e=t.$createElement,n=(t._self._c,t.__map(t.orderList,(function(e,n){var a=t.__get_orig(e),r=t.getStatus(e);return{$orig:a,m0:r}})));t._isMounted||(t.e0=function(e,n){var a=arguments[arguments.length-1].currentTarget.dataset,r=a.eventParams||a["event-params"];n=r.cart;return e.stopPropagation(),t.$yrouter.push({path:"/pages/shop/GoodsCon/index",query:{id:n.productInfo.id}})},t.e1=function(e,n){var a=arguments[arguments.length-1].currentTarget.dataset,r=a.eventParams||a["event-params"];n=r.cart;return e.stopPropagation(),t.$yrouter.push({path:"/pages/activity/GroupDetails/index",query:{id:n.combinationId}})},t.e2=function(e,n){var a=arguments[arguments.length-1].currentTarget.dataset,r=a.eventParams||a["event-params"];n=r.cart;return e.stopPropagation(),t.$yrouter.push({path:"/pages/activity/DargainDetails/index",query:{id:n.bargainId}})},t.e3=function(e,n){var a=arguments[arguments.length-1].currentTarget.dataset,r=a.eventParams||a["event-params"];n=r.cart;return e.stopPropagation(),t.$yrouter.push({path:"/pages/activity/SeckillDetails/index",query:{id:n.seckillId}})}),t.$mp.data=Object.assign({},{$root:{l0:n}})},i=[]},b5eb:function(t,e,n){"use strict";(function(t){n("0371");a(n("66fd"));var e=a(n("1506"));function a(t){return t&&t.__esModule?t:{default:t}}t(e.default)}).call(this,n("543d")["createPage"])}},[["b5eb","common/runtime","common/vendor"]]]); |