refactor: 附件/视频搜索

This commit is contained in:
2025-04-16 13:39:19 +08:00
parent 721904f7e3
commit bc5022b2d6
9 changed files with 56 additions and 22 deletions

View File

@@ -21,6 +21,7 @@ class Attachment extends Common
{
$param = request()->param([
'id',
'keyword',
'page/d' => 1,
'size/d' => 12,
]);
@@ -47,6 +48,7 @@ class Attachment extends Common
'support_platform',
'attach',
])
->withSearch(['name'], ['name' => $param['keyword']??null])
->language($this->lang_id)
->category($param['id']??null)
->order(['sort' => 'asc', 'id' => 'desc'])
@@ -70,6 +72,7 @@ class Attachment extends Common
{
$param = request()->param([
'id',
'keyword',
'page/d' => 1,
'size/d' => 12
]);
@@ -106,6 +109,7 @@ class Attachment extends Common
'video',
'link'
])
->withSearch(['name'], ['name' => $param['keyword']??null])
->language($this->lang_id)
->category($param['id']??null)
->order(['sort' => 'asc', 'id' => 'desc'])