Authored by ccbikai

Merge branch 'release/1.0' into develop

... ... @@ -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('/list', {
item.url = urlFormat('/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('/list', {
url: urlFormat('/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('/list', {
subitem.url = urlFormat('/list', {
sort: subitem.sort,
sort_name: subitem.name,
gender: genderArr[categorykey]
... ...
... ... @@ -10,6 +10,8 @@ const search = {
method: 'app.search.li'
}, params);
delete data.client_type;
delete data.client_secret;
return api.post('', data, {
cache: true,
code: 200
... ...
... ... @@ -24,7 +24,7 @@ const titleMap = {
action: ''
},
title: {
des: 'BLK',
des: '',
action: ''
}
},
... ... @@ -34,7 +34,7 @@ const titleMap = {
action: ''
},
title: {
des: 'BLK',
des: '',
action: ''
},
right: {
... ... @@ -48,7 +48,7 @@ const titleMap = {
action: ''
},
title: {
des: 'BLK',
des: '',
action: ''
},
right: {
... ... @@ -89,7 +89,7 @@ const titleMap = {
6: {
headerid: '6',
title: {
des: '资讯6',
des: '资讯',
action: ''
}
}
... ... @@ -97,10 +97,16 @@ const titleMap = {
const matchHeader = (url) => {
let header = {
headerid: '-1' // 默认不显示头部
headerid: '-1'
};
let path = url.split('?')[0];
if (/\/cate-all$/.test(path)) {
header = titleMap[1];
header.title.des = '全部分类';
return header;
}
if (/\/me\/mydetails$/.test(path)) {
header = titleMap[1];
header.title.des = '个人信息';
... ...