<!DOCTYPE html>
<html lang="en">
<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <title>精品小说楼_轻小说专区</title>

    <meta name="description"
          content="精品小说楼是国内优秀的小说弹幕网站,精品小说楼提供海量网络小说,日本轻小说,国产轻小说,动漫小说,轻小说TXT下载,轻小说在线阅读和TXT小说下载,是网友最喜欢的温馨小说站。">
    <meta name="keywords" content="精品小说楼,精品小说,弹幕网站,弹幕,弹幕小说网站,免费小说,小说阅读,小说排行,轻小说,txt小说下载,电子书下载,动漫轻小说,日本轻小说">

    <meta property="og:type" content="soft_novel_index"/>
    <meta property="og:title" content="精品小说楼_轻小说专区"/>
    <meta property="og:description" content="精品小说楼是国内优秀的小说弹幕网站,精品小说楼提供海量热门网络小说,日本轻小说,国产轻小说,动漫小说,轻小说在线阅读和TXT小说下载,致力于网络精品小说的收集,智能计算小说评分,打造小说精品排行榜,致力于无广告无弹窗的小说阅读环境。"/>


    <div th:include="common/css :: css"></div>

    </div>
    <script>
        var _hmt = _hmt || [];
        (function () {
            var hm = document.createElement("script");
            hm.src = "https://hm.baidu.com/hm.js?2cf01edbc2b27cd3a143e17948167d77";
            var s = document.getElementsByTagName("script")[0];
            s.parentNode.insertBefore(hm, s);
        })();
    </script>

    <style type="text/css">


        .line-limit-length {

            overflow: hidden;

            text-overflow: ellipsis;

            white-space: nowrap;

        }

        .indexP p a {
            color: #4c6978;
        }

        .Readarea {
            font-size: 18px;
            line-height: 35px;
            padding: 10px;
            color: #333;
        }

        div, p {
            wrap-work: break-word;
            word-break: break-all;
            word-wrap: break-word;
            word-break: normal;
            -moz-box-sizing: border-box;
            -webkit-box-sizing: border-box;
            box-sizing: border-box;
            -ms-box-sizing: border-box;
        }

        .indexDiv a {
            margin-left: 20px;
        }

        img {
            width: 147px;
            height: 197px;
        }
    </style>
</head>
<body>


<input type="hidden" id="limit" th:value="${limit}"/>
<input type="hidden" id="curr" th:value="${curr}"/>
<input type="hidden" id="total" th:value="${total}"/>
<input type="hidden" id="ids" th:value="${ids}"/>
<input type="hidden" id="keyword" th:value="${keyword}"/>
<input type="hidden" id="softTag" th:value="${softTag}"/>
<input type="hidden" id="sortBy" th:value="${sortBy}"/>
<input type="hidden" id="sort" th:value="${sort}"/>
<input type="hidden" id="bookStatus" th:value="${bookStatus}"/>
<input type="hidden" id="softCat" th:value="${softCat}"/>

