...
|
...
|
@@ -70,23 +70,26 @@ exports.orderEnsure = (req, res, next) => { |
|
|
addressModel.addressData(uid)
|
|
|
];
|
|
|
|
|
|
if (_.isUndefined(req.cookies._isNewUser)) {
|
|
|
allPromise.push(orderModel.isNewUser(uid));
|
|
|
}
|
|
|
/* tar note 170426 品众去除 */
|
|
|
// if (_.isUndefined(req.cookies._isNewUser)) {
|
|
|
// allPromise.push(orderModel.isNewUser(uid));
|
|
|
// }
|
|
|
|
|
|
return Promise.all(allPromise).then(result => {
|
|
|
let order = result[0];
|
|
|
let userProfile = result[1];
|
|
|
let address = result[2];
|
|
|
let isNewUser = result[3];
|
|
|
|
|
|
if (!_.isUndefined(isNewUser)) {
|
|
|
if (isNewUser) {
|
|
|
res.cookie('_isNewUser', true, actCkOpthn);
|
|
|
} else {
|
|
|
res.cookie('_isNewUser', false, actCkOpthn);
|
|
|
}
|
|
|
}
|
|
|
/* tar note 170426 品众去除 */
|
|
|
// 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`);
|
...
|
...
|
|