lishiyeaaron hace 5 años
padre
commit
dfc8f93f78

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

@@ -40,6 +40,7 @@ class UserShelfBooksController extends BaseController
      * @apiSuccess {Int}         data.last_cid   最后章节id
      * @apiSuccess {String}      data.last_chapter  最新章节
      * @apiSuccess {String}      data.last_chapter  最近阅读章节
+     * @apiSuccess {String}      data.recent_cid  最近阅读章节id
      * @apiSuccessExample {json} Success-Response:
      *     HTTP/1.1 200 OK
      *     {
@@ -56,6 +57,7 @@ class UserShelfBooksController extends BaseController
      *                   cover: "https://leyue-bucket.oss-cn-hangzhou.aliyuncs.com/ycsd_cover/covermiddle/0/1.jpg",
      *                   updated_at: 1511783068,
      *                   last_cid: 4,
+     *                   recent_cid:5,
      *                   last_chapter:"最新 第122章 大事不妙",
      *                   recent_reading_chapter:"最近阅读:第5章 又来?"
      *
@@ -69,6 +71,7 @@ class UserShelfBooksController extends BaseController
      *                   cover: "https://leyue-bucket.oss-cn-hangzhou.aliyuncs.com/ycsd_cover/covermiddle/0/11.jpg",
      *                   updated_at: 1511783068,
      *                   last_cid: 4,
+     *                   recent_cid:5,
      *                   last_chapter:"最新 第2556章 又来了个张老三",
      *                   recent_reading_chapter:"最近阅读:第2551章 又来了个猪八戒"
      *               }
@@ -99,6 +102,7 @@ class UserShelfBooksController extends BaseController
                 if($v['bid'] == $val['bid']){
                     $v['updated_at'] = $val['time'];
                     $recent_reading_cid = $val['cid'];
+                    $v['recent_cid'] = $recent_reading_cid;
                     $recent_reading_chapter = ChapterService::getChapterNameById($recent_reading_cid,$bid);
                     $v['recent_reading_chapter'] = "最近阅读:{$recent_reading_chapter['name']}";
                     break;