Authored by whb

修改navbanner

@@ -465,9 +465,10 @@ class WebAction extends Controller_Abstract @@ -465,9 +465,10 @@ class WebAction extends Controller_Abstract
465 */ 465 */
466 protected function setWebNavHeader($channel = '') 466 protected function setWebNavHeader($channel = '')
467 { 467 {
468 -// if(empty($channel)) {  
469 -// $channel = \Index\HomeModel::getSwitchChannel();  
470 -// } 468 + //TODO
  469 + if(empty($channel)) {
  470 + $channel = \Index\HomeModel::getSwitchChannel();
  471 + }
471 // else {//设置频道 472 // else {//设置频道
472 // \Index\HomeModel::setSwitchToCookie($channel); 473 // \Index\HomeModel::setSwitchToCookie($channel);
473 // } 474 // }
@@ -5,6 +5,7 @@ use LibModels\Web\Home\IndexData; @@ -5,6 +5,7 @@ use LibModels\Web\Home\IndexData;
5 use Plugin\Cache; 5 use Plugin\Cache;
6 use Configs\CacheConfig; 6 use Configs\CacheConfig;
7 use Api\Yohobuy; 7 use Api\Yohobuy;
  8 +use Plugin\Images;
8 9
9 class CommonController extends WebAction 10 class CommonController extends WebAction
10 { 11 {
@@ -95,7 +96,6 @@ class CommonController extends WebAction @@ -95,7 +96,6 @@ class CommonController extends WebAction
95 } 96 }
96 else 97 else
97 { 98 {
98 - $data = json_decode($data, true);  
99 $banner = ''; 99 $banner = '';
100 if(isset($data['data'][0]['data'])) 100 if(isset($data['data'][0]['data']))
101 { 101 {
@@ -62,6 +62,7 @@ class HomeModel @@ -62,6 +62,7 @@ class HomeModel
62 if (empty($data)) { 62 if (empty($data)) {
63 return array(); 63 return array();
64 } 64 }
  65 +
65 $menu = array(); 66 $menu = array();
66 $key = sprintf('%s_%s_%s',CacheConfig::KEY_WEB_HOME_NAVBAR_DATA, md5(serialize($data)), $channel); 67 $key = sprintf('%s_%s_%s',CacheConfig::KEY_WEB_HOME_NAVBAR_DATA, md5(serialize($data)), $channel);
67 $menu = Cache::get($key); 68 $menu = Cache::get($key);