Showing
7 changed files
with
8 additions
and
17 deletions
@@ -9,7 +9,7 @@ const co = Promise.coroutine; | @@ -9,7 +9,7 @@ const co = Promise.coroutine; | ||
9 | const path = require('path'); | 9 | const path = require('path'); |
10 | const helpers = global.yoho.helpers; | 10 | const helpers = global.yoho.helpers; |
11 | const _ = require('lodash'); | 11 | const _ = require('lodash'); |
12 | -const currencyApi = require('./currency-data'); | 12 | +const currencyApi = require('./currency-api'); |
13 | 13 | ||
14 | // 使用 product中的分页逻辑 | 14 | // 使用 product中的分页逻辑 |
15 | const pagerPath = path.join(global.appRoot, '/apps/product/models/public-handler.js'); | 15 | const pagerPath = path.join(global.appRoot, '/apps/product/models/public-handler.js'); |
@@ -38,7 +38,7 @@ const currencyTabs = (type)=>{ | @@ -38,7 +38,7 @@ const currencyTabs = (type)=>{ | ||
38 | const currencyOptions = (condition)=>{ | 38 | const currencyOptions = (condition)=>{ |
39 | let result = [], paramUrl = {}; | 39 | let result = [], paramUrl = {}; |
40 | let tabs = {90: '最近3个月明细', 180: '最近半年明细', 360: '最近一年明细'}; | 40 | let tabs = {90: '最近3个月明细', 180: '最近半年明细', 360: '最近一年明细'}; |
41 | - | 41 | + |
42 | for (let name in tabs) { | 42 | for (let name in tabs) { |
43 | if (condition.queryType) { | 43 | if (condition.queryType) { |
44 | paramUrl.type = condition.queryType; | 44 | paramUrl.type = condition.queryType; |
@@ -8,7 +8,7 @@ const Promise = require('bluebird'); | @@ -8,7 +8,7 @@ const Promise = require('bluebird'); | ||
8 | const co = Promise.coroutine; | 8 | const co = Promise.coroutine; |
9 | const _ = require('lodash'); | 9 | const _ = require('lodash'); |
10 | const userApi = require('./user-api'); | 10 | const userApi = require('./user-api'); |
11 | -const currencyApi = require('./currency-data'); | 11 | +const currencyApi = require('./currency-api'); |
12 | 12 | ||
13 | /** | 13 | /** |
14 | * 礼品卡页面 | 14 | * 礼品卡页面 |
@@ -51,15 +51,7 @@ exports.exchange = (req, params, uid) => { | @@ -51,15 +51,7 @@ exports.exchange = (req, params, uid) => { | ||
51 | data.giftCardCode1 = _.trim(params.giftCardCode1 || ''); | 51 | data.giftCardCode1 = _.trim(params.giftCardCode1 || ''); |
52 | data.giftCardCode2 = _.trim(params.giftCardCode2 || ''); | 52 | data.giftCardCode2 = _.trim(params.giftCardCode2 || ''); |
53 | data.giftCardCode3 = _.trim(params.giftCardCode3 || ''); | 53 | data.giftCardCode3 = _.trim(params.giftCardCode3 || ''); |
54 | - data.captchaCode = _.trim(params.verifyCode || '').toLowerCase(); | ||
55 | 54 | ||
56 | - if (data.captchaCode && data.captchaCode !== req.session.captcha) { | ||
57 | - return { | ||
58 | - code: 400, | ||
59 | - message: '图形验证码不正确' | ||
60 | - }; | ||
61 | - | ||
62 | - } | ||
63 | let respData = yield userApi.exchangeGift(data, uid); | 55 | let respData = yield userApi.exchangeGift(data, uid); |
64 | 56 | ||
65 | return respData; | 57 | return respData; |
@@ -2,7 +2,7 @@ | @@ -2,7 +2,7 @@ | ||
2 | const Promise = require('bluebird'); | 2 | const Promise = require('bluebird'); |
3 | const co = Promise.coroutine; | 3 | const co = Promise.coroutine; |
4 | const _ = require('lodash'); | 4 | const _ = require('lodash'); |
5 | -const redenvelopesData = require('./redenvelopes-data.js'); | 5 | +const redenvelopesData = require('./redenvelopes-api.js'); |
6 | 6 | ||
7 | const redenvelopesList = uid=>{ | 7 | const redenvelopesList = uid=>{ |
8 | return co(function*() { | 8 | return co(function*() { |
@@ -130,8 +130,7 @@ const exchangeGift = (params, uid) => { | @@ -130,8 +130,7 @@ const exchangeGift = (params, uid) => { | ||
130 | uid: uid, | 130 | uid: uid, |
131 | giftCardCode1: params.giftCardCode1, | 131 | giftCardCode1: params.giftCardCode1, |
132 | giftCardCode2: params.giftCardCode2, | 132 | giftCardCode2: params.giftCardCode2, |
133 | - giftCardCode3: params.giftCardCode3, | ||
134 | - captchaCode: params.captchaCode | 133 | + giftCardCode3: params.giftCardCode3 |
135 | }); | 134 | }); |
136 | }; | 135 | }; |
137 | 136 |
@@ -92,7 +92,7 @@ | @@ -92,7 +92,7 @@ | ||
92 | {{> pager}} | 92 | {{> pager}} |
93 | {{^}} | 93 | {{^}} |
94 | {{#with unUseCoupons}} | 94 | {{#with unUseCoupons}} |
95 | - {{> empty}} | 95 | + {{> home/orders/empty}} |
96 | {{/with}} | 96 | {{/with}} |
97 | {{/unless}} | 97 | {{/unless}} |
98 | {{/if}} | 98 | {{/if}} |
@@ -102,7 +102,7 @@ | @@ -102,7 +102,7 @@ | ||
102 | {{> pager}} | 102 | {{> pager}} |
103 | {{^}} | 103 | {{^}} |
104 | {{#with usedCoupons}} | 104 | {{#with usedCoupons}} |
105 | - {{> empty}} | 105 | + {{> home/orders/empty}} |
106 | {{/with}} | 106 | {{/with}} |
107 | {{/unless}} | 107 | {{/unless}} |
108 | {{/if}} | 108 | {{/if}} |
@@ -112,7 +112,7 @@ | @@ -112,7 +112,7 @@ | ||
112 | {{> pager}} | 112 | {{> pager}} |
113 | {{^}} | 113 | {{^}} |
114 | {{#with noValidCoupons}} | 114 | {{#with noValidCoupons}} |
115 | - {{> empty}} | 115 | + {{> home/orders/empty}} |
116 | {{/with}} | 116 | {{/with}} |
117 | {{/unless}} | 117 | {{/unless}} |
118 | {{/if}} | 118 | {{/if}} |
-
Please register or login to post a comment