作者 李宇航

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

Master lyh edit



查看合并请求 !588
@@ -347,7 +347,7 @@ class FileController @@ -347,7 +347,7 @@ class FileController
347 // 设置响应头 347 // 设置响应头
348 header('Content-Description: File Transfer'); 348 header('Content-Description: File Transfer');
349 header('Content-Type: application/octet-stream'); 349 header('Content-Type: application/octet-stream');
350 - header('Content-Disposition: attachment; filename="' . $info['name'] . '"'); 350 + header('Content-Disposition: attachment; filename="' . !empty($info['name']) ? $info['name'] : '未命名'.basename($info['path']) . '"');
351 // 下载文件 351 // 下载文件
352 readfile($fileUrl); 352 readfile($fileUrl);
353 } 353 }
@@ -30,8 +30,8 @@ class BlogLogic extends BaseLogic @@ -30,8 +30,8 @@ class BlogLogic extends BaseLogic
30 */ 30 */
31 public function blogSave(){ 31 public function blogSave(){
32 //拼接参数 32 //拼接参数
33 - DB::beginTransaction();  
34 - try { 33 +// DB::beginTransaction();
  34 +// try {
35 $this->param = $this->paramProcessing($this->param); 35 $this->param = $this->paramProcessing($this->param);
36 if(isset($this->param['id']) && !empty($this->param['id'])){ 36 if(isset($this->param['id']) && !empty($this->param['id'])){
37 $id = $this->param['id']; 37 $id = $this->param['id'];
@@ -48,11 +48,11 @@ class BlogLogic extends BaseLogic @@ -48,11 +48,11 @@ class BlogLogic extends BaseLogic
48 $route = RouteMap::setRoute($this->param['url'], RouteMap::SOURCE_BLOG, $id, $this->user['project_id']); 48 $route = RouteMap::setRoute($this->param['url'], RouteMap::SOURCE_BLOG, $id, $this->user['project_id']);
49 $this->edit(['url'=>$route],['id'=>$id]); 49 $this->edit(['url'=>$route],['id'=>$id]);
50 } 50 }
51 - DB::commit();  
52 - }catch (\Exception $e){  
53 - DB::rollBack();  
54 - $this->fail('系统错误,请联系管理员');  
55 - } 51 +// DB::commit();
  52 +// }catch (\Exception $e){
  53 +// DB::rollBack();
  54 +// $this->fail('系统错误,请联系管理员');
  55 +// }
56 $this->addUpdateNotify(RouteMap::SOURCE_BLOG,$route); 56 $this->addUpdateNotify(RouteMap::SOURCE_BLOG,$route);
57 $this->curlDelRoute(['new_route'=>$route]); 57 $this->curlDelRoute(['new_route'=>$route]);
58 return $this->success(['id'=>$id]); 58 return $this->success(['id'=>$id]);