正在显示
1 个修改的文件
包含
5 行增加
和
4 行删除
| @@ -61,15 +61,16 @@ class CNoticeController extends BaseController | @@ -61,15 +61,16 @@ class CNoticeController extends BaseController | ||
| 61 | ],[ | 61 | ],[ |
| 62 | 'language.required' => 'language不能为空', | 62 | 'language.required' => 'language不能为空', |
| 63 | ]); | 63 | ]); |
| 64 | + $project_id_arr = env('PROJECT_ID'); | ||
| 65 | + if(in_array($this->user['project_id'],$project_id_arr)){ | ||
| 66 | + $this->response('success'); | ||
| 67 | + } | ||
| 64 | $lang_num = count($this->param['language']); | 68 | $lang_num = count($this->param['language']); |
| 65 | $keyword_num = (new Keyword())->counts(['route'=>['!=',null]]); | 69 | $keyword_num = (new Keyword())->counts(['route'=>['!=',null]]); |
| 66 | $data_num = $this->productNum() + $this->CustomNum() + $this->newsNum() + $this->blogNum(); | 70 | $data_num = $this->productNum() + $this->CustomNum() + $this->newsNum() + $this->blogNum(); |
| 67 | $number = $keyword_num * 18 + $lang_num * $data_num; | 71 | $number = $keyword_num * 18 + $lang_num * $data_num; |
| 68 | - $project_id_arr = env('PROJECT_ID'); | ||
| 69 | if($number >= 450000){ | 72 | if($number >= 450000){ |
| 70 | - if(!in_array($this->user['project_id'],$project_id_arr)){ | ||
| 71 | - $this->response('success',Code::SUCCESS,['msg'=>'翻译数量过多, 大概页面数量:'.$number.', 磁盘空间占用可能会超过40G,请联系管理员操作!']); | ||
| 72 | - } | 73 | + $this->response('success',Code::SUCCESS,['msg'=>'翻译数量过多, 大概页面数量:'.$number.', 磁盘空间占用可能会超过40G,请联系管理员操作!']); |
| 73 | } | 74 | } |
| 74 | $this->response('success'); | 75 | $this->response('success'); |
| 75 | } | 76 | } |
-
请 注册 或 登录 后发表评论