Authored by uedxwg

搜索侧边导航修改

@@ -67,7 +67,6 @@ function searchResult() { @@ -67,7 +67,6 @@ function searchResult() {
67 var keyword = ($keyword.val() + '').toLowerCase(); 67 var keyword = ($keyword.val() + '').toLowerCase();
68 var result = {}, 68 var result = {},
69 i = 0, 69 i = 0,
70 - rightBarHtml,  
71 html = ''; 70 html = '';
72 71
73 // 遍历首字母搜索 72 // 遍历首字母搜索
@@ -85,7 +84,6 @@ function searchResult() { @@ -85,7 +84,6 @@ function searchResult() {
85 }); 84 });
86 85
87 // 根据搜索结果生成 HTML 86 // 根据搜索结果生成 HTML
88 - rightBarHtml = '<div id="right-bar" class="right-bar"><div class="con" id="con">';  
89 $.each(result, function(k, v) { 87 $.each(result, function(k, v) {
90 var brandHtml = ['<div class="brand-list bar-', i, '">']; 88 var brandHtml = ['<div class="brand-list bar-', i, '">'];
91 89
@@ -96,8 +94,6 @@ function searchResult() { @@ -96,8 +94,6 @@ function searchResult() {
96 $.each(v, function(i, brand) { 94 $.each(v, function(i, brand) {
97 95
98 brandHtml.push('<p><a href="' + brand.url + '">' + brand.name); 96 brandHtml.push('<p><a href="' + brand.url + '">' + brand.name);
99 -  
100 - // brandHtml.push('<p><span>' + brand.name);  
101 if (brand.isNew) { 97 if (brand.isNew) {
102 brandHtml.push('<i class="icon-hot">HOT</i>'); 98 brandHtml.push('<i class="icon-hot">HOT</i>');
103 } 99 }
@@ -109,19 +105,8 @@ function searchResult() { @@ -109,19 +105,8 @@ function searchResult() {
109 brandHtml.push('</div>'); 105 brandHtml.push('</div>');
110 html += brandHtml.join(''); 106 html += brandHtml.join('');
111 107
112 - if (k.indexOf(0) > -1) {  
113 - k = '#';  
114 - }  
115 -  
116 - rightBarHtml = rightBarHtml + '<b>' + k + '</b>';  
117 }); 108 });
118 109
119 - rightBarHtml += '</div>';  
120 -  
121 - if (Object.keys(result).length > 0) {  
122 - html += rightBarHtml;  
123 - }  
124 -  
125 // 插入 dom,绑定事件 110 // 插入 dom,绑定事件
126 $('.search-result').html(html); 111 $('.search-result').html(html);
127 } 112 }
@@ -173,6 +173,7 @@ @@ -173,6 +173,7 @@
173 border-radius: 12rem / $pxConvertRem; 173 border-radius: 12rem / $pxConvertRem;
174 background: rgba(0, 0, 0, .8); 174 background: rgba(0, 0, 0, .8);
175 z-index: 2; 175 z-index: 2;
  176 + display: none;
176 177
177 b { 178 b {
178 height: 36rem / $pxConvertRem; 179 height: 36rem / $pxConvertRem;