Authored by 郝肖肖

isApp 获取方式

@@ -131,7 +131,7 @@ class IndexController extends AbstractAction @@ -131,7 +131,7 @@ class IndexController extends AbstractAction
131 $channel = $this->get('yh_channel'); 131 $channel = $this->get('yh_channel');
132 132
133 // 标识是不是APP客户端 133 // 标识是不是APP客户端
134 - $isApp = is_numeric($channel); 134 + $isApp = $this->isApp();
135 // APP访问时通过频道参数判断性别 135 // APP访问时通过频道参数判断性别
136 if ($isApp) { 136 if ($isApp) {
137 switch (intval($channel)) { 137 switch (intval($channel)) {
@@ -31,12 +31,12 @@ class InfoController extends AbstractAction @@ -31,12 +31,12 @@ class InfoController extends AbstractAction
31 $data['guang']['id'] = $id; 31 $data['guang']['id'] = $id;
32 32
33 // 标识是不是APP访问的 33 // 标识是不是APP访问的
34 - $isApp = null !== $this->get('app_version', null); 34 + $isApp = $this->isApp();
35 // 标识是否是微信访问 35 // 标识是否是微信访问
36 $isWeixin = stripos($this->server('HTTP_USER_AGENT', ''), 'MicroMessenger') !== false; 36 $isWeixin = stripos($this->server('HTTP_USER_AGENT', ''), 'MicroMessenger') !== false;
37 37
38 // WAP上设置头部导航 38 // WAP上设置头部导航
39 - if (!$isApp && !$isWeixin) { 39 + if (!$isApp || !$isWeixin) {
40 $this->setNavHeader('逛', true, SITE_MAIN); 40 $this->setNavHeader('逛', true, SITE_MAIN);
41 } 41 }
42 42
@@ -84,7 +84,7 @@ class PlusstarController extends AbstractAction @@ -84,7 +84,7 @@ class PlusstarController extends AbstractAction
84 84
85 $channel = $this->get('yh_channel'); 85 $channel = $this->get('yh_channel');
86 // 标识是不是APP客户端 86 // 标识是不是APP客户端
87 - $isApp = is_numeric($channel); 87 + $isApp = $this->isApp();
88 // 标识是否是微信访问 88 // 标识是否是微信访问
89 $isWeixin = stripos($this->server('HTTP_USER_AGENT', ''), 'MicroMessenger') !== false; 89 $isWeixin = stripos($this->server('HTTP_USER_AGENT', ''), 'MicroMessenger') !== false;
90 // APP访问时通过频道参数判断性别 90 // APP访问时通过频道参数判断性别