...
|
...
|
@@ -189,22 +189,18 @@ exports.orderSub = (req, res, next) => { |
|
|
/*
|
|
|
*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) {
|
|
|
try {
|
|
|
unionKey = authcode(req.cookies._QYH_UNION, 'q_union_yohobuy');
|
|
|
|
|
|
if (!unionKey) {
|
|
|
let encryData = crypto.decrypt('', decodeURIComponent(req.cookies._QYH_UNION));
|
|
|
encryData = encryData.substr(0, encryData.lastIndexOf('}') + 1);
|
|
|
testQyhUnion = JSON.parse(encryData);
|
|
|
} catch (e) {
|
|
|
testQyhUnion = {};
|
|
|
}
|
|
|
|
|
|
if (testQyhUnion.client_id) {
|
|
|
unionKey = encryData;
|
|
|
} else {
|
|
|
unionKey = authcode(req.cookies._QYH_UNION, 'q_union_yohobuy');
|
|
|
let testQyhUnion = JSON.parse(encryData);
|
|
|
unionKey = testQyhUnion.client_id ? encryData : '';
|
|
|
}
|
|
|
} else {
|
|
|
unionKey = '{"client_id":' + req.cookies.mkt_code + '}';
|
...
|
...
|
|