合并分支 'lyh-server' 到 'master'
Lyh server 查看合并请求 !2124
正在显示
2 个修改的文件
包含
9 行增加
和
4 行删除
| @@ -1238,12 +1238,17 @@ class ProjectController extends BaseController | @@ -1238,12 +1238,17 @@ class ProjectController extends BaseController | ||
| 1238 | * @time :2025/6/10 10:51 | 1238 | * @time :2025/6/10 10:51 |
| 1239 | */ | 1239 | */ |
| 1240 | public function generateCountCharts(){ | 1240 | public function generateCountCharts(){ |
| 1241 | + $this->request->validate([ | ||
| 1242 | + 'project_id'=>'required', | ||
| 1243 | + ],[ | ||
| 1244 | + 'project_id.required' => '项目id不能为空', | ||
| 1245 | + ]); | ||
| 1241 | $noticeModel = new NoticeLog(); | 1246 | $noticeModel = new NoticeLog(); |
| 1242 | $info = $noticeModel->read(['type'=>NoticeLog::TYPE_GENERATE_COUNT_CHARTS,'status'=>0,'data'=>['like','%"'.$this->param['project_id'].'"%']]); | 1247 | $info = $noticeModel->read(['type'=>NoticeLog::TYPE_GENERATE_COUNT_CHARTS,'status'=>0,'data'=>['like','%"'.$this->param['project_id'].'"%']]); |
| 1243 | if($info !== false){ | 1248 | if($info !== false){ |
| 1244 | $this->fail('当前数据在生成中'); | 1249 | $this->fail('当前数据在生成中'); |
| 1245 | } | 1250 | } |
| 1246 | - NoticeLog::createLog(NoticeLog::TYPE_GENERATE_COUNT_CHARTS, ['project_id' => $this->user['project_id']]); | 1251 | + NoticeLog::createLog(NoticeLog::TYPE_GENERATE_COUNT_CHARTS, ['project_id' => $this->param['project_id']]); |
| 1247 | $this->response('success'); | 1252 | $this->response('success'); |
| 1248 | } | 1253 | } |
| 1249 | } | 1254 | } |
| @@ -80,7 +80,7 @@ class News extends Base | @@ -80,7 +80,7 @@ class News extends Base | ||
| 80 | $arr = json_decode($info['values']); | 80 | $arr = json_decode($info['values']); |
| 81 | foreach ($arr as $k1=>$v1){ | 81 | foreach ($arr as $k1=>$v1){ |
| 82 | $v1 = (array)$v1; | 82 | $v1 = (array)$v1; |
| 83 | - $v1['url'] = getImageUrl($v1['url'],$this->user['storage_type'],$this->user['project_location']); | 83 | + $v1['url'] = getImageUrl($v1['url']); |
| 84 | $arr[$k1] = $v1; | 84 | $arr[$k1] = $v1; |
| 85 | } | 85 | } |
| 86 | $v['values'] = $arr; | 86 | $v['values'] = $arr; |
| @@ -89,9 +89,9 @@ class News extends Base | @@ -89,9 +89,9 @@ class News extends Base | ||
| 89 | foreach ($arr1 as $k1=>$v1){ | 89 | foreach ($arr1 as $k1=>$v1){ |
| 90 | $v1 = (array)$v1; | 90 | $v1 = (array)$v1; |
| 91 | if(isset($v1['url'])){ | 91 | if(isset($v1['url'])){ |
| 92 | - $v1['url'] = getFileUrl($v1['url'],$this->user['storage_type'],$this->user['project_location'],$this->user['file_cdn'] ?? 0); | 92 | + $v1['url'] = getFileUrl($v1['url']); |
| 93 | }else{ | 93 | }else{ |
| 94 | - $v1 = getFileUrl($v1,$this->user['storage_type'],$this->user['project_location'],$this->user['file_cdn'] ?? 0); | 94 | + $v1 = getFileUrl($v1); |
| 95 | } | 95 | } |
| 96 | $arr1[$k1] = $v1; | 96 | $arr1[$k1] = $v1; |
| 97 | } | 97 | } |
-
请 注册 或 登录 后发表评论