Skip to content

Commit

Permalink
文件夹结构调整,新增模版自定义功能
Browse files Browse the repository at this point in the history
  • Loading branch information
x201206030 committed Dec 26, 2020
1 parent f03ab95 commit 6ad5190
Show file tree
Hide file tree
Showing 601 changed files with 75,656 additions and 8 deletions.
22 changes: 15 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ Gitee仓库地址: https://gitee.com/novel_dev_team/novel-cloud
- [x] 服务端代码重构MyBatis3升级为MyBatis3DynamicSql
- [x] 移动站与PC站站点分离浏览器自动识别跳转
- [x] PC站UI更新
- [x] 支持前端模版自定义内置多套模版
- [x] 新闻模块
- [x] 排行榜
- [x] 小说评论模块
Expand All @@ -46,7 +47,8 @@ novel-plus -- 父工程
├── novel-common -- 通用模块
├── novel-front -- 前台门户&作家后台管理子系统可拆分
├── novel-crawl -- 爬虫管理子系统
└── novel-admin -- 平台后台管理子系统
├── novel-admin -- 平台后台管理子系统
└── templates -- 前端模版
```

#### 技术选型
Expand Down Expand Up @@ -78,7 +80,7 @@ novel-plus -- 父工程

#### 接口文档

[点击查看接口文档示例](./doc/api.md)
[点击查看接口文档示例](doc/api/api.md)

#### PC站截图

Expand Down Expand Up @@ -175,19 +177,25 @@ novel-plus -- 父工程
1. 安装MySQL软件
2. 修改MySQL`max_allowed_packet `配置建议100M)。
3. 新建数据库设置编码为utf8mb4
4. 执行sql/novel_plus.sql脚本文件
4. 执行doc/sql/novel_plus.sql脚本文件

##### 爬虫管理系统安装

1. 修改novel-common模块下application-dev.yml文件中的数据库的配置
1. 修改novel-common模块下application-common-dev.yml配置文件中的数据库配置
2. 修改novel-crawl模块下application.yml文件中的管理员账号密码
3. 启动程序打开浏览器默认8081端口访问
4. 选择已有或新增爬虫源支持自定义爬虫规则),点击`开启`按钮开始爬取小说数据

##### 前台小说门户安装

1. 修改novel-common模块下application-dev.yml文件中的数据库的配置
2. 启动程序打开浏览器默认8080端口访问
1. 修改novel-common模块下application-common-dev.yml配置文件中的数据库配置
2. 修改novel-front模块下application.yml配置文件中的模版名内置orange和blue两套模版)。
`
#模版配置
templates:
name: orange
`
3. 启动程序打开浏览器默认8080端口访问

**喜欢此项目的可以给我的GitHub和Gitee加个Star支持一下 。**

Expand All @@ -209,7 +217,7 @@ docker安装教程:[点击前往](https://my.oschina.net/java2nb/blog/4271989)

[点击前往官网查看](https://xiongxyang.gitee.io/home/service.htm)

#### 微信公众号发布最新更新资讯
#### 微信公众号发布最新更新资讯最新前端模版最新爬虫规则技术文档等

![mini-code](https://s3.ax1x.com/2020/12/03/DoImOx.png)

Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
20 changes: 19 additions & 1 deletion novel-front/src/main/resources/application.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,14 @@ spring:
jest:
uris: http://127.0.0.1:9200

#thymeleaf模版路径配置
thymeleaf:
prefix: file:${user.dir}/templates/${templates.name}/html/
suffix: .html
#静态文件路径配置
resources:
static-locations: file:${user.dir}/templates/${templates.name}/static/

redisson:
singleServerConfig:
address: 127.0.0.1:6379
Expand Down Expand Up @@ -64,4 +72,14 @@ book:
#字数
word-count: 1000
#价值(屋币)
value: 5
value: 5



#模版配置
templates:
name: orange




17 changes: 17 additions & 0 deletions templates/orange/html/404.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Page Not Found</title>
<script>
setTimeout(function () {
location.href = '/';
},3000)

</script>
</head>
<body style="background: url(/images/404.jpeg) no-repeat;" >


</body>
</html>
49 changes: 49 additions & 0 deletions templates/orange/html/about/contact.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head th:replace="common/header :: common_head(~{::title},~{::meta},~{::link},~{})">
<title th:text="'联系我们_'+#{website.name}"></title>
<meta name="keywords" content="联系我们,小说,小说网,言情小说,都市小说,玄幻小说,穿越小说,青春小说,总裁豪门小说,网络小说,免费小说,全本小说,原创网络文学" />
<meta name="description" th:content="#{website.name}+'小说每日更新小说连载,小说排行榜,提供言情小说,都市小说,玄幻小说,穿越小说,青春小说,总裁豪门小说,网络小说,免费小说,全本小说,首发小说,最新章节免费小说阅读,精彩尽在'+#{website.name}+'小说!'" />
<link rel="stylesheet" href="/css/about.css"/>
</head>
<body class="body">


<div th:replace="common/top :: top('')">
</div>
<div class="main box_center cf">
<div class="userBox cf">
<div class="my_l">
<ul class="log_list">

<li><a href="/about/default.html">关于我们</a></li>
<li><a class="on" href="/about/contact.html">联系我们</a></li>
<li><a href="/about/user_agreement.html">用户协议</a></li>
<li><a href="/about/copyright.html">版权声明</a></li>
<li><a href="/about/submission.html">投稿说明</a></li>
<li><a href="/user/feedback.html">反馈留言</a></li>
</ul>
</div>
<div class="my_r">
<div class="aboutBox">
<h2>联系我们</h2>
<div class="about_info">
<A href="tencent://message/?uin=1179705413&amp;Site=作家申请,商务合作&amp;Menu=yes">
<img style="border:0px;" src=http://wpa.qq.com/pa?p=1:1179705413:6></a>
<p>&nbsp;</p>
<p>&nbsp;</p>
</div>
</div>
</div>
</div>
</div>

<div th:replace="common/footer :: footer">
</div>
<div th:replace="common/js :: js"></div>
<script src="/javascript/bookdetail.js" type="text/javascript"></script>

</body>
</html>
54 changes: 54 additions & 0 deletions templates/orange/html/about/copyright.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head th:replace="common/header :: common_head(~{::title},~{::meta},~{::link},~{})">
<title th:text="'版权声明_'+#{website.name}"></title>
<meta name="keywords" content="版权声明,小说,小说网,言情小说,都市小说,玄幻小说,穿越小说,青春小说,总裁豪门小说,网络小说,免费小说,全本小说,原创网络文学" />
<meta name="description" th:content="#{website.name}+'小说每日更新小说连载,小说排行榜,提供言情小说,都市小说,玄幻小说,穿越小说,青春小说,总裁豪门小说,网络小说,免费小说,全本小说,首发小说,最新章节免费小说阅读,精彩尽在'+#{website.name}+'小说!'" />
<link rel="stylesheet" href="/css/about.css"/>
</head>
<body class="body">

<div th:replace="common/top :: top('')">
</div>
<div class="main box_center cf">
<div class="userBox cf">
<div class="my_l">
<ul class="log_list">

<li><a href="/about/default.html">关于我们</a></li>
<li><a href="/about/contact.html">联系我们</a></li>
<li><a href="/about/user_agreement.html">用户协议</a></li>
<li><a class="on" href="/about/copyright.html">版权声明</a></li>
<li><a href="/about/submission.html">投稿说明</a></li>
<li><a href="/user/feedback.html">反馈留言</a></li>
</ul>
</div>
<div class="my_r">
<div class="aboutBox">
<h2>版权声明</h2>
<div class="about_info">
<p>本版权与免责声明系为保证小说精品屋(<a href="/">www.java2nb.com</a>)的正常发展规避意外风险而设其初衷是为了向用户提供不间断的优质数字阅读服务因此建议您在接受本站服务之前请务必仔细阅读本条款。</p>
<p>1. 无论是驻站作者原创的作品还是由读者投稿或转载的文章其版权均归原作者所有所有使用必须事先征得原作者同意若作者有版权声明的或文章从其他网站转载而附带有原所有站的版权声明者其版权归属以附带声明为准如有侵犯您的权利请联系我们本站立即改正。</p>
<p>2. 本站所收录作品社区话题书库评论及均属发布者其个人行为与本站立场无关并不表示我们赞同文章中的观点如果有某些文章侵犯了您的权益请您和我们联系我们会马上处理。</p>
<p>3. 未经本站的明确许可任何人不得转载盗链本站作品不得复制或仿造本网站。</p>
<p>4. 如因作品内容版权和其它问题需要同本网联系的请在30日内进行。</p>
<p>5. 本网站尊重他人之知识产权如果您确认您的作品在本网站以某种方式被抄袭并且该行为触犯了中国及国际版权法的请向本网站做版权投诉并提供相关证明文件及理由。</p>
<p>6. 除本网站注明之服务条款外小说精品屋对本网站上所有内容包括但不限于本网站上的信息内容材料或产品的合法性准确性真实性实用性和安全性不提供任何形式的保证亦不承担任何法律责任。</p>
<p>7. 您仅有权按照本网站的明确说明和规定使用浏览本网站相关服务或页面未经小说精品屋或相关权利人明确书面许可不得对本网站任何组成部分包括作品页 作品段落作品内容等进行修改分发再造复制抄袭交易转载等如果本站确定您的行为违法或有损本网站和他人的利益将保留包括但不限于拒绝提供服务删除用户账户提起诉讼的权利。</p>
<p>8. 本声明未涉及的问题参见国家有关法律法规当本声明与国家法律法规冲突时以国家法律法规为准本声明的修改及更新权均属于小说精品屋所有。</p>
</div>
</div>
</div>

</div>
</div>

<div th:replace="common/footer :: footer">
</div>
<div th:replace="common/js :: js"></div>
<script src="/javascript/bookdetail.js" type="text/javascript"></script>

</body>
</html>
44 changes: 44 additions & 0 deletions templates/orange/html/about/default.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head th:replace="common/header :: common_head(~{::title},~{::meta},~{::link},~{})">
<title th:text="'关于我们_'+#{website.name}"></title>
<meta name="keywords" content="关于我们,小说,小说网,言情小说,都市小说,玄幻小说,穿越小说,青春小说,总裁豪门小说,网络小说,免费小说,全本小说,原创网络文学" />
<meta name="description" th:content="#{website.name}+'每日更新小说连载,小说排行榜,提供言情小说,都市小说,玄幻小说,穿越小说,青春小说,总裁豪门小说,网络小说,免费小说,全本小说,首发小说,最新章节免费小说阅读,精彩尽在'+#{website.name}+'小说!'" />
<link rel="stylesheet" href="/css/about.css"/>
</head>
<body class="body">

<div th:replace="common/top :: top('')">
</div>
<div class="main box_center cf">
<div class="userBox cf">
<div class="my_l">
<ul class="log_list">

<li><a class="on" href="/about/default.html">关于我们</a></li>
<li><a href="/about/contact.html">联系我们</a></li>
<li><a href="/about/user_agreement.html">用户协议</a></li>
<li><a href="/about/copyright.html">版权声明</a></li>
<li><a href="/about/submission.html">投稿说明</a></li>
<li><a href="/user/feedback.html">反馈留言</a></li>
</ul>
</div>
<div class="my_r">
<div class="aboutBox">
<h2>关于我们</h2>
<div class="about_info">
<p th:text="#{website.name}+'创建于2019年,是集创作、阅读、作品加工、IP运营为一体的中文小说阅读综合平台。'"></p>
<p></p>
</div>
</div>
</div>
</div>
</div>

<div th:replace="common/footer :: footer">
</div>
<div th:replace="common/js :: js"></div>
<script src="/javascript/bookdetail.js" type="text/javascript"></script>

</body>
</html>
123 changes: 123 additions & 0 deletions templates/orange/html/about/news.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,123 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head th:replace="common/header :: common_head(~{::title},~{::meta},~{::link},~{})">
<title th:text="'新闻公共_'+#{website.name}"></title>
<meta name="keywords" content="新闻公告,小说,小说网,言情小说,都市小说,玄幻小说,穿越小说,青春小说,总裁豪门小说,网络小说,免费小说,全本小说,原创网络文学"/>
<meta name="description"
th:content="#{website.name}+'小说每日更新小说连载,小说排行榜,提供言情小说,都市小说,玄幻小说,穿越小说,青春小说,总裁豪门小说,网络小说,免费小说,全本小说,首发小说,最新章节免费小说阅读,精彩尽在'+#{website.name}+'小说!'"/>
<link rel="stylesheet" href="/css/about.css"/>
</head>
<body class="body">

<div th:replace="common/top :: top('')">
</div>
<!--主体 start-->
<div class="main box_center cf">
<div class="userBox cf">
<div class="my_l">
<ul class="log_list">

<li><a href="/about/default.html">关于我们</a></li>
<li><a href="/about/contact.html">联系我们</a></li>
<li><a href="/about/user_agreement.html">用户协议</a></li>
<li><a href="/about/copyright.html">版权声明</a></li>
<li><a href="/about/submission.html">投稿说明</a></li>
<li><a href="/user/feedback.html">反馈留言</a></li>
</ul>
</div>
<div class="my_r">
<div class="newsBox">
<ul class="news_list" id="newsList">




</ul>


</div>
<div class="pageBox cf" id="newsPage">

</div>
</div>

</div>
</div>
<!--主体 end-->

<div th:replace="common/footer :: footer">
</div>v
<div th:replace="common/js :: js"></div>
<script src="/javascript/bookdetail.js" type="text/javascript"></script>
<script language="javascript" type="text/javascript">
search(1, 5);

function search(curr, limit) {

$.ajax({
type: "get",
url: "/news/listByPage",
data: {'curr':curr,'limit':limit},
dataType: "json",
success: function (data) {
if (data.code == 200) {
var newsList = data.data.list;
if (newsList.length > 0) {
var newsListHtml = "";
for (var i = 0; i < newsList.length; i++) {
var news = newsList[i];
newsListHtml += (" <li>\n" +
" <h5><i class=\"dot\"></i><a href=\"newsInfo-"+news.id+".html\" >"+news.title+"</a></h5>\n" +
" <p>"+news.createTime+"</p>\n" +
" </li>");
}
$("#newsList").html(newsListHtml);

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

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


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


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

}
}
});
});

}


} else {
layer.alert(data.msg);
}

},
error: function () {
layer.alert('网络异常');
}
})

}
</script>
</body>
</html>



Loading

0 comments on commit 6ad5190

Please sign in to comment.