作者 Your Name
@@ -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]);
@@ -486,6 +486,7 @@ class RankDataLogic extends BaseLogic @@ -486,6 +486,7 @@ class RankDataLogic extends BaseLogic
486 //保证关键词数 486 //保证关键词数
487 $keyword_num = DeployBuild::where('project_id', $project_id)->value('keyword_num'); 487 $keyword_num = DeployBuild::where('project_id', $project_id)->value('keyword_num');
488 $type = Project::where('id', $project_id)->value('type'); 488 $type = Project::where('id', $project_id)->value('type');
  489 + $model_is_compliance = $model->is_compliance;
489 $model->is_compliance = 0; 490 $model->is_compliance = 0;
490 //是否达标 491 //是否达标
491 $is_compliance = $first_page_num >= $keyword_num; 492 $is_compliance = $first_page_num >= $keyword_num;
@@ -495,7 +496,7 @@ class RankDataLogic extends BaseLogic @@ -495,7 +496,7 @@ class RankDataLogic extends BaseLogic
495 if ($keyword_num && $type == Project::TYPE_TWO && $is_compliance) { 496 if ($keyword_num && $type == Project::TYPE_TWO && $is_compliance) {
496 Log::channel('rank_data')->info('项目' . $project_id . ':关键词达标'. $keyword_num .' - ' . $first_page_num . ' - ' . $first_page_without_extension_num); 497 Log::channel('rank_data')->info('项目' . $project_id . ':关键词达标'. $keyword_num .' - ' . $first_page_num . ' - ' . $first_page_without_extension_num);
497 //项目表更新 498 //项目表更新
498 - if (($model->updated_date != date('Y-m-d') || empty($model->is_compliance)) && !$lang) { 499 + if (($model->updated_date != date('Y-m-d') || empty($model_is_compliance)) && !$lang) {
499 $compliance_day = Project::where(['id' => $project_id])->value('finish_remain_day') ?: 0; 500 $compliance_day = Project::where(['id' => $project_id])->value('finish_remain_day') ?: 0;
500 Project::where('id', $project_id)->update(['is_remain_today' => 1, 'finish_remain_day' => $compliance_day + 1]); 501 Project::where('id', $project_id)->update(['is_remain_today' => 1, 'finish_remain_day' => $compliance_day + 1]);
501 Log::channel('rank_data')->info('项目' . $project_id . '达标天数+1:'. ($compliance_day + 1)); 502 Log::channel('rank_data')->info('项目' . $project_id . '达标天数+1:'. ($compliance_day + 1));