Authored by ccbikai

商品详情页优化

... ... @@ -74,7 +74,7 @@ exports.intro = (req, res, next) => {
exports.preference = (req, res) => {
preference({
productskn: req.query.productSkn,
yhchannel: 1,
yhchannel: req.yoho.channel,
brandId: req.query.brandId
}).then((result) => {
res.render('detail/preference', Object.assign({
... ...
... ... @@ -11,6 +11,13 @@ const _ = require('lodash');
const api = global.yoho.API;
const helpers = global.yoho.helpers;
const yhchannelMap = {
boys: '1',
girls: '2',
kids: '3',
lifestyle: '4'
};
const _formatProduct = (data) => {
let list = [];
... ... @@ -46,7 +53,7 @@ module.exports = (data) => {
return api.get('', {
method: 'h5.preference.Search',
productskn: data.productskn,
yhchannel: data.yhchannel,
yhchannel: yhchannelMap[data.yhchannel],
brandId: data.brandId
}).then(result => {
if (result) {
... ...
... ... @@ -15,8 +15,8 @@ module.exports = {
port: 6001,
siteUrl: '//m.yohobuy.com',
domains: {
api: 'http://testapi.yoho.cn:28078/',
service: 'http://testservice.yoho.cn:28077/'
api: 'http://api.yoho.yohoops.org/',
service: 'http://service.yoho.yohoops.org/'
// api: 'http://devapi.yoho.cn:58078/',
// service: 'http://devservice.yoho.cn:58077/'
... ...
... ... @@ -92,6 +92,7 @@
.tip {
display: inline-block;
vertical-align: top;
width: 16.6%;
img {
... ...