...
|
...
|
@@ -61,7 +61,7 @@ const convertCoupons = (req, res, next) => { |
|
|
|
|
|
// 获取礼品卡列表
|
|
|
const getGiftCards = (req, res, next) => {
|
|
|
oeModel.getGiftCards(req.user.uid).then(data => {
|
|
|
req.ctx(oeModel)..getGiftCards(req.user.uid).then(data => {
|
|
|
if (data.data) {
|
|
|
data.data.userMobile = req.user.mobile;
|
|
|
}
|
...
|
...
|
@@ -91,7 +91,7 @@ const sendCheckSms = (req, res, next) => { |
|
|
let params = req.body;
|
|
|
|
|
|
if (params.giftCard) {
|
|
|
return oeModel.sendGiftCardCkeckSms(req.user.uid, req.yoho.udid).then(result => {
|
|
|
return req.ctx(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(req.user.uid, checkCode, req.yoho.udid).then(result => {
|
|
|
return req.ctx(oeModel).checkGiftCardSmsCode(req.user.uid, checkCode, req.yoho.udid).then(result => {
|
|
|
if (result.code === 200) {
|
|
|
return next();
|
|
|
}
|
...
|
...
|
|