3524ce0.js 4.3 KB

1
  1. (window.webpackJsonp=window.webpackJsonp||[]).push([[57,17],{481:function(t,e,n){var content=n(483);content.__esModule&&(content=content.default),"string"==typeof content&&(content=[[t.i,content,""]]),content.locals&&(t.exports=content.locals);(0,n(17).default)("4bccbd40",content,!0,{sourceMap:!1})},482:function(t,e,n){"use strict";n(481)},483:function(t,e,n){var r=n(16)(!1);r.push([t.i,".null-data[data-v-93598fb0]{padding:100px}.null-data .img-null[data-v-93598fb0]{width:150px;height:150px}",""]),t.exports=r},484:function(t,e,n){"use strict";n.r(e);var r={components:{},props:{img:{type:String},text:{type:String,default:"暂无数据"},imgStyle:{type:String,default:""}},methods:{}},o=(n(482),n(8)),component=Object(o.a)(r,(function(){var t=this,e=t._self._c;return e("div",{staticClass:"bg-white flex-col col-center null-data"},[e("img",{staticClass:"img-null",style:t.imgStyle,attrs:{src:t.img,alt:""}}),t._v(" "),e("div",{staticClass:"muted mt8"},[t._v(t._s(t.text))])])}),[],!1,null,"93598fb0",null);e.default=component.exports},506:function(t,e,n){"use strict";var r=n(2),o=n(109).find,c=n(188),l="find",d=!0;l in[]&&Array(1).find((function(){d=!1})),r({target:"Array",proto:!0,forced:d},{find:function(t){return o(this,t,arguments.length>1?arguments[1]:void 0)}}),c(l)},545:function(t,e,n){t.exports=n.p+"img/order_null.ce12c76.png"},588:function(t,e,n){var content=n(670);content.__esModule&&(content=content.default),"string"==typeof content&&(content=[[t.i,content,""]]),content.locals&&(t.exports=content.locals);(0,n(17).default)("3d018cb6",content,!0,{sourceMap:!1})},669:function(t,e,n){"use strict";n(588)},670:function(t,e,n){var r=n(16)(!1);r.push([t.i,".user-order{padding:20px 0}",""]),t.exports=r},722:function(t,e,n){"use strict";n.r(e);n(29);var r=n(9),o=(n(506),n(12),n(53),{head:function(){return{title:this.$store.getters.headTitle,link:[{rel:"icon",type:"image/x-icon",href:this.$store.getters.favicon}]}},layout:"user",asyncData:function(t){return Object(r.a)(regeneratorRuntime.mark((function e(){var n,r,o,c,l;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=t.$get,t.$post,e.next=3,n("order/lists",{params:{page_size:10}});case 3:if(r=e.sent,o=r.data,c=o.list,l=o.count,1!=r.code){e.next=10;break}return e.abrupt("return",{orderList:{list:c,count:l}});case 10:case"end":return e.stop()}}),e)})))()},components:{},data:function(){return{activeName:"all",order:[{type:"all",list:[],name:"全部",count:0,page:1},{type:"pay",list:[],name:"待付款",count:0,page:1},{type:"delivery",list:[],name:"待收货",count:0,page:1},{type:"finish",list:[],name:"已完成",count:0,page:1},{type:"close",list:[],name:"已关闭",count:0,page:1}]}},methods:{handleClick:function(){this.getOrderList()},getOrderList:function(){var t=this;return Object(r.a)(regeneratorRuntime.mark((function e(){var n,r,o,c,l,d,f;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=t.activeName,r=t.order,o=r.find((function(t){return t.type==n})),e.next=4,t.$get("order/lists",{params:{page_size:10,page_no:o.page,type:n}});case 4:c=e.sent,l=c.data,d=l.list,f=l.count,1==c.code&&(t.orderList={list:d,count:f});case 10:case"end":return e.stop()}}),e)})))()},changePage:function(t){var e=this;this.order.some((function(n){n.type==e.activeName&&(n.page=t)})),this.getOrderList()}},watch:{orderList:{immediate:!0,handler:function(t){var e=this;this.order.some((function(n){if(n.type==e.activeName)return Object.assign(n,t),console.log(n),!0}))}}}}),c=o,l=(n(669),n(8)),component=Object(l.a)(c,(function(){var t=this,e=t._self._c;return e("div",{staticClass:"user-order"},[e("el-tabs",{on:{"tab-click":t.handleClick},model:{value:t.activeName,callback:function(e){t.activeName=e},expression:"activeName"}},t._l(t.order,(function(r,o){return e("el-tab-pane",{key:o,attrs:{label:r.name,name:r.type}},[r.list.length?[e("order-list",{attrs:{list:r.list},on:{refresh:t.getOrderList}}),t._v(" "),r.count?e("div",{staticClass:"pagination flex row-center"},[e("el-pagination",{attrs:{"hide-on-single-page":"",background:"",layout:"prev, pager, next",total:r.count,"prev-text":"上一页","next-text":"下一页","page-size":10},on:{"current-change":t.changePage}})],1):t._e()]:e("null-data",{attrs:{img:n(545),text:"暂无订单~"}})],2)})),1)],1)}),[],!1,null,null,null);e.default=component.exports;installComponents(component,{OrderList:n(696).default,NullData:n(484).default})}}]);