正在显示
3 个修改的文件
包含
11 行增加
和
1 行删除
| @@ -182,6 +182,11 @@ class BlogLogic extends BaseLogic | @@ -182,6 +182,11 @@ class BlogLogic extends BaseLogic | ||
| 182 | }else{ | 182 | }else{ |
| 183 | $param['category_id'] = ''; | 183 | $param['category_id'] = ''; |
| 184 | } | 184 | } |
| 185 | + if(isset($this->param['release_at']) && !empty(($this->param['release_at'])) && ($this->param['status'] == 3)){ | ||
| 186 | + if($this->param['release_at'] < date('Y-m-d 23:59:59')){ | ||
| 187 | + $this->fail('发布时间需大于当天'); | ||
| 188 | + } | ||
| 189 | + } | ||
| 185 | return $this->success($param); | 190 | return $this->success($param); |
| 186 | } | 191 | } |
| 187 | 192 |
| @@ -201,6 +201,11 @@ class NewsLogic extends BaseLogic | @@ -201,6 +201,11 @@ class NewsLogic extends BaseLogic | ||
| 201 | }else{ | 201 | }else{ |
| 202 | $param['category_id'] = ''; | 202 | $param['category_id'] = ''; |
| 203 | } | 203 | } |
| 204 | + if(isset($this->param['release_at']) && !empty(($this->param['release_at'])) && ($this->param['status'] == 3)){ | ||
| 205 | + if($this->param['release_at'] < date('Y-m-d 23:59:59')){ | ||
| 206 | + $this->fail('发布时间需大于当天'); | ||
| 207 | + } | ||
| 208 | + } | ||
| 204 | return $this->success($param); | 209 | return $this->success($param); |
| 205 | } | 210 | } |
| 206 | 211 |
| @@ -315,7 +315,7 @@ class ProductLogic extends BaseLogic | @@ -315,7 +315,7 @@ class ProductLogic extends BaseLogic | ||
| 315 | }else{ | 315 | }else{ |
| 316 | $param['icon'] = Arr::a2s([]); | 316 | $param['icon'] = Arr::a2s([]); |
| 317 | } | 317 | } |
| 318 | - if(isset($this->param['send_time']) && !empty(($this->param['send_time']))){ | 318 | + if(isset($this->param['send_time']) && !empty(($this->param['send_time'])) && ($this->param['status'] == 3)){ |
| 319 | if($this->param['send_time'] < date('Y-m-d 23:59:59')){ | 319 | if($this->param['send_time'] < date('Y-m-d 23:59:59')){ |
| 320 | $this->fail('发布时间需大于当天'); | 320 | $this->fail('发布时间需大于当天'); |
| 321 | } | 321 | } |
-
请 注册 或 登录 后发表评论