Authored by yyq

add udid

@@ -91,7 +91,7 @@ const sendCheckSms = (req, res, next) => { @@ -91,7 +91,7 @@ const sendCheckSms = (req, res, next) => {
91 let params = req.body; 91 let params = req.body;
92 92
93 if (params.giftCard) { 93 if (params.giftCard) {
94 - return oeModel.sendGiftCardCkeckSms(req.user.uid).then(result => { 94 + return oeModel.sendGiftCardCkeckSms(req.user.uid, req.yoho.udid).then(result => {
95 res.json(result); 95 res.json(result);
96 }).catch(next); 96 }).catch(next);
97 } 97 }
@@ -105,7 +105,7 @@ const submitCheck = (req, res, next) => { @@ -105,7 +105,7 @@ const submitCheck = (req, res, next) => {
105 105
106 // 带礼品卡号和短信验证码,则校验短信验证码,否则删除使用礼品卡 106 // 带礼品卡号和短信验证码,则校验短信验证码,否则删除使用礼品卡
107 if (req.body.giftCard && checkCode) { 107 if (req.body.giftCard && checkCode) {
108 - return oeModel.checkGiftCardSmsCode(checkCode).then(result => { 108 + return oeModel.checkGiftCardSmsCode(checkCode, req.yoho.udid).then(result => {
109 if (result.code === 200) { 109 if (result.code === 200) {
110 return next(); 110 return next();
111 } 111 }
@@ -111,18 +111,20 @@ const getOrderComputeAsync = (uid, cartType, paymentType, deliveryWay, other) => @@ -111,18 +111,20 @@ const getOrderComputeAsync = (uid, cartType, paymentType, deliveryWay, other) =>
111 * 发送礼品卡使用校验短信API 111 * 发送礼品卡使用校验短信API
112 * @param uid [number] uid 112 * @param uid [number] uid
113 */ 113 */
114 -const sendGiftCardCkeckSmsAsync = (uid) => api.get('', { 114 +const sendGiftCardCkeckSmsAsync = (uid, udid) => api.get('', {
115 method: 'app.giftcard.sendSms', 115 method: 'app.giftcard.sendSms',
116 - uid: uid 116 + uid: uid,
  117 + udid: udid
117 }); 118 });
118 119
119 /** 120 /**
120 * 校验礼品卡使用短信验证码API 121 * 校验礼品卡使用短信验证码API
121 * @param code [number] code 122 * @param code [number] code
122 */ 123 */
123 -const checkGiftCardSmsCodeAsync = (code) => api.get('', { 124 +const checkGiftCardSmsCodeAsync = (code, udid) => api.get('', {
124 method: 'app.giftcard.validRegCode', 125 method: 'app.giftcard.validRegCode',
125 - code: code 126 + code: code,
  127 + udid: udid
126 }); 128 });
127 129
128 /** 130 /**
@@ -67,10 +67,10 @@ const getGiftCards = (uid) => ensureApi.getGiftCardAsync(uid).then(result => { @@ -67,10 +67,10 @@ const getGiftCards = (uid) => ensureApi.getGiftCardAsync(uid).then(result => {
67 }); 67 });
68 68
69 // 发送礼品卡使用校验短信 69 // 发送礼品卡使用校验短信
70 -const sendGiftCardCkeckSms = (uid) => ensureApi.sendGiftCardCkeckSmsAsync(uid); 70 +const sendGiftCardCkeckSms = (uid, udid) => ensureApi.sendGiftCardCkeckSmsAsync(uid, udid);
71 71
72 // 校验礼品卡使用短信验证码 72 // 校验礼品卡使用短信验证码
73 -const checkGiftCardSmsCode = (uid) => ensureApi.checkGiftCardSmsCodeAsync(uid); 73 +const checkGiftCardSmsCode = (uid, udid) => ensureApi.checkGiftCardSmsCodeAsync(uid, udid);
74 74
75 // 订单计算 75 // 订单计算
76 const compute = (uid, cartType, pa) => { 76 const compute = (uid, cartType, pa) => {