diff --git a/app/apis/controller/AdController.php b/app/apis/controller/AdController.php index 72bf6ee..9f5dd54 100644 --- a/app/apis/controller/AdController.php +++ b/app/apis/controller/AdController.php @@ -41,7 +41,10 @@ class AdController extends BaseController { if ($scene === 'default') { - + $item['alt'] = isset($item['translation']) ? $item['translation']['alt'] : ''; + $item['title'] = isset($item['translation']) ? $item['translation']['title'] : ''; + unset($item['translation']); + $item['full_image'] = (new \app\mzl\modules\upload\service\OssService())->generatePrivateUrl($item['image']); } return $item; diff --git a/app/console/controller/AdController.php b/app/console/controller/AdController.php index 7e34f6a..60652db 100644 --- a/app/console/controller/AdController.php +++ b/app/console/controller/AdController.php @@ -41,7 +41,10 @@ class AdController extends BaseController { if ($scene === 'default') { - + $item['alt'] = isset($item['translation']) ? $item['translation']['alt'] : ''; + $item['title'] = isset($item['translation']) ? $item['translation']['title'] : ''; + unset($item['translation']); + $item['full_image'] = (new \app\mzl\modules\upload\service\OssService())->generatePrivateUrl($item['image']); } return $item;