|
@@ -80,14 +80,18 @@ const _formatOrderGoods = (orderGoods, count, haveLink, tickets) => { |
|
@@ -80,14 +80,18 @@ const _formatOrderGoods = (orderGoods, count, haveLink, tickets) => { |
80
|
* 获取快递有关信息
|
80
|
* 获取快递有关信息
|
81
|
* @private
|
81
|
* @private
|
82
|
*/
|
82
|
*/
|
83
|
-const _assignExpressInfo = (showLogistics, order, result) => {
|
|
|
84
|
- if (showLogistics && order.express_company.caption && order.express_number) {
|
|
|
85
|
- Object.assign(result, {
|
83
|
+const _assignExpressInfo = (showLogistics, order) => {
|
|
|
84
|
+ let data = {};
|
|
|
85
|
+
|
|
|
86
|
+ if (showLogistics && order.express_company && order.express_company.caption) {
|
|
|
87
|
+ data = {
|
86
|
logisticsUrl: helpers.urlFormat('/home/logistic', {order_code: order.order_code}),
|
88
|
logisticsUrl: helpers.urlFormat('/home/logistic', {order_code: order.order_code}),
|
87
|
logisticsCompany: order.express_company.caption,
|
89
|
logisticsCompany: order.express_company.caption,
|
88
|
- logisticsNum: order.express_number
|
|
|
89
|
- });
|
90
|
+ logisticsNum: order.express_number || ''
|
|
|
91
|
+ };
|
90
|
}
|
92
|
}
|
|
|
93
|
+
|
|
|
94
|
+ return data;
|
91
|
};
|
95
|
};
|
92
|
|
96
|
|
93
|
/**
|
97
|
/**
|
|
@@ -164,7 +168,7 @@ const _getOrderStatus = (order, showLogistics) => { |
|
@@ -164,7 +168,7 @@ const _getOrderStatus = (order, showLogistics) => { |
164
|
qrcode: helpers.urlFormat(`/home/QRcode/${order.order_code}`)
|
168
|
qrcode: helpers.urlFormat(`/home/QRcode/${order.order_code}`)
|
165
|
});
|
169
|
});
|
166
|
} else {
|
170
|
} else {
|
167
|
- _assignExpressInfo(showLogistics, order, result);
|
171
|
+ Object.assign(result, _assignExpressInfo(showLogistics, order));
|
168
|
}
|
172
|
}
|
169
|
break;
|
173
|
break;
|
170
|
case 6:
|
174
|
case 6:
|
|
@@ -180,7 +184,7 @@ const _getOrderStatus = (order, showLogistics) => { |
|
@@ -180,7 +184,7 @@ const _getOrderStatus = (order, showLogistics) => { |
180
|
qrcode: helpers.urlFormat(`/home/QRcode/${order.order_code}`)
|
184
|
qrcode: helpers.urlFormat(`/home/QRcode/${order.order_code}`)
|
181
|
});
|
185
|
});
|
182
|
} else {
|
186
|
} else {
|
183
|
- _assignExpressInfo(showLogistics, order, result);
|
187
|
+ Object.assign(result, _assignExpressInfo(showLogistics, order));
|
184
|
}
|
188
|
}
|
185
|
break;
|
189
|
break;
|
186
|
default:
|
190
|
default:
|
|
@@ -213,7 +217,7 @@ const _getOrderStatus = (order, showLogistics) => { |
|
@@ -213,7 +217,7 @@ const _getOrderStatus = (order, showLogistics) => { |
213
|
Object.assign(result, {
|
217
|
Object.assign(result, {
|
214
|
unreceived: true
|
218
|
unreceived: true
|
215
|
});
|
219
|
});
|
216
|
- _assignExpressInfo(showLogistics, order, result);
|
220
|
+ Object.assign(result, _assignExpressInfo(showLogistics, order));
|
217
|
break;
|
221
|
break;
|
218
|
case 6:
|
222
|
case 6:
|
219
|
|
223
|
|
|
@@ -221,7 +225,7 @@ const _getOrderStatus = (order, showLogistics) => { |
|
@@ -221,7 +225,7 @@ const _getOrderStatus = (order, showLogistics) => { |
221
|
Object.assign(result, {
|
225
|
Object.assign(result, {
|
222
|
completed: true
|
226
|
completed: true
|
223
|
});
|
227
|
});
|
224
|
- _assignExpressInfo(showLogistics, order, result);
|
228
|
+ Object.assign(result, _assignExpressInfo(showLogistics, order));
|
225
|
break;
|
229
|
break;
|
226
|
default:
|
230
|
default:
|
227
|
break;
|
231
|
break;
|