Authored by 郭成尧

unionInfo

... ... @@ -171,7 +171,8 @@ class BuyNowController {
product_sku_list: req.body.product_sku_list,
is_print_price: req.body.is_print_price,
remark: req.body.remark,
activity_id: req.body.activity_id
activity_id: req.body.activity_id,
ip: req.yoho.clientIp
};
// 是否开发票
... ... @@ -188,7 +189,10 @@ class BuyNowController {
}
if (req.cookies.mkt_code || req.cookies._QYH_UNION) {
params.qhy_union = paymentProcess.unionInfoHandle(req.cookies, uid);
let unionInfo = paymentProcess.unionInfoHandle(req.cookies, uid);
params.qhy_union = _.get(unionInfo, 'unionKey', false);
params.userAgent = _.get(unionInfo, 'userAgent', '');
}
co(function * () {
... ...
... ... @@ -231,7 +231,7 @@ exports.orderSub = (req, res, next) => {
unionKey: unionInfo.unionKey, // 友盟数据
userAgent: unionInfo.userAgent,
isWechat: req.yoho.isWechat,
ip: req.ip || '',
ip: req.yoho.clientIp,
udid: req.cookies._yasvd || 'yoho'
};
... ...
... ... @@ -163,7 +163,12 @@ class BuyNowModel extends global.yoho.BaseModel {
finalParams.qhy_union = params.qhy_union;
}
return api.post('', finalParams, {cache: false});
return api.post('', finalParams, {
headers: {
'X-Forwarded-For': params.ip || '',
'User-Agent': params.userAgent
}
});
}
/**
... ...