Authored by 毕凯

侧边栏目数据

... ... @@ -49,6 +49,7 @@ exports.boys = (req, res) => {
module: mod,
page: 'home',
title: '男生首页',
boysHomePage: true,
homeHeader: {
searchUrl: helpers.url('/search', null, 'search')
},
... ...
... ... @@ -36,7 +36,13 @@ const processSideBar = (list) => {
item = camelCase.listCamelCase(item);
if (item.sub) {
let sub = [];
let sub = [{
textCn: '逛',
textEn: 'TrendFinder',
back: true,
isSelect: false,
bgColor: '#000'
}];
_.forEach(item.sub, (s) => {
s = camelCase.listCamelCase(s); // 子菜单键名驼峰化
... ...
... ... @@ -23,6 +23,7 @@
{{#if sub}}
<ul class="sub-nav">
{{# sub}}
{{log this}}
<li class="{{# isSelect}}current{{/ isSelect}}" style="background-color:{{bgColor}};">
{{#if sortUrl}}
<a href="{{sortUrl}}" style="{{#if sortNameColor}}color:{{sortNameColor}};{{/if}}">
... ...
... ... @@ -17,7 +17,7 @@ const config = require('../config/common');
* @return {[tring]}
*/
exports.image = (url, width, height, mode) => {
mode = _.isNumber(mode) ? mode : 1;
mode = _.isNumber(mode) ? mode : 2;
return url.replace(/{width}/g, width).replace(/{height}/g, height).replace(/{mode}/g, mode);
};
... ...