(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["pages/order/order-detail/order-detail"],{"2ea5":function(e,t,n){"use strict";(function(e){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=r(n("d084"));function r(e){return e&&e.__esModule?e:{default:e}}var i=function(){n.e("components/page-component/app-order-goods-info/app-order-goods-info").then(function(){return resolve(n("176f"))}.bind(null,n)).catch(n.oe)},a=function(){n.e("components/page-component/app-order-express/app-order-express").then(function(){return resolve(n("9f14"))}.bind(null,n)).catch(n.oe)},s=function(){n.e("components/page-component/app-order-banner/app-order-banner").then(function(){return resolve(n("0d71"))}.bind(null,n)).catch(n.oe)},d=function(){Promise.all([n.e("common/vendor"),n.e("components/basic-component/app-jump-button/app-jump-button")]).then(function(){return resolve(n("9e5c"))}.bind(null,n)).catch(n.oe)},c={components:{AppJumpButton:d,"app-order-goods-info":i,"app-order-express":a,"app-order-banner":s},data:function(){return{order_id:null,orderDetail:{detailExpressRelation:[],detailExpress:[]},is_show:!1,advance_order:{goods_num:0},detail:[],sign:""}},computed:{getPageUrl:function(){var e=this.orderDetail;if(1==e.is_send&&0==e.detailExpress.length){var t="";return e.detail.forEach((function(e,n){0===n&&(t=e.goods_info.pic_url)})),"/pages/order/express-detail/express-detail?express=".concat(e.express,"&customer_name=").concat(e.customer_name,"&express_no=").concat(e.express_no,"&cover_pic=").concat(t)}if(1==e.is_send&&1==e.detailExpress.length){var n=e.detailExpress[0].express,o=e.detailExpress[0].express_no,r=e.detailExpress[0].customer_name,i=e.detailExpress[0].expressRelation[0].orderDetail.goods_info.goods_attr.cover_pic;return"/pages/order/express-detail/express-detail?express="+n+"&customer_name="+r+"&express_no="+o+"&cover_pic="+i}if(e.detailExpress.length>=1)return"/pages/order/express-list/express-list?order_id="+e.id}},methods:{toggle:function(e){this.orderDetail.composition_list[e].show=!this.orderDetail.composition_list[e].show,this.$forceUpdate()},getOrderDetail:function(){var t=this;t.$showLoading(),t.$request({url:t.$api.order.detail,data:{id:t.order_id}}).then((function(n){if(t.$hideLoading(),t.is_show=!0,0==n.code){if(t.orderDetail=n.data.detail,"composition"==t.sign)for(var o in t.orderDetail.composition_list)t.orderDetail.composition_list[o].show=!1}else e.showModal({title:"",content:n.msg,showCancel:!1})})).catch((function(){t.$hideLoading()}))},copyText:function(e){o.default.copyText(e)},navigation:function(t){e.openLocation({latitude:parseFloat(t.latitude),longitude:parseFloat(t.longitude),name:t.name,address:t.address})},cancel:function(t){var n=this;e.showModal({title:"提示",content:"是否取消订单？",success:function(e){e.confirm&&n.$subscribe(n.orderDetail.template_message_list).then((function(e){n.cancelAction(t)})).catch((function(e){n.cancelAction(t)}))}})},cancelAction:function(t){var n=this;e.showLoading({title:"取消中"}),n.$request({url:n.$api.order.cancel,data:{id:t.id}}).then((function(t){e.hideLoading(),0===t.code?"advance"===n.sign?n.$request({url:n.$api.advance.order_detail,method:"get",data:{id:n.order_id}}).then((function(t){n.is_show=!0,0===t.code?n.orderDetail=t.data.detail:e.showModal({title:"",content:t.msg,showCancel:!1})})):n.getOrderDetail():e.showModal({title:"",content:t.msg,showCancel:!1})})).catch((function(){e.hideLoading()}))},mobile:function(){e.makePhoneCall({phoneNumber:this.orderDetail.city.mobile})}},onLoad:function(e){this.order_id=e.id,this.sign=e.sign},onShow:function(){var t=this,n=setInterval((function(){"advance"===t.sign?t.$request({url:t.$api.advance.order_detail,method:"get",data:{id:t.order_id}}).then((function(n){t.is_show=!0,0===n.code?t.orderDetail=n.data.detail:e.showModal({title:"",content:n.msg,showCancel:!1})})):t.getOrderDetail(),clearInterval(n)}),300)}};t.default=c}).call(this,n("543d")["default"])},"2fe9":function(e,t,n){"use strict";n.r(t);var o=n("2ea5"),r=n.n(o);for(var i in o)"default"!==i&&function(e){n.d(t,e,(function(){return o[e]}))}(i);t["default"]=r.a},"3e5b":function(e,t,n){"use strict";var o=n("5e89"),r=n.n(o);r.a},"5e89":function(e,t,n){},"84de":function(e,t,n){"use strict";n.r(t);var o=n("d3f8"),r=n("2fe9");for(var i in r)"default"!==i&&function(e){n.d(t,e,(function(){return r[e]}))}(i);n("3e5b");var a,s=n("f0c5"),d=Object(s["a"])(r["default"],o["b"],o["c"],!1,null,"f01d4f7e",null,!1,o["a"],a);t["default"]=d.exports},"9b20":function(e,t,n){"use strict";(function(e){n("8748");o(n("66fd"));var t=o(n("84de"));function o(e){return e&&e.__esModule?e:{default:e}}e(t.default)}).call(this,n("543d")["createPage"])},d3f8:function(e,t,n){"use strict";var o,r=function(){var e=this,t=e.$createElement;e._self._c},i=[];n.d(t,"b",(function(){return r})),n.d(t,"c",(function(){return i})),n.d(t,"a",(function(){return o}))}},[["9b20","common/runtime","common/vendor"]]]);