dyjh 6 년 전
부모
커밋
dd708794dd
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      app/Http/Controllers/Api/V1/AlbumController.php

+ 1 - 1
app/Http/Controllers/Api/V1/AlbumController.php

xqd
@@ -1457,7 +1457,7 @@ class AlbumController extends Controller
         if ($validator->fails()) {
             return $this->error(ErrorCode::CLIENT_WRONG_PARAMS, '传入参数不正确!', $validator->messages());
         }
-        $cat_id = $request->input('cat_id');
+        $cat_id = $request->input('cat_id') ?? 0;
         $store_id = request('store_id');
         $cats = AlbumCatModel::where([['parent_id',$cat_id],['store_id',$store_id]])->orderByDesc('sort')->get();
         return $this->api($cats);