Authored by hongweigao

修改名称,兑换礼品卡接口去掉验证码

... ... @@ -9,7 +9,7 @@ const co = Promise.coroutine;
const path = require('path');
const helpers = global.yoho.helpers;
const _ = require('lodash');
const currencyApi = require('./currency-data');
const currencyApi = require('./currency-api');
// 使用 product中的分页逻辑
const pagerPath = path.join(global.appRoot, '/apps/product/models/public-handler.js');
... ...
... ... @@ -8,7 +8,7 @@ const Promise = require('bluebird');
const co = Promise.coroutine;
const _ = require('lodash');
const userApi = require('./user-api');
const currencyApi = require('./currency-data');
const currencyApi = require('./currency-api');
/**
* 礼品卡页面
... ... @@ -51,15 +51,7 @@ exports.exchange = (req, params, uid) => {
data.giftCardCode1 = _.trim(params.giftCardCode1 || '');
data.giftCardCode2 = _.trim(params.giftCardCode2 || '');
data.giftCardCode3 = _.trim(params.giftCardCode3 || '');
data.captchaCode = _.trim(params.verifyCode || '').toLowerCase();
if (data.captchaCode && data.captchaCode !== req.session.captcha) {
return {
code: 400,
message: '图形验证码不正确'
};
}
let respData = yield userApi.exchangeGift(data, uid);
return respData;
... ...
... ... @@ -2,7 +2,7 @@
const Promise = require('bluebird');
const co = Promise.coroutine;
const _ = require('lodash');
const redenvelopesData = require('./redenvelopes-data.js');
const redenvelopesData = require('./redenvelopes-api.js');
const redenvelopesList = uid=>{
return co(function*() {
... ...
... ... @@ -130,8 +130,7 @@ const exchangeGift = (params, uid) => {
uid: uid,
giftCardCode1: params.giftCardCode1,
giftCardCode2: params.giftCardCode2,
giftCardCode3: params.giftCardCode3,
captchaCode: params.captchaCode
giftCardCode3: params.giftCardCode3
});
};
... ...
... ... @@ -92,7 +92,7 @@
{{> pager}}
{{^}}
{{#with unUseCoupons}}
{{> empty}}
{{> home/orders/empty}}
{{/with}}
{{/unless}}
{{/if}}
... ... @@ -102,7 +102,7 @@
{{> pager}}
{{^}}
{{#with usedCoupons}}
{{> empty}}
{{> home/orders/empty}}
{{/with}}
{{/unless}}
{{/if}}
... ... @@ -112,7 +112,7 @@
{{> pager}}
{{^}}
{{#with noValidCoupons}}
{{> empty}}
{{> home/orders/empty}}
{{/with}}
{{/unless}}
{{/if}}
... ...