Просмотр исходного кода

云存储水印和缩略图问题修复

evoxwht 4 лет назад
Родитель
Сommit
cd145b73ad

+ 1 - 1
crmeb/crmeb/services/upload/storage/Cos.php

@@ -198,8 +198,8 @@ class Cos extends BaseUpload
                 if ($type == 'all' || $type == $v) {
                 if ($type == 'all' || $type == $v) {
                     $height = 'thumb_' . $v . '_height';
                     $height = 'thumb_' . $v . '_height';
                     $width = 'thumb_' . $v . '_width';
                     $width = 'thumb_' . $v . '_width';
+                    $key = 'filePath' . ucfirst($v);
                     if (isset($config[$height]) && isset($config[$width]) && $config[$height] && $config[$width]) {
                     if (isset($config[$height]) && isset($config[$width]) && $config[$height] && $config[$width]) {
-                        $key = 'filePath' . ucfirst($v);
                         $this->fileInfo->$key = $filePath . '?imageMogr2/thumbnail/' . $config[$width] . 'x' . $config[$height];
                         $this->fileInfo->$key = $filePath . '?imageMogr2/thumbnail/' . $config[$width] . 'x' . $config[$height];
                         $this->fileInfo->$key = $this->water($this->fileInfo->$key);
                         $this->fileInfo->$key = $this->water($this->fileInfo->$key);
                         $data[$v] = $this->fileInfo->$key;
                         $data[$v] = $this->fileInfo->$key;

+ 1 - 1
crmeb/crmeb/services/upload/storage/Oss.php

@@ -198,8 +198,8 @@ class Oss extends BaseUpload
                 if ($type == 'all' || $type == $v) {
                 if ($type == 'all' || $type == $v) {
                     $height = 'thumb_' . $v . '_height';
                     $height = 'thumb_' . $v . '_height';
                     $width = 'thumb_' . $v . '_width';
                     $width = 'thumb_' . $v . '_width';
+                    $key = 'filePath' . ucfirst($v);
                     if (isset($config[$height]) && isset($config[$width]) && $config[$height] && $config[$width]) {
                     if (isset($config[$height]) && isset($config[$width]) && $config[$height] && $config[$width]) {
-                        $key = 'filePath' . ucfirst($v);
                         $this->fileInfo->$key = $filePath . '?x-oss-process=image/resize,h_' . $config[$height] . ',w_' . $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);
                         $this->fileInfo->$key = $this->water($this->fileInfo->$key);
                         $data[$v] = $this->fileInfo->$key;
                         $data[$v] = $this->fileInfo->$key;

+ 1 - 1
crmeb/crmeb/services/upload/storage/Qiniu.php

@@ -199,8 +199,8 @@ class Qiniu extends BaseUpload
                 if ($type == 'all' || $type == $v) {
                 if ($type == 'all' || $type == $v) {
                     $height = 'thumb_' . $v . '_height';
                     $height = 'thumb_' . $v . '_height';
                     $width = 'thumb_' . $v . '_width';
                     $width = 'thumb_' . $v . '_width';
+                    $key = 'filePath' . ucfirst($v);
                     if (isset($config[$height]) && isset($config[$width]) && $config[$height] && $config[$width]) {
                     if (isset($config[$height]) && isset($config[$width]) && $config[$height] && $config[$width]) {
-                        $key = 'filePath' . ucfirst($v);
                         $this->fileInfo->$key = $filePath . '?imageView2/2/w/' . $config[$width] . '/h/' . $config[$height];
                         $this->fileInfo->$key = $filePath . '?imageView2/2/w/' . $config[$width] . '/h/' . $config[$height];
                         $this->fileInfo->$key = $this->water($this->fileInfo->$key);
                         $this->fileInfo->$key = $this->water($this->fileInfo->$key);
                         $data[$v] = $this->fileInfo->$key;
                         $data[$v] = $this->fileInfo->$key;