1 line
4.4 KiB
JavaScript
1 line
4.4 KiB
JavaScript
(window.webpackJsonp=window.webpackJsonp||[]).push([[53,16],{447:function(t,e,n){var content=n(449);content.__esModule&&(content=content.default),"string"==typeof content&&(content=[[t.i,content,""]]),content.locals&&(t.exports=content.locals);(0,n(15).default)("12a18d22",content,!0,{sourceMap:!1})},448:function(t,e,n){"use strict";n(447)},449:function(t,e,n){var r=n(14)(!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},450: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(448),n(9)),component=Object(o.a)(r,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"bg-white flex-col col-center null-data"},[n("img",{staticClass:"img-null",style:t.imgStyle,attrs:{src:t.img,alt:""}}),t._v(" "),n("div",{staticClass:"muted mt8"},[t._v(t._s(t.text))])])}),[],!1,null,"93598fb0",null);e.default=component.exports},472:function(t,e,n){"use strict";var r=n(7),o=n(101).find,c=n(187),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)},509:function(t,e,n){t.exports=n.p+"img/order_null.ce12c76.png"},546:function(t,e,n){var content=n(625);content.__esModule&&(content=content.default),"string"==typeof content&&(content=[[t.i,content,""]]),content.locals&&(t.exports=content.locals);(0,n(15).default)("8a7e8b7a",content,!0,{sourceMap:!1})},624:function(t,e,n){"use strict";n(546)},625:function(t,e,n){var r=n(14)(!1);r.push([t.i,".user-order{padding:20px 0}",""]),t.exports=r},675:function(t,e,n){"use strict";n.r(e);var r=n(6),o=(n(472),n(11),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(624),n(9)),component=Object(l.a)(c,(function(){var t=this,e=t.$createElement,r=t._self._c||e;return r("div",{staticClass:"user-order"},[r("el-tabs",{on:{"tab-click":t.handleClick},model:{value:t.activeName,callback:function(e){t.activeName=e},expression:"activeName"}},t._l(t.order,(function(e,o){return r("el-tab-pane",{key:o,attrs:{label:e.name,name:e.type}},[e.list.length?[r("order-list",{attrs:{list:e.list},on:{refresh:t.getOrderList}}),t._v(" "),e.count?r("div",{staticClass:"pagination flex row-center"},[r("el-pagination",{attrs:{"hide-on-single-page":"",background:"",layout:"prev, pager, next",total:e.count,"prev-text":"上一页","next-text":"下一页","page-size":10},on:{"current-change":t.changePage}})],1):t._e()]:r("null-data",{attrs:{img:n(509),text:"暂无订单~"}})],2)})),1)],1)}),[],!1,null,null,null);e.default=component.exports;installComponents(component,{OrderList:n(650).default,NullData:n(450).default})}}]); |