Parcourir la source

fix 书架有、阅读记录没有导致 书架无法继续阅读

songdb il y a 4 ans
Parent
commit
cc08c90ccc

+ 6 - 0
app/Http/Controllers/QuickApp/User/UserShelfBooksController.php

@@ -37,6 +37,12 @@ class UserShelfBooksController extends BaseController
                     break;
                 }
             }
+
+            //补充逻辑 书架有、阅读记录没有场景
+            if(!isset($v['recent_cid']))
+            {
+                $v['recent_cid']             = $v['first_cid'];
+            }
         }
         return response()->collection(new UserShelfBooksTransformer(), $res);
     }