(window.webpackJsonp=window.webpackJsonp||[]).push([[2,10,15,16],{404:function(e,t,r){"use strict";var n=r(11),o=r(5),d=r(116),c=r(23),l=r(15),v=r(52),m=r(251),h=r(81),f=r(7),_=r(83),x=r(82).f,y=r(42).f,w=r(22).f,C=r(405).trim,S="Number",k=o.Number,T=k.prototype,O=v(_(T))==S,N=function(e){var t,r,n,o,d,c,l,code,v=h(e,!1);if("string"==typeof v&&v.length>2)if(43===(t=(v=C(v)).charCodeAt(0))||45===t){if(88===(r=v.charCodeAt(2))||120===r)return NaN}else if(48===t){switch(v.charCodeAt(1)){case 66:case 98:n=2,o=49;break;case 79:case 111:n=8,o=55;break;default:return+v}for(c=(d=v.slice(2)).length,l=0;lo)return NaN;return parseInt(d,n)}return+v};if(d(S,!k(" 0o1")||!k("0b1")||k("+0x1"))){for(var D,I=function(e){var t=arguments.length<1?0:e,r=this;return r instanceof I&&(O?f((function(){T.valueOf.call(r)})):v(r)!=S)?m(new k(N(t)),r,I):N(t)},A=n?x(k):"MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,EPSILON,isFinite,isInteger,isNaN,isSafeInteger,MAX_SAFE_INTEGER,MIN_SAFE_INTEGER,parseFloat,parseInt,isInteger,fromString,range".split(","),E=0;A.length>E;E++)l(k,D=A[E])&&!l(I,D)&&w(I,D,y(k,D));I.prototype=T,T.constructor=I,c(o,S,I)}},405:function(e,t,r){var n=r(27),o="["+r(406)+"]",d=RegExp("^"+o+o+"*"),c=RegExp(o+o+"*$"),l=function(e){return function(t){var r=String(n(t));return 1&e&&(r=r.replace(d,"")),2&e&&(r=r.replace(c,"")),r}};e.exports={start:l(1),end:l(2),trim:l(3)}},406:function(e,t){e.exports="\t\n\v\f\r                 \u2028\u2029\ufeff"},407:function(e,t,r){var content=r(409);content.__esModule&&(content=content.default),"string"==typeof content&&(content=[[e.i,content,""]]),content.locals&&(e.exports=content.locals);(0,r(14).default)("03051d40",content,!0,{sourceMap:!1})},408:function(e,t,r){"use strict";r(407)},409:function(e,t,r){var n=r(13)(!1);n.push([e.i,".price-format{display:flex;align-items:baseline}",""]),e.exports=n},410:function(e,t,r){"use strict";r.r(t);r(404),r(68),r(252);var n={data:function(){return{priceSlice:{}}},components:{},props:{firstSize:{type:Number,default:14},secondSize:{type:Number,default:14},color:{type:String},weight:{type:[String,Number],default:500},price:{type:[String,Number],default:""},showSubscript:{type:Boolean,default:!0},subscriptSize:{type:Number,default:14},lineThrough:{type:Boolean,default:!1}},created:function(){this.priceFormat()},watch:{price:function(e){this.priceFormat()}},methods:{priceFormat:function(){var e=this.price,t={};null!==e&&(e=parseFloat(e),e=String(e).split("."),t.first=e[0],t.second=e[1],this.priceSlice=t)}}},o=(r(408),r(8)),component=Object(o.a)(n,(function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("span",{class:(e.lineThrough?"line-through":"")+"price-format",style:{color:e.color,"font-weight":e.weight}},[e.showSubscript?r("span",{style:{"font-size":e.subscriptSize+"px","margin-right":"1px"}},[e._v("¥")]):e._e(),e._v(" "),r("span",{style:{"font-size":e.firstSize+"px","margin-right":"1px"}},[e._v(e._s(e.priceSlice.first))]),e._v(" "),e.priceSlice.second?r("span",{style:{"font-size":e.secondSize+"px"}},[e._v("."+e._s(e.priceSlice.second))]):e._e()])}),[],!1,null,null,null);t.default=component.exports},417:function(e,t,r){"use strict";r.r(t);r(404),r(69),r(53),r(18),r(85),r(68),r(84);var n=6e4,o=36e5,d=24*o;function c(e){return(0+e.toString()).slice(-2)}var l={components:{},props:{isSlot:{type:Boolean,default:!1},time:{type:Number,default:0},format:{type:String,default:"hh:mm:ss"},autoStart:{type:Boolean,default:!0}},watch:{time:{immediate:!0,handler:function(e){e&&this.reset()}}},data:function(){return{timeObj:{},formateTime:0}},created:function(){},computed:{},methods:{createTimer:function(e){return setTimeout(e,100)},isSameSecond:function(e,t){return Math.floor(e)===Math.floor(t)},start:function(){this.counting||(this.counting=!0,this.endTime=Date.now()+1e3*this.remain,this.setTimer())},setTimer:function(){var e=this;this.tid=this.createTimer((function(){var t=e.getRemain();e.isSameSecond(t,e.remain)&&0!==t||e.setRemain(t),0!==e.remain&&e.setTimer()}))},getRemain:function(){return Math.max(this.endTime-Date.now(),0)},pause:function(){this.counting=!1,clearTimeout(this.tid)},reset:function(){this.pause(),this.remain=this.time,this.setRemain(this.remain),this.autoStart&&this.start()},setRemain:function(e){var t=this.format;this.remain=e;var time,r=(time=e,{days:Math.floor(time/d),hours:c(Math.floor(time%d/o)),minutes:c(Math.floor(time%o/n)),seconds:c(Math.floor(time%n/1e3))});this.formateTime=function(e,t){var r=t.days,n=t.hours,o=t.minutes,d=t.seconds;return-1!==e.indexOf("dd")&&(e=e.replace("dd",r)),-1!==e.indexOf("hh")&&(e=e.replace("hh",c(n))),-1!==e.indexOf("mm")&&(e=e.replace("mm",c(o))),-1!==e.indexOf("ss")&&(e=e.replace("ss",c(d))),e}(t,r),this.$emit("change",r),0===e&&(this.pause(),this.$emit("finish"))}}},v=r(8),component=Object(v.a)(l,(function(){var e=this,t=e.$createElement,r=e._self._c||t;return e.time>=0?r("div",[r("client-only",[e.isSlot?e._t("default"):r("span",[e._v(e._s(e.formateTime))])],2)],1):e._e()}),[],!1,null,null,null);t.default=component.exports},438:function(e,t,r){var content=r(458);content.__esModule&&(content=content.default),"string"==typeof content&&(content=[[e.i,content,""]]),content.locals&&(e.exports=content.locals);(0,r(14).default)("3e5ddd00",content,!0,{sourceMap:!1})},457:function(e,t,r){"use strict";r(438)},458:function(e,t,r){var n=r(13)(!1);n.push([e.i,".deliver-search-container .deliver-box .deliver-recode-box[data-v-c351ad84]{padding:10px 20px;background-color:#f2f2f2}.deliver-search-container .deliver-box .deliver-recode-box .recode-img[data-v-c351ad84]{position:relative;width:72px;height:72px}.deliver-search-container .deliver-box .deliver-recode-box .recode-img .float-count[data-v-c351ad84]{position:absolute;bottom:0;height:20px;width:100%;background-color:rgba(0,0,0,.5);color:#fff;font-size:12px}.deliver-search-container .deliver-box .deliver-recode-box .recode-info-container[data-v-c351ad84]{flex:1}.deliver-search-container .deliver-box .deliver-recode-box .recode-info-container .recode-label[data-v-c351ad84]{width:70px}.deliver-search-container .deliver-box .deliver-recode-box .recode-info-container .copy-btn[data-v-c351ad84]{height:20px;min-width:42px;border:1px solid #ff2c3c;font-size:12px;margin-left:8px;border-radius:60px;cursor:pointer}.deliver-search-container .deliver-box .deliver-recode-box .recode-info-container .copy-btn[data-v-c351ad84]:hover{background-color:#fff}.deliver-search-container .deliver-box .deliver-flow-box[data-v-c351ad84]{padding-left:15px}",""]),e.exports=n},464:function(e,t,r){"use strict";r.r(t);var n=r(3),o=(r(47),r(404),{props:{value:{type:Boolean,default:!1},aid:{type:Number|String}},data:function(){return{showDialog:!1,deliverBuy:{},delivery:{},deliverFinish:{},deliverOrder:{},deliverShipment:{},deliverTake:{},timeLineArray:[]}},watch:{value:function(e){console.log(e,"val"),this.showDialog=e},showDialog:function(e){e&&this.aid&&(this.timeLineArray=[],this.getDeliverTraces()),this.$emit("input",e)}},methods:{getDeliverTraces:function(){var e=this;return Object(n.a)(regeneratorRuntime.mark((function t(){var data,r,n,o,d,c,l,v,m;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return data={id:e.aid},t.next=3,e.$get("order/orderTraces",{params:data});case 3:1==(r=t.sent).code&&(n=r.data,o=n.buy,d=n.delivery,c=n.finish,l=n.order,v=n.shipment,m=n.take,e.deliverBuy=o,e.delivery=d,e.deliverFinish=c,e.deliverOrder=l,e.deliverShipment=v,e.deliverTake=m,e.timeLineArray.push(e.deliverFinish),e.timeLineArray.push(e.delivery),e.timeLineArray.push(e.deliverShipment),e.timeLineArray.push(e.deliverBuy),console.log(e.timeLineArray));case 5:case"end":return t.stop()}}),t)})))()},onCopy:function(){var e=document.createElement("input");e.value=this.deliverOrder.invoice_no,document.body.appendChild(e),e.select(),document.execCommand("Copy"),this.$message.success("复制成功"),e.remove()}}}),d=(r(457),r(8)),component=Object(d.a)(o,(function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("div",{staticClass:"deliver-search-container"},[r("el-dialog",{attrs:{visible:e.showDialog,width:"920px",title:"物流查询"},on:{"update:visible":function(t){e.showDialog=t}}},[r("div",{staticClass:"deliver-box"},[r("div",{staticClass:"deliver-recode-box row"},[r("div",{staticClass:"recode-img"},[r("el-image",{staticStyle:{width:"100%",height:"100%"},attrs:{fit:"cover",src:e.deliverOrder.image}}),e._v(" "),r("div",{staticClass:"float-count row-center"},[e._v("共"+e._s(e.deliverOrder.count)+"件商品")])],1),e._v(" "),r("div",{staticClass:"recode-info-container ml10"},[r("div",{staticClass:"row"},[r("div",{staticClass:"recode-label"},[e._v("物流状态:")]),e._v(" "),r("div",{staticClass:"primary lg",staticStyle:{"font-weight":"500"}},[e._v(e._s(e.deliverOrder.tips))])]),e._v(" "),r("div",{staticClass:"row",staticStyle:{margin:"6px 0"}},[r("div",{staticClass:"recode-label"},[e._v("快递公司:")]),e._v(" "),r("div",[e._v(e._s(e.deliverOrder.shipping_name))])]),e._v(" "),r("div",{staticClass:"row"},[r("div",{staticClass:"recode-label"},[e._v("快递单号:")]),e._v(" "),r("div",[e._v(e._s(e.deliverOrder.invoice_no))]),e._v(" "),r("div",{staticClass:"copy-btn primary row-center",on:{click:e.onCopy}},[e._v("复制")])])])]),e._v(" "),r("div",{staticClass:"deliver-flow-box mt16"},[r("el-timeline",[this.deliverFinish.tips?r("el-timeline-item",[r("div",[r("div",{staticClass:"row lg"},[r("div",{staticClass:"mr8",staticStyle:{"font-weight":"500"}},[e._v("\n "+e._s(this.deliverTake.contacts)+"\n ")]),e._v(" "),r("div",{staticStyle:{"font-weight":"500"}},[e._v(e._s(this.deliverTake.mobile))])]),e._v(" "),r("div",{staticClass:"lighter mt8"},[e._v(e._s(this.deliverTake.address))])])]):e._e(),e._v(" "),this.deliverFinish.tips?r("el-timeline-item",{attrs:{timestamp:this.deliverFinish.time}},[r("div",{staticClass:"time-line-title"},[e._v(e._s(this.deliverFinish.title))]),e._v(" "),r("div",[e._v(e._s(this.deliverFinish.tips))])]):e._e(),e._v(" "),this.delivery.traces&&this.delivery.traces.length?r("el-timeline-item",{attrs:{timestamp:this.delivery.time}},[r("div",{staticClass:"time-line-title mb8"},[e._v(e._s(this.delivery.title))]),e._v(" "),e._l(this.delivery.traces,(function(t,n){return r("el-timeline-item",{key:n,attrs:{timestamp:t[0]}},[r("div",{staticClass:"muted"},[e._v(e._s(t[1]))])])}))],2):e._e(),e._v(" "),this.deliverShipment.tips?r("el-timeline-item",{attrs:{timestamp:this.deliverShipment.time}},[r("div",{staticClass:"time-line-title"},[e._v(e._s(this.deliverShipment.title))]),e._v(" "),r("div",[e._v(e._s(this.deliverShipment.tips))])]):e._e(),e._v(" "),this.deliverBuy.tips?r("el-timeline-item",{attrs:{timestamp:this.deliverBuy.time}},[r("div",{staticClass:"time-line-title"},[e._v(e._s(this.deliverBuy.title))]),e._v(" "),r("div",[e._v(e._s(this.deliverBuy.tips))])]):e._e()],1)],1)])])],1)}),[],!1,null,"c351ad84",null);t.default=component.exports},496:function(e,t,r){var content=r(563);content.__esModule&&(content=content.default),"string"==typeof content&&(content=[[e.i,content,""]]),content.locals&&(e.exports=content.locals);(0,r(14).default)("eac16e6c",content,!0,{sourceMap:!1})},562:function(e,t,r){"use strict";r(496)},563:function(e,t,r){var n=r(13)(!1);n.push([e.i,".order-list[data-v-e371a130]{padding:0 10px}.order-list .item[data-v-e371a130]{margin-bottom:20px}.order-list .item .item-hd[data-v-e371a130]{height:40px;border:1px solid #e5e5e5;background:#f2f2f2;padding:0 20px}.order-list .item .item-hd .status[data-v-e371a130]{width:300px;text-align:right}.order-list .item .item-con[data-v-e371a130]{box-shadow:0 3px 4px rgba(0,0,0,.08);align-items:stretch}.order-list .item .item-con .goods[data-v-e371a130]{padding:17px 0;width:560px}.order-list .item .item-con .goods .goods-item[data-v-e371a130]{padding:10px 20px}.order-list .item .item-con .goods .goods-item .goods-img[data-v-e371a130]{flex:none;margin-right:10px;width:72px;height:72px}.order-list .item .item-con .goods .goods-item .goods-name[data-v-e371a130]{width:100%}.order-list .item .item-con .goods .goods-item .goods-name .num[data-v-e371a130]{padding:0 42px}.order-list .item .item-con .pay-price[data-v-e371a130]{width:200px;border-left:1px solid #e5e5e5;border-right:1px solid #e5e5e5}.order-list .item .item-con .operate[data-v-e371a130]{width:185px}.order-list .item .item-con .operate>div[data-v-e371a130]{cursor:pointer}.order-list .item .item-con .operate .btn[data-v-e371a130]{width:120px;height:32px;border-radius:2px}.order-list .item .item-con .operate .btn.plain[data-v-e371a130]{border:1px solid #ff2c3c}",""]),e.exports=n},596:function(e,t,r){"use strict";r.r(t);var n=r(3),o=(r(47),{components:{CountDown:r(417).default},props:{list:{type:Array,default:function(){return[]}}},data:function(){return{showDeliver:!1,aid:-1}},created:function(){console.log(this.list)},methods:{handleOrder:function(e,t){var r=this;this.type=e,this.orderId=t,this.$confirm(this.getTipsText(e),{title:"温馨提示",center:!0,confirmButtonText:"确定",cancelButtonText:"取消",callback:function(e){"confirm"==e&&r.postOrder()}})},postOrder:function(){var e=this;return Object(n.a)(regeneratorRuntime.mark((function t(){var r,n,o,d,code,c;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:r=e.type,n=e.orderId,o="",t.t0=r,t.next=0===t.t0?5:1===t.t0?7:2===t.t0?9:11;break;case 5:return o="order/cancel",t.abrupt("break",11);case 7:return o="order/del",t.abrupt("break",11);case 9:return o="order/confirm",t.abrupt("break",11);case 11:return t.next=13,e.$post(o,{id:n});case 13:d=t.sent,code=d.code,d.data,c=d.msg,1==code&&(e.$message({message:c,type:"success"}),e.$emit("refresh"));case 18:case"end":return t.stop()}}),t)})))()},getTipsText:function(e){switch(e){case 0:return"确认取消订单吗?";case 1:return"确认删除订单吗?";case 2:return"确认收货吗?"}},showDeliverDialog:function(e){console.log("showDeliverDialog"),this.aid=e,this.showDeliver=!0}},computed:{getOrderStatus:function(){return function(e){var text="";switch(e){case 0:text="待支付";break;case 1:text="待发货";break;case 2:text="待收货";break;case 3:text="已完成";break;case 4:text="订单已关闭"}return text}},getCancelTime:function(){return function(time){return time-Date.now()/1e3}}}}),d=(r(562),r(8)),component=Object(d.a)(o,(function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("div",{staticClass:"order-list"},[e._l(e.list,(function(t){return r("div",{key:t.id,staticClass:"item mb16"},[r("div",{staticClass:"item-hd row"},[r("div",{staticClass:"flex1 lighter sm"},[e._v("下单时间:"+e._s(t.create_time))]),e._v(" "),r("div",{staticClass:"flex1 lighter sm"},[e._v("订单编号:"+e._s(t.order_sn))]),e._v(" "),r("div",{class:["status sm",{primary:0==t.order_status}]},[e._v("\n "+e._s(e.getOrderStatus(t.order_status))+"\n ")])]),e._v(" "),r("div",{staticClass:"item-con row"},[r("div",{staticClass:"goods"},e._l(t.order_goods,(function(t,n){return r("nuxt-link",{key:n,staticClass:"goods-item row",attrs:{to:"/goods_details/"+t.goods_id}},[r("el-image",{staticClass:"goods-img",attrs:{src:t.image,alt:""}}),e._v(" "),r("div",{staticClass:"goods-info flex1"},[r("div",{staticClass:"goods-name mb8 row-between"},[r("div",{staticClass:"line1",staticStyle:{width:"350px"}},[t.is_seckill?r("el-tag",{attrs:{size:"mini",effect:"plain"}},[e._v("秒杀")]):e._e(),e._v("\n "+e._s(t.goods_name)+"\n ")],1),e._v(" "),r("div",{staticClass:"num"},[e._v("x"+e._s(t.goods_num))])]),e._v(" "),r("div",{staticClass:"sm muted mb8"},[e._v(e._s(t.spec_value))]),e._v(" "),r("div",{staticClass:"primary"},[r("price-formate",{attrs:{price:t.goods_price}})],1)])],1)})),1),e._v(" "),r("div",{staticClass:"pay-price column",staticStyle:{"padding-left":"30px"}},[r("div",{staticClass:"muted"},[e._v("共"+e._s(t.goods_count)+"件商品")]),e._v(" "),r("div",{staticClass:"muted mt8 row"},[e._v("\n 应付金额:\n "),r("span",{staticClass:"primary"},[r("price-formate",{attrs:{price:t.order_amount,"subscript-size":16,"first-size":16,"second-size":16}})],1)])]),e._v(" "),r("div",{staticClass:"operate column-center sm"},[t.pay_btn?r("nuxt-link",{staticClass:"btn mb16 bg-primary row-center white sm",attrs:{to:"/payment?id="+t.id}},[r("span",{staticClass:"mr8"},[e._v("去付款")]),e._v(" "),e.getCancelTime(t.order_cancel_time)>0?r("count-down",{attrs:{time:e.getCancelTime(t.order_cancel_time),format:"hh:mm:ss"},on:{finish:function(t){return e.$emit("refresh")}}}):e._e()],1):e._e(),e._v(" "),t.take_btn?r("div",{staticClass:"btn mb10 primary row-center sm plain",on:{click:function(r){return e.handleOrder(2,t.id)}}},[e._v("\n 确认收货\n ")]):e._e(),e._v(" "),t.delivery_btn?r("div",{staticClass:"mb10 muted row-center sm",on:{click:function(r){return e.showDeliverDialog(t.id)}}},[e._v("\n 物流查询\n ")]):e._e(),e._v(" "),t.cancel_btn?r("div",{staticClass:"mb10 muted row-center sm",on:{click:function(r){return e.handleOrder(0,t.id)}}},[e._v("\n 取消订单\n ")]):e._e(),e._v(" "),t.del_btn?r("div",{staticClass:"mb10 muted row-center sm",on:{click:function(r){return e.handleOrder(1,t.id)}}},[e._v("\n 删除订单\n ")]):e._e(),e._v(" "),r("nuxt-link",{staticClass:"lighter",attrs:{to:"/user/order/detail?id="+t.id}},[e._v("\n 查看详情\n ")])],1)])])})),e._v(" "),r("deliver-search",{attrs:{aid:e.aid},model:{value:e.showDeliver,callback:function(t){e.showDeliver=t},expression:"showDeliver"}})],2)}),[],!1,null,"e371a130",null);t.default=component.exports;installComponents(component,{PriceFormate:r(410).default,DeliverSearch:r(464).default})}}]);