...
|
...
|
@@ -131,13 +131,15 @@ exports.orderCompute = (req, res, next) => { |
|
|
if (req.body.cartType === 'bundle') {
|
|
|
let activityInfo = JSON.parse(req.cookies['activity-info']);
|
|
|
|
|
|
cartModel.orderCompute(uid, cartType, deliveryId, paymentType, couponCode, yohoCoin, null, activityInfo).then(result => {
|
|
|
res.json(result);
|
|
|
}).catch(next);
|
|
|
cartModel.orderCompute(uid, cartType, deliveryId, paymentType,
|
|
|
couponCode, yohoCoin, null, activityInfo).then(result => {
|
|
|
res.json(result);
|
|
|
}).catch(next);
|
|
|
} else {
|
|
|
cartModel.orderCompute(uid, cartType, deliveryId, paymentType, couponCode, yohoCoin, skuList).then(result => {
|
|
|
res.json(result);
|
|
|
}).catch(next);
|
|
|
cartModel.orderCompute(uid, cartType, deliveryId, paymentType,
|
|
|
couponCode, yohoCoin, skuList).then(result => {
|
|
|
res.json(result);
|
|
|
}).catch(next);
|
|
|
}
|
|
|
} else {
|
|
|
cartModel.ticketsOrderCompute(uid, productSku, buyNumber, yohoCoin).then(result => {
|
...
|
...
|
@@ -190,11 +192,6 @@ exports.orderSub = (req, res, next) => { |
|
|
let unionInfo = {};
|
|
|
|
|
|
if (req.cookies.mkt_code || req.cookies._QYH_UNION) {
|
|
|
/*
|
|
|
*1、http://union.yohobuy.com/go?client_id=3415&aid=0118&channel=3415&cid=3601&wi=NDgwMDB8dGVzdA==&target=http://m.yohobuy.com/
|
|
|
*2、http://union.yoho.cn/union/jump?channel_id=51fanli&u_id=6&tracking_code=fanli123&target_url=http%3a%2f%2fm.yohobuy.com%3funion_type%3d3063%26utm_source%3dmfanli%26utm_medium%3dcps%26utm_campaign%3dmpfanli
|
|
|
*3、union.yohobuy.com/go/proxy?utm_medium=none&utm_campaign=none&client_id=991002&ads_code=&go_url=https%253A%252F%252Fm.yohobuy.com%252F%253Futm_source%253Dhyyx%2526utm_medium%253Dnone%2526utm_campaign%253Dnone%2526union_type%253D991002&channel_code=hyyx&append=&mbr_name=&u_id=&aid=&channel=cps&cid=&wi=
|
|
|
**/
|
|
|
/* tar modified 161108 添加新的联盟数据处理逻辑,兼容原有联盟数据处理,
|
|
|
区别是旧的北京写 cookie 加密过来,新的 node 写 cookie,没有加密 */
|
|
|
if (req.cookies._QYH_UNION) {
|
...
|
...
|
@@ -239,7 +236,8 @@ exports.orderSub = (req, res, next) => { |
|
|
if (unionInfo && result.data) {
|
|
|
result.data.unionCookie = unionInfo;
|
|
|
} else {
|
|
|
logger.info(`orderEnsure: unionInfo:${JSON.stringify(unionInfo)}, result data:${JSON.stringify(result.data)}`);
|
|
|
logger.info(`orderEnsure: unionInfo:${JSON.stringify(unionInfo)},
|
|
|
result data:${JSON.stringify(result.data)}`);
|
|
|
}
|
|
|
|
|
|
// 提交成功清除Cookie
|
...
|
...
|
@@ -320,7 +318,9 @@ exports.selectAddress = (req, res, next) => { |
|
|
|
|
|
let moreUrl = (req.get('Referer') && !/\/home\/addressAct/.test(req.get('Referer')) &&
|
|
|
!/selectAddress/.test(req.get('Referer'))) ?
|
|
|
req.get('Referer') : helpers.urlFormat('/cart/index/new/orderEnsure', {cartType: req.cookies._cartType}); // 取跳过来的url
|
|
|
req.get('Referer') : helpers.urlFormat('/cart/index/new/orderEnsure', {
|
|
|
cartType: req.cookies._cartType
|
|
|
}); // 取跳过来的url
|
|
|
|
|
|
address = address.data;
|
|
|
|
...
|
...
|
|