<?php

namespace App\Http\Controllers\WapBrowser\Chapter;

use Illuminate\Http\Request;
use App\Http\Controllers\WapBrowser\BaseController;
use Cookie;
use App\Modules\Book\Services\ChapterService;
use App\Http\Controllers\Wap\Book\Transformers\ChapterTransformer;
use App\Modules\Book\Services\BookConfigService;
use App\Http\Controllers\Wap\Book\Transformers\ChapterListTransformer;
use App\Modules\OfficialAccount\Services\OfficialAccountService;
use App\Http\Controllers\Wap\Book\Transformers\BookTransformer;
use Hashids;
use GuzzleHttp\Client;
use Log;
use DB;

class BookController extends BaseController
{


    public function bookDetail(Request $request){
        $bid = $request->input('bid',0);
        $bid = Hashids::decode($bid)[0];
        $book_info = BookConfigService::getBookById($bid);
        if(!$book_info){
            return redirect()->to('/');
        }
        if(!in_array($book_info->is_on_shelf,[1,2])){
            return redirect()->to('/');
        }
        $book_info['is_on_user_shelf'] = 0;
        $book = itemTransform(new BookTransformer(), $book_info);
        $where = ['category_id'=>$book['book_category_id'],'is_on_shelf'=>[1]];
        $recommend_books = BookConfigService::getBooks($where,[],4);
        $data = [];
        foreach ($recommend_books as $v){
            if($v->bid != $bid && count($data) <3){
                $data[] = $v;
            }
        }
        $recommend_books = collectionTransform(new BookTransformer(),$data);
        $paginator = ChapterService::getChapterListsPage($bid, 20);
        $ret =collectionTransform(new ChapterListTransformer,$paginator);
        return $ret;
        //return response()->pagination(new ChapterListTransformer, $res);
        $book = json_decode(json_encode($book));
        //return;
        return view('wap-browser.detail',['title'=>$book->book_name,'book'=>$book,'recommend'=>$recommend_books,'catalog'=>$ret]);
    }

    public function test(Request $request){
        $id = $request->input('id',1);
        return Hashids::encode($id);
    }

    public function index(Request $request)
    {
        $bid = $request->input('bid',0);
        $cid = $request->input('cid',0);
        $oldbid = $bid;
        $bid = Hashids::decode($bid)[0];
        //获取图书信息
        $book_info = BookConfigService::getBookById($bid);


        if (empty($book_info)) return redirect()->to('/');


        if ($book_info->is_on_shelf == 0 || $book_info->is_on_shelf == 3) {
            return view('wap-browser.subscribe',['title'=>'下架']);
        }
        if ($bid == 1042 && $this->distribution_channel_id == 123) {
            return view('wap-browser.subscribe',['title'=>'下架']);
        }

        if ($book_info->is_on_shelf == 4) {
            return view('wap-browser.subscribe',['title'=>'下架']);
        }
        //获取章节信息
        $chapter = ChapterService::getChapterNameById($cid, $bid);
        if (!$chapter) {
            return redirect()->to('/');
        }
        //强关
        $force_subscribe = $book_info->force_subscribe_chapter_seq > $chapter->sequence;
        if ($force_subscribe) {

            $content = $this->getChapter($book_info, $chapter);
            $content = itemTransform(new ChapterTransformer, $content);
            return view('wap-browser.reader',['content'=>$content,'book'=>$book_info]);
        }
        //需要强制关注 没关注
        if (!$force_subscribe) {
            return redirect()->to('/subscribe');
        }
        return redirect()->to('/');
    }


    /**
     * 获取章节内容
     * @param $book
     * @param $chapter
     * @return bool|array
     */
    protected function getChapter($book, $chapter)
    {
        $chapter_content = ChapterService::getChapter($book->bid, $chapter->id);
        if (!$chapter_content) return false;
        $chapter->content = str_replace($chapter_content->name, '', $chapter_content->content);
        return $chapter;
    }

