mirror of
https://github.com/201206030/novel.git
synced 2025-06-24 08:06:39 +00:00
移动端漫画内容适配
This commit is contained in:
@ -244,8 +244,11 @@ public class BookController {
|
||||
modelMap.put("preIndexNum", preAndNextIndexNum.get(1));
|
||||
modelMap.put("bookContent", bookContent);
|
||||
modelMap.put("indexName", indexName);
|
||||
String bookName = bookService.queryBaseInfo(bookId).getBookName();
|
||||
Book basicBook = bookService.queryBaseInfo(bookId);
|
||||
String bookName = basicBook.getBookName();
|
||||
Integer catId = basicBook.getCatid();
|
||||
modelMap.put("bookName", bookName);
|
||||
modelMap.put("catId", catId);
|
||||
return "books/book_content";
|
||||
}
|
||||
|
||||
|
@ -180,6 +180,25 @@ public class SearchFilter implements Filter {
|
||||
forObject=forObject.replaceAll("<script type=\"text/javascript\">var cnzz_protocol =[^<]+</script>","");
|
||||
forObject=forObject.replaceAll("globalNav.js","");
|
||||
forObject=forObject.replaceAll("TSB.js","");
|
||||
forObject=forObject+"<script>var browser={\n" +
|
||||
" versions:function(){\n" +
|
||||
" var u = window.navigator.userAgent;\n" +
|
||||
" return {\n" +
|
||||
" trident: u.indexOf('Trident') > -1, //IE内核\n" +
|
||||
" presto: u.indexOf('Presto') > -1, //opera内核\n" +
|
||||
" webKit: u.indexOf('AppleWebKit') > -1, //苹果、谷歌内核\n" +
|
||||
" gecko: u.indexOf('Gecko') > -1 && u.indexOf('KHTML') == -1, //火狐内核\n" +
|
||||
" mobile: !!u.match(/AppleWebKit.*Mobile.*/)||!!u.match(/AppleWebKit/), //是否为移动终端\n" +
|
||||
" ios: !!u.match(/\\(i[^;]+;( U;)? CPU.+Mac OS X/), //ios终端\n" +
|
||||
" android: u.indexOf('Android') > -1 || u.indexOf('Linux') > -1, //android终端或者uc浏览器\n" +
|
||||
" iPhone: u.indexOf('iPhone') > -1 || u.indexOf('Mac') > -1, //是否为iPhone或者安卓QQ浏览器\n" +
|
||||
" iPad: u.indexOf('iPad') > -1, //是否为iPad\n" +
|
||||
" webApp: u.indexOf('Safari') == -1 ,//是否为web应用程序,没有头部与底部\n" +
|
||||
" weixin: u.indexOf('MicroMessenger') == -1 //是否为微信浏览器\n" +
|
||||
" };\n" +
|
||||
" }()\n" +
|
||||
"};" +
|
||||
"</script>";
|
||||
forObject=forObject+"<script>$(function(){$(\"#app_manhua\").remove();" +
|
||||
"$('.btmBtnBox').remove();$('.red_box').remove()" +
|
||||
";$('.mainNav').remove();$('.wrap_last_head').remove();$('.wrap_last_mid').remove()" +
|
||||
|
@ -7,8 +7,8 @@ spring:
|
||||
# username: xiongxiaoyang
|
||||
# password: Lzslov123!
|
||||
url: jdbc:mysql://127.0.0.1:3306/books?useUnicode=true&characterEncoding=utf-8&useSSL=false&allowPublicKeyRetrieval=true&serverTimezone=Asia/Shanghai
|
||||
username: root
|
||||
password:
|
||||
username: books
|
||||
password: books
|
||||
cache:
|
||||
ehcache:
|
||||
config: classpath:ehcache.xml
|
||||
|
@ -4,7 +4,8 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
|
||||
<meta th:if="${catId == 9}" name="viewport" content="width=device-width, initial-scale=0.5, maximum-scale=1">
|
||||
<meta th:if="${catId != 9}" name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
|
||||
<title th:text="${bookName}+${indexName}"></title>
|
||||
|
||||
<meta name="keywords" th:attr="content=${bookName}+','+${indexName}">
|
||||
@ -210,7 +211,7 @@
|
||||
</div>
|
||||
<div id="chaptercontent" class="Readarea ReadAjax_content screen_container"
|
||||
style="color: rgb(0, 0, 0); font-size: 25px;">
|
||||
<p style="width:100%;text-alight:center;">
|
||||
<p style="width:100%;text-alight:center; overflow: auto;-webkit-overflow-scrolling:touch;" >
|
||||
<a
|
||||
href="javascript:void(0);" th:utext="${bookContent.content}"></a></p>
|
||||
</div>
|
||||
|
Reference in New Issue
Block a user