作者 lyh

列表页聚合页模式

@@ -117,7 +117,12 @@ class AiVideoAutoPublish extends Command @@ -117,7 +117,12 @@ class AiVideoAutoPublish extends Command
117 } 117 }
118 $data['title'] = $info['title']; 118 $data['title'] = $info['title'];
119 $data['remark'] = $info['intro']; 119 $data['remark'] = $info['intro'];
120 - $data['images'] = array_walk($info['gallery'], function (&$item) {$item['alt'] = $item['title'];unset($item['title']);}); 120 + $data['images'] = array_map(function ($item) {
  121 + return [
  122 + 'alt' => $item['title'],
  123 + 'url' => $item['url'] ?? '',
  124 + ];
  125 + }, $info['gallery']);
121 return $data; 126 return $data;
122 }else{ 127 }else{
123 //聚合页获取当前关联产品的图片 128 //聚合页获取当前关联产品的图片