Authored by 毕凯

子菜单键名驼峰化

@@ -3,6 +3,7 @@ @@ -3,6 +3,7 @@
3 * @author: Bi Kai<kai.bi@yoho.cn> 3 * @author: Bi Kai<kai.bi@yoho.cn>
4 * @date: 2016/05/09 4 * @date: 2016/05/09
5 */ 5 */
  6 +'use strict';
6 const _ = require('lodash'); 7 const _ = require('lodash');
7 const API = require('../../../library/api'); 8 const API = require('../../../library/api');
8 const sign = require('../../../library/sign'); 9 const sign = require('../../../library/sign');
@@ -55,6 +56,20 @@ const getLeftNav = (guangChoosed) => { @@ -55,6 +56,20 @@ const getLeftNav = (guangChoosed) => {
55 _.forEach(Object.keys(item), (k) => { 56 _.forEach(Object.keys(item), (k) => {
56 item[_.camelCase(k)] = item[k]; // 下划线变量名转换为驼峰 57 item[_.camelCase(k)] = item[k]; // 下划线变量名转换为驼峰
57 }); 58 });
  59 +
  60 + if (item.sub) {
  61 + let sub = [];
  62 +
  63 + // 子菜单键名驼峰化
  64 + _.forEach(item.sub, (s) => {
  65 + _.forEach(Object.keys(s), (key) => {
  66 + s[_.camelCase(key)] = s[key]; // 下划线变量名转换为驼峰
  67 + });
  68 + sub.push(s);
  69 + });
  70 +
  71 + item.sub = sub;
  72 + }
58 }); 73 });
59 return result.data; 74 return result.data;
60 } else { 75 } else {
1 {{#showFooterTab}} 1 {{#showFooterTab}}
2 -{{log this}}  
3 <div class="footer-tab"> 2 <div class="footer-tab">
4 <a class="tab-item {{#if grilsHomePage}}current{{/if}}{{#if boysHomePage}}current{{/if}}{{#if kidsHomePage}}current{{/if}}{{#if lifestyleHomePage}}current{{/if}}" href="{{indexUrl}}"> 3 <a class="tab-item {{#if grilsHomePage}}current{{/if}}{{#if boysHomePage}}current{{/if}}{{#if kidsHomePage}}current{{/if}}{{#if lifestyleHomePage}}current{{/if}}" href="{{indexUrl}}">
5 <p class="iconfont tab-icon">&#xe62a;</p> 4 <p class="iconfont tab-icon">&#xe62a;</p>