Explorar o código

'为空或为0判断'

zhuchengjie %!s(int64=3) %!d(string=hai) anos
pai
achega
ffdb0f6e0f
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      app/Http/Controllers/QuickApp/Book/BookController.php

+ 1 - 1
app/Http/Controllers/QuickApp/Book/BookController.php

@@ -336,7 +336,7 @@ class BookController extends BaseController
     {
         $category_id = $request->input('category_id');
         $bid         = $request->input('bid');
-        if (empty($bid) || empty($category_id)) {
+        if (empty($bid) || (empty($category_id) && $category_id != 0)) {
             return response()->error('PARAM_ERROR');
         }
         $bid   = BookService::decodeBidStatic($bid);