瀏覽代碼

fix shelf bug

songdb 4 年之前
父節點
當前提交
03e8ba4ec9
共有 1 個文件被更改,包括 5 次插入5 次删除
  1. 5 5
      app/Http/Controllers/QuickApp/User/UserShelfBooksController.php

+ 5 - 5
app/Http/Controllers/QuickApp/User/UserShelfBooksController.php

@@ -65,12 +65,12 @@ class UserShelfBooksController extends BaseController
         if (checkParam($param, ['bid'])) {
             return response()->error('LACK_PARAM');
         }
-
-        $param['uid']                     = $this->uid;
-        $param['bid']                     = Hashids::decode($param['bid'])[0];
-        $param['distribution_channel_id'] = $this->distribution_channel_id;
-        $res                              = UserShelfBooksService::create($param);
+        $res = true;
         try {
+            $param['uid']                     = $this->uid;
+            $param['bid']                     = Hashids::decode($param['bid'])[0];
+            $param['distribution_channel_id'] = $this->distribution_channel_id;
+            $res                              = UserShelfBooksService::create($param);
         } catch (\Exception $e) {
             return response()->error('QAPP_PARAM_ERROR');
         }