<ul class="layui-nav"  lay-filter="" style="padding:0 20px;text-align: center" >
    <li id="menunew" class="layui-nav-item"><a href="/book/searchSoftBook.html">最新</a></li>
    <li id="menu21" class="layui-nav-item"><a href="/book/searchSoftBook.html?softCat=21">魔幻</a></li>
    <li id="menu22" class="layui-nav-item"><a href="/book/searchSoftBook.html?softCat=22">玄幻</a></li>
    <li id="menu23" class="layui-nav-item"><a href="/book/searchSoftBook.html?softCat=23">古风</a></li>
    <li id="menu24" class="layui-nav-item"><a href="/book/searchSoftBook.html?softCat=24">科幻</a></li>
    <li id="menu25" class="layui-nav-item"><a href="/book/searchSoftBook.html?softCat=25">校园</a></li>
    <li id="menu26" class="layui-nav-item"><a href="/book/searchSoftBook.html?softCat=26">都市</a></li>
    <li id="menu27" class="layui-nav-item"><a href="/book/searchSoftBook.html?softCat=27">游戏</a></li>
    <li id="menu28" class="layui-nav-item"><a href="/book/searchSoftBook.html?softCat=28">同人</a></li>
    <li id="menu29" class="layui-nav-item"><a href="/book/searchSoftBook.html?softCat=29">悬疑</a></li>
    <li id="menu0" class="layui-nav-item"><a href="/book/searchSoftBook.html?softCat=0">动漫</a></li>
    <li id="menucomplete" class="layui-nav-item"><a >完本</a>
        <dl class="layui-nav-child"> <!-- 二级菜单 -->
            <dd><a href="/book/searchSoftBook.html?bookStatus=已完成">全部</a></dd>
            <dd><a href="/book/searchSoftBook.html?bookStatus=已完成&softCat=21">魔幻</a></dd>
            <dd><a href="/book/searchSoftBook.html?bookStatus=已完成&softCat=22">玄幻</a></dd>
            <dd><a href="/book/searchSoftBook.html?bookStatus=已完成&softCat=23">古风</a></dd>
            <dd><a href="/book/searchSoftBook.html?bookStatus=已完成&softCat=24">科幻</a></dd>
            <dd><a href="/book/searchSoftBook.html?bookStatus=已完成&softCat=25">校园</a></dd>
            <dd><a href="/book/searchSoftBook.html?bookStatus=已完成&softCat=26">都市</a></dd>
            <dd><a href="/book/searchSoftBook.html?bookStatus=已完成&softCat=27">游戏</a></dd>
            <dd><a href="/book/searchSoftBook.html?bookStatus=已完成&softCat=28">同人</a></dd>
            <dd><a href="/book/searchSoftBook.html?bookStatus=已完成&softCat=29">悬疑</a></dd>
            <dd><a href="/book/searchSoftBook.html?bookStatus=已完成&softCat=0">动漫</a></dd>
        </dl>
    </li>
    <li id="menuhot" class="layui-nav-item"><a >排行</a>
        <dl class="layui-nav-child"> <!-- 二级菜单 -->
            <dd><a href="/book/searchSoftBook.html?sortBy=score">全部</a></dd>
            <dd><a href="/book/searchSoftBook.html?sortBy=score&softCat=21">魔幻</a></dd>
            <dd><a href="/book/searchSoftBook.html?sortBy=score&softCat=22">玄幻</a></dd>
            <dd><a href="/book/searchSoftBook.html?sortBy=score&softCat=23">古风</a></dd>
            <dd><a href="/book/searchSoftBook.html?sortBy=score&softCat=24">科幻</a></dd>
            <dd><a href="/book/searchSoftBook.html?sortBy=score&softCat=25">校园</a></dd>
            <dd><a href="/book/searchSoftBook.html?sortBy=score&softCat=26">都市</a></dd>
            <dd><a href="/book/searchSoftBook.html?sortBy=score&softCat=27">游戏</a></dd>
            <dd><a href="/book/searchSoftBook.html?sortBy=score&softCat=28">同人</a></dd>
            <dd><a href="/book/searchSoftBook.html?sortBy=score&softCat=29">悬疑</a></dd>
            <dd><a href="/book/searchSoftBook.html?sortBy=score&softCat=0">动漫</a></dd>
        </dl>
    </li>

</ul>


<div class="layui-container">
    <div class="layui-row">

        <div class="layui-col-xs10 layui-col-sm10 layui-col-md11 layui-col-lg11" style="padding-top:1%">
            <input id="title" type="text" name="title" required lay-verify="required" placeholder="请输入书名·作者"
                   autocomplete="off"
                   class="layui-input" th:value="${keyword}">
        </div>
        <div class="layui-col-xs1" style="padding: 1%">
            <button onclick="searchBooks()" class="layui-btn" lay-submit lay-filter="formDemo">搜索</button>
        </div>
    </div>

</div>


