diff --git a/app/Service/AttachmentService.php b/app/Service/AttachmentService.php index a788e6c..c576be9 100644 --- a/app/Service/AttachmentService.php +++ b/app/Service/AttachmentService.php @@ -74,12 +74,12 @@ class AttachmentService implements AttachmentServiceInterface public function switchImgToAliOss($path, $bucket = 'thumbnail_q50') { if (strpos($path, 'http') === false || strpos($path, 'https') === false) { - $path = 'https://img.lanzulive.com/' . $path; + $path = env('IMG_HOST') . $path; } else { $temp = explode('//', $path); $temp = explode('/', $temp[1]); unset($temp[0]); - $path = 'https://img.lanzulive.com/' . implode('/', $temp); + $path = env('IMG_HOST') . implode('/', $temp); } return $path . '!' . $bucket; }