Authored by yyq

add udid

... ... @@ -91,7 +91,7 @@ const sendCheckSms = (req, res, next) => {
let params = req.body;
if (params.giftCard) {
return oeModel.sendGiftCardCkeckSms(req.user.uid).then(result => {
return oeModel.sendGiftCardCkeckSms(req.user.uid, req.yoho.udid).then(result => {
res.json(result);
}).catch(next);
}
... ... @@ -105,7 +105,7 @@ const submitCheck = (req, res, next) => {
// 带礼品卡号和短信验证码,则校验短信验证码,否则删除使用礼品卡
if (req.body.giftCard && checkCode) {
return oeModel.checkGiftCardSmsCode(checkCode).then(result => {
return oeModel.checkGiftCardSmsCode(checkCode, req.yoho.udid).then(result => {
if (result.code === 200) {
return next();
}
... ...
... ... @@ -111,18 +111,20 @@ const getOrderComputeAsync = (uid, cartType, paymentType, deliveryWay, other) =>
* 发送礼品卡使用校验短信API
* @param uid [number] uid
*/
const sendGiftCardCkeckSmsAsync = (uid) => api.get('', {
const sendGiftCardCkeckSmsAsync = (uid, udid) => api.get('', {
method: 'app.giftcard.sendSms',
uid: uid
uid: uid,
udid: udid
});
/**
* 校验礼品卡使用短信验证码API
* @param code [number] code
*/
const checkGiftCardSmsCodeAsync = (code) => api.get('', {
const checkGiftCardSmsCodeAsync = (code, udid) => api.get('', {
method: 'app.giftcard.validRegCode',
code: code
code: code,
udid: udid
});
/**
... ...
... ... @@ -67,10 +67,10 @@ const getGiftCards = (uid) => ensureApi.getGiftCardAsync(uid).then(result => {
});
// 发送礼品卡使用校验短信
const sendGiftCardCkeckSms = (uid) => ensureApi.sendGiftCardCkeckSmsAsync(uid);
const sendGiftCardCkeckSms = (uid, udid) => ensureApi.sendGiftCardCkeckSmsAsync(uid, udid);
// 校验礼品卡使用短信验证码
const checkGiftCardSmsCode = (uid) => ensureApi.checkGiftCardSmsCodeAsync(uid);
const checkGiftCardSmsCode = (uid, udid) => ensureApi.checkGiftCardSmsCodeAsync(uid, udid);
// 订单计算
const compute = (uid, cartType, pa) => {
... ...