diff --git a/pages/order/OrderDetails/index.vue b/pages/order/OrderDetails/index.vue index 3a74584..5a16356 100644 --- a/pages/order/OrderDetails/index.vue +++ b/pages/order/OrderDetails/index.vue @@ -29,7 +29,7 @@ - + {{ delivery.deliveryName }}:{{ delivery.deliveryId }} @@ -42,14 +42,14 @@ - {{ logistics.Traces && logistics.Traces.length > 0 ? logistics.Traces[logistics.Traces.length - 1].acceptStation : '暂无轨迹信息'}} + {{ logistics[index] && logistics[index].Traces && logistics[index].Traces.length > 0 ? logistics[index] && logistics[index].Traces[logistics[index].Traces.length - 1].acceptStation : '暂无轨迹信息'}} - {{ logistics.Traces && logistics.Traces.length > 0 ? logistics.Traces[logistics.Traces.length - 1].acceptTime : '' }} + {{ logistics[index] && logistics[index].Traces && logistics[index].Traces.length > 0 ? logistics[index] && logistics[index].Traces[logistics[index].Traces.length - 1].acceptTime : '' }} @@ -553,17 +553,17 @@ export default { this.showMore = false // this.$forceUpdate() }, - getExpressInfo() { + getExpressInfo(delivery, i) { let params = { orderCode: this.orderInfo.id, - shipperCode: this.orderInfo.deliverySn, - logisticCode: this.orderInfo.deliveryId + shipperCode: delivery.deliverySn, + logisticCode: delivery.deliveryId }; express(params) .then(res => { const {success, data} = res if(success) { - this.logistics = data || {} + this.logistics[i] = data || {} } }) @@ -913,8 +913,11 @@ export default { this.system_store = res.data.systemStore || {}; this.mapKey = res.data.mapKay; this.setOfflinePayStatus(this.orderInfo.offlinePayStatus); - if(this.orderInfo._status._type == 3 || (this.orderInfo._status._type == 2 && this.orderInfo.isTickets!==1)) { - this.getExpressInfo() + const orderInfo = this.orderInfo + if(orderInfo._status._type == -1 || orderInfo._status._type == -2 || orderInfo._status._type == 4 || orderInfo._status._type == 3 || (orderInfo._status._type == 2 && orderInfo.isTickets!==1)) { + for(let i = 0; i < orderInfo.deliveryInfo.length; i++) { + this.getExpressInfo(orderInfo.deliveryInfo[i], i) + } } }) .catch(err => {