作者 lyh

gx

@@ -70,6 +70,11 @@ class FileController @@ -70,6 +70,11 @@ class FileController
70 if ($info === false) { 70 if ($info === false) {
71 $this->response('指定文件不存在!', Code::USER_ERROR); 71 $this->response('指定文件不存在!', Code::USER_ERROR);
72 } 72 }
  73 + //获取cos链接
  74 + if($info['cos'] == 1){
  75 + $cos = new CosService();
  76 + return $cos->getImageUrl($info['path']);
  77 + }
73 $path = $this->config['root'].'/'.$info['path']; 78 $path = $this->config['root'].'/'.$info['path'];
74 if (!is_file($path)) { 79 if (!is_file($path)) {
75 $this->response('指定文件已被系统删除!', Code::USER_ERROR); 80 $this->response('指定文件已被系统删除!', Code::USER_ERROR);