...
|
...
|
@@ -34,7 +34,7 @@ const bindController = require(`${cRoot}/3party-bind`); |
|
|
// const AddressController = require(`${cRoot}/address`);
|
|
|
// const GiftController = require(`${cRoot}/gift`);
|
|
|
|
|
|
const homeNav = (req, res) => {
|
|
|
const homeNav = (req) => {
|
|
|
return [
|
|
|
{
|
|
|
title: '交易管理',
|
...
|
...
|
@@ -56,12 +56,12 @@ const homeNav = (req, res) => { |
|
|
|
|
|
/* {name: '我的投诉', href: '/home/complaints'}, */
|
|
|
{name: '我的信息', href: '/home/message', count: 0},
|
|
|
{
|
|
|
name: '在线客服',
|
|
|
href: res.locals.customerServiceSwitch ?
|
|
|
{
|
|
|
name: '在线客服',
|
|
|
href: _.get(req.app.locals.pc, 'clientService.new', false) ?
|
|
|
'/service/client' : 'http://chat8.live800.com/live800/chatClient/chatbox.jsp?companyID=620092&configID=149091&jid=8732423409',
|
|
|
isBlank: true
|
|
|
}
|
|
|
isBlank: true
|
|
|
}
|
|
|
]
|
|
|
},
|
|
|
{
|
...
|
...
|
@@ -74,11 +74,11 @@ const homeNav = (req, res) => { |
|
|
]
|
|
|
}
|
|
|
];
|
|
|
}
|
|
|
};
|
|
|
|
|
|
const getActiveNav = (req, res)=>{
|
|
|
const getActiveNav = (req)=>{
|
|
|
|
|
|
let mHomeNav = _.cloneDeep(homeNav(req, res));
|
|
|
let mHomeNav = _.cloneDeep(homeNav(req));
|
|
|
|
|
|
return mHomeNav.map((item) => {
|
|
|
item.subNav = item.subNav.map((nav) => {
|
...
|
...
|
@@ -108,7 +108,7 @@ const getActiveNav = (req, res)=>{ |
|
|
|
|
|
const getHomeNav = (req, res, next) => {
|
|
|
res.locals.path = [{href: helpers.urlFormat('/'), name: 'YOHO!BUY 有货首页'}, {name: '个人中心'}];
|
|
|
res.locals.homeNav = getActiveNav(req, res);
|
|
|
res.locals.homeNav = getActiveNav(req);
|
|
|
res.locals.userThumb = '//img10.static.yhbimg.com/headimg/' +
|
|
|
'2013/11/28/09/01cae078abe5fe320c88cdf4c220212688.gif?imageView/2/w/100/h/100';
|
|
|
next();
|
...
|
...
|
|