Authored by Rock Zhang

添加对微信浏览器的判断,微信浏览器时除首页外的其他页面不显示头部

@@ -354,6 +354,11 @@ class AbstractAction extends Controller_Abstract @@ -354,6 +354,11 @@ class AbstractAction extends Controller_Abstract
354 { 354 {
355 $header = array(); 355 $header = array();
356 356
  357 + // 判断是否是微信浏览器浏览
  358 + if (strpos($_SERVER['HTTP_USER_AGENT'], 'MicroMessenger') === false) {
  359 + $header['isShow'] = true;
  360 + }
  361 +
357 if ($backUrl) { 362 if ($backUrl) {
358 $header['navBack'] = true; 363 $header['navBack'] = true;
359 } 364 }
1 {{#pageHeader}} 1 {{#pageHeader}}
  2 +{{# isShow}}
2 <header class="yoho-header{{#if boys}} boys{{/if}}{{#if girls}} girls{{/if}}{{#if kids}} kids{{/if}}{{#if lifeStyle}} life-style{{/if}}"> 3 <header class="yoho-header{{#if boys}} boys{{/if}}{{#if girls}} girls{{/if}}{{#if kids}} kids{{/if}}{{#if lifeStyle}} life-style{{/if}}">
3 {{#if navBack}} 4 {{#if navBack}}
4 <a href="javascript:history.go(-1);" class="nav-back"></a> 5 <a href="javascript:history.go(-1);" class="nav-back"></a>
@@ -10,4 +11,5 @@ @@ -10,4 +11,5 @@
10 <p class="nav-title">{{.}}</p> 11 <p class="nav-title">{{.}}</p>
11 {{/navTitle}} 12 {{/navTitle}}
12 </header> 13 </header>
  14 +{{/ isShow}}
13 {{/pageHeader}} 15 {{/pageHeader}}