作者 李宇航

合并分支 'lyh-server' 到 'master'

变更数据



查看合并请求 !3298
@@ -1651,7 +1651,7 @@ if (!function_exists('httpGetSsl')) { @@ -1651,7 +1651,7 @@ if (!function_exists('httpGetSsl')) {
1651 */ 1651 */
1652 function outMessage($filename = 'lyh_info',$message = '') 1652 function outMessage($filename = 'lyh_info',$message = '')
1653 { 1653 {
1654 - @file_put_contents(storage_path('logs/'.$filename.'.log'), "上传失败: " . $message . PHP_EOL, FILE_APPEND); 1654 + @file_put_contents(storage_path('logs/'.$filename.'.log'), "错误信息: " . $message . PHP_EOL, FILE_APPEND);
1655 return true; 1655 return true;
1656 } 1656 }
1657 } 1657 }
@@ -364,7 +364,7 @@ class ImageController extends Controller @@ -364,7 +364,7 @@ class ImageController extends Controller
364 $res = $amazonS3Service->uploadFiles($file,$this->path,$fileName); 364 $res = $amazonS3Service->uploadFiles($file,$this->path,$fileName);
365 } 365 }
366 if($res === false){ 366 if($res === false){
367 - outMessage('upload_images','文件上传失败'.$name); 367 + outMessage('upload_images','图片上传失败'.$name);
368 continue; 368 continue;
369 } 369 }
370 $this->synchronizationImage($fileName,$this->upload_location); 370 $this->synchronizationImage($fileName,$this->upload_location);
@@ -707,6 +707,9 @@ class ImageController extends Controller @@ -707,6 +707,9 @@ class ImageController extends Controller
707 $info = $imageSetting->read(['project_id'=>$this->cache['project_id']]); 707 $info = $imageSetting->read(['project_id'=>$this->cache['project_id']]);
708 $domain = 'http://globalso-v6-1309677403.cos.ap-hongkong.myqcloud.com';//cos域名 708 $domain = 'http://globalso-v6-1309677403.cos.ap-hongkong.myqcloud.com';//cos域名
709 if($is_image){ 709 if($is_image){
  710 + if(empty($data['image'])){
  711 + $this->response('开启图片水印需要先关闭水印功能,重新上传水印图片'.Code::SYSTEM_ERROR);
  712 + }
710 $param = [ 713 $param = [
711 'image/'.$domain.($data['image'] ?? ''),//图片 714 'image/'.$domain.($data['image'] ?? ''),//图片
712 'gravity/'.($data['gravity'] ?? 'SouthEast'), 715 'gravity/'.($data['gravity'] ?? 'SouthEast'),