Authored by 王涛

Merge branch 'master-500-dev-lushangqing' into 'master-500-dev'

【无】 web网站home首页导航高亮样式与当前路由对应



See merge request !956
@@ -32,23 +32,28 @@ export default { @@ -32,23 +32,28 @@ export default {
32 let logoData=Vue.ref([ 32 let logoData=Vue.ref([
33 { 33 {
34 id:'1', 34 id:'1',
35 - logoUrl:'logo-dong' 35 + logoUrl:'logo-dong',
  36 + active:true
36 }, 37 },
37 { 38 {
38 id:'2', 39 id:'2',
39 - logoUrl:'logo-da' 40 + logoUrl:'logo-da',
  41 + active:false
40 }, 42 },
41 { 43 {
42 id:'3', 44 id:'3',
43 - logoUrl:'logo-nan' 45 + logoUrl:'logo-nan',
  46 + active:false
44 }, 47 },
45 { 48 {
46 id:'4', 49 id:'4',
47 - logoUrl:'logo-ren' 50 + logoUrl:'logo-ren',
  51 + active:false
48 }, 52 },
49 { 53 {
50 id:'5', 54 id:'5',
51 - logoUrl:'logo-tong' 55 + logoUrl:'logo-tong',
  56 + active:false
52 } 57 }
53 ]) 58 ])
54 let compatibleData=Vue.ref([ 59 let compatibleData=Vue.ref([
@@ -91,13 +96,13 @@ export default { @@ -91,13 +96,13 @@ export default {
91 items: 1, 96 items: 1,
92 margin: 20, 97 margin: 20,
93 nav: false, 98 nav: false,
94 - dots: true, 99 + dots: false,
95 active: true, 100 active: true,
96 dotsEach: 2, 101 dotsEach: 2,
97 smartSpeed: 1000, 102 smartSpeed: 1000,
98 autoplay: 5000, 103 autoplay: 5000,
99 // navText: ['<span class="flaticon-left-arrow"></span>', '<span class="flaticon-right-arrow"></span>'], 104 // navText: ['<span class="flaticon-left-arrow"></span>', '<span class="flaticon-right-arrow"></span>'],
100 - dotsText: ['<span class="flaticon-left-arrow"></span>', '<span class="flaticon-right-arrow"></span>'], 105 + // dotsData: ['<span class="flaticon-left-arrow"></span>', '<span class="flaticon-right-arrow"></span>'],
101 responsive: { 106 responsive: {
102 /* 0: { 107 /* 0: {
103 items: 1, 108 items: 1,
@@ -116,6 +121,15 @@ export default { @@ -116,6 +121,15 @@ export default {
116 }*/ 121 }*/
117 } 122 }
118 }); 123 });
  124 + //lsq 导航高亮样式对应路由
  125 + let hashUr=location.hash;
  126 + let href=$('.navigation li a').attr('href');
  127 + $('.navigation li').unbind('click.li').on('click.li',function (){
  128 + if(hashUr==href){
  129 + $('.navigation li').removeClass('current');
  130 + $(this).addClass('current')
  131 + }
  132 + })
119 }) 133 })
120 return{ 134 return{
121 isHover, 135 isHover,