<?php
/**
 * 图书路由文件
 * by zhanyang
 *
 * 2017-11-20
 */

/**
 * 图书路由文件
 */
Route::group(['domain' => env('CHANNEL_DOMAIN'), 'namespace' => 'App\Http\Controllers\Channel\Book', 'prefix' => 'api/book', 'middleware' => 'ChannelApiAuth'], function () {
    Route::group(['middleware'=>'ChannelOperateRecord'],function (){
        //获取图书详情
        Route::get('getBookInfo', 'BooksController@getBookInfo');

        //获取图书目录
        Route::get('getBookDirectory', 'BooksController@getBookDirectory');

        //获取图书分类
        Route::get('getBookCategories', 'BooksController@getBookCategoriesV2');

        //设置书本的渠道标识
        Route::post('setChannelSpecialBook', 'BooksController@setChannelSpecialBook');

        //获取推广图书列表
        Route::get('getPromotionBookList', 'BooksController@getPromotionBookList');

        //获取章节内容
        Route::get('getChapterContent', 'ChapterController@getChapterContent');

        //获取书本的前五章章节内容
        Route::get('getTopFiveChapterContents', 'ChapterController@getTopFiveChapterContents');

        //设置强关章节
        Route::post('setSubScribleChapter', 'BookSubScribleChapterController@setSubScribleChapter');

        //查询强关章节
        Route::get('getSubScribleChapter', 'BookSubScribleChapterController@getSubScribleChapter');

        //前5章内容
        Route::get('fiveChapterImage', 'ChapterImageController@getTopFiveChapter');
        //排行榜
        Route::get('getRanks', 'BooksController@getRanks');
        //获取推广图书列表V2
        Route::get('getPromotionBookListV2', 'BooksController@getPromotionBookListV2');
        //自主评分
        Route::post('score', 'BookChannelScoreController@score');
        //Route::get('score', 'BookChannelScoreController@score');
    });

});