Authored by whb

common getbanner

@@ -101,7 +101,11 @@ class CommonController extends WebAction @@ -101,7 +101,11 @@ class CommonController extends WebAction
101 $banner = ''; 101 $banner = '';
102 if(isset($data['data'][0]['data'])) 102 if(isset($data['data'][0]['data']))
103 { 103 {
  104 + if($data['data'][0]['template_name'] == 'single_image') {
104 $banner = current($data['data'][0]['data']); 105 $banner = current($data['data'][0]['data']);
  106 + } else if($data['data'][0]['template_name'] == 'single_name_image') {
  107 + $banner = $data['data'][0]['data'];
  108 + }
105 if(!empty($banner)) { 109 if(!empty($banner)) {
106 if(empty($width) || empty($height) ) { 110 if(empty($width) || empty($height) ) {
107 $width = 2600;//通栏广告 111 $width = 2600;//通栏广告