<div th:each="book : ${books}" class="layui-row" style="margin-bottom:10px;padding:10px;background: #f2f2f2">
    <a th:href="'/book/'+ ${book.id} + '.html'">
    <div class="layui-col-xs6 layui-col-sm3 layui-col-md2 layui-col-lg2" style="text-align: center">
        <img align="center"
             th:src="${book.picUrl}"/>
    </div>
    </a>
    <div style="padding: 20px" class="layui-col-xs6 layui-col-sm8 layui-col-md8 layui-col-lg8">
        <a th:href="'/book/'+ ${book.id} + '.html'">
            <div class="line-limit-length" style=";color: #4c6978;font-weight: bold;font-size: 15px"
                 th:text="${book.bookName}"></div>
        </a>
        <div style=";color: #4c6978;float: right;"><i style="color: red" th:text="${book.score} + '分'"></i></div>
        <a th:href="'/book/searchSoftBook.html?keyword='+ ${book.author}">
            <div style=";color: #4c6978;" class="line-limit-length" th:text="'作者：'+ ${book.author}"></div>
        </a>
        <div style="margin-top: 5px;color: #4c6978;" th:text="'类别：'+ ${book.cateName}"></div>
        <div style="margin-top: 5px;color: #4c6978;" th:text="'状态：'+ ${book.bookStatus}"></div>
        <div style="margin-top: 5px;color: #4c6978;">更新：<i th:text="${#dates.format(book.updateTime, 'yy-MM-dd')}"></i>
        </div>
        <div class="layui-collapse" style="margin-top: 5px;">
            <div class="layui-colla-item">
                <h2 style="color: #4c6978;" class="layui-colla-title">简介：</h2>
                <div style="color: #4c6978;" class="layui-colla-content" th:utext="${book.bookDesc}">

                </div>
            </div>
        </div>


    </div>

</div>


<div id="books" style="text-align: center"></div>


<div th:replace="common/soft_footer :: footer">
</div>

<a name="buttom"></a>
</body>

<div th:replace="common/js :: js"></div>

<script>
    layui.use('laypage', function () {
        var laypage = layui.laypage;

        //执行一个laypage实例
        laypage.render({
            elem: 'books' //注意，这里的 test1 是 ID，不用加 # 号
            , count: $("#total").val() //数据总数，从服务端得到,
            , curr: $("#curr").val()
            , limit: $("#limit").val()
            , jump: function (obj, first) {


                //obj包含了当前分页的所有参数，比如：
                console.log(obj.curr); //得到当前页，以便向服务端请求对应页的数据。
                console.log(obj.limit); //得到每页显示的条数


                //首次不执行
                if (!first) {
                    searchByAllCondition(obj.curr,obj.limit);
                } else {

                }
            }
        });
    });

    function searchByAllCondition(curr,limit,newKeyword){
        var toUrl = "/book/searchSoftBook.html?curr=" + curr + "&limit=" + limit;
        var ids = $("#ids").val();
        if(ids){
            toUrl += ("&historyBookIds=" + ids);
        }
        var keyword = $("#keyword").val();
        if(newKeyword){
            toUrl += encodeURI("&keyword=" + newKeyword);
        }else if (keyword) {
            toUrl += encodeURI("&keyword=" + keyword);
        }
        var bookStatus = $("#bookStatus").val();
        if(bookStatus){
            toUrl += ("&bookStatus=" + bookStatus);
        }
        var softCat = $("#softCat").val();
        if (softCat) {
            toUrl += ("&softCat=" + softCat);
        }
        var softTag = $("#softTag").val();
        if (softTag) {
            toUrl += ("&softTag=" + softTag);
        }

        var sortBy = $("#sortBy").val();
        if (sortBy) {
            toUrl += ("&sortBy=" + sortBy);
        }

        var sort = $("#sort").val();
        if (sort) {
            toUrl += ("&sort=" + sort);
        }

        window.location.href = toUrl;
    }

    function searchBooks() {
        var keywords = $("#title").val();
        $("#keyword").val("");
        searchByAllCondition(1,20,keywords);
    }

</script>
<script>
    (function(){
        var bp = document.createElement('script');
        var curProtocol = window.location.protocol.split(':')[0];
        if (curProtocol === 'https') {
            bp.src = 'https://zz.bdstatic.com/linksubmit/push.js';
        }
        else {
            bp.src = 'http://push.zhanzhang.baidu.com/push.js';
        }
        var s = document.getElementsByTagName("script")[0];
        s.parentNode.insertBefore(bp, s);


        var sortCat = $("#softCat").val();
        var sortBy = $("#sortBy").val();
        if(sortBy == 'score'){
            $("#menuhot").addClass("layui-this");
        }else if($("#bookStatus").val()){
            $("#menucomplete").addClass("layui-this");
        }else if(sortCat){
            $("#menu"+sortCat).addClass("layui-this");
        }else{
            $("#menunew").addClass("layui-this");
        }

    })();


    function toMyCollect(){
        var token = localStorage.getItem("token");
        if(token) {
            window.location.href = "/book/search?token=" + token;
        }else{
            window.location.href = "/user/login.html";
        }
    }
</script>



</html>