Authored by weiqingting

菜单下拉问题

@@ -31,13 +31,35 @@ $('.leftpanel .nav .parent>a').click(function() { @@ -31,13 +31,35 @@ $('.leftpanel .nav .parent>a').click(function() {
31 return false; 31 return false;
32 }); 32 });
33 33
  34 +var isMenuShow=false;
  35 +var localStorage=window.localStorage;
34 36
35 -// $(".leftpanel .nav .children a").each(function() {  
36 -// var attr = $(this).attr('href'); 37 +$(".leftpanel .nav .children a").each(function() {
  38 + var attr = $(this).attr('href');
37 39
38 -// if (attr == window.location.pathname + window.location.search) {  
39 -// $(this).parents(".children").show();  
40 -// $(this).parent("li").addClass("active");  
41 -// $(this).parents(".parent").addClass("parent-focus");  
42 -// }  
43 -// });  
  40 + if (attr == window.location.pathname + window.location.search) {
  41 + $(this).parents(".children").show();
  42 + $(this).parent("li").addClass("active");
  43 + $(this).parents(".parent").addClass("active");
  44 + localStorage.setItem("router",attr);
  45 + localStorage.getItem("router");
  46 + isMenuShow=true;
  47 + }
  48 +});
  49 +
  50 +if(!isMenuShow&&localStorage.getItem("router")){
  51 + $(".leftpanel .nav .children a").each(function() {
  52 + var attr = $(this).attr('href');
  53 +
  54 + if (localStorage.getItem("router") == attr) {
  55 + $(this).parents(".children").show();
  56 + $(this).parent("li").addClass("active");
  57 + $(this).parents(".parent").addClass("active");
  58 + isMenuShow=true;
  59 + }
  60 +
  61 +});
  62 +}
  63 +
  64 +
  65 +// LocalStorage.setItem("router",);
@@ -3,8 +3,8 @@ @@ -3,8 +3,8 @@
3 * 入口管理 3 * 入口管理
4 */ 4 */
5 5
6 -//exports.domain = require('../config/common.js').domain;  
7 -exports.domain = "http://172.16.6.127:8088/platform"; 6 +exports.domain = require('../config/common.js').domain;
  7 +// exports.domain = "http://172.16.6.127:8088/platform";
8 8
9 exports.res = [ 9 exports.res = [
10 {//入口信息管理界面 10 {//入口信息管理界面
@@ -3,8 +3,8 @@ @@ -3,8 +3,8 @@
3 * APP意见反馈管理 3 * APP意见反馈管理
4 */ 4 */
5 5
6 -//exports.domain = require('../config/common.js').domain;  
7 -exports.domain = "http://172.16.6.127:8088/platform"; 6 +exports.domain = require('../config/common.js').domain;
  7 +// exports.domain = "http://172.16.6.127:8088/platform";
8 8
9 exports.res = [ 9 exports.res = [
10 { 10 {
1 -//exports.domain = require('../config/common.js').domain; 1 +exports.domain = require('../config/common.js').domain;
2 // exports.domain = "http://192.168.102.201:8082/platform"; 2 // exports.domain = "http://192.168.102.201:8082/platform";
3 - exports.domain = "http://172.16.6.210:8083/platform"; 3 + // exports.domain = "http://172.16.6.210:8083/platform";
4 4
5 exports.res = [ 5 exports.res = [
6 { 6 {
@@ -3,8 +3,8 @@ @@ -3,8 +3,8 @@
3 * 版本管理 3 * 版本管理
4 */ 4 */
5 5
6 -//exports.domain = require('../config/common.js').domain;  
7 -exports.domain = "http://172.16.6.127:8088/platform"; 6 +exports.domain = require('../config/common.js').domain;
  7 +// exports.domain = "http://172.16.6.127:8088/platform";
8 8
9 exports.res = [ 9 exports.res = [
10 { 10 {
1 {{#menu}} 1 {{#menu}}
2 -<li {{#if parent}}class="parent {{active}}"{{/if}}> 2 +<li {{#if parent}}class="parent "{{/if}}>
3 <a href="javascript:;"> 3 <a href="javascript:;">
4 <i class="fa fa-suitcase"></i> 4 <i class="fa fa-suitcase"></i>
5 <span>{{title}}</span> 5 <span>{{title}}</span>
@@ -7,7 +7,7 @@ @@ -7,7 +7,7 @@
7 {{#if menu}} 7 {{#if menu}}
8 <ul class="children"> 8 <ul class="children">
9 {{#menu}} 9 {{#menu}}
10 - <li class="{{active}}"> 10 + <li >
11 <a {{#if href}}href="{{href}}"{{/if}}> 11 <a {{#if href}}href="{{href}}"{{/if}}>
12 <i class="fa fa-suitcase"></i> 12 <i class="fa fa-suitcase"></i>
13 <span>{{title}}</span> 13 <span>{{title}}</span>