Authored by yyq

jit tip

... ... @@ -42,7 +42,7 @@ const online = (req, res, next) => {
order.payment_type = parseInt(order.payment_type, 10);
if (amount <= 0 || order.payment_type === 2) {
PayModel.deliveryData(order, PayModel.payments.delivery).then(orderInfo => {
PayModel.deliveryData(order, PayModel.payments.delivery, uid).then(orderInfo => {
res.render('pay-success', {
module: 'shopping',
page: 'success',
... ...
... ... @@ -178,4 +178,20 @@ module.exports = class extends global.yoho.BaseModel {
return this.get({data: options});
}
/**
* [订单物流提示]
* @param {[type]} uid [用户uid]
* @param {[type]} code [订单号]
* @return {[type]} [{}]
*/
getOrderExNotice(uid, code) {
let options = {
method: 'app.SpaceOrders.getOrderExNotice',
order_code: code,
uid: uid
};
return this.get({data: options});
}
};
... ...
... ... @@ -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));
});
}
... ...
... ... @@ -31,7 +31,7 @@
<h5>温馨提示:</h5>
{{#if multiPackage}}
<p>
1.{{packageTitle}}至有货仓库,预计3-5日内发货给您。<br>
1.{{packageTitle}}<br>
2.当订单发货后,您可以登录<a href="{{ordersUrl}}" class="notice-link" target="_blank">订单中心</a>查询快递发货详情。<br>
3.YOHO!BUY有货支持 “开箱验货” 和 “15天退换货保障”,收货后请当面验货,如果发现商品有任何问题请致电客服电话400-889-9646,
<a href="{{returnGoodsUrl}}" class="notice-link" target="_blank">“退换货政策”</a> 请点击查看。<br>
... ...