diff --git a/crmeb/app/services/system/config/SystemConfigServices.php b/crmeb/app/services/system/config/SystemConfigServices.php index c75d00383..2ac149167 100644 --- a/crmeb/app/services/system/config/SystemConfigServices.php +++ b/crmeb/app/services/system/config/SystemConfigServices.php @@ -177,6 +177,17 @@ class SystemConfigServices extends BaseServices ], 'show_value' => 1 ], + 'image_thumbnail_status' => [ + 'son_type' => [ + 'thumb_big_width' => '', + 'thumb_big_height' => '', + 'thumb_mid_width' => '', + 'thumb_mid_height' => '', + 'thumb_small_width' => '', + 'thumb_small_height' => '', + ], + 'show_value' => 1 + ], 'image_watermark_status' => [ 'son_type' => [ 'watermark_type' => [ diff --git a/crmeb/crmeb/services/upload/storage/Cos.php b/crmeb/crmeb/services/upload/storage/Cos.php index 00a95b9a0..e0f39833a 100644 --- a/crmeb/crmeb/services/upload/storage/Cos.php +++ b/crmeb/crmeb/services/upload/storage/Cos.php @@ -199,7 +199,7 @@ class Cos extends BaseUpload $height = 'thumb_' . $v . '_height'; $width = 'thumb_' . $v . '_width'; $key = 'filePath' . ucfirst($v); - if (isset($config[$height]) && isset($config[$width]) && $config[$height] && $config[$width]) { + if (sys_config('image_thumbnail_status', 1) && isset($config[$height]) && isset($config[$width]) && $config[$height] && $config[$width]) { $this->fileInfo->$key = $filePath . '?imageMogr2/thumbnail/' . $config[$width] . 'x' . $config[$height]; $this->fileInfo->$key = $this->water($this->fileInfo->$key); $data[$v] = $this->fileInfo->$key; diff --git a/crmeb/crmeb/services/upload/storage/Local.php b/crmeb/crmeb/services/upload/storage/Local.php index 378fbe6a6..434b165da 100644 --- a/crmeb/crmeb/services/upload/storage/Local.php +++ b/crmeb/crmeb/services/upload/storage/Local.php @@ -139,7 +139,7 @@ class Local extends BaseUpload $this->fileInfo->realName = $fileHandle->getOriginalName(); $this->fileInfo->fileName = $this->fileInfo->uploadInfo->getFilename(); $this->fileInfo->filePath = $this->defaultPath . '/' . str_replace('\\', '/', $fileName); - if ($this->checkImage(public_path() . $this->fileInfo->filePath) && $this->authThumb) { + if ($this->checkImage(public_path() . $this->fileInfo->filePath) && $this->authThumb && pathinfo($fileName,PATHINFO_EXTENSION) != 'ico') { try { $this->thumb($this->fileInfo->filePath); } catch (\Throwable $e) { diff --git a/crmeb/crmeb/services/upload/storage/Oss.php b/crmeb/crmeb/services/upload/storage/Oss.php index 7c6f9876e..b5e898c2e 100644 --- a/crmeb/crmeb/services/upload/storage/Oss.php +++ b/crmeb/crmeb/services/upload/storage/Oss.php @@ -199,7 +199,7 @@ class Oss extends BaseUpload $height = 'thumb_' . $v . '_height'; $width = 'thumb_' . $v . '_width'; $key = 'filePath' . ucfirst($v); - if (isset($config[$height]) && isset($config[$width]) && $config[$height] && $config[$width]) { + if (sys_config('image_thumbnail_status', 1) && isset($config[$height]) && isset($config[$width]) && $config[$height] && $config[$width]) { $this->fileInfo->$key = $filePath . '?x-oss-process=image/resize,h_' . $config[$height] . ',w_' . $config[$width]; $this->fileInfo->$key = $this->water($this->fileInfo->$key); $data[$v] = $this->fileInfo->$key; diff --git a/crmeb/crmeb/services/upload/storage/Qiniu.php b/crmeb/crmeb/services/upload/storage/Qiniu.php index cca5d4553..9d9c5d47f 100644 --- a/crmeb/crmeb/services/upload/storage/Qiniu.php +++ b/crmeb/crmeb/services/upload/storage/Qiniu.php @@ -200,7 +200,7 @@ class Qiniu extends BaseUpload $height = 'thumb_' . $v . '_height'; $width = 'thumb_' . $v . '_width'; $key = 'filePath' . ucfirst($v); - if (isset($config[$height]) && isset($config[$width]) && $config[$height] && $config[$width]) { + if (sys_config('image_thumbnail_status', 1) && isset($config[$height]) && isset($config[$width]) && $config[$height] && $config[$width]) { $this->fileInfo->$key = $filePath . '?imageView2/2/w/' . $config[$width] . '/h/' . $config[$height]; $this->fileInfo->$key = $this->water($this->fileInfo->$key); $data[$v] = $this->fileInfo->$key;