作者 张关杰

Merge branch 'develop' of http://47.244.231.31:8099/zhl/globalso-v6 into bate

@@ -500,6 +500,15 @@ if (!function_exists('getFileUrl')) { @@ -500,6 +500,15 @@ if (!function_exists('getFileUrl')) {
500 $url[] = getFileUrl($v); 500 $url[] = getFileUrl($v);
501 } 501 }
502 }else{ 502 }else{
  503 + if(empty($path)){
  504 + return '';
  505 + }
  506 + if((strpos($path,'https://')!== false) || (strpos($path,'http://') !== false)){
  507 + return $path;
  508 + }
  509 + if(substr($path,0,2) == '//'){
  510 + return 'https:'.$path;
  511 + }
503 if($location == 1){ 512 if($location == 1){
504 $cos = config('filesystems.disks.cos'); 513 $cos = config('filesystems.disks.cos');
505 $cosCdn = $cos['cdn']; 514 $cosCdn = $cos['cdn'];
@@ -41,6 +41,8 @@ class BaseController extends Controller @@ -41,6 +41,8 @@ class BaseController extends Controller
41 $this->manage = $info; 41 $this->manage = $info;
42 Cache::put(Common::MANAGE_TOKEN . $this->token, $info, 3600 * 6);//更新缓存时间 42 Cache::put(Common::MANAGE_TOKEN . $this->token, $info, 3600 * 6);//更新缓存时间
43 $this->uid = $info['id']; 43 $this->uid = $info['id'];
  44 + //写入操作记录
  45 +
44 } 46 }
45 } 47 }
46 48
@@ -124,4 +126,5 @@ class BaseController extends Controller @@ -124,4 +126,5 @@ class BaseController extends Controller
124 $response = response($result,$result_code,$this->header); 126 $response = response($result,$result_code,$this->header);
125 throw new HttpResponseException($response); 127 throw new HttpResponseException($response);
126 } 128 }
  129 +
127 } 130 }
@@ -114,9 +114,8 @@ class FileManageController extends BaseController @@ -114,9 +114,8 @@ class FileManageController extends BaseController
114 $hash = hash_file('md5', $file->getPathname()); 114 $hash = hash_file('md5', $file->getPathname());
115 $info = FileManage::where('hash', $hash)->first(); 115 $info = FileManage::where('hash', $hash)->first();
116 if($info){ 116 if($info){
117 - $this->fail('文件已存在'.$hash); 117 + $this->fail('文件已上传,文件名称.'.$info['name']);
118 } 118 }
119 -  
120 return [ 119 return [
121 'size' => $size, 120 'size' => $size,
122 'extension' => $extension, 121 'extension' => $extension,