Authored by whb

修改navbanner

... ... @@ -465,9 +465,10 @@ class WebAction extends Controller_Abstract
*/
protected function setWebNavHeader($channel = '')
{
// if(empty($channel)) {
// $channel = \Index\HomeModel::getSwitchChannel();
// }
//TODO
if(empty($channel)) {
$channel = \Index\HomeModel::getSwitchChannel();
}
// else {//设置频道
// \Index\HomeModel::setSwitchToCookie($channel);
// }
... ...
... ... @@ -5,6 +5,7 @@ use LibModels\Web\Home\IndexData;
use Plugin\Cache;
use Configs\CacheConfig;
use Api\Yohobuy;
use Plugin\Images;
class CommonController extends WebAction
{
... ... @@ -95,7 +96,6 @@ class CommonController extends WebAction
}
else
{
$data = json_decode($data, true);
$banner = '';
if(isset($data['data'][0]['data']))
{
... ...
... ... @@ -62,6 +62,7 @@ class HomeModel
if (empty($data)) {
return array();
}
$menu = array();
$key = sprintf('%s_%s_%s',CacheConfig::KEY_WEB_HOME_NAVBAR_DATA, md5(serialize($data)), $channel);
$menu = Cache::get($key);
... ...