Compare commits

...

16 Commits

51 changed files with 323 additions and 175 deletions

View File

@ -2,14 +2,18 @@
# 小说精品屋-plus
#### 官网
https://xiongxyang.gitee.io/home/
#### 新项目小说精品屋-微服务版
基于小说精品屋-plus构建的Spring Cloud 微服务小说门户平台
Gitee仓库地址 https://gitee.com/xiongxyang/novel-cloud
GitHub仓库地址 https://github.com/201206030/novel-cloud
Gitee仓库地址 https://gitee.com/novel_dev_team/novel-cloud
#### 演示地址
[点击前往](http://47.106.243.172:8888/)
@ -21,7 +25,7 @@ GitHub仓库地址 https://github.com/201206030/novel-cloud
#### 项目介绍
小说精品屋-plus是在[小说精品屋](https://github.com/201206030/fiction_house)的基础上去除了漫画和弹幕模块专注于小说是一个多端PC、移动)阅读、功能完善的小说原创/爬虫网站项目既包含了作家专区供原创作者上传小说又提供了爬虫工具通过规则多线程全自动采集任意小说网站数据已兼容99%的小说网站),新书自动入库,老书自动更新
小说精品屋-plus是在[小说精品屋](https://github.com/201206030/fiction_house)的基础上去除了漫画和弹幕模块专注于小说是一个多端PC、WAP)阅读、功能完善的原创文学CMS系统由前台门户系统、作家后台管理系统、平台后台管理系统、爬虫管理系统等多个子系统构成支持会员充值、订阅模式、新闻发布和实时统计报表等功能
小说精品屋-plus重新进行了数据库设计代码重构和功能增强提升了程序整体的可读性和性能增加了很多商用特性主要升级如下
@ -44,9 +48,9 @@ GitHub仓库地址 https://github.com/201206030/novel-cloud
```
novel-plus -- 父工程
novel-common -- 通用模块
novel-front -- 前台门户系统
novel-crawl -- 爬虫管理系统
novel-admin -- 后台管理系统
novel-front -- 前台门户&作家后台管理子系统可拆分
novel-crawl -- 爬虫管理系统
novel-admin -- 平台后台管理系统
```
#### 技术选型
@ -76,6 +80,10 @@ novel-plus -- 父工程
| Layui | 前端UI
#### 接口文档
[点击查看接口文档示例](./doc/api.md)
#### PC站截图
1. 首页
@ -197,13 +205,13 @@ docker安装教程[点击前往](https://my.oschina.net/java2nb/blog/4271989)
#### 代码仓库
Gitee仓库地址 https://gitee.com/xiongxyang/novel-plus
GitHub仓库地址 https://github.com/201206030/novel-plus
Gitee仓库地址 https://gitee.com/novel_dev_team/novel-plus
#### QQ交流群
![mini-code](https://s1.ax1x.com/2020/10/31/BUQVeI.png)
[点击前往官网查看](https://xiongxyang.gitee.io/home/service.htm)
#### 微信公众号发布最新更新资讯
@ -224,7 +232,7 @@ docker安装教程[点击前往](https://my.oschina.net/java2nb/blog/4271989)
本项目提供的爬虫工具仅用于采集项目初期的测试数据请勿用于商业盈利
用户使用本系统从事任何违法违规的事情一切后果由用户自行承担作者不承担任何责任
#### 备注
### 备注
精品小说屋所有相关项目均已在开源中国公开感兴趣的可进入[开源中国](https://www.oschina.net/p/fiction_house)按关键字`精品小说屋`搜索。

116
doc/api.md Normal file
View File

@ -0,0 +1,116 @@
<h1 class="curproject-name"> 小说精品屋-plus </h1>
小说精品屋-plus接口
# 作家模块
## 小说章节分页列表查询接口
<a id=小说章节分页列表查询接口> </a>
### 基本信息
**Path** /book/queryIndexList
**Method** GET
**接口描述:**
<p>作家后台章节管理页面需要请求该接口获取小说章节分页列表信息</p>
### 请求参数
**Query**
| 参数名称 | 是否必须 | 示例 | 备注 |
| ------------ | ------------ | ------------ | ------------ |
| bookId | 是 | 1334337530296893441 | 小说ID |
| curr | 否 | 1 | 查询页码默认1 |
| limit | 否 | 5 | 分页大小默认5 |
### 返回数据
<table>
<thead class="ant-table-thead">
<tr>
<th key=name>名称</th><th key=type>类型</th><th key=required>是否必须</th><th key=default>默认值</th><th key=desc>备注</th><th key=sub>其他信息</th>
</tr>
</thead><tbody className="ant-table-tbody"><tr key=0-0><td key=0><span style="padding-left: 0px"><span style="color: #8c8a8a"></span> code</span></td><td key=1><span>number</span></td><td key=2>必须</td><td key=3></td><td key=4><span style="white-space: pre-wrap">响应状态吗200表示成功</span></td><td key=5></td></tr><tr key=0-1><td key=0><span style="padding-left: 0px"><span style="color: #8c8a8a"></span> msg</span></td><td key=1><span>string</span></td><td key=2>必须</td><td key=3></td><td key=4><span style="white-space: pre-wrap">响应信息</span></td><td key=5></td></tr><tr key=0-2><td key=0><span style="padding-left: 0px"><span style="color: #8c8a8a"></span> data</span></td><td key=1><span>object</span></td><td key=2>必须</td><td key=3></td><td key=4><span style="white-space: pre-wrap">响应数据</span></td><td key=5></td></tr><tr key=0-2-0><td key=0><span style="padding-left: 20px"><span style="color: #8c8a8a">├─</span> total</span></td><td key=1><span>number</span></td><td key=2>必须</td><td key=3></td><td key=4><span style="white-space: pre-wrap">总数量</span></td><td key=5></td></tr><tr key=0-2-1><td key=0><span style="padding-left: 20px"><span style="color: #8c8a8a">├─</span> list</span></td><td key=1><span>object []</span></td><td key=2>必须</td><td key=3></td><td key=4><span style="white-space: pre-wrap">章节数据集合</span></td><td key=5><p key=3><span style="font-weight: '700'">item 类型: </span><span>object</span></p></td></tr><tr key=0-2-1-0><td key=0><span style="padding-left: 40px"><span style="color: #8c8a8a">├─</span> id</span></td><td key=1><span>string</span></td><td key=2>必须</td><td key=3></td><td key=4><span style="white-space: pre-wrap">章节ID</span></td><td key=5></td></tr><tr key=0-2-1-1><td key=0><span style="padding-left: 40px"><span style="color: #8c8a8a">├─</span> bookId</span></td><td key=1><span>string</span></td><td key=2>必须</td><td key=3></td><td key=4><span style="white-space: pre-wrap">小说ID</span></td><td key=5></td></tr><tr key=0-2-1-2><td key=0><span style="padding-left: 40px"><span style="color: #8c8a8a">├─</span> indexName</span></td><td key=1><span>string</span></td><td key=2>必须</td><td key=3></td><td key=4><span style="white-space: pre-wrap">章节名</span></td><td key=5></td></tr><tr key=0-2-1-3><td key=0><span style="padding-left: 40px"><span style="color: #8c8a8a">├─</span> isVip</span></td><td key=1><span>number</span></td><td key=2>必须</td><td key=3></td><td key=4><span style="white-space: pre-wrap">是否收费1:收费0:免费</span></td><td key=5></td></tr><tr key=0-2-1-4><td key=0><span style="padding-left: 40px"><span style="color: #8c8a8a">├─</span> updateTime</span></td><td key=1><span>string</span></td><td key=2>必须</td><td key=3></td><td key=4><span style="white-space: pre-wrap">更新时间</span></td><td key=5></td></tr><tr key=0-2-2><td key=0><span style="padding-left: 20px"><span style="color: #8c8a8a">├─</span> pageNum</span></td><td key=1><span>number</span></td><td key=2>必须</td><td key=3></td><td key=4><span style="white-space: pre-wrap">页码</span></td><td key=5></td></tr><tr key=0-2-3><td key=0><span style="padding-left: 20px"><span style="color: #8c8a8a">├─</span> pageSize</span></td><td key=1><span>number</span></td><td key=2>必须</td><td key=3></td><td key=4><span style="white-space: pre-wrap">分页大小</span></td><td key=5></td></tr><tr key=0-2-4><td key=0><span style="padding-left: 20px"><span style="color: #8c8a8a">├─</span> size</span></td><td key=1><span>number</span></td><td key=2>必须</td><td key=3></td><td key=4><span style="white-space: pre-wrap">当前页数量</span></td><td key=5></td></tr>
</tbody>
</table>
## 小说章节删除接口
<a id=小说章节删除接口> </a>
### 基本信息
**Path** /author/deleteIndex/{indexId}
**Method** DELETE
**接口描述:**
<p>作家后台章节管理页面点击删除按钮请求该接口删除小说章节内容</p>
### 请求参数
**Headers**
| 参数名称 | 参数值 | 是否必须 | 示例 | 备注 |
| ------------ | ------------ | ------------ | ------------ | ------------ |
| Content-Type | application/x-www-form-urlencoded | 是 | | |
| Authorization | | 是 | eyJhbGciOiJIUzUxMiJ9.eyJleHAiOjE2MDgzNDg0NzksInN1YiI6IntcImlkXCI6MTI1NTA2MDMyODMyMjAyNzUyMCxcInVzZXJuYW1lXCI6XCIxMzU2MDQyMTMyNFwiLFwibmlja05hbWVcIjpcIjEzNTYwNDIxMzI0XCJ9IiwiY3JlYXRlZCI6MTYwNzc0MzY3OTkxM30.0qhwis_zPb6t8wGNejMhDZ2iHCL9Tgh2UHd1gcQBCp8t6RW3ggSwtfo4l_RgMT_v8jOkLW91GzTVWlNnTE6LCA | 认证JWT请求登录接口成功后返回 |
**路径参数**
| 参数名称 | 示例 | 备注 |
| ------------ | ------------ | ------------ |
| indexId | 1337603246936645632 | 章节ID |
### 返回数据
<table>
<thead class="ant-table-thead">
<tr>
<th key=name>名称</th><th key=type>类型</th><th key=required>是否必须</th><th key=default>默认值</th><th key=desc>备注</th><th key=sub>其他信息</th>
</tr>
</thead><tbody className="ant-table-tbody"><tr key=0-0><td key=0><span style="padding-left: 0px"><span style="color: #8c8a8a"></span> code</span></td><td key=1><span>number</span></td><td key=2>必须</td><td key=3></td><td key=4><span style="white-space: pre-wrap">响应状态吗200表示成功</span></td><td key=5></td></tr><tr key=0-1><td key=0><span style="padding-left: 0px"><span style="color: #8c8a8a"></span> msg</span></td><td key=1><span>string</span></td><td key=2>必须</td><td key=3></td><td key=4><span style="white-space: pre-wrap">响应信息</span></td><td key=5></td></tr>
</tbody>
</table>
## 小说章节发布接口
<a id=小说章节发布接口> </a>
### 基本信息
**Path** /author/addBookContent
**Method** POST
**接口描述:**
<p>作家后台章节发布页面点击提交按钮请求该接口新增小说章节内容</p>
### 请求参数
**Headers**
| 参数名称 | 参数值 | 是否必须 | 示例 | 备注 |
| ------------ | ------------ | ------------ | ------------ | ------------ |
| Content-Type | application/x-www-form-urlencoded | 是 | | |
| Authorization | | 是 | eyJhbGciOiJIUzUxMiJ9.eyJleHAiOjE2MDgzNDg0NzksInN1YiI6IntcImlkXCI6MTI1NTA2MDMyODMyMjAyNzUyMCxcInVzZXJuYW1lXCI6XCIxMzU2MDQyMTMyNFwiLFwibmlja05hbWVcIjpcIjEzNTYwNDIxMzI0XCJ9IiwiY3JlYXRlZCI6MTYwNzc0MzY3OTkxM30.0qhwis_zPb6t8wGNejMhDZ2iHCL9Tgh2UHd1gcQBCp8t6RW3ggSwtfo4l_RgMT_v8jOkLW91GzTVWlNnTE6LCA | 认证JWT请求登录接口成功后返回 |
**Body**
| 参数名称 | 参数类型 | 是否必须 | 示例 | 备注 |
| ------------ | ------------ | ------------ | ------------ | ------------ |
| bookId | text | 是 | 1334337530296893441 | 小说ID |
| indexName | text | 是 | 第六章未婚妻(下) | 章节名 |
| content | text | 是 | 开始之时,李七夜还是生疏无比,那怕他对于刀术的所有奥义了然于胸,但是,他出刀之时依然会颤抖,无法达到妙及巅毫的要求。 | 章节内容 |
| isVip | text | 是 | 1 | 是否收费1:收费0:免费 |
### 返回数据
<table>
<thead class="ant-table-thead">
<tr>
<th key=name>名称</th><th key=type>类型</th><th key=required>是否必须</th><th key=default>默认值</th><th key=desc>备注</th><th key=sub>其他信息</th>
</tr>
</thead><tbody className="ant-table-tbody"><tr key=0-0><td key=0><span style="padding-left: 0px"><span style="color: #8c8a8a"></span> code</span></td><td key=1><span>number</span></td><td key=2>必须</td><td key=3></td><td key=4><span style="white-space: pre-wrap">响应状态吗200表示成功</span></td><td key=5></td></tr><tr key=0-1><td key=0><span style="padding-left: 0px"><span style="color: #8c8a8a"></span> msg</span></td><td key=1><span>string</span></td><td key=2>必须</td><td key=3></td><td key=4><span style="white-space: pre-wrap">响应信息</span></td><td key=5></td></tr>
</tbody>
</table>

View File

@ -5,7 +5,7 @@
<groupId>com.java2nb</groupId>
<artifactId>novel-admin</artifactId>
<version>2.11.0</version>
<version>3.1.0</version>
<packaging>jar</packaging>
<name>novel-admin</name>

View File

@ -147,7 +147,7 @@
<tr>
<td>下载地址</td>
<td>
<a href="https://gitee.com/xiongxyang/fiction_house" target="_blank">Gitee</a> /
<a href="https://gitee.com/novel_dev_team/fiction_house" target="_blank">Gitee</a> /
<a href="https://github.com/201206030/fiction_house" target="_blank">Github</a>
</td>
</tr>
@ -155,8 +155,8 @@
<td>Gitee</td>
<td style="padding-bottom: 0;">
<div class="layui-btn-container">
<a href='https://gitee.com/xiongxyang/fiction_house/stargazers'><img src='https://gitee.com/xiongxyang/fiction_house/badge/star.svg?theme=dark' alt='star'></img></a>
<a href='https://gitee.com/xiongxyang/fiction_house/members'><img src='https://gitee.com/xiongxyang/fiction_house/badge/fork.svg?theme=dark' alt='fork'></img></a>
<a href='https://gitee.com/novel_dev_team/fiction_house/stargazers'><img src='https://gitee.com/novel_dev_team/fiction_house/badge/star.svg?theme=dark' alt='star'></img></a>
<a href='https://gitee.com/novel_dev_team/fiction_house/members'><img src='https://gitee.com/novel_dev_team/fiction_house/badge/fork.svg?theme=dark' alt='fork'></img></a>
</div>
</td>
</tr>
@ -200,7 +200,7 @@
<tr>
<td>下载地址</td>
<td>
<a href="https://gitee.com/xiongxyang/novel-plus" target="_blank">Gitee</a> /
<a href="https://gitee.com/novel_dev_team/novel-plus" target="_blank">Gitee</a> /
<a href="https://github.com/201206030/novel-plus" target="_blank">Github</a>
</td>
</tr>
@ -208,8 +208,8 @@
<td>Gitee</td>
<td style="padding-bottom: 0;">
<div class="layui-btn-container">
<a href='https://gitee.com/xiongxyang/novel-plus/stargazers'><img src='https://gitee.com/xiongxyang/novel-plus/badge/star.svg?theme=dark' alt='star'></img></a>
<a href='https://gitee.com/xiongxyang/novel-plus/members'><img src='https://gitee.com/xiongxyang/novel-plus/badge/fork.svg?theme=dark' alt='fork'></img></a>
<a href='https://gitee.com/novel_dev_team/novel-plus/stargazers'><img src='https://gitee.com/novel_dev_team/novel-plus/badge/star.svg?theme=dark' alt='star'></img></a>
<a href='https://gitee.com/novel_dev_team/novel-plus/members'><img src='https://gitee.com/novel_dev_team/novel-plus/badge/fork.svg?theme=dark' alt='fork'></img></a>
</div>
</td>
</tr>
@ -253,7 +253,7 @@
<tr>
<td>下载地址</td>
<td>
<a href="https://gitee.com/xiongxyang/novel-cloud" target="_blank">Gitee</a> /
<a href="https://gitee.com/novel_dev_team/novel-cloud" target="_blank">Gitee</a> /
<a href="https://github.com/201206030/novel-cloud" target="_blank">Github</a>
</td>
</tr>
@ -261,8 +261,8 @@
<td>Gitee</td>
<td style="padding-bottom: 0;">
<div class="layui-btn-container">
<a href='https://gitee.com/xiongxyang/novel-cloud/stargazers'><img src='https://gitee.com/xiongxyang/novel-cloud/badge/star.svg?theme=dark' alt='star'></img></a>
<a href='https://gitee.com/xiongxyang/novel-cloud/members'><img src='https://gitee.com/xiongxyang/novel-cloud/badge/fork.svg?theme=dark' alt='fork'></img></a>
<a href='https://gitee.com/novel_dev_team/novel-cloud/stargazers'><img src='https://gitee.com/novel_dev_team/novel-cloud/badge/star.svg?theme=dark' alt='star'></img></a>
<a href='https://gitee.com/novel_dev_team/novel-cloud/members'><img src='https://gitee.com/novel_dev_team/novel-cloud/badge/fork.svg?theme=dark' alt='fork'></img></a>
</div>
</td>
</tr>

View File

@ -5,7 +5,7 @@
<parent>
<artifactId>novel</artifactId>
<groupId>com.java2nb</groupId>
<version>3.0.2</version>
<version>3.1.0</version>
</parent>
<modelVersion>4.0.0</modelVersion>

View File

@ -1,9 +1,6 @@
package com.java2nb.novel.core.utils;
import org.apache.http.client.HttpClient;
import org.apache.http.impl.client.DefaultHttpClient;
import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
import org.springframework.http.*;
import org.springframework.web.client.RestTemplate;
/**
@ -28,4 +25,23 @@ public class HttpUtil {
return null;
}
}
public static String getByHttpClientWithChrome(String url) {
try {
HttpHeaders headers = new HttpHeaders();
headers.add("user-agent","Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/87.0.4280.67 Safari/537.36");
HttpEntity<String> requestEntity = new HttpEntity<>(null, headers);
ResponseEntity<String> forEntity = restTemplate.exchange(url.toString(), HttpMethod.GET, requestEntity, String.class);
if (forEntity.getStatusCode() == HttpStatus.OK) {
return forEntity.getBody();
} else {
return null;
}
} catch (Exception e) {
e.printStackTrace();
return null;
}
}
}

View File

@ -5,7 +5,7 @@
<parent>
<artifactId>novel</artifactId>
<groupId>com.java2nb</groupId>
<version>3.0.2</version>
<version>3.1.0</version>
</parent>
<modelVersion>4.0.0</modelVersion>

View File

@ -9,10 +9,7 @@ import com.java2nb.novel.service.CrawlService;
import com.java2nb.novel.vo.CrawlSingleTaskVO;
import com.java2nb.novel.vo.CrawlSourceVO;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.bind.annotation.*;
/**
* @author Administrator
@ -39,7 +36,7 @@ public class CrawlController {
/**
* 爬虫源分页列表查询
* */
@PostMapping("listCrawlByPage")
@GetMapping("listCrawlByPage")
public ResultBean listCrawlByPage(@RequestParam(value = "curr", defaultValue = "1") int page, @RequestParam(value = "limit", defaultValue = "10") int pageSize){
return ResultBean.ok(new PageInfo<>(BeanUtil.copyList(crawlService.listCrawlByPage(page,pageSize), CrawlSourceVO.class)
@ -71,7 +68,7 @@ public class CrawlController {
/**
* 单本采集任务分页列表查询
* */
@PostMapping("listCrawlSingleTaskByPage")
@GetMapping("listCrawlSingleTaskByPage")
public ResultBean listCrawlSingleTaskByPage(@RequestParam(value = "curr", defaultValue = "1") int page, @RequestParam(value = "limit", defaultValue = "10") int pageSize){
return ResultBean.ok(new PageInfo<>(BeanUtil.copyList(crawlService.listCrawlSingleTaskByPage(page,pageSize), CrawlSingleTaskVO.class)
@ -81,8 +78,8 @@ public class CrawlController {
/**
* 删除采集任务
* */
@PostMapping("delCrawlSingleTask")
public ResultBean delCrawlSingleTask(Long id){
@DeleteMapping("delCrawlSingleTask/{id}")
public ResultBean delCrawlSingleTask(@PathVariable("id") Long id){
crawlService.delCrawlSingleTask(id);

View File

@ -11,8 +11,7 @@ import com.java2nb.novel.utils.Constants;
import lombok.SneakyThrows;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.StringUtils;
import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
import org.springframework.http.*;
import org.springframework.web.client.RestTemplate;
import java.text.SimpleDateFormat;
@ -44,7 +43,7 @@ public class CrawlParser {
public static Book parseBook(RuleBean ruleBean, String bookId) {
Book book = new Book();
String bookDetailUrl = ruleBean.getBookDetailUrl().replace("{bookId}", bookId);
String bookDetailHtml = getByHttpClient(bookDetailUrl);
String bookDetailHtml = getByHttpClientWithChrome(bookDetailUrl);
if (bookDetailHtml != null) {
Pattern bookNamePatten = compile(ruleBean.getBookNamePatten());
Matcher bookNameMatch = bookNamePatten.matcher(bookDetailHtml);
@ -157,7 +156,7 @@ public class CrawlParser {
List<BookContent> contentList = new ArrayList<>();
//读取目录
String indexListUrl = ruleBean.getBookIndexUrl().replace("{bookId}", sourceBookId);
String indexListHtml = getByHttpClient(indexListUrl);
String indexListHtml = getByHttpClientWithChrome(indexListUrl);
if (indexListHtml != null) {
if(StringUtils.isNotBlank(ruleBean.getBookIndexStart())){
@ -186,10 +185,41 @@ public class CrawlParser {
String indexName = indexNameMatch.group(1);
if (hasIndex == null || !StringUtils.deleteWhitespace(hasIndex.getIndexName()).equals(StringUtils.deleteWhitespace(indexName))) {
String contentUrl = ruleBean.getBookContentUrl().replace("{bookId}", sourceBookId).replace("{indexId}", indexIdMatch.group(1));
String sourceIndexId = indexIdMatch.group(1);
String bookContentUrl = ruleBean.getBookContentUrl();
int calStart = bookContentUrl.indexOf("{cal_");
if(calStart != -1){
//内容页URL需要进行计算才能得到
String calStr = bookContentUrl.substring(calStart,calStart+bookContentUrl.substring(calStart).indexOf("}"));
String[] calArr = calStr.split("_");
int calType = Integer.parseInt(calArr[1]);
if(calType == 1) {
///{cal_1_1_3}_{bookId}/{indexId}.html
//第一种计算规则去除第x个参数的最后y个字母
int x = Integer.parseInt(calArr[2]);
int y = Integer.parseInt(calArr[3]);
String calResult;
if (x == 1) {
calResult = sourceBookId.substring(0, sourceBookId.length() - y);
} else {
calResult = sourceIndexId.substring(0, sourceBookId.length() - y);
}
if(calResult.length() == 0){
calResult = "0";
}
bookContentUrl = bookContentUrl.replace(calStr+"}", calResult);
}
}
String contentUrl = bookContentUrl.replace("{bookId}", sourceBookId).replace("{indexId}", sourceIndexId);
//查询章节内容
String contentHtml = getByHttpClient(contentUrl);
String contentHtml = getByHttpClientWithChrome(contentUrl);
if (contentHtml != null && !contentHtml.contains("正在手打中")) {
String content = contentHtml.substring(contentHtml.indexOf(ruleBean.getContentStart()) + ruleBean.getContentStart().length());
content = content.substring(0, content.indexOf(ruleBean.getContentEnd()));
@ -280,6 +310,22 @@ public class CrawlParser {
}
private static String getByHttpClientWithChrome(String url) {
try {
String body = HttpUtil.getByHttpClientWithChrome(url);
if(body != null && body.length() < Constants.INVALID_HTML_LENGTH){
return processErrorHttpResult(url);
}
//成功获得html内容
return body;
} catch (Exception e) {
e.printStackTrace();
}
return processErrorHttpResult(url);
}
@SneakyThrows
private static String processErrorHttpResult(String url){
Integer count = retryCount.get();

View File

@ -30,6 +30,7 @@ import java.util.regex.Matcher;
import java.util.regex.Pattern;
import static com.java2nb.novel.core.utils.HttpUtil.getByHttpClient;
import static com.java2nb.novel.core.utils.HttpUtil.getByHttpClientWithChrome;
import static com.java2nb.novel.mapper.BookDynamicSqlSupport.crawlBookId;
import static com.java2nb.novel.mapper.BookDynamicSqlSupport.crawlSourceId;
import static com.java2nb.novel.mapper.CrawlSourceDynamicSqlSupport.*;
@ -217,7 +218,7 @@ public class CrawlServiceImpl implements CrawlService {
.replace("{catId}", ruleBean.getCatIdRule().get("catId" + catId))
.replace("{page}", page + "");
String bookListHtml = getByHttpClient(catBookListUrl);
String bookListHtml = getByHttpClientWithChrome(catBookListUrl);
if (bookListHtml != null) {
Pattern bookIdPatten = Pattern.compile(ruleBean.getBookIdPatten());
Matcher bookIdMatcher = bookIdPatten.matcher(bookListHtml);

View File

@ -96,7 +96,7 @@
<script language="javascript" type="text/javascript">
$(function () {
$.ajax({
type: "POST",
type: "get",
url: "/crawl/listCrawlByPage",
data: {'curr':1,'limit':100},
dataType: "json",

View File

@ -125,7 +125,7 @@
function search(curr, limit) {
$.ajax({
type: "POST",
type: "get",
url: "/crawl/listCrawlSingleTaskByPage",
data: {'curr': curr, 'limit': limit},
dataType: "json",
@ -205,9 +205,9 @@
function del(id) {
$.ajax({
type: "POST",
url: "/crawl/delCrawlSingleTask",
data: {'id': id},
type: "delete",
url: "/crawl/delCrawlSingleTask/"+id,
data: {},
dataType: "json",
success: function (data) {
if (data.code == 200) {

View File

@ -117,7 +117,7 @@
示例:<b></b>
<li><input type="text" id="visitCountPatten" class="s_input icon_key"
placeholder="小说点击量的正则表达式"></li>
示例:<b>&lt;p class=\"review\"&gt;</b>
示例:<b>&lt;p class="review"&gt;</b>
<li><input type="text" id="descStart" class="s_input icon_key"
placeholder="小说简介开始截取字符串"></li>
示例:<b>&lt;/p&gt;</b>

View File

@ -122,7 +122,7 @@
function search(curr, limit) {
$.ajax({
type: "POST",
type: "get",
url: "/crawl/listCrawlByPage",
data: {'curr':curr,'limit':limit},
dataType: "json",

View File

@ -5,7 +5,7 @@
<parent>
<artifactId>novel</artifactId>
<groupId>com.java2nb</groupId>
<version>3.0.2</version>
<version>3.1.0</version>
</parent>
<modelVersion>4.0.0</modelVersion>

View File

@ -13,10 +13,7 @@ import com.java2nb.novel.service.BookService;
import com.java2nb.novel.service.FriendLinkService;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.bind.annotation.*;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
@ -38,7 +35,7 @@ public class AuthorController extends BaseController{
/**
* 校验笔名是否存在
* */
@PostMapping("checkPenName")
@GetMapping("checkPenName")
public ResultBean checkPenName(String penName){
return ResultBean.ok(authorService.checkPenName(penName));
@ -47,7 +44,7 @@ public class AuthorController extends BaseController{
/**
* 作家发布小说分页列表查询
* */
@PostMapping("listBookByPage")
@GetMapping("listBookByPage")
public ResultBean listBookByPage(@RequestParam(value = "curr", defaultValue = "1") int page, @RequestParam(value = "limit", defaultValue = "10") int pageSize ,HttpServletRequest request){
return ResultBean.ok(new PageInfo<>(bookService.listBookPageByUserId(getUserDetails(request).getId(),page,pageSize)
@ -90,8 +87,8 @@ public class AuthorController extends BaseController{
/**
* 删除章节
*/
@PostMapping("deleteIndex")
public ResultBean deleteIndex(Long indexId, HttpServletRequest request) {
@DeleteMapping("deleteIndex/{indexId}")
public ResultBean deleteIndex(@PathVariable("indexId") Long indexId, HttpServletRequest request) {
Author author = checkAuthor(request);
@ -136,8 +133,8 @@ public class AuthorController extends BaseController{
/**
* 查询章节内容
*/
@PostMapping("queryIndexContent")
public ResultBean queryIndexContent(Long indexId, HttpServletRequest request) {
@GetMapping("queryIndexContent/{indexId}")
public ResultBean queryIndexContent(@PathVariable("indexId") Long indexId, HttpServletRequest request) {
Author author = checkAuthor(request);
@ -167,7 +164,7 @@ public class AuthorController extends BaseController{
/**
* 作家日收入统计数据分页列表查询
* */
@PostMapping("listIncomeDailyByPage")
@GetMapping("listIncomeDailyByPage")
public ResultBean listIncomeDailyByPage(@RequestParam(value = "curr", defaultValue = "1") int page,
@RequestParam(value = "limit", defaultValue = "10") int pageSize ,
@RequestParam(value = "bookId", defaultValue = "0") Long bookId,
@ -183,7 +180,7 @@ public class AuthorController extends BaseController{
/**
* 作家月收入统计数据分页列表查询
* */
@PostMapping("listIncomeMonthByPage")
@GetMapping("listIncomeMonthByPage")
public ResultBean listIncomeMonthByPage(@RequestParam(value = "curr", defaultValue = "1") int page,
@RequestParam(value = "limit", defaultValue = "10") int pageSize ,
@RequestParam(value = "bookId", defaultValue = "0") Long bookId,

View File

@ -12,10 +12,7 @@ import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.amqp.rabbit.core.RabbitTemplate;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.bind.annotation.*;
import javax.servlet.http.HttpServletRequest;
import java.util.HashMap;
@ -41,7 +38,7 @@ public class BookController extends BaseController{
/**
* 查询首页小说设置列表数据
* */
@PostMapping("listBookSetting")
@GetMapping("listBookSetting")
public ResultBean listBookSetting(){
return ResultBean.ok(bookService.listBookSettingVO());
}
@ -49,7 +46,7 @@ public class BookController extends BaseController{
/**
* 查询首页点击榜单数据
* */
@PostMapping("listClickRank")
@GetMapping("listClickRank")
public ResultBean listClickRank(){
return ResultBean.ok(bookService.listClickRank());
}
@ -57,7 +54,7 @@ public class BookController extends BaseController{
/**
* 查询首页新书榜单数据
* */
@PostMapping("listNewRank")
@GetMapping("listNewRank")
public ResultBean listNewRank(){
return ResultBean.ok(bookService.listNewRank());
}
@ -65,7 +62,7 @@ public class BookController extends BaseController{
/**
* 查询首页更新榜单数据
* */
@PostMapping("listUpdateRank")
@GetMapping("listUpdateRank")
public ResultBean listUpdateRank(){
return ResultBean.ok(bookService.listUpdateRank());
}
@ -73,7 +70,7 @@ public class BookController extends BaseController{
/**
* 查询小说分类列表
* */
@PostMapping("listBookCategory")
@GetMapping("listBookCategory")
public ResultBean listBookCategory(){
return ResultBean.ok(bookService.listBookCategory());
}
@ -81,7 +78,7 @@ public class BookController extends BaseController{
/**
* 分页搜索
* */
@PostMapping("searchByPage")
@GetMapping("searchByPage")
public ResultBean searchByPage(BookSP bookSP, @RequestParam(value = "curr", defaultValue = "1") int page, @RequestParam(value = "limit", defaultValue = "20") int pageSize){
PageInfo<BookVO> pageInfo = bookService.searchByPage(bookSP,page,pageSize);
return ResultBean.ok(pageInfo);
@ -90,8 +87,8 @@ public class BookController extends BaseController{
/**
* 查询小说详情信息
* */
@PostMapping("queryBookDetail")
public ResultBean queryBookDetail(Long id){
@GetMapping("queryBookDetail/{id}")
public ResultBean queryBookDetail(@PathVariable("id") Long id){
return ResultBean.ok(bookService.queryBookDetail(id));
}
@ -99,7 +96,7 @@ public class BookController extends BaseController{
/**
* 查询小说排行信息
* */
@PostMapping("listRank")
@GetMapping("listRank")
public ResultBean listRank(@RequestParam(value = "type",defaultValue = "0") Byte type,@RequestParam(value = "limit",defaultValue = "30") Integer limit){
return ResultBean.ok(bookService.listRank(type,limit));
}
@ -120,7 +117,7 @@ public class BookController extends BaseController{
/**
* 查询章节相关信息
* */
@PostMapping("queryBookIndexAbout")
@GetMapping("queryBookIndexAbout")
public ResultBean queryBookIndexAbout(Long bookId,Long lastBookIndexId) {
Map<String,Object> data = new HashMap<>(2);
data.put("bookIndexCount",bookService.queryIndexCount(bookId));
@ -135,7 +132,7 @@ public class BookController extends BaseController{
/**
* 根据分类id查询同类推荐书籍
* */
@PostMapping("listRecBookByCatId")
@GetMapping("listRecBookByCatId")
public ResultBean listRecBookByCatId(Integer catId) {
return ResultBean.ok(bookService.listRecBookByCatId(catId));
}
@ -144,7 +141,7 @@ public class BookController extends BaseController{
/**
*分页查询书籍评论列表
* */
@PostMapping("listCommentByPage")
@GetMapping("listCommentByPage")
public ResultBean listCommentByPage(@RequestParam("bookId") Long bookId,@RequestParam(value = "curr", defaultValue = "1") int page, @RequestParam(value = "limit", defaultValue = "5") int pageSize) {
return ResultBean.ok(new PageInfo<>(bookService.listCommentByPage(null,bookId,page,pageSize)));
}
@ -165,7 +162,7 @@ public class BookController extends BaseController{
/**
* 根据小说ID查询小说前十条最新更新目录集合
* */
@PostMapping("queryNewIndexList")
@GetMapping("queryNewIndexList")
public ResultBean queryNewIndexList(Long bookId){
return ResultBean.ok(bookService.queryIndexList(bookId,"index_num desc",1,10));
}
@ -173,8 +170,8 @@ public class BookController extends BaseController{
/**
* 目录页
* */
@PostMapping("/queryIndexList")
public ResultBean indexList(Long bookId,@RequestParam(value = "curr", defaultValue = "1") int page, @RequestParam(value = "limit", defaultValue = "5") int pageSize,@RequestParam(value = "orderBy") String orderBy) {
@GetMapping("/queryIndexList")
public ResultBean indexList(Long bookId,@RequestParam(value = "curr", defaultValue = "1") int page, @RequestParam(value = "limit", defaultValue = "5") int pageSize,@RequestParam(value = "orderBy",defaultValue = "index_num desc") String orderBy) {
return ResultBean.ok(new PageInfo<>(bookService.queryIndexList(bookId,orderBy,page,pageSize)));
}

View File

@ -4,6 +4,7 @@ import com.java2nb.novel.core.bean.ResultBean;
import com.java2nb.novel.service.FriendLinkService;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
@ -22,7 +23,7 @@ public class FriendLinkController {
/**
* 查询首页友情链接
* */
@PostMapping("listIndexLink")
@GetMapping("listIndexLink")
public ResultBean listIndexLink(){
return ResultBean.ok(friendLinkService.listIndexLink());
}

View File

@ -5,10 +5,7 @@ import com.java2nb.novel.core.bean.ResultBean;
import com.java2nb.novel.service.NewsService;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.bind.annotation.*;
/**
* @author 11797
@ -24,7 +21,7 @@ public class NewsController {
/**
* 查询首页新闻
* */
@PostMapping("listIndexNews")
@GetMapping("listIndexNews")
public ResultBean listIndexNews(){
return ResultBean.ok(newsService.listIndexNews());
}
@ -32,7 +29,7 @@ public class NewsController {
/**
* 分页查询新闻列表
* */
@PostMapping("listByPage")
@GetMapping("listByPage")
public ResultBean listByPage(@RequestParam(value = "curr", defaultValue = "1") int page, @RequestParam(value = "limit", defaultValue = "5") int pageSize){
return ResultBean.ok(new PageInfo<>(newsService.listByPage(page,pageSize)));
}

View File

@ -15,10 +15,7 @@ import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.StringUtils;
import org.springframework.validation.BindingResult;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.bind.annotation.*;
import javax.servlet.http.HttpServletRequest;
import javax.validation.Valid;
@ -115,7 +112,7 @@ public class UserController extends BaseController {
/**
* 查询小说是否已加入书架
*/
@PostMapping("queryIsInShelf")
@GetMapping("queryIsInShelf")
public ResultBean queryIsInShelf(Long bookId, HttpServletRequest request) {
UserDetails userDetails = getUserDetails(request);
if (userDetails == null) {
@ -140,8 +137,8 @@ public class UserController extends BaseController {
/**
* 移出书架
* */
@PostMapping("removeFromBookShelf")
public ResultBean removeFromBookShelf(Long bookId, HttpServletRequest request) {
@DeleteMapping("removeFromBookShelf/{bookId}")
public ResultBean removeFromBookShelf(@PathVariable("bookId") Long bookId, HttpServletRequest request) {
UserDetails userDetails = getUserDetails(request);
if (userDetails == null) {
return ResultBean.fail(ResponseStatus.NO_LOGIN);
@ -153,7 +150,7 @@ public class UserController extends BaseController {
/**
* 分页查询书架
* */
@PostMapping("listBookShelfByPage")
@GetMapping("listBookShelfByPage")
public ResultBean listBookShelfByPage(@RequestParam(value = "curr", defaultValue = "1") int page, @RequestParam(value = "limit", defaultValue = "10") int pageSize,HttpServletRequest request) {
UserDetails userDetails = getUserDetails(request);
if (userDetails == null) {
@ -165,7 +162,7 @@ public class UserController extends BaseController {
/**
* 分页查询阅读记录
* */
@PostMapping("listReadHistoryByPage")
@GetMapping("listReadHistoryByPage")
public ResultBean listReadHistoryByPage(@RequestParam(value = "curr", defaultValue = "1") int page, @RequestParam(value = "limit", defaultValue = "10") int pageSize,HttpServletRequest request) {
UserDetails userDetails = getUserDetails(request);
if (userDetails == null) {
@ -203,7 +200,7 @@ public class UserController extends BaseController {
/**
* 分页查询我的反馈列表
* */
@PostMapping("listUserFeedBackByPage")
@GetMapping("listUserFeedBackByPage")
public ResultBean listUserFeedBackByPage(@RequestParam(value = "curr", defaultValue = "1") int page, @RequestParam(value = "limit", defaultValue = "5") int pageSize, HttpServletRequest request){
UserDetails userDetails = getUserDetails(request);
if (userDetails == null) {
@ -215,7 +212,7 @@ public class UserController extends BaseController {
/**
* 查询个人信息
* */
@PostMapping("userInfo")
@GetMapping("userInfo")
public ResultBean userInfo(HttpServletRequest request) {
UserDetails userDetails = getUserDetails(request);
if (userDetails == null) {
@ -263,7 +260,7 @@ public class UserController extends BaseController {
/**
* 分页查询用户书评
* */
@PostMapping("listCommentByPage")
@GetMapping("listCommentByPage")
public ResultBean listCommentByPage(@RequestParam(value = "curr", defaultValue = "1") int page, @RequestParam(value = "limit", defaultValue = "5") int pageSize,HttpServletRequest request) {
UserDetails userDetails = getUserDetails(request);
if (userDetails == null) {

View File

@ -2,39 +2,13 @@ var SCYC = {
}
$.extend($.fn.validatebox.defaults.rules, {
checkBookName: {
validator: function (value, param) {
var url = "/aspx/book/booklist.aspx";
var data = { bid: param, bname: value, act: "getbooknamerepeat" };
var bool = false;
$.ajax({
type: "post",
dataType: 'html',
async: false,
url: url,
data: data,
cache: false,
success: function (result) {
if (result == "1") {
$.fn.validatebox.defaults.rules.checkBookName.message = '该书名已存在,请重新输入';
bool = false;
} else {
$.fn.validatebox.defaults.rules.checkBookName.message = '';
bool = true;
}
}
});
return bool;
message: '';
}
},
checkNiceName: {
checkPenName: {
validator: function (value, param) {
var url = "/author/checkPenName";
var data = { penName: value};
var bool = false;
$.ajax({
type: "post",
type: "get",
dataType: 'json',
async: false,
url: url,
@ -42,10 +16,10 @@ $.extend($.fn.validatebox.defaults.rules, {
cache: false,
success: function (result) {
if (result.data) {
$.fn.validatebox.defaults.rules.checkNiceName.message = '笔名已存在,请重新输入';
$.fn.validatebox.defaults.rules.checkPenName.message = '笔名已存在,请重新输入';
bool = false;
} else {
$.fn.validatebox.defaults.rules.checkNiceName.message = '';
$.fn.validatebox.defaults.rules.checkPenName.message = '';
bool = true;
}
}

View File

@ -56,7 +56,7 @@
function search(curr, limit) {
$.ajax({
type: "POST",
type: "get",
url: "/news/listByPage",
data: {'curr':curr,'limit':limit},
dataType: "json",

View File

@ -118,7 +118,7 @@
$.ajax({
type: "POST",
type: "get",
url: "/author/listIncomeMonthByPage",
data: {'curr':curr,'limit':limit},
dataType: "json",

View File

@ -124,7 +124,7 @@
}
$.ajax({
type: "POST",
type: "get",
url: "/author/listIncomeDailyByPage",
data: data,
dataType: "json",

View File

@ -134,9 +134,9 @@
}
$.ajax({
type: "POST",
url: "/author/queryIndexContent",
data: {'indexId':indexId},
type: "get",
url: "/author/queryIndexContent/"+indexId,
data: {},
dataType: "json",
success: function (data) {
if (data.code == 200) {

View File

@ -144,7 +144,7 @@
function search(curr, limit) {
$.ajax({
type: "POST",
type: "get",
url: "/author/listBookByPage",
data: {'curr':curr,'limit':limit},
dataType: "json",

View File

@ -144,7 +144,7 @@
function search(curr, limit) {
$.ajax({
type: "POST",
type: "get",
url: "/book/queryIndexList",
data: {'bookId': bookId, 'curr': curr, 'limit': limit, 'orderBy': 'index_num desc'},
dataType: "json",
@ -299,9 +299,9 @@
layer.close(index);
$.ajax({
type: "POST",
url: "/author/deleteIndex",
data: {'indexId': indexId},
type: "delete",
url: "/author/deleteIndex/"+indexId,
data: {},
dataType: "json",
success: function (data) {
if (data.code == 200) {

View File

@ -60,7 +60,7 @@
作者笔名:
</td>
<td>
<input name="penName" th:value="${author.penName}" type="text" maxlength="8" id="TxtNiceName" class="easyui-validatebox inpMain" data-options="required:true" validType="checkNiceName" />
<input name="penName" th:value="${author.penName}" type="text" maxlength="8" id="TxtNiceName" class="easyui-validatebox inpMain" data-options="required:true" validType="checkPenName" />
</td>
<td>

View File

@ -119,7 +119,7 @@
function searchComments(curr, limit) {
$.ajax({
type: "POST",
type: "get",
url: "/book/listCommentByPage",
data: {'bookId': $("#bookId").val(),'curr':curr,'limit':limit},
dataType: "json",

View File

@ -234,7 +234,7 @@
}
//查询是否在书架
$.ajax({
type: "POST",
type: "get",
url: "/user/queryIsInShelf",
data: {'bookId':$("#bookId").val()},
dataType: "json",

View File

@ -199,7 +199,7 @@
var lastBookIndexId = $("#lastBookIndexId").val();
if(lastBookIndexId){
$.ajax({
type: "POST",
type: "get",
url: "/book/queryBookIndexAbout",
data: {'bookId': bookId, 'lastBookIndexId': lastBookIndexId},
dataType: "json",
@ -226,7 +226,7 @@
<script language="javascript" type="text/javascript">
//查询是否在书架
$.ajax({
type: "POST",
type: "get",
url: "/user/queryIsInShelf",
data: {'bookId': $("#bookId").val()},
dataType: "json",
@ -255,7 +255,7 @@
function loadCommentList(){
$.ajax({
type: "POST",
type: "get",
url: "/book/listCommentByPage",
data: {'bookId': $("#bookId").val()},
dataType: "json",
@ -335,7 +335,7 @@
var bookCatId = $("#bookCatId").val();
//查询同类推荐
$.ajax({
type: "POST",
type: "get",
url: "/book/listRecBookByCatId",
data: {'catId': bookCatId},
dataType: "json",

View File

@ -88,7 +88,7 @@
function listRank(rankType){
$.ajax({
type: "POST",
type: "get",
url: "/book/listRank",
data: {'type':rankType,'limit':30},
dataType: "json",

View File

@ -163,7 +163,7 @@
$.ajax({
type: "POST",
type: "get",
url: "/book/searchByPage",
data: searchData,
dataType: "json",
@ -227,7 +227,7 @@
function listBookCategory(c) {
$.ajax({
type: "POST",
type: "get",
url: "/book/listBookCategory",
data: {},
dataType: "json",

View File

@ -2,7 +2,7 @@
<div class="box_center cf">
<div class="copyright">
<ul >
<li class="menu"><a href="/?to=mobile">手机站</a><i class="line">|</i><a href="/">网站首页</a><i class="line">|</i><a href="/about/default.html" >关于我们</a><i class="line">|</i><a href="/about/contact.html" >联系我们</a><i class="line">|</i><a href="/user/feedback.html" >反馈留言</a><i class="line">|</i><a href="/author/index.html" >作家专区</a></li>
<li class="menu"><a href="/?to=mobile">手机站</a><i class="line">|</i><a href="/">网站首页</a><i class="line">|</i><a href="/about/default.html" >关于我们</a><i class="line">|</i><a href="/about/contact.html" >联系我们</a><i class="line">|</i><a href="/user/feedback.html" >反馈留言</a><i class="line">|</i><a href="/author/index.html" >作家专区</a><i class="line">|</i><a href="/mobile/fiction_house.apk" >客户端</a></li>
<li th:text="'Copyright (C) '+#{website.domain}+' All rights reserved&nbsp;&nbsp;'+#{website.name}+'版权所有'"></li>
</ul>

View File

@ -157,7 +157,7 @@
$(function () {
//加载首页书籍设置数据
$.ajax({
type: "POST",
type: "get",
url: "/book/listBookSetting",
data: {},
dataType: "json",
@ -331,7 +331,7 @@
})
//首页新闻查询
$.ajax({
type: "POST",
type: "get",
url: "/news/listIndexNews",
data: {},
dataType: "json",
@ -359,7 +359,7 @@
//点击榜单数据查询
$.ajax({
type: "POST",
type: "get",
url: "/book/listClickRank",
data: {},
dataType: "json",
@ -402,7 +402,7 @@
})
//新书榜单查询
$.ajax({
type: "POST",
type: "get",
url: "/book/listNewRank",
data: {},
dataType: "json",
@ -446,7 +446,7 @@
})
//更新榜单查询
$.ajax({
type: "POST",
type: "get",
url: "/book/listUpdateRank",
data: {},
dataType: "json",
@ -504,7 +504,7 @@
})
//友情链接查询
$.ajax({
type: "POST",
type: "get",
url: "/friendLink/listIndexLink",
data: {},
dataType: "json",

View File

@ -195,7 +195,7 @@
<script>
//查询是否在书架
$.ajax({
type: "POST",
type: "get",
url: "/user/queryIsInShelf",
data: {'bookId': $("#bookIdHidden").val()},
dataType: "json",
@ -221,7 +221,7 @@
//查询最新目录集合
$.ajax({
type: "POST",
type: "get",
url: "/book/queryNewIndexList",
data: {'bookId': $("#bookIdHidden").val()},
dataType: "json",

View File

@ -168,7 +168,7 @@
}
$.ajax({
type: "POST",
type: "get",
url: "/book/searchByPage",
data: searchData,
dataType: "json",

View File

@ -4,7 +4,7 @@
<a href="/?to=pc" style="font-size: 14px;color: #fff;margin-left: 8px">电脑站</a>
<a href="/user/read_history.html" style="font-size: 14px;color: #fff;margin-left: 8px">阅读记录</a>
<a href="/user/favorites.html" style="font-size: 14px;color: #fff;margin-left: 8px">书架</a>
<a href="/mobile/HotBook.apk" style="font-size: 14px;color: #fff;margin-left: 8px">客户端</a>
<a href="/mobile/fiction_house.apk" style="font-size: 14px;color: #fff;margin-left: 8px">客户端</a>
<!--<a href="https://www.zinglizingli.xyz/me/index.html" style="font-size: 14px;color: #fff;margin-left: 8px">开发者</a>-->

View File

@ -91,7 +91,7 @@
<dd><a href="/book/book_ranking.html?sortBy=visit_count&catId=7">女频小说</a></dd>
</dl>
</li>
<li class="layui-nav-item"><a href="javascript:toMyCollect()">书架</a></li>
<li class="layui-nav-item"><a href="/user/favorites.html">书架</a></li>
</ul>
<ul class="layui-nav pc" lay-filter="" style="padding:0 36px;text-align: center">
@ -235,7 +235,7 @@
<script>
//加载首页书籍设置数据
$.ajax({
type: "POST",
type: "get",
url: "/book/listBookSetting",
data: {},
dataType: "json",
@ -318,7 +318,7 @@
//更新榜单查询
$.ajax({
type: "POST",
type: "get",
url: "/book/listUpdateRank",
data: {},
dataType: "json",

View File

@ -86,7 +86,7 @@
//查询用户信息
$.ajax({
type: "POST",
type: "get",
url: "/user/userInfo",
data: {},
dataType: "json",

View File

@ -52,7 +52,7 @@
function search(curr, limit) {
$.ajax({
type: "POST",
type: "get",
url: "/user/listCommentByPage",
data: {'curr':curr,'limit':limit},
dataType: "json",

View File

@ -80,7 +80,7 @@
function search(curr, limit) {
$.ajax({
type: "POST",
type: "get",
url: "/user/listBookShelfByPage",
data: {'curr':curr,'limit':limit},
dataType: "json",

View File

@ -59,7 +59,7 @@
function search(curr, limit) {
$.ajax({
type: "POST",
type: "get",
url: "/user/listUserFeedBackByPage",
data: {'curr':curr,'limit':limit},
dataType: "json",

View File

@ -67,7 +67,7 @@
function search(curr, limit) {
$.ajax({
type: "POST",
type: "get",
url: "/user/listReadHistoryByPage",
data: {'curr':curr,'limit':limit},
dataType: "json",

View File

@ -57,7 +57,7 @@
<script type="text/javascript">
//查询用户信息
$.ajax({
type: "POST",
type: "get",
url: "/user/userInfo",
data: {},
dataType: "json",

View File

@ -53,7 +53,7 @@
<script type="text/javascript">
//查询用户信息
$.ajax({
type: "POST",
type: "get",
url: "/user/userInfo",
data: {},
dataType: "json",

View File

@ -45,7 +45,7 @@
<script type="text/javascript">
//查询用户信息
$.ajax({
type: "POST",
type: "get",
url: "/user/userInfo",
data: {},
dataType: "json",

View File

@ -81,7 +81,7 @@
<script type="text/javascript">
//查询用户信息
$.ajax({
type: "POST",
type: "get",
url: "/user/userInfo",
data: {},
dataType: "json",
@ -113,7 +113,7 @@
})
//查询书架列表
$.ajax({
type: "POST",
type: "get",
url: "/user/listBookShelfByPage",
data: {'limit':2},
dataType: "json",

View File

@ -5,11 +5,12 @@
<groupId>com.java2nb</groupId>
<artifactId>novel</artifactId>
<version>3.0.2</version>
<version>3.1.0</version>
<modules>
<module>novel-common</module>
<module>novel-front</module>
<module>novel-crawl</module>
<module>novel-admin</module>
</modules>
<packaging>pom</packaging>