调整首页接口和返回数据

This commit is contained in:
2023-01-18 16:13:16 +08:00
parent bc463d44a2
commit 9f44774e86
5 changed files with 60 additions and 30 deletions

View File

@@ -64,15 +64,15 @@ class OrderController extends Controller
}, function ($query) {
$query->common();
})
// ->when($type, function ($q) use ($type) {
// if ($type == 'score') {
// $q->TypeScore();
// }
//
// if ($type == 'sample') {
// $q->TypeSample();
// }
// })
->when($type, function ($q) use ($type) {
if ($type == 'score') {
$q->TypeScore();
}
if ($type == 'sample') {
$q->TypeSample();
}
})
->paginate();
return $this->success(new OrderCollection($list));