From 4cf786db4caf3ec41f43570780143cd581e8248c Mon Sep 17 00:00:00 2001 From: weigang Date: Thu, 27 Aug 2020 17:04:08 +0800 Subject: [PATCH] Img fix --- app/Service/AttachmentService.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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; }