Authored by yyq

add udid

... ... @@ -143,6 +143,8 @@ const submit = (req, res, next) => {
userAgent: userAgent
});
params.udid = req.cookies._yasvd || 'yoho_pc';
if (params.sku) { // 快捷结算
easypayModel.easypayOrderSubmit(uid, 'ordinary', params, remoteIp).then(result => {
res.json(result);
... ...
... ... @@ -172,6 +172,12 @@ const easypayOrderSubmitAsync = (uid, cartType, addressId, deliveryTime, deliver
}
}
if (other.udid) {
Object.assign(param, {
udid: other.udid
});
}
return api.get('', param, {
headers: {'X-Forwarded-For': remoteIp || ''}
});
... ...
... ... @@ -167,6 +167,12 @@ const orderSubmitAsync = (uid, cartType, addressId, deliveryTime, deliveryWay, p
});
}
if (other.udid) {
Object.assign(param, {
udid: other.udid
});
}
// 友盟有关信息的传递
if (other.qhyUnion) {
Object.assign(param, {
... ...
... ... @@ -71,6 +71,7 @@ const modifyAddress = (req, res, next) => {
return '';
}
}());
let udid = req.cookies._yasvd || 'yoho_pc';
if (!orderId || !userName || !areaCode || !address) {
return res.json({
... ... @@ -79,7 +80,7 @@ const modifyAddress = (req, res, next) => {
});
}
ordersService.updateDeliveryAddress(orderId, userName, areaCode, address, mobile, phone, uid)
ordersService.updateDeliveryAddress(orderId, userName, areaCode, address, mobile, phone, uid, udid)
.then(result => res.json(result))
.catch(next);
};
... ...
... ... @@ -153,7 +153,7 @@ exports.closeReasons = ()=>{
* @param type address_id
* @return type
*/
exports.updateDeliveryAddress = (orderId, userName, areaCode, address, mobile, phone, uid)=>{
exports.updateDeliveryAddress = (orderId, userName, areaCode, address, mobile, phone, uid, udid)=>{
let options = {
method: 'app.SpaceOrders.updateDeliveryAddress',
order_code: orderId,
... ... @@ -171,6 +171,10 @@ exports.updateDeliveryAddress = (orderId, userName, areaCode, address, mobile, p
Object.assign(options, {phone: phone});
}
if (udid) {
Object.assign(options, {udid: udid});
}
return api.get('', options);
};
... ...