Showing
3 changed files
with
26 additions
and
22 deletions
@@ -71,9 +71,10 @@ exports.orderEnsure = (req, res, next) => { | @@ -71,9 +71,10 @@ exports.orderEnsure = (req, res, next) => { | ||
71 | ]; | 71 | ]; |
72 | 72 | ||
73 | /* tar note 170426 品众去除 */ | 73 | /* tar note 170426 品众去除 */ |
74 | - // if (_.isUndefined(req.cookies._isNewUser)) { | ||
75 | - // allPromise.push(orderModel.isNewUser(uid)); | ||
76 | - // } | 74 | + /* tar note 170601 品众代码恢复 */ |
75 | + if (_.isUndefined(req.cookies._isNewUser)) { | ||
76 | + allPromise.push(orderModel.isNewUser(uid)); | ||
77 | + } | ||
77 | 78 | ||
78 | return Promise.all(allPromise).then(result => { | 79 | return Promise.all(allPromise).then(result => { |
79 | let order = result[0]; | 80 | let order = result[0]; |
@@ -81,15 +82,16 @@ exports.orderEnsure = (req, res, next) => { | @@ -81,15 +82,16 @@ exports.orderEnsure = (req, res, next) => { | ||
81 | let address = result[2]; | 82 | let address = result[2]; |
82 | 83 | ||
83 | /* tar note 170426 品众去除 */ | 84 | /* tar note 170426 品众去除 */ |
84 | - // let isNewUser = result[3]; | ||
85 | - | ||
86 | - // if (!_.isUndefined(isNewUser)) { | ||
87 | - // if (isNewUser) { | ||
88 | - // res.cookie('_isNewUser', true, actCkOpthn); | ||
89 | - // } else { | ||
90 | - // res.cookie('_isNewUser', false, actCkOpthn); | ||
91 | - // } | ||
92 | - // } | 85 | + /* tar note 170601 品众代码恢复 */ |
86 | + let isNewUser = result[3]; | ||
87 | + | ||
88 | + if (!_.isUndefined(isNewUser)) { | ||
89 | + if (isNewUser) { | ||
90 | + res.cookie('_isNewUser', true, actCkOpthn); | ||
91 | + } else { | ||
92 | + res.cookie('_isNewUser', false, actCkOpthn); | ||
93 | + } | ||
94 | + } | ||
93 | 95 | ||
94 | if (order.cartUrl) { | 96 | if (order.cartUrl) { |
95 | logger.info(`orderEnsure: order cartUrl has value:${order.cartUrl}, order data is null`); | 97 | logger.info(`orderEnsure: order cartUrl has value:${order.cartUrl}, order data is null`); |
@@ -76,7 +76,8 @@ | @@ -76,7 +76,8 @@ | ||
76 | }()); | 76 | }()); |
77 | 77 | ||
78 | {{!--/* tar add 170426 品众代码去除 */--}} | 78 | {{!--/* tar add 170426 品众代码去除 */--}} |
79 | - {{!--window._fxcmd = window._fxcmd || []; | 79 | + {{!--/* tar add 170601 品众代码恢复 */--}} |
80 | + window._fxcmd = window._fxcmd || []; | ||
80 | _fxcmd.sid = 'bb3b16fa1106a6ab8619da0095755f32'; | 81 | _fxcmd.sid = 'bb3b16fa1106a6ab8619da0095755f32'; |
81 | _fxcmd.trackAll = false; | 82 | _fxcmd.trackAll = false; |
82 | // 参数配置(可选)... | 83 | // 参数配置(可选)... |
@@ -89,7 +90,7 @@ | @@ -89,7 +90,7 @@ | ||
89 | _pzfx.src = '//static.w3t.cn/fx/1/1/fx.js'; | 90 | _pzfx.src = '//static.w3t.cn/fx/1/1/fx.js'; |
90 | var sc = document.getElementsByTagName('script')[0]; | 91 | var sc = document.getElementsByTagName('script')[0]; |
91 | sc.parentNode.insertBefore(_pzfx,sc); | 92 | sc.parentNode.insertBefore(_pzfx,sc); |
92 | - }, 1000);--}} | 93 | + }, 1000); |
93 | 94 | ||
94 | 95 | ||
95 | </script> | 96 | </script> |
@@ -327,14 +327,15 @@ function submitOrder() { | @@ -327,14 +327,15 @@ function submitOrder() { | ||
327 | } | 327 | } |
328 | 328 | ||
329 | /* tar add 170426 品众代码去除 */ | 329 | /* tar add 170426 品众代码去除 */ |
330 | - // if (window._fxcmd) { | ||
331 | - // window._fxcmd.push(['trackOrder', { | ||
332 | - // oid: res.data.order_code, | ||
333 | - // otp: res.data.order_amount, | ||
334 | - // u_info: cookie.get('_UID'), | ||
335 | - // u_type: cookie.get('_isNewUser') ? 1 : 0 | ||
336 | - // }, []]); | ||
337 | - // } | 330 | + /* tar note 170601 品众代码恢复 */ |
331 | + if (window._fxcmd) { | ||
332 | + window._fxcmd.push(['trackOrder', { | ||
333 | + oid: res.data.order_code, | ||
334 | + otp: res.data.order_amount, | ||
335 | + u_info: cookie.get('_UID'), | ||
336 | + u_type: cookie.get('_isNewUser') ? 1 : 0 | ||
337 | + }, []]); | ||
338 | + } | ||
338 | 339 | ||
339 | cookie.remove(['order-info', 'activity-info']); | 340 | cookie.remove(['order-info', 'activity-info']); |
340 | window.location.href = url; | 341 | window.location.href = url; |
-
Please register or login to post a comment