Authored by ccbikai(👎🏻🍜)

Merge branch 'release/5.4.1' of git.yoho.cn:fe/yohobuywap-node into release/5.4.1

... ... @@ -207,6 +207,7 @@ exports.orderSub = (req, res, next) => {
let userAgent = null;
let unionKey = '';
let unionInfo = {};
let clientId = null;
if (req.cookies.mkt_code || req.cookies._QYH_UNION) {
/* tar modified 161108 添加新的联盟数据处理逻辑,兼容原有联盟数据处理,
... ... @@ -222,16 +223,24 @@ exports.orderSub = (req, res, next) => {
unionKey = testQyhUnion.client_id ? encryData : '';
}
try {
unionInfo = JSON.parse(unionKey);
} catch (e) {
unionInfo = {};
logger.error(`orderEnsure: _QYH_UNION:${req.cookies._QYH_UNION}`);
}
clientId = unionInfo && unionInfo.client_id;
} else {
unionKey = '{"client_id":' + req.cookies.mkt_code + (req.cookies.union_data ? ',"union_data":' + req.cookies.union_data : '') + '}';
unionKey = '{"client_id":' + req.cookies.mkt_code +
(req.cookies.union_data ? ',"union_data":' + req.cookies.union_data : '') + '}';
clientId = req.cookies.mkt_code;
}
/* 检查联盟参数是否有效 */
unionInfo = unionKey ? JSON.parse(unionKey) : {};
/* 模拟APP的User-Agent */
userAgent = unionInfo.client_id ? 'YOHO!Buy/3.8.2.259(Model/PC;Channel/' +
unionInfo.client_id + ';uid/' + uid + ')' : null;
userAgent = clientId ? 'YOHO!Buy/3.8.2.259(Model/PC;Channel/' +
clientId + ';uid/' + uid + ')' : null;
}
return co(function* () {
... ... @@ -251,13 +260,6 @@ exports.orderSub = (req, res, next) => {
yohoCoin, skuList, unionKey, userAgent, null, null, ip);
}
if (unionInfo && result.data) {
result.data.unionCookie = unionInfo;
} else {
logger.info(`orderEnsure: unionInfo:${JSON.stringify(unionInfo)},
result data:${JSON.stringify(result.data)}`);
}
// 提交成功清除Cookie
orderInfo = {};
res.cookie('order-info', null, actCkOpthn);
... ...
... ... @@ -26,10 +26,10 @@ const tool = {
// dest.virtualGoods = (origin.attribute * 1 === 3);
// 活动促销短语
origin.market_phrase && (dest.marketPhrase = origin.market_phrase);
origin.market_phrase && origin.market_phrase !== ' ' && (dest.marketPhrase = origin.market_phrase);
// 商品促销短语
origin.sales_phrase && (dest.goodsSubtitle = origin.sales_phrase);
origin.sales_phrase && origin.sales_phrase !== ' ' && (dest.goodsSubtitle = origin.sales_phrase);
// 商品标签
if (origin.tags) {
... ...
... ... @@ -388,4 +388,22 @@
.discount-gray {
background-color: #e0e0e0;
}
.hover {
position: fixed;
width: 100%;
background-color: black;
height: 100%;
top: 0;
left: 0;
right: 0;
border: 0;
z-index: 999;
align-items: center;
display: flex;
img {
width: 100%;
}
}
}
... ...