Showing
4 changed files
with
12 additions
and
4 deletions
@@ -74,7 +74,7 @@ exports.intro = (req, res, next) => { | @@ -74,7 +74,7 @@ exports.intro = (req, res, next) => { | ||
74 | exports.preference = (req, res) => { | 74 | exports.preference = (req, res) => { |
75 | preference({ | 75 | preference({ |
76 | productskn: req.query.productSkn, | 76 | productskn: req.query.productSkn, |
77 | - yhchannel: 1, | 77 | + yhchannel: req.yoho.channel, |
78 | brandId: req.query.brandId | 78 | brandId: req.query.brandId |
79 | }).then((result) => { | 79 | }).then((result) => { |
80 | res.render('detail/preference', Object.assign({ | 80 | res.render('detail/preference', Object.assign({ |
@@ -11,6 +11,13 @@ const _ = require('lodash'); | @@ -11,6 +11,13 @@ const _ = require('lodash'); | ||
11 | const api = global.yoho.API; | 11 | const api = global.yoho.API; |
12 | const helpers = global.yoho.helpers; | 12 | const helpers = global.yoho.helpers; |
13 | 13 | ||
14 | +const yhchannelMap = { | ||
15 | + boys: '1', | ||
16 | + girls: '2', | ||
17 | + kids: '3', | ||
18 | + lifestyle: '4' | ||
19 | +}; | ||
20 | + | ||
14 | const _formatProduct = (data) => { | 21 | const _formatProduct = (data) => { |
15 | let list = []; | 22 | let list = []; |
16 | 23 | ||
@@ -46,7 +53,7 @@ module.exports = (data) => { | @@ -46,7 +53,7 @@ module.exports = (data) => { | ||
46 | return api.get('', { | 53 | return api.get('', { |
47 | method: 'h5.preference.Search', | 54 | method: 'h5.preference.Search', |
48 | productskn: data.productskn, | 55 | productskn: data.productskn, |
49 | - yhchannel: data.yhchannel, | 56 | + yhchannel: yhchannelMap[data.yhchannel], |
50 | brandId: data.brandId | 57 | brandId: data.brandId |
51 | }).then(result => { | 58 | }).then(result => { |
52 | if (result) { | 59 | if (result) { |
@@ -15,8 +15,8 @@ module.exports = { | @@ -15,8 +15,8 @@ module.exports = { | ||
15 | port: 6001, | 15 | port: 6001, |
16 | siteUrl: '//m.yohobuy.com', | 16 | siteUrl: '//m.yohobuy.com', |
17 | domains: { | 17 | domains: { |
18 | - api: 'http://testapi.yoho.cn:28078/', | ||
19 | - service: 'http://testservice.yoho.cn:28077/' | 18 | + api: 'http://api.yoho.yohoops.org/', |
19 | + service: 'http://service.yoho.yohoops.org/' | ||
20 | 20 | ||
21 | // api: 'http://devapi.yoho.cn:58078/', | 21 | // api: 'http://devapi.yoho.cn:58078/', |
22 | // service: 'http://devservice.yoho.cn:58077/' | 22 | // service: 'http://devservice.yoho.cn:58077/' |
-
Please register or login to post a comment