作者 刘锟

amp站点图片添加宽高属性

@@ -28,13 +28,13 @@ class WebSettingAmpLogic extends BaseLogic @@ -28,13 +28,13 @@ class WebSettingAmpLogic extends BaseLogic
28 return $this->success(); 28 return $this->success();
29 } 29 }
30 //log图处理 30 //log图处理
31 - if(!empty($info['top_logo'])){  
32 $info['top_logo'] = Arr::s2a($info['top_logo']); 31 $info['top_logo'] = Arr::s2a($info['top_logo']);
  32 + if(!empty($info['top_logo'])){
33 $info['top_logo']['url'] = getImageUrl($info['top_logo']['url'], $this->user['storage_type'], $this->user['project_location']); 33 $info['top_logo']['url'] = getImageUrl($info['top_logo']['url'], $this->user['storage_type'], $this->user['project_location']);
34 } 34 }
35 //banner处理 35 //banner处理
36 - if (!empty($info['index_banner'])) {  
37 $info['index_banner'] = Arr::s2a($info['index_banner']); 36 $info['index_banner'] = Arr::s2a($info['index_banner']);
  37 + if (!empty($info['index_banner'])) {
38 foreach ($info['index_banner'] as &$v) { 38 foreach ($info['index_banner'] as &$v) {
39 $v['url'] = getImageUrl($v['url'], $this->user['storage_type'], $this->user['project_location']); 39 $v['url'] = getImageUrl($v['url'], $this->user['storage_type'], $this->user['project_location']);
40 } 40 }