正在显示
1 个修改的文件
包含
1 行增加
和
6 行删除
| @@ -69,12 +69,7 @@ class DetailController extends BaseController | @@ -69,12 +69,7 @@ class DetailController extends BaseController | ||
| 69 | * @time :2024/11/12 15:07 | 69 | * @time :2024/11/12 15:07 |
| 70 | */ | 70 | */ |
| 71 | public function getColumn(Column $column){ | 71 | public function getColumn(Column $column){ |
| 72 | - $this->request->validate([ | ||
| 73 | - 'product_id'=>'required' | ||
| 74 | - ],[ | ||
| 75 | - 'product_id.required' => '产品id不能为空' | ||
| 76 | - ]); | ||
| 77 | - $this->map['product_id'] = ['in',[0,$this->map['product_id']]]; | 72 | + $this->map['product_id'] = ['in',[0,$this->map['product_id'] ?? 0]]; |
| 78 | $data = $column->list($this->map,'id',['*'],'asc'); | 73 | $data = $column->list($this->map,'id',['*'],'asc'); |
| 79 | $this->response('success',Code::SUCCESS,$data); | 74 | $this->response('success',Code::SUCCESS,$data); |
| 80 | } | 75 | } |
-
请 注册 或 登录 后发表评论