Authored by whb

common的广告修改

... ... @@ -85,6 +85,8 @@ class CommonController extends WebAction
$content_code = $this->get('content_code', '');
$client_type = $this->get('client_type', 'web');
$callback = $this->get('callback', '');
$width = $this->get('width', '');
$height = $this->get('height', '');
$params = array(
'content_code' => $content_code,
'client_type' => $client_type
... ... @@ -100,9 +102,12 @@ class CommonController extends WebAction
if(isset($data['data'][0]['data']))
{
$banner = current($data['data'][0]['data']);
if(!empty($banner)) {
$banner['src'] = Images::getImageUrl($banner['src'], 2600, 60 ,2);
if(empty($width) || empty($height) ) {
$width = 2600;//通栏广告
$height = 60;
}
$banner['src'] = Images::getImageUrl($banner['src'], $width, $height ,2);
//str_replace('?imageView/{mode}/w/{width}/h/{height}', '', $banner['src']);
}
}
... ...
... ... @@ -75,7 +75,8 @@ class HomeModel
'link' => $val['sort_url'],
'icon' => $val['sort_ico'],
'classname' => str_replace(' ', '', strtolower($val['sort_name_en'])) == $channel ? $channel : '',
'index_main' => $index_main++,
'index_main' => $index_main ++,
'content_code' => $val['content_code'],
'is_hot' => $val['is_hot'] == 'Y' ? true : false,
'is_new' => $val['is_new'] == 'Y' ? true : false,
// 'subnav' => array()
... ... @@ -88,6 +89,7 @@ class HomeModel
'link' => $sub['sort_url'],
'is_hot' => $sub['is_hot'] == 'Y' ? true : false,
'is_new' => $sub['is_new'] == 'Y' ? true : false,
'content_code' => $sub['content_code'],
// 'thirdnav' => array(),
'index_sub' => $index_sub ++
);
... ... @@ -97,6 +99,7 @@ class HomeModel
'title' => $thirdsub['sort_name'],
'name_en' => $thirdsub['sort_name_en'],
'link' => $thirdsub['sort_url'],
'content_code' => $thirdsub['content_code'],
// 'branditems' => array()
);
if (isset($thirdsub['sub'])) {
... ...