弹幕不分页
This commit is contained in:
@@ -17,6 +17,28 @@ class BarrageController extends BaseController
|
||||
$this->service = new BarrageService();
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取列表
|
||||
*
|
||||
* @param Request $request 请求对象
|
||||
* @return mixed 返回分页数据及总数
|
||||
*/
|
||||
public function preset(Request $request)
|
||||
{
|
||||
try {
|
||||
$raw = $this->service->serviceListAll($request);
|
||||
$data = [];
|
||||
foreach ($raw as $item) {
|
||||
unset($item['created_at']);
|
||||
unset($item['updated_at']);
|
||||
$data[] = $this->indexFormat($item);
|
||||
}
|
||||
return $this->success($data);
|
||||
} catch (\Throwable $e) {
|
||||
return $this->error($e->getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取列表
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user