Authored by 郭成尧

pzoom

... ... @@ -71,9 +71,10 @@ exports.orderEnsure = (req, res, next) => {
];
/* tar note 170426 品众去除 */
// if (_.isUndefined(req.cookies._isNewUser)) {
// allPromise.push(orderModel.isNewUser(uid));
// }
/* tar note 170601 品众代码恢复 */
if (_.isUndefined(req.cookies._isNewUser)) {
allPromise.push(orderModel.isNewUser(uid));
}
return Promise.all(allPromise).then(result => {
let order = result[0];
... ... @@ -81,15 +82,16 @@ exports.orderEnsure = (req, res, next) => {
let address = result[2];
/* tar note 170426 品众去除 */
// let isNewUser = result[3];
// if (!_.isUndefined(isNewUser)) {
// if (isNewUser) {
// res.cookie('_isNewUser', true, actCkOpthn);
// } else {
// res.cookie('_isNewUser', false, actCkOpthn);
// }
// }
/* tar note 170601 品众代码恢复 */
let isNewUser = result[3];
if (!_.isUndefined(isNewUser)) {
if (isNewUser) {
res.cookie('_isNewUser', true, actCkOpthn);
} else {
res.cookie('_isNewUser', false, actCkOpthn);
}
}
if (order.cartUrl) {
logger.info(`orderEnsure: order cartUrl has value:${order.cartUrl}, order data is null`);
... ...
... ... @@ -76,7 +76,8 @@
}());
{{!--/* tar add 170426 品众代码去除 */--}}
{{!--window._fxcmd = window._fxcmd || [];
{{!--/* tar add 170601 品众代码恢复 */--}}
window._fxcmd = window._fxcmd || [];
_fxcmd.sid = 'bb3b16fa1106a6ab8619da0095755f32';
_fxcmd.trackAll = false;
// 参数配置(可选)...
... ... @@ -89,7 +90,7 @@
_pzfx.src = '//static.w3t.cn/fx/1/1/fx.js';
var sc = document.getElementsByTagName('script')[0];
sc.parentNode.insertBefore(_pzfx,sc);
}, 1000);--}}
}, 1000);
</script>
... ...
... ... @@ -327,14 +327,15 @@ function submitOrder() {
}
/* tar add 170426 品众代码去除 */
// if (window._fxcmd) {
// window._fxcmd.push(['trackOrder', {
// oid: res.data.order_code,
// otp: res.data.order_amount,
// u_info: cookie.get('_UID'),
// u_type: cookie.get('_isNewUser') ? 1 : 0
// }, []]);
// }
/* tar note 170601 品众代码恢复 */
if (window._fxcmd) {
window._fxcmd.push(['trackOrder', {
oid: res.data.order_code,
otp: res.data.order_amount,
u_info: cookie.get('_UID'),
u_type: cookie.get('_isNewUser') ? 1 : 0
}, []]);
}
cookie.remove(['order-info', 'activity-info']);
window.location.href = url;
... ...