...
|
...
|
@@ -327,7 +327,8 @@ module.exports = class extends global.yoho.BaseModel { |
|
|
|
|
|
return Promise.all([
|
|
|
this.orderDetail(uid, orderCode),
|
|
|
this.payApiModel.getResourceData(FRAUD_CONTENT_CODE)
|
|
|
this.payApiModel.getResourceData(FRAUD_CONTENT_CODE),
|
|
|
this.payApiModel.getOrderExNotice(uid, orderCode)
|
|
|
]).then(procData => {
|
|
|
let orderInfo = procData[0].code === 200 && procData[0].data;
|
|
|
|
...
|
...
|
@@ -354,6 +355,10 @@ module.exports = class extends global.yoho.BaseModel { |
|
|
};
|
|
|
}
|
|
|
|
|
|
if (orderInfo.is_multi_package === 'Y') {
|
|
|
orderInfo.package_title = _.get(procData, '[2].data.notice');
|
|
|
}
|
|
|
|
|
|
return {
|
|
|
code: 200,
|
|
|
message: '支付成功,请等待发货',
|
...
|
...
|
@@ -372,11 +377,20 @@ module.exports = class extends global.yoho.BaseModel { |
|
|
* [0元订单或者货到付款-成功处理]
|
|
|
* @param {[type]} orderInfo [订单详情]
|
|
|
* @param {[type]} payId [支付方式ID]
|
|
|
* @param {[type]} uid [用户ID]
|
|
|
* @return {[type]} [{}]
|
|
|
*/
|
|
|
deliveryData(orderInfo, payId) {
|
|
|
return this.payApiModel.getResourceData(FRAUD_CONTENT_CODE).then(procData => {
|
|
|
return Object.assign(orderInfo, this._execOrderData(orderInfo, procData && procData.data || {}, payId));
|
|
|
deliveryData(orderInfo, payId, uid) {
|
|
|
|
|
|
return Promise.all([
|
|
|
this.payApiModel.getResourceData(FRAUD_CONTENT_CODE),
|
|
|
this.payApiModel.getOrderExNotice(uid, orderInfo.order_code)
|
|
|
]).then(procData => {
|
|
|
if (orderInfo.is_multi_package === 'Y') {
|
|
|
orderInfo.package_title = _.get(procData, '[1].data.notice');
|
|
|
}
|
|
|
|
|
|
return Object.assign(orderInfo, this._execOrderData(orderInfo, _.get(procData, '[0].data', {}), payId));
|
|
|
});
|
|
|
}
|
|
|
|
...
|
...
|
|