|
@@ -22,7 +22,14 @@ class FirstPageController extends CatchController
|
|
|
public function list(Request $request) {
|
|
|
$firstPageListTypeMap = CommonConfigService::getFirstPageListTypeMap();
|
|
|
$miniprogramTypeMap = CommonConfigService::getMiniprogramTypeMap();
|
|
|
+ $miniprogramType = $request->input('miniprogram_type');
|
|
|
+ $firstPageListType = $request->input('type');
|
|
|
$result = DB::table('first_pages')
|
|
|
+ ->when($miniprogramType, function ($query, $miniprogramType){
|
|
|
+ return $query->where('miniprogram_type', $miniprogramType);
|
|
|
+ })->when($firstPageListType, function ($query, $firstPageListType){
|
|
|
+ return $query->where('type', $firstPageListType);
|
|
|
+ })->orderBy('status', 'desc')
|
|
|
->orderBy('id', 'desc')
|
|
|
->paginate($request->input('limit', 15));
|
|
|
foreach ($result as $item) {
|