    /**
     * 获取公众号信息
     * @param $distribution_channel_id
     */
    protected function getOfficialAccount()
    {
        $distribution_channel_id = $this->distribution_channel_id;
        $res = OfficialAccountService::canUseOfficialAccountByChannelId(compact('distribution_channel_id'));
        if (isset($res->nickname) && !empty($res->nickname)) {
            Cookie::queue('force_subscribe_name', $res->nickname, env('U_COOKIE_EXPIRE'));
        }
        return $res;
    }

    /**
     * 获取二维码
     * @param $param
     * @return bool
     */
    protected function getRcodeInfo($param, $bid)
    {

        $client = new Client(['timeout' => 3.0,]);
        $param_need = [];
        try {
            $qrcode_url_res = $client->request('get', 'https://zsyauth.aizhuishu.com/api/get_qrcode_url?' . http_build_query($param_need))->getBody()->getContents();

        } catch (\Exception $e) {

        }
        return false;
    }

    /* 小说章节目录 */
    public function catalog(Request $request)
    {
        $bid = $request->input('bid',0);
        //$bid = Hashids::decode($bid)[0];
        
        return view('wap-browser.catalog', [
            'title'=>'目录',
            'bid'=>$bid
        ]);
    }

    /* 小说章节目录 */
    public function apiCatalog(Request $request)
    {
        $bid = $request->input('bid',0);
        $bid = Hashids::decode($bid)[0];
        $page_size = $request->input('page_size', 15);
        $res = ChapterService::getChapterListsPage($bid, $page_size);
        return response()->pagination(new ChapterListTransformer, $res);

//        $str = '{"code":0,"msg":"","data":{"list":[{"bid":"YwxrpDq5bGM1kPK8PZKd97eXAv0ZB3Lm","chapter_id":631907,"chapter_name":"\u7b2c1\u7ae0 \u8fd9\u662f\u4f60\u6b20\u5979\u7684","chapter_sequence":1,"chapter_is_vip":0,"chapter_size":1180,"prev_cid":0,"next_cid":631906,"recent_update_at":"2018-03-21 11:32:39"},{"bid":"YwxrpDq5bGM1kPK8PZKd97eXAv0ZB3Lm","chapter_id":631906,"chapter_name":"\u7b2c2\u7ae0 \u6ca1\u6709\u4eba\u6bd4\u4e3d\u96c5\u66f4\u91cd\u8981","chapter_sequence":2,"chapter_is_vip":0,"chapter_size":1171,"prev_cid":631907,"next_cid":631905,"recent_update_at":"2018-03-21 11:32:39"},{"bid":"YwxrpDq5bGM1kPK8PZKd97eXAv0ZB3Lm","chapter_id":631905,"chapter_name":"\u7b2c3\u7ae0 \u4f60\u4e0d\u53ef\u4ee5\u8fd9\u4e48\u505a","chapter_sequence":3,"chapter_is_vip":0,"chapter_size":1257,"prev_cid":631906,"next_cid":631904,"recent_update_at":"2018-03-21 11:32:39"},{"bid":"YwxrpDq5bGM1kPK8PZKd97eXAv0ZB3Lm","chapter_id":631904,"chapter_name":"\u7b2c4\u7ae0 \u5b69\u5b50\u662f\u8c01\u7684","chapter_sequence":4,"chapter_is_vip":0,"chapter_size":1134,"prev_cid":631905,"next_cid":631903,"recent_update_at":"2018-03-21 11:32:39"},{"bid":"YwxrpDq5bGM1kPK8PZKd97eXAv0ZB3Lm","chapter_id":631903,"chapter_name":"\u7b2c5\u7ae0 \u6211\u53ea\u6709\u4f60\u4e00\u4e2a\u7537\u4eba","chapter_sequence":5,"chapter_is_vip":0,"chapter_size":1154,"prev_cid":631904,"next_cid":631902,"recent_update_at":"2018-03-21 11:32:38"},{"bid":"YwxrpDq5bGM1kPK8PZKd97eXAv0ZB3Lm","chapter_id":631902,"chapter_name":"\u7b2c6\u7ae0 \u8fd9\u53ef\u662f\u5947\u803b\u5927\u8fb1","chapter_sequence":6,"chapter_is_vip":0,"chapter_size":1093,"prev_cid":631903,"next_cid":631901,"recent_update_at":"2018-03-21 11:32:38"},{"bid":"YwxrpDq5bGM1kPK8PZKd97eXAv0ZB3Lm","chapter_id":631901,"chapter_name":"\u7b2c7\u7ae0 \u4f60\u60f3\u5e26\u8d70\u7684\u6050\u6015\u4e0d\u6b62\u84dd\u6c90\u7433\u4e00\u4e2a\u4eba\u5427","chapter_sequence":7,"chapter_is_vip":0,"chapter_size":1204,"prev_cid":631902,"next_cid":631910,"recent_update_at":"2018-03-21 11:32:38"},{"bid":"YwxrpDq5bGM1kPK8PZKd97eXAv0ZB3Lm","chapter_id":631910,"chapter_name":"\u7b2c8\u7ae0  \u6211\u4ee5\u524d\u8fd8\u771f\u5c0f\u770b\u4e86\u4f60","chapter_sequence":8,"chapter_is_vip":0,"chapter_size":1160,"prev_cid":631901,"next_cid":631899,"recent_update_at":"2018-03-21 11:32:40"},{"bid":"YwxrpDq5bGM1kPK8PZKd97eXAv0ZB3Lm","chapter_id":631899,"chapter_name":"\u7b2c9\u7ae0 \u6b7b\u4e86\u6700\u597d","chapter_sequence":9,"chapter_is_vip":0,"chapter_size":1195,"prev_cid":631910,"next_cid":631898,"recent_update_at":"2018-03-21 11:32:38"},{"bid":"YwxrpDq5bGM1kPK8PZKd97eXAv0ZB3Lm","chapter_id":631898,"chapter_name":"\u7b2c10\u7ae0  \u6211\u548c\u6c90\u7433\u662f\u6e05\u767d\u7684","chapter_sequence":10,"chapter_is_vip":0,"chapter_size":1291,"prev_cid":631899,"next_cid":631897,"recent_update_at":"2018-03-21 11:32:37"},{"bid":"YwxrpDq5bGM1kPK8PZKd97eXAv0ZB3Lm","chapter_id":631897,"chapter_name":"\u7b2c11\u7ae0  \u4f60\u522b\u7ed9\u6211\u88c5\u6b7b","chapter_sequence":11,"chapter_is_vip":0,"chapter_size":1085,"prev_cid":631898,"next_cid":631896,"recent_update_at":"2018-03-21 11:32:37"},{"bid":"YwxrpDq5bGM1kPK8PZKd97eXAv0ZB3Lm","chapter_id":631896,"chapter_name":"\u7b2c12\u7ae0  \u4f60\u6700\u597d\u79bb\u5979\u8fdc\u4e00\u70b9","chapter_sequence":12,"chapter_is_vip":0,"chapter_size":1140,"prev_cid":631897,"next_cid":631895,"recent_update_at":"2018-03-21 11:32:37"},{"bid":"YwxrpDq5bGM1kPK8PZKd97eXAv0ZB3Lm","chapter_id":631895,"chapter_name":"\u7b2c13\u7ae0  \u5979\u6b7b\u8fd8\u662f\u4f60\u6b7b\uff0c\u4f60\u81ea\u5df1\u770b\u7740\u529e","chapter_sequence":13,"chapter_is_vip":0,"chapter_size":1151,"prev_cid":631896,"next_cid":631894,"recent_update_at":"2018-03-21 11:32:37"},{"bid":"YwxrpDq5bGM1kPK8PZKd97eXAv0ZB3Lm","chapter_id":631894,"chapter_name":"\u7b2c14\u7ae0 \u4f60\u53ef\u4e0d\u80fd\u72b9\u8c6b\u554a","chapter_sequence":14,"chapter_is_vip":0,"chapter_size":1157,"prev_cid":631895,"next_cid":631893,"recent_update_at":"2018-03-21 11:32:37"},{"bid":"YwxrpDq5bGM1kPK8PZKd97eXAv0ZB3Lm","chapter_id":631893,"chapter_name":"\u7b2c15\u7ae0 \u4f60\u4f1a\u906d\u62a5\u5e94\u7684","chapter_sequence":15,"chapter_is_vip":0,"chapter_size":1328,"prev_cid":631894,"next_cid":631857,"recent_update_at":"2018-03-21 11:32:37"},{"bid":"YwxrpDq5bGM1kPK8PZKd97eXAv0ZB3Lm","chapter_id":631857,"chapter_name":"\u7b2c16\u7ae0 \u5979\u4e0d\u4f1a\u6709\u4e8b\u513f\u7684","chapter_sequence":16,"chapter_is_vip":1,"chapter_size":1188,"prev_cid":631893,"next_cid":631856,"recent_update_at":"2018-03-21 11:32:33"},{"bid":"YwxrpDq5bGM1kPK8PZKd97eXAv0ZB3Lm","chapter_id":631856,"chapter_name":"\u7b2c17\u7ae0 \u84dd\u6c90\u7433\u662f\u6211\u7684\u59bb\u5b50","chapter_sequence":17,"chapter_is_vip":1,"chapter_size":1174,"prev_cid":631857,"next_cid":631855,"recent_update_at":"2018-03-21 11:32:33"},{"bid":"YwxrpDq5bGM1kPK8PZKd97eXAv0ZB3Lm","chapter_id":631855,"chapter_name":"\u7b2c18\u7ae0 \u4f60\u7684\u826f\u5fc3\u88ab\u72d7\u5403\u4e86\u5417","chapter_sequence":18,"chapter_is_vip":1,"chapter_size":1173,"prev_cid":631856,"next_cid":631854,"recent_update_at":"2018-03-21 11:32:33"},{"bid":"YwxrpDq5bGM1kPK8PZKd97eXAv0ZB3Lm","chapter_id":631854,"chapter_name":"\u7b2c19\u7ae0 \u522b\u6311\u6218\u6211\u7684\u5e95\u7ebf","chapter_sequence":19,"chapter_is_vip":1,"chapter_size":1068,"prev_cid":631855,"next_cid":631853,"recent_update_at":"2018-03-21 11:32:33"},{"bid":"YwxrpDq5bGM1kPK8PZKd97eXAv0ZB3Lm","chapter_id":631853,"chapter_name":"\u7b2c20\u7ae0 \u662f\u6211\u4eec\u79e6\u5bb6\u6b20\u4e86\u6c90\u7433\u8fd9\u4e2b\u5934\u7684","chapter_sequence":20,"chapter_is_vip":1,"chapter_size":1129,"prev_cid":631854,"next_cid":631852,"recent_update_at":"2018-03-21 11:32:33"},{"bid":"YwxrpDq5bGM1kPK8PZKd97eXAv0ZB3Lm","chapter_id":631852,"chapter_name":"\u7b2c21\u7ae0 \u771f\u7684\u4e0d\u7231\u5979\u4e48","chapter_sequence":21,"chapter_is_vip":1,"chapter_size":1220,"prev_cid":631853,"next_cid":631900,"recent_update_at":"2018-03-21 11:32:33"},{"bid":"YwxrpDq5bGM1kPK8PZKd97eXAv0ZB3Lm","chapter_id":631900,"chapter_name":"\u7b2c22\u7ae0 \u6211\u59bb\u5b50\u8fd8\u5728\u91cc\u9762\u5462","chapter_sequence":22,"chapter_is_vip":1,"chapter_size":1198,"prev_cid":631852,"next_cid":631850,"recent_update_at":"2018-03-21 11:32:38"},{"bid":"YwxrpDq5bGM1kPK8PZKd97eXAv0ZB3Lm","chapter_id":631850,"chapter_name":"\u7b2c23\u7ae0 \u4e0b\u8f88\u5b50\u6211\u4eec\u6ce8\u5b9a\u7ea0\u7f20\u4e0d\u6e05\u4e86","chapter_sequence":23,"chapter_is_vip":1,"chapter_size":1108,"prev_cid":631900,"next_cid":631849,"recent_update_at":"2018-03-21 11:32:33"},{"bid":"YwxrpDq5bGM1kPK8PZKd97eXAv0ZB3Lm","chapter_id":631849,"chapter_name":"\u7b2c24\u7ae0 \u8fd9\u662f\u5979\u552f\u4e00\u7559\u7ed9\u4ed6\u7684\u4e1c\u897f\u4e86","chapter_sequence":24,"chapter_is_vip":1,"chapter_size":1133,"prev_cid":631850,"next_cid":631892,"recent_update_at":"2018-03-21 11:32:33"},{"bid":"YwxrpDq5bGM1kPK8PZKd97eXAv0ZB3Lm","chapter_id":631892,"chapter_name":"\u7b2c25\u7ae0 \u592a\u592a\u600e\u4e48\u53ef\u80fd\u4e0d\u559c\u6b22\u4f60","chapter_sequence":25,"chapter_is_vip":1,"chapter_size":1147,"prev_cid":631849,"next_cid":631891,"recent_update_at":"2018-03-21 11:32:37"},{"bid":"YwxrpDq5bGM1kPK8PZKd97eXAv0ZB3Lm","chapter_id":631891,"chapter_name":"\u7b2c26\u7ae0 \u6398\u5730\u4e09\u5c3a\u4e5f\u8981\u628a\u5f90\u4e3d\u96c5\u7ed9\u6211\u627e\u51fa\u6765","chapter_sequence":26,"chapter_is_vip":1,"chapter_size":1163,"prev_cid":631892,"next_cid":631890,"recent_update_at":"2018-03-21 11:32:37"},{"bid":"YwxrpDq5bGM1kPK8PZKd97eXAv0ZB3Lm","chapter_id":631890,"chapter_name":"\u7b2c27\u7ae0 \u4ed6\u540e\u6094\u4e86\u600e\u4e48\u529e","chapter_sequence":27,"chapter_is_vip":1,"chapter_size":1231,"prev_cid":631891,"next_cid":631889,"recent_update_at":"2018-03-21 11:32:37"},{"bid":"YwxrpDq5bGM1kPK8PZKd97eXAv0ZB3Lm","chapter_id":631889,"chapter_name":"\u7b2c28\u7ae0 \u8bf7\u8ba9\u6211\u5728\u6700\u77ed\u7684\u65f6\u95f4\u91cc\u590d\u539f","chapter_sequence":28,"chapter_is_vip":1,"chapter_size":1154,"prev_cid":631890,"next_cid":631888,"recent_update_at":"2018-03-21 11:32:37"},{"bid":"YwxrpDq5bGM1kPK8PZKd97eXAv0ZB3Lm","chapter_id":631888,"chapter_name":"\u7b2c29\u7ae0 \u5979\u662f\u4ed6\u7684\u7a7a\u6c14","chapter_sequence":29,"chapter_is_vip":1,"chapter_size":1171,"prev_cid":631889,"next_cid":631887,"recent_update_at":"2018-03-21 11:32:36"},{"bid":"YwxrpDq5bGM1kPK8PZKd97eXAv0ZB3Lm","chapter_id":631887,"chapter_name":"\u7b2c30\u7ae0 \u6211\u4eec\u6709\u8bdd\u597d\u597d\u8bf4","chapter_sequence":30,"chapter_is_vip":1,"chapter_size":1213,"prev_cid":631888,"next_cid":631886,"recent_update_at":"2018-03-21 11:32:36"},{"bid":"YwxrpDq5bGM1kPK8PZKd97eXAv0ZB3Lm","chapter_id":631886,"chapter_name":"\u7b2c31\u7ae0 \u56db\u5e74\u524d\u7ed9\u6211\u6350\u8d60\u809d\u810f\u7684\u5fd7\u613f\u8005\u662f\u8c01","chapter_sequence":31,"chapter_is_vip":1,"chapter_size":1161,"prev_cid":631887,"next_cid":631885,"recent_update_at":"2018-03-21 11:32:36"},{"bid":"YwxrpDq5bGM1kPK8PZKd97eXAv0ZB3Lm","chapter_id":631885,"chapter_name":"\u7b2c32\u7ae0 \u4ed6\u89c9\u5f97\u5f90\u4e3d\u96c5\u5c31\u662f\u5929\u4f7f","chapter_sequence":32,"chapter_is_vip":1,"chapter_size":1156,"prev_cid":631886,"next_cid":631884,"recent_update_at":"2018-03-21 11:32:36"},{"bid":"YwxrpDq5bGM1kPK8PZKd97eXAv0ZB3Lm","chapter_id":631884,"chapter_name":"\u7b2c33\u7ae0  \u4ed6\u662f\u5929\u5e95\u4e0b\u6700\u5927\u7684\u8822\u6750","chapter_sequence":33,"chapter_is_vip":1,"chapter_size":1265,"prev_cid":631885,"next_cid":631883,"recent_update_at":"2018-03-21 11:32:36"},{"bid":"YwxrpDq5bGM1kPK8PZKd97eXAv0ZB3Lm","chapter_id":631883,"chapter_name":"\u7b2c34\u7ae0 \u4ed6\u79e6\u4e91\u9706\u5c31\u662f\u5e2e\u51f6","chapter_sequence":34,"chapter_is_vip":1,"chapter_size":1154,"prev_cid":631884,"next_cid":631882,"recent_update_at":"2018-03-21 11:32:36"},{"bid":"YwxrpDq5bGM1kPK8PZKd97eXAv0ZB3Lm","chapter_id":631882,"chapter_name":"\u7b2c35\u7ae0 \u5f90\u4e3d\u96c5\u8fd8\u771f\u662f\u4e2a\u4eba\u624d","chapter_sequence":35,"chapter_is_vip":1,"chapter_size":1217,"prev_cid":631883,"next_cid":631881,"recent_update_at":"2018-03-21 11:32:36"},{"bid":"YwxrpDq5bGM1kPK8PZKd97eXAv0ZB3Lm","chapter_id":631881,"chapter_name":"\u7b2c36\u7ae0 \u597d\u597d\u62db\u547c\u5f20\u533b\u751f","chapter_sequence":36,"chapter_is_vip":1,"chapter_size":1249,"prev_cid":631882,"next_cid":631880,"recent_update_at":"2018-03-21 11:32:36"},{"bid":"YwxrpDq5bGM1kPK8PZKd97eXAv0ZB3Lm","chapter_id":631880,"chapter_name":"\u7b2c37\u7ae0  \u4e00\u5207\u90fd\u662f\u82cd\u5929\u5f04\u4eba\u554a","chapter_sequence":37,"chapter_is_vip":1,"chapter_size":1230,"prev_cid":631881,"next_cid":631879,"recent_update_at":"2018-03-21 11:32:36"},{"bid":"YwxrpDq5bGM1kPK8PZKd97eXAv0ZB3Lm","chapter_id":631879,"chapter_name":"\u7b2c38\u7ae0 \u5148\u751f\uff0c\u4f60\u5728\u627e\u4e1c\u897f\u4e48","chapter_sequence":38,"chapter_is_vip":1,"chapter_size":1234,"prev_cid":631880,"next_cid":631878,"recent_update_at":"2018-03-21 11:32:36"},{"bid":"YwxrpDq5bGM1kPK8PZKd97eXAv0ZB3Lm","chapter_id":631878,"chapter_name":"\u7b2c39\u7ae0 \u592a\u592a\u5979\u4e0d\u592a\u559c\u6b22\u7d20\u8272","chapter_sequence":39,"chapter_is_vip":1,"chapter_size":1183,"prev_cid":631879,"next_cid":631877,"recent_update_at":"2018-03-21 11:32:36"},{"bid":"YwxrpDq5bGM1kPK8PZKd97eXAv0ZB3Lm","chapter_id":631877,"chapter_name":"\u7b2c40\u7ae0 \u53f6\u6d69\u7136\u53bb\u54ea\u513f\u4e86","chapter_sequence":40,"chapter_is_vip":1,"chapter_size":1212,"prev_cid":631878,"next_cid":631876,"recent_update_at":"2018-03-21 11:32:35"},{"bid":"YwxrpDq5bGM1kPK8PZKd97eXAv0ZB3Lm","chapter_id":631876,"chapter_name":"\u7b2c41\u7ae0 \u6211\u4e00\u5b9a\u8170\u5e26\u5979\u56de\u6765","chapter_sequence":41,"chapter_is_vip":1,"chapter_size":1110,"prev_cid":631877,"next_cid":631875,"recent_update_at":"2018-03-21 11:32:35"},{"bid":"YwxrpDq5bGM1kPK8PZKd97eXAv0ZB3Lm","chapter_id":631875,"chapter_name":"\u7b2c42\u7ae0 \u5979\u8fd8\u6d3b\u7740","chapter_sequence":42,"chapter_is_vip":1,"chapter_size":1182,"prev_cid":631876,"next_cid":631874,"recent_update_at":"2018-03-21 11:32:35"},{"bid":"YwxrpDq5bGM1kPK8PZKd97eXAv0ZB3Lm","chapter_id":631874,"chapter_name":"\u7b2c43\u7ae0 \u4ed6\u662f\u592a\u592a\u7684\u6d69\u7136\u54e5","chapter_sequence":43,"chapter_is_vip":1,"chapter_size":1215,"prev_cid":631875,"next_cid":631873,"recent_update_at":"2018-03-21 11:32:35"},{"bid":"YwxrpDq5bGM1kPK8PZKd97eXAv0ZB3Lm","chapter_id":631873,"chapter_name":"\u7b2c44\u7ae0 \u8fd9\u8fd8\u771f\u662f\u4e2a\u597d\u5730\u65b9","chapter_sequence":44,"chapter_is_vip":1,"chapter_size":1170,"prev_cid":631874,"next_cid":631872,"recent_update_at":"2018-03-21 11:32:35"},{"bid":"YwxrpDq5bGM1kPK8PZKd97eXAv0ZB3Lm","chapter_id":631872,"chapter_name":"\u7b2c45\u7ae0 \u79e6\u4e91\u9706\u4e5f\u662f\u4e2a\u53ef\u601c\u4eba","chapter_sequence":45,"chapter_is_vip":1,"chapter_size":1177,"prev_cid":631873,"next_cid":631871,"recent_update_at":"2018-03-21 11:32:35"},{"bid":"YwxrpDq5bGM1kPK8PZKd97eXAv0ZB3Lm","chapter_id":631871,"chapter_name":"\u7b2c46\u7ae0 \u540e\u534a\u751f\u7684\u4e00\u5207\u8bf7\u4f60\u628a\u5979\u4ea4\u7ed9\u6211","chapter_sequence":46,"chapter_is_vip":1,"chapter_size":1161,"prev_cid":631872,"next_cid":631870,"recent_update_at":"2018-03-21 11:32:35"},{"bid":"YwxrpDq5bGM1kPK8PZKd97eXAv0ZB3Lm","chapter_id":631870,"chapter_name":"\u7b2c47\u7ae0 \u6211\u60f3\u5979\u4e86","chapter_sequence":47,"chapter_is_vip":1,"chapter_size":1678,"prev_cid":631871,"next_cid":631869,"recent_update_at":"2018-03-21 11:32:35"},{"bid":"YwxrpDq5bGM1kPK8PZKd97eXAv0ZB3Lm","chapter_id":631869,"chapter_name":"\u7b2c48\u7ae0 \u522b\u8ba9\u5979\u5e26\u7740\u9057\u61be\u79bb\u5f00","chapter_sequence":48,"chapter_is_vip":1,"chapter_size":1197,"prev_cid":631870,"next_cid":631868,"recent_update_at":"2018-03-21 11:32:34"},{"bid":"YwxrpDq5bGM1kPK8PZKd97eXAv0ZB3Lm","chapter_id":631868,"chapter_name":"\u7b2c49\u7ae0 \u4ed6\u662f\u8c01\uff1f","chapter_sequence":49,"chapter_is_vip":1,"chapter_size":1201,"prev_cid":631869,"next_cid":631867,"recent_update_at":"2018-03-21 11:32:34"},{"bid":"YwxrpDq5bGM1kPK8PZKd97eXAv0ZB3Lm","chapter_id":631867,"chapter_name":"\u7b2c50\u7ae0 \u5979\u53ef\u80fd\u771f\u7684\u8d70\u706b\u5165\u9b54\u4e86","chapter_sequence":50,"chapter_is_vip":1,"chapter_size":1200,"prev_cid":631868,"next_cid":631866,"recent_update_at":"2018-03-21 11:32:34"},{"bid":"YwxrpDq5bGM1kPK8PZKd97eXAv0ZB3Lm","chapter_id":631866,"chapter_name":"\u7b2c51\u7ae0 \u8fd9\u662f\u7ed9\u6c90\u7433\u505a\u7684","chapter_sequence":51,"chapter_is_vip":1,"chapter_size":1146,"prev_cid":631867,"next_cid":631865,"recent_update_at":"2018-03-21 11:32:34"},{"bid":"YwxrpDq5bGM1kPK8PZKd97eXAv0ZB3Lm","chapter_id":631865,"chapter_name":"\u7b2c52\u7ae0 \u5bb6\u7684\u8bb0\u5fc6","chapter_sequence":52,"chapter_is_vip":1,"chapter_size":1217,"prev_cid":631866,"next_cid":631864,"recent_update_at":"2018-03-21 11:32:34"},{"bid":"YwxrpDq5bGM1kPK8PZKd97eXAv0ZB3Lm","chapter_id":631864,"chapter_name":"\u7b2c53\u7ae0 \u4f60\u8bf4\u6211\u662f\u4e0d\u662f\u592a\u50bb\u4e86","chapter_sequence":53,"chapter_is_vip":1,"chapter_size":1129,"prev_cid":631865,"next_cid":631863,"recent_update_at":"2018-03-21 11:32:34"},{"bid":"YwxrpDq5bGM1kPK8PZKd97eXAv0ZB3Lm","chapter_id":631863,"chapter_name":"\u7b2c54\u7ae0 \u7ed9\u4e91\u9706\u4e00\u4e2a\u8d4e\u7f6a\u7684\u673a\u4f1a\u5427","chapter_sequence":54,"chapter_is_vip":1,"chapter_size":1217,"prev_cid":631864,"next_cid":631862,"recent_update_at":"2018-03-21 11:32:34"},{"bid":"YwxrpDq5bGM1kPK8PZKd97eXAv0ZB3Lm","chapter_id":631862,"chapter_name":"\u7b2c55\u7ae0 \u539f\u6765\u662f\u56e0\u4e3a\u7231","chapter_sequence":55,"chapter_is_vip":1,"chapter_size":1168,"prev_cid":631863,"next_cid":631861,"recent_update_at":"2018-03-21 11:32:34"},{"bid":"YwxrpDq5bGM1kPK8PZKd97eXAv0ZB3Lm","chapter_id":631861,"chapter_name":"\u7b2c56\u7ae0 \u5979\u662f\u6211\u7684\u7a7a\u6c14\u6211\u7684\u6c34\u5206","chapter_sequence":56,"chapter_is_vip":1,"chapter_size":1272,"prev_cid":631862,"next_cid":631860,"recent_update_at":"2018-03-21 11:32:34"},{"bid":"YwxrpDq5bGM1kPK8PZKd97eXAv0ZB3Lm","chapter_id":631860,"chapter_name":"\u7b2c57\u7ae0 \u6211\u4e0d\u60f3\u8ba9\u5979\u6d3b\u7740","chapter_sequence":57,"chapter_is_vip":1,"chapter_size":1119,"prev_cid":631861,"next_cid":631859,"recent_update_at":"2018-03-21 11:32:34"},{"bid":"YwxrpDq5bGM1kPK8PZKd97eXAv0ZB3Lm","chapter_id":631859,"chapter_name":"\u7b2c58\u7ae0 \u6211\u8981\u5e26\u7740\u4f60\u4e00\u8d77\u6b7b","chapter_sequence":58,"chapter_is_vip":1,"chapter_size":1190,"prev_cid":631860,"next_cid":631858,"recent_update_at":"2018-03-21 11:32:33"},{"bid":"YwxrpDq5bGM1kPK8PZKd97eXAv0ZB3Lm","chapter_id":631858,"chapter_name":"\u7b2c59\u7ae0 \u7ec8\u4e8e\u548c\u4f60\u5728\u4e00\u8d77\u4e86","chapter_sequence":59,"chapter_is_vip":1,"chapter_size":1478,"prev_cid":631859,"next_cid":0,"recent_update_at":"2018-03-21 11:32:33"}],"meta":{"total":59,"per_page":100,"current_page":1,"last_page":1,"next_page_url":"","prev_page_url":""}}}';
//        return response($str);
    }
}
