Authored by ccbikai

修改品类页面

... ... @@ -7,10 +7,14 @@
'use strict';
const api = global.yoho.API;
const helpers = global.yoho.helpers;
const brandApi = require('./brand-api');
const logger = global.yoho.logger;
const _ = require('lodash');
const querystring = require('querystring');
const urlFormat = (path, qs) => {
return path + '?' + querystring.stringify(qs);
};
/**
* 处理品牌一览品牌列表数据
... ... @@ -101,7 +105,7 @@ const getCateListData = params => {
sub: []
};
if (_.isEmpty(cate.sub)) {
item.url = helpers.urlFormat('/product/list', {
item.url = urlFormat('/product/list', {
sort: item.sort,
sort_name: item.name,
gender: genderArr[categorykey]
... ... @@ -115,7 +119,7 @@ const getCateListData = params => {
id: item.id,
name: '全部' + item.name,
sort: item.sort,
url: helpers.urlFormat('/product/list', {
url: urlFormat('/product/list', {
sort: item.sort,
sort_name: item.name,
gender: genderArr[categorykey]
... ... @@ -130,7 +134,7 @@ const getCateListData = params => {
sort: sub.relation_parameter.sort,
url: ''
};
subitem.url = helpers.urlFormat('/product/list', {
subitem.url = urlFormat('/product/list', {
sort: subitem.sort,
sort_name: subitem.name,
gender: genderArr[categorykey]
... ...