Authored by 郭成尧

udid-add

... ... @@ -202,6 +202,7 @@ exports.orderCompute = (req, res, next) => {
*/
exports.orderSub = (req, res, next) => {
let uid = req.user.uid;
let udid = req.sessionID || 'yoho';
let addressId = parseInt(crypto.decrypt('', req.body.addressId), 10);
let cartType = req.body.cartType || 'ordinary';
let deliveryTimeId = req.body.deliveryTimeId || 1;
... ... @@ -268,7 +269,9 @@ exports.orderSub = (req, res, next) => {
code: 411
});
} else {
let verifyResult = yield orderModel.validRegCode(uid, verifyCode);
let verifyResult = yield orderModel.validRegCode({
uid, verifyCode, udid
});
if (verifyResult.code !== 200) {
return res.json(verifyResult);
... ... @@ -294,7 +297,7 @@ exports.orderSub = (req, res, next) => {
userAgent: unionInfo.userAgent,
isWechat: req.yoho.isWechat,
ip: req.yoho.clientIp,
udid: req.cookies._yasvd || 'yoho'
udid: udid
};
/* tar modified 161206 套餐 */
... ...
... ... @@ -94,11 +94,12 @@ const giftCardSendSms = (uid) => {
/**
* 礼品卡支付时验证短信验证码
*/
const validRegCode = (uid, verifyCode) => {
const validRegCode = (params) => {
return api.get('', {
method: 'app.giftcard.validRegCode',
uid: uid,
code: verifyCode
uid: params.uid,
udid: params.udid,
code: params.verifyCode
});
};
... ...
... ... @@ -191,7 +191,7 @@ const addressModify = (req, res, next) => {
*/
const changeAddress = (req, res, next) => {
let uid = req.user.uid;
let udid = req.cookies._yasvd || 'yoho';
let udid = req.sessionID || 'yoho';
if (!uid) {
return res.json({
... ...