...
|
...
|
@@ -55,10 +55,6 @@ const getCoupons = (req, res, next) => { |
|
|
// 获取优惠券列表
|
|
|
const convertCoupons = (req, res, next) => {
|
|
|
oeModel.convertCoupons(req.user.uid, req.query.code).then(data => {
|
|
|
if (data.data) {
|
|
|
data.data.userMobile = req.user.mobile;
|
|
|
}
|
|
|
|
|
|
res.send(data);
|
|
|
}).catch(next);
|
|
|
};
|
...
|
...
|
@@ -66,6 +62,10 @@ const convertCoupons = (req, res, next) => { |
|
|
// 获取礼品卡列表
|
|
|
const getGiftCards = (req, res, next) => {
|
|
|
oeModel.getGiftCards(req.user.uid).then(data => {
|
|
|
if (data.data) {
|
|
|
data.data.userMobile = req.user.mobile;
|
|
|
}
|
|
|
|
|
|
res.send(data);
|
|
|
}).catch(next);
|
|
|
};
|
...
|
...
|
@@ -105,7 +105,7 @@ const submitCheck = (req, res, next) => { |
|
|
|
|
|
// 带礼品卡号和短信验证码,则校验短信验证码,否则删除使用礼品卡
|
|
|
if (req.body.giftCard && checkCode) {
|
|
|
return oeModel.checkGiftCardSmsCode(checkCode, req.yoho.udid).then(result => {
|
|
|
return oeModel.checkGiftCardSmsCode(req.user.uid, checkCode, req.yoho.udid).then(result => {
|
|
|
if (result.code === 200) {
|
|
|
return next();
|
|
|
}
|
...
|
...
|
@@ -192,7 +192,16 @@ const submit = (req, res, next) => { |
|
|
userAgent: userAgent
|
|
|
});
|
|
|
|
|
|
params.udid = req.cookies._yasvd || 'yoho_pc';
|
|
|
params.udid = req.yoho.udid;
|
|
|
|
|
|
// 5.8.1 发票优化需求
|
|
|
// 只接受电子发票(1 纸质 2 电子),发票内容为明细(id 12:明细)
|
|
|
if (params.invoicesType) {
|
|
|
Object.assign(params, {
|
|
|
invoicesType: 2,
|
|
|
invoicesContent: 12
|
|
|
});
|
|
|
}
|
|
|
|
|
|
if (params.sku) { // 快捷结算
|
|
|
easypayModel.easypayOrderSubmit(uid, 'ordinary', params, remoteIp).then(result => {
|
...
|
...
|
|