Authored by zhangxiaoru

guang 前端控制头部

@@ -297,15 +297,11 @@ const index = (req, res, next) => { @@ -297,15 +297,11 @@ const index = (req, res, next) => {
297 return; 297 return;
298 } 298 }
299 299
300 - if (isqq || isWeibo) {  
301 - pageHeader: false  
302 - } else {  
303 parameter = { 300 parameter = {
304 pageHeader: headerModel.setNav({ 301 pageHeader: headerModel.setNav({
305 navTitle: title 302 navTitle: title
306 }) 303 })
307 }; 304 };
308 - }  
309 305
310 isShare = isWeixin || isqq || isWeibo ? true : false; 306 isShare = isWeixin || isqq || isWeibo ? true : false;
311 307
@@ -2,9 +2,9 @@ @@ -2,9 +2,9 @@
2 {{# guang}} 2 {{# guang}}
3 <div id="wrapper" > 3 <div id="wrapper" >
4 <div id="scroller" class="{{channel}}"> 4 <div id="scroller" class="{{channel}}">
5 - {{#if isShare}} 5 + {{!-- {{#if isShare}} --}}
6 {{> wei-guang/guang-header}} 6 {{> wei-guang/guang-header}}
7 - {{/if}} 7 + {{!-- {{/if}} --}}
8 {{# author}} 8 {{# author}}
9 <div class="author" data-id={{id}}> 9 <div class="author" data-id={{id}}>
10 <a class="clearfix" href={{url}}> 10 <a class="clearfix" href={{url}}>
@@ -214,3 +214,14 @@ @@ -214,3 +214,14 @@
214 {{#if isShare}} 214 {{#if isShare}}
215 {{> wei-guang/side-nav}} 215 {{> wei-guang/side-nav}}
216 {{/if}} 216 {{/if}}
  217 +
  218 +<script type="text/javascript">
  219 + var isWechat = /micromessenger/i.test(navigator.userAgent || ''),
  220 + isqq = /MQQBrowser/i.test(navigator.userAgent || ''),
  221 + isWeibo = navigator.userAgent.toLowerCase().indexOf('weibo') !== -1;
  222 +
  223 + if (isWechat || isqq || isWeibo) {
  224 + document.getElementById('guang-header').classList.remove('hide');
  225 + document.getElementById('yoho-header').classList.add('hide');
  226 + }
  227 +</script>
1 -<div class="guang-header clearfix"> 1 +<div id="guang-header" class="guang-header clearfix hide">
2 <span class="nav-btn iconfont">&#xe60b;</span> 2 <span class="nav-btn iconfont">&#xe60b;</span>
3 <span class="logo"></span> 3 <span class="logo"></span>
4 </div> 4 </div>