调整首页接口和返回数据
This commit is contained in:
@@ -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));
|
||||
|
||||
Reference in New Issue
Block a user