Merge pull request #131 from 201206030/develop_xxy

merge
This commit is contained in:
xxy 2024-05-28 09:55:50 +08:00 committed by GitHub
commit a4861996b5
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
96 changed files with 2564 additions and 1603 deletions

View File

@ -67,7 +67,7 @@ novel-plus -- 父工程
## 演示视频 ## 演示视频
https://www.bilibili.com/video/BV1Zo4y187Mi https://www.bilibili.com/video/BV18e41197xs
## 增值服务 ## 增值服务

3
doc/sql/20240512.sql Normal file
View File

@ -0,0 +1,3 @@
update crawl_source
set crawl_rule = replace(crawl_rule, 'ibiquge.net', 'ibiquzw.org')
where id = 16;

View File

@ -1,5 +1,7 @@
CREATE database if NOT EXISTS `novel_plus` default character set utf8mb4 collate utf8mb4_unicode_ci; CREATE
use `novel_plus`; database if NOT EXISTS `novel_plus` default character set utf8mb4 collate utf8mb4_unicode_ci;
use
`novel_plus`;
SET NAMES utf8mb4; SET NAMES utf8mb4;
@ -10,17 +12,19 @@ DROP TABLE IF EXISTS `author`;
CREATE TABLE `author` CREATE TABLE `author`
( (
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键', `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键',
`user_id` bigint(20) DEFAULT NULL COMMENT '用户ID', `user_id` bigint(20) DEFAULT NULL COMMENT '用户ID',
`invite_code` varchar(20) DEFAULT NULL COMMENT '邀请码', `invite_code` varchar(20) DEFAULT NULL COMMENT '邀请码',
`pen_name` varchar(20) DEFAULT NULL COMMENT '笔名', `pen_name` varchar(20) DEFAULT NULL COMMENT '笔名',
`tel_phone` varchar(20) DEFAULT NULL COMMENT '手机号码', `tel_phone` varchar(20) DEFAULT NULL COMMENT '手机号码',
`chat_account` varchar(50) DEFAULT NULL COMMENT 'QQ或微信账号', `chat_account` varchar(50) DEFAULT NULL COMMENT 'QQ或微信账号',
`email` varchar(50) DEFAULT NULL COMMENT '电子邮箱', `email` varchar(50) DEFAULT NULL COMMENT '电子邮箱',
`work_direction` tinyint(4) DEFAULT NULL COMMENT '作品方向0男频1女频', `work_direction` tinyint(4) DEFAULT NULL COMMENT '作品方向0男频1女频',
`status` tinyint(4) DEFAULT '0' COMMENT '0正常1封禁', `status` tinyint(4) DEFAULT '0' COMMENT '0正常1封禁',
`create_time` datetime DEFAULT NULL COMMENT '创建时间', `create_time` datetime DEFAULT NULL COMMENT '创建时间',
PRIMARY KEY (`id`) PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8mb4 COMMENT='作者表'; ) ENGINE = InnoDB
AUTO_INCREMENT = 3
DEFAULT CHARSET = utf8mb4 COMMENT ='作者表';
-- ---------------------------- -- ----------------------------
-- Records of author -- Records of author
@ -40,12 +44,14 @@ CREATE TABLE `author_code`
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键', `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键',
`invite_code` varchar(100) DEFAULT NULL COMMENT '邀请码', `invite_code` varchar(100) DEFAULT NULL COMMENT '邀请码',
`validity_time` datetime DEFAULT NULL COMMENT '有效时间', `validity_time` datetime DEFAULT NULL COMMENT '有效时间',
`is_use` tinyint(1) DEFAULT '0' COMMENT '是否使用过0未使用1:使用过', `is_use` tinyint(1) DEFAULT '0' COMMENT '是否使用过0未使用1:使用过',
`create_time` datetime DEFAULT NULL COMMENT '创建时间', `create_time` datetime DEFAULT NULL COMMENT '创建时间',
`create_user_id` bigint(20) DEFAULT NULL COMMENT '创建人ID', `create_user_id` bigint(20) DEFAULT NULL COMMENT '创建人ID',
PRIMARY KEY (`id`), PRIMARY KEY (`id`),
UNIQUE KEY `key_code` (`invite_code`) USING BTREE UNIQUE KEY `key_code` (`invite_code`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8mb4 COMMENT='作家邀请码表'; ) ENGINE = InnoDB
AUTO_INCREMENT = 6
DEFAULT CHARSET = utf8mb4 COMMENT ='作家邀请码表';
-- ---------------------------- -- ----------------------------
-- Records of author_code -- Records of author_code
@ -63,36 +69,38 @@ VALUES ('5', 'ww34343', '2020-05-21 00:00:00', '0', '2020-05-13 14:18:58', '1');
DROP TABLE IF EXISTS `book`; DROP TABLE IF EXISTS `book`;
CREATE TABLE `book` CREATE TABLE `book`
( (
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键', `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键',
`work_direction` tinyint(1) DEFAULT NULL COMMENT '作品方向0男频1女频''', `work_direction` tinyint(1) DEFAULT NULL COMMENT '作品方向0男频1女频''',
`cat_id` int(11) DEFAULT NULL COMMENT '分类ID', `cat_id` int(11) DEFAULT NULL COMMENT '分类ID',
`cat_name` varchar(50) DEFAULT NULL COMMENT '分类名', `cat_name` varchar(50) DEFAULT NULL COMMENT '分类名',
`pic_url` varchar(200) NOT NULL COMMENT '小说封面', `pic_url` varchar(200) NOT NULL COMMENT '小说封面',
`book_name` varchar(50) NOT NULL COMMENT '小说名', `book_name` varchar(50) NOT NULL COMMENT '小说名',
`author_id` bigint(20) DEFAULT NULL COMMENT '作者id', `author_id` bigint(20) DEFAULT NULL COMMENT '作者id',
`author_name` varchar(50) NOT NULL COMMENT '作者名', `author_name` varchar(50) NOT NULL COMMENT '作者名',
`book_desc` varchar(2000) NOT NULL COMMENT '书籍描述', `book_desc` varchar(2000) NOT NULL COMMENT '书籍描述',
`score` float NOT NULL COMMENT '评分预留字段', `score` float NOT NULL COMMENT '评分预留字段',
`book_status` tinyint(1) NOT NULL DEFAULT '0' COMMENT '书籍状态0连载中1已完结', `book_status` tinyint(1) NOT NULL DEFAULT '0' COMMENT '书籍状态0连载中1已完结',
`visit_count` bigint(20) DEFAULT '103' COMMENT '点击量', `visit_count` bigint(20) DEFAULT '103' COMMENT '点击量',
`word_count` int(11) DEFAULT NULL COMMENT '总字数', `word_count` int(11) DEFAULT NULL COMMENT '总字数',
`comment_count` int(11) DEFAULT '0' COMMENT '评论数', `comment_count` int(11) DEFAULT '0' COMMENT '评论数',
`last_index_id` bigint(20) DEFAULT NULL COMMENT '最新目录ID', `last_index_id` bigint(20) DEFAULT NULL COMMENT '最新目录ID',
`last_index_name` varchar(50) DEFAULT NULL COMMENT '最新目录名', `last_index_name` varchar(50) DEFAULT NULL COMMENT '最新目录名',
`last_index_update_time` datetime DEFAULT NULL COMMENT '最新目录更新时间', `last_index_update_time` datetime DEFAULT NULL COMMENT '最新目录更新时间',
`is_vip` tinyint(1) DEFAULT '0' COMMENT '是否收费1收费0免费', `is_vip` tinyint(1) DEFAULT '0' COMMENT '是否收费1收费0免费',
`status` tinyint(1) DEFAULT '0' COMMENT '状态0入库1上架', `status` tinyint(1) DEFAULT '0' COMMENT '状态0入库1上架',
`update_time` datetime NOT NULL COMMENT '更新时间', `update_time` datetime NOT NULL COMMENT '更新时间',
`create_time` datetime DEFAULT NULL COMMENT '创建时间', `create_time` datetime DEFAULT NULL COMMENT '创建时间',
`crawl_source_id` int(11) DEFAULT NULL COMMENT '爬虫源站ID', `crawl_source_id` int(11) DEFAULT NULL COMMENT '爬虫源站ID',
`crawl_book_id` varchar(32) DEFAULT NULL COMMENT '抓取的源站小说ID', `crawl_book_id` varchar(32) DEFAULT NULL COMMENT '抓取的源站小说ID',
`crawl_last_time` datetime DEFAULT NULL COMMENT '最后一次的抓取时间', `crawl_last_time` datetime DEFAULT NULL COMMENT '最后一次的抓取时间',
`crawl_is_stop` tinyint(1) DEFAULT '0' COMMENT '是否已停止更新0未停止1已停止', `crawl_is_stop` tinyint(1) DEFAULT '0' COMMENT '是否已停止更新0未停止1已停止',
PRIMARY KEY (`id`), PRIMARY KEY (`id`),
UNIQUE KEY `key_uq_bookName_authorName` (`book_name`,`author_name`) USING BTREE, UNIQUE KEY `key_uq_bookName_authorName` (`book_name`, `author_name`) USING BTREE,
KEY `key_lastIndexUpdateTime` (`last_index_update_time`) USING BTREE, KEY `key_lastIndexUpdateTime` (`last_index_update_time`) USING BTREE,
KEY `key_createTime` (`create_time`) USING BTREE KEY `key_createTime` (`create_time`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=1262260513468559361 DEFAULT CHARSET=utf8mb4 COMMENT='小说表'; ) ENGINE = InnoDB
AUTO_INCREMENT = 1262260513468559361
DEFAULT CHARSET = utf8mb4 COMMENT ='小说表';
-- ---------------------------- -- ----------------------------
-- Records of book -- Records of book
@ -110,14 +118,16 @@ CREATE TABLE `book_author`
`tel_phone` varchar(20) DEFAULT NULL COMMENT '手机号码', `tel_phone` varchar(20) DEFAULT NULL COMMENT '手机号码',
`chat_account` varchar(50) DEFAULT NULL COMMENT 'QQ或微信账号', `chat_account` varchar(50) DEFAULT NULL COMMENT 'QQ或微信账号',
`email` varchar(50) DEFAULT NULL COMMENT '电子邮箱', `email` varchar(50) DEFAULT NULL COMMENT '电子邮箱',
`work_direction` tinyint(4) DEFAULT NULL COMMENT '作品方向0男频1女频', `work_direction` tinyint(4) DEFAULT NULL COMMENT '作品方向0男频1女频',
`status` tinyint(4) DEFAULT NULL COMMENT '0待审核1审核通过正常2审核不通过', `status` tinyint(4) DEFAULT NULL COMMENT '0待审核1审核通过正常2审核不通过',
`create_time` datetime DEFAULT NULL COMMENT '创建时间', `create_time` datetime DEFAULT NULL COMMENT '创建时间',
`create_user_id` bigint(20) DEFAULT NULL COMMENT '申请人ID', `create_user_id` bigint(20) DEFAULT NULL COMMENT '申请人ID',
`update_time` datetime DEFAULT NULL COMMENT '更新时间', `update_time` datetime DEFAULT NULL COMMENT '更新时间',
`update_user_id` bigint(20) DEFAULT NULL COMMENT '更新人ID', `update_user_id` bigint(20) DEFAULT NULL COMMENT '更新人ID',
PRIMARY KEY (`id`) PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=1254957873655066625 DEFAULT CHARSET=utf8mb4 COMMENT='作者表'; ) ENGINE = InnoDB
AUTO_INCREMENT = 1254957873655066625
DEFAULT CHARSET = utf8mb4 COMMENT ='作者表';
-- ---------------------------- -- ----------------------------
-- Records of book_author -- Records of book_author
@ -129,16 +139,18 @@ CREATE TABLE `book_author`
DROP TABLE IF EXISTS `book_category`; DROP TABLE IF EXISTS `book_category`;
CREATE TABLE `book_category` CREATE TABLE `book_category`
( (
`id` int(11) NOT NULL AUTO_INCREMENT COMMENT '主键', `id` int(11) NOT NULL AUTO_INCREMENT COMMENT '主键',
`work_direction` tinyint(1) DEFAULT NULL COMMENT '作品方向0男频1女频''', `work_direction` tinyint(1) DEFAULT NULL COMMENT '作品方向0男频1女频''',
`name` varchar(20) NOT NULL COMMENT '分类名', `name` varchar(20) NOT NULL COMMENT '分类名',
`sort` tinyint(4) NOT NULL DEFAULT '10' COMMENT '排序', `sort` tinyint(4) NOT NULL DEFAULT '10' COMMENT '排序',
`create_user_id` bigint(20) DEFAULT NULL, `create_user_id` bigint(20) DEFAULT NULL,
`create_time` datetime DEFAULT NULL, `create_time` datetime DEFAULT NULL,
`update_user_id` bigint(20) DEFAULT NULL, `update_user_id` bigint(20) DEFAULT NULL,
`update_time` datetime DEFAULT NULL, `update_time` datetime DEFAULT NULL,
PRIMARY KEY (`id`) PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=8 DEFAULT CHARSET=utf8mb4 COMMENT='小说类别表'; ) ENGINE = InnoDB
AUTO_INCREMENT = 8
DEFAULT CHARSET = utf8mb4 COMMENT ='小说类别表';
-- ---------------------------- -- ----------------------------
-- Records of book_category -- Records of book_category
@ -165,15 +177,17 @@ DROP TABLE IF EXISTS `book_comment`;
CREATE TABLE `book_comment` CREATE TABLE `book_comment`
( (
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键', `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键',
`book_id` bigint(20) DEFAULT NULL COMMENT '小说ID', `book_id` bigint(20) DEFAULT NULL COMMENT '小说ID',
`comment_content` varchar(512) DEFAULT NULL COMMENT '评价内容', `comment_content` varchar(512) DEFAULT NULL COMMENT '评价内容',
`reply_count` int(11) DEFAULT '0' COMMENT '回复数量', `reply_count` int(11) DEFAULT '0' COMMENT '回复数量',
`audit_status` tinyint(1) DEFAULT '0' COMMENT '审核状态0待审核1审核通过2审核不通过', `audit_status` tinyint(1) DEFAULT '0' COMMENT '审核状态0待审核1审核通过2审核不通过',
`create_time` datetime DEFAULT NULL COMMENT '评价时间', `create_time` datetime DEFAULT NULL COMMENT '评价时间',
`create_user_id` bigint(20) DEFAULT NULL COMMENT '评价人', `create_user_id` bigint(20) DEFAULT NULL COMMENT '评价人',
PRIMARY KEY (`id`), PRIMARY KEY (`id`),
UNIQUE KEY `key_uq_bookid_userid` (`book_id`,`create_user_id`) USING BTREE UNIQUE KEY `key_uq_bookid_userid` (`book_id`, `create_user_id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=13 DEFAULT CHARSET=utf8mb4 COMMENT='小说评论表'; ) ENGINE = InnoDB
AUTO_INCREMENT = 13
DEFAULT CHARSET = utf8mb4 COMMENT ='小说评论表';
-- ---------------------------- -- ----------------------------
-- Records of book_comment -- Records of book_comment
@ -190,13 +204,14 @@ DROP TABLE IF EXISTS `book_comment_reply`;
CREATE TABLE `book_comment_reply` CREATE TABLE `book_comment_reply`
( (
`id` bigint(20) NOT NULL COMMENT '主键', `id` bigint(20) NOT NULL COMMENT '主键',
`comment_id` bigint(20) DEFAULT NULL COMMENT '评论ID', `comment_id` bigint(20) DEFAULT NULL COMMENT '评论ID',
`reply_content` varchar(512) DEFAULT NULL COMMENT '回复内容', `reply_content` varchar(512) DEFAULT NULL COMMENT '回复内容',
`audit_status` tinyint(1) DEFAULT '0' COMMENT '审核状态0待审核1审核通过2审核不通过', `audit_status` tinyint(1) DEFAULT '0' COMMENT '审核状态0待审核1审核通过2审核不通过',
`create_time` datetime DEFAULT NULL COMMENT '回复用户ID', `create_time` datetime DEFAULT NULL COMMENT '回复用户ID',
`create_user_id` bigint(20) DEFAULT NULL COMMENT '回复时间', `create_user_id` bigint(20) DEFAULT NULL COMMENT '回复时间',
PRIMARY KEY (`id`) PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='小说评论回复表'; ) ENGINE = InnoDB
DEFAULT CHARSET = utf8mb4 COMMENT ='小说评论回复表';
-- ---------------------------- -- ----------------------------
-- Records of book_comment_reply -- Records of book_comment_reply
@ -213,7 +228,9 @@ CREATE TABLE `book_content`
`content` mediumtext COMMENT '小说章节内容', `content` mediumtext COMMENT '小说章节内容',
PRIMARY KEY (`id`), PRIMARY KEY (`id`),
UNIQUE KEY `key_uq_indexId` (`index_id`) USING BTREE UNIQUE KEY `key_uq_indexId` (`index_id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=3347665 DEFAULT CHARSET=utf8mb4 COMMENT='小说内容表'; ) ENGINE = InnoDB
AUTO_INCREMENT = 3347665
DEFAULT CHARSET = utf8mb4 COMMENT ='小说内容表';
-- ---------------------------- -- ----------------------------
-- Records of book_content -- Records of book_content
@ -227,17 +244,19 @@ CREATE TABLE `book_index`
( (
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键', `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键',
`book_id` bigint(20) NOT NULL COMMENT '小说ID', `book_id` bigint(20) NOT NULL COMMENT '小说ID',
`index_num` int(11) NOT NULL COMMENT '目录号', `index_num` int(11) NOT NULL COMMENT '目录号',
`index_name` varchar(100) DEFAULT NULL COMMENT '目录名', `index_name` varchar(100) DEFAULT NULL COMMENT '目录名',
`word_count` int(11) DEFAULT NULL COMMENT '字数', `word_count` int(11) DEFAULT NULL COMMENT '字数',
`is_vip` tinyint(4) DEFAULT '0' COMMENT '是否收费1收费0免费', `is_vip` tinyint(4) DEFAULT '0' COMMENT '是否收费1收费0免费',
`create_time` datetime DEFAULT NULL, `create_time` datetime DEFAULT NULL,
`update_time` datetime DEFAULT NULL, `update_time` datetime DEFAULT NULL,
PRIMARY KEY (`id`), PRIMARY KEY (`id`),
UNIQUE KEY `key_uq_bookId_indexNum` (`book_id`,`index_num`) USING BTREE, UNIQUE KEY `key_uq_bookId_indexNum` (`book_id`, `index_num`) USING BTREE,
KEY `key_bookId` (`book_id`) USING BTREE, KEY `key_bookId` (`book_id`) USING BTREE,
KEY `key_indexNum` (`index_num`) USING BTREE KEY `key_indexNum` (`index_num`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=1262260612777095169 DEFAULT CHARSET=utf8mb4 COMMENT='小说目录表'; ) ENGINE = InnoDB
AUTO_INCREMENT = 1262260612777095169
DEFAULT CHARSET = utf8mb4 COMMENT ='小说目录表';
-- ---------------------------- -- ----------------------------
-- Records of book_index -- Records of book_index
@ -249,13 +268,15 @@ CREATE TABLE `book_index`
DROP TABLE IF EXISTS `book_screen_bullet`; DROP TABLE IF EXISTS `book_screen_bullet`;
CREATE TABLE `book_screen_bullet` CREATE TABLE `book_screen_bullet`
( (
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键', `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键',
`content_id` bigint(20) NOT NULL COMMENT '小说内容ID', `content_id` bigint(20) NOT NULL COMMENT '小说内容ID',
`screen_bullet` varchar(512) NOT NULL COMMENT '小说弹幕内容', `screen_bullet` varchar(512) NOT NULL COMMENT '小说弹幕内容',
`create_time` datetime NOT NULL COMMENT '创建时间', `create_time` datetime NOT NULL COMMENT '创建时间',
PRIMARY KEY (`id`), PRIMARY KEY (`id`),
KEY `key_contentId` (`content_id`) USING BTREE KEY `key_contentId` (`content_id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=79 DEFAULT CHARSET=utf8mb4 COMMENT='小说弹幕表'; ) ENGINE = InnoDB
AUTO_INCREMENT = 79
DEFAULT CHARSET = utf8mb4 COMMENT ='小说弹幕表';
-- ---------------------------- -- ----------------------------
-- Records of book_screen_bullet -- Records of book_screen_bullet
@ -271,12 +292,14 @@ CREATE TABLE `book_setting`
`book_id` bigint(20) DEFAULT NULL COMMENT '小说ID', `book_id` bigint(20) DEFAULT NULL COMMENT '小说ID',
`sort` tinyint(4) DEFAULT NULL COMMENT '排序号', `sort` tinyint(4) DEFAULT NULL COMMENT '排序号',
`type` tinyint(1) DEFAULT NULL COMMENT '类型0轮播图1顶部小说栏设置2本周强推3热门推荐4精品推荐', `type` tinyint(1) DEFAULT NULL COMMENT '类型0轮播图1顶部小说栏设置2本周强推3热门推荐4精品推荐',
`create_time` datetime DEFAULT NULL COMMENT '创建时间', `create_time` datetime DEFAULT NULL COMMENT '创建时间',
`create_user_id` bigint(20) DEFAULT NULL COMMENT '创建人ID', `create_user_id` bigint(20) DEFAULT NULL COMMENT '创建人ID',
`update_time` datetime DEFAULT NULL COMMENT '更新时间', `update_time` datetime DEFAULT NULL COMMENT '更新时间',
`update_user_id` bigint(20) DEFAULT NULL COMMENT '更新人ID', `update_user_id` bigint(20) DEFAULT NULL COMMENT '更新人ID',
PRIMARY KEY (`id`) PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=64 DEFAULT CHARSET=utf8mb4 COMMENT='首页小说设置表'; ) ENGINE = InnoDB
AUTO_INCREMENT = 64
DEFAULT CHARSET = utf8mb4 COMMENT ='首页小说设置表';
-- ---------------------------- -- ----------------------------
-- Records of book_setting -- Records of book_setting
@ -353,14 +376,15 @@ DROP TABLE IF EXISTS `crawl_batch_task`;
CREATE TABLE `crawl_batch_task` CREATE TABLE `crawl_batch_task`
( (
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键', `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键',
`source_id` int(11) DEFAULT NULL COMMENT '爬虫源ID', `source_id` int(11) DEFAULT NULL COMMENT '爬虫源ID',
`crawl_count_success` int(11) DEFAULT NULL COMMENT '成功抓取数量', `crawl_count_success` int(11) DEFAULT NULL COMMENT '成功抓取数量',
`crawl_count_target` int(11) DEFAULT NULL COMMENT '目标抓取数量', `crawl_count_target` int(11) DEFAULT NULL COMMENT '目标抓取数量',
`task_status` tinyint(1) DEFAULT '1' COMMENT '任务状态1正在运行0已停止', `task_status` tinyint(1) DEFAULT '1' COMMENT '任务状态1正在运行0已停止',
`start_time` datetime DEFAULT NULL COMMENT '任务开始时间', `start_time` datetime DEFAULT NULL COMMENT '任务开始时间',
`end_time` datetime DEFAULT NULL COMMENT '任务结束时间', `end_time` datetime DEFAULT NULL COMMENT '任务结束时间',
PRIMARY KEY (`id`) PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='批量抓取任务表'; ) ENGINE = InnoDB
DEFAULT CHARSET = utf8mb4 COMMENT ='批量抓取任务表';
-- ---------------------------- -- ----------------------------
-- Records of crawl_batch_task -- Records of crawl_batch_task
@ -373,13 +397,14 @@ DROP TABLE IF EXISTS `crawl_single_task`;
CREATE TABLE `crawl_single_task` CREATE TABLE `crawl_single_task`
( (
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键', `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键',
`source_id` int(11) DEFAULT NULL COMMENT '爬虫源ID', `source_id` int(11) DEFAULT NULL COMMENT '爬虫源ID',
`source_book_id` varchar(255) DEFAULT NULL COMMENT '源站小说ID', `source_book_id` varchar(255) DEFAULT NULL COMMENT '源站小说ID',
`task_status` tinyint(1) DEFAULT NULL COMMENT '任务状态0失败1成功2未执行', `task_status` tinyint(1) DEFAULT NULL COMMENT '任务状态0失败1成功2未执行',
`exc_count` tinyint(2) DEFAULT '0' COMMENT '已经执行次数最多执行5次', `exc_count` tinyint(2) DEFAULT '0' COMMENT '已经执行次数最多执行5次',
`create_time` datetime DEFAULT NULL COMMENT '创建时间', `create_time` datetime DEFAULT NULL COMMENT '创建时间',
PRIMARY KEY (`id`) PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='抓取单本小说任务表'; ) ENGINE = InnoDB
DEFAULT CHARSET = utf8mb4 COMMENT ='抓取单本小说任务表';
-- ---------------------------- -- ----------------------------
-- Records of crawl_single_task -- Records of crawl_single_task
@ -394,11 +419,13 @@ CREATE TABLE `crawl_source`
`id` int(11) NOT NULL AUTO_INCREMENT COMMENT '主键', `id` int(11) NOT NULL AUTO_INCREMENT COMMENT '主键',
`source_name` varchar(50) DEFAULT NULL COMMENT '源站名', `source_name` varchar(50) DEFAULT NULL COMMENT '源站名',
`crawl_rule` text COMMENT '爬取规则json串', `crawl_rule` text COMMENT '爬取规则json串',
`source_status` tinyint(1) DEFAULT '0' COMMENT '爬虫源状态0关闭1开启', `source_status` tinyint(1) DEFAULT '0' COMMENT '爬虫源状态0关闭1开启',
`create_time` datetime DEFAULT NULL COMMENT '创建时间', `create_time` datetime DEFAULT NULL COMMENT '创建时间',
`update_time` datetime DEFAULT NULL COMMENT '更新时间', `update_time` datetime DEFAULT NULL COMMENT '更新时间',
PRIMARY KEY (`id`) PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8mb4 COMMENT='爬虫源表'; ) ENGINE = InnoDB
AUTO_INCREMENT = 5
DEFAULT CHARSET = utf8mb4 COMMENT ='爬虫源表';
-- ---------------------------- -- ----------------------------
-- Records of crawl_source -- Records of crawl_source
@ -426,17 +453,19 @@ VALUES ('5', '笔趣阁',
DROP TABLE IF EXISTS `friend_link`; DROP TABLE IF EXISTS `friend_link`;
CREATE TABLE `friend_link` CREATE TABLE `friend_link`
( (
`id` int(11) NOT NULL AUTO_INCREMENT COMMENT '主键', `id` int(11) NOT NULL AUTO_INCREMENT COMMENT '主键',
`link_name` varchar(50) NOT NULL COMMENT '链接名', `link_name` varchar(50) NOT NULL COMMENT '链接名',
`link_url` varchar(100) NOT NULL COMMENT '链接url', `link_url` varchar(100) NOT NULL COMMENT '链接url',
`sort` tinyint(4) NOT NULL DEFAULT '11' COMMENT '排序号', `sort` tinyint(4) NOT NULL DEFAULT '11' COMMENT '排序号',
`is_open` tinyint(1) NOT NULL DEFAULT '1' COMMENT '是否开启0不开启1开启', `is_open` tinyint(1) NOT NULL DEFAULT '1' COMMENT '是否开启0不开启1开启',
`create_user_id` bigint(20) DEFAULT NULL COMMENT '创建人id', `create_user_id` bigint(20) DEFAULT NULL COMMENT '创建人id',
`create_time` datetime DEFAULT NULL COMMENT '创建时间', `create_time` datetime DEFAULT NULL COMMENT '创建时间',
`update_user_id` bigint(20) DEFAULT NULL COMMENT '更新者用户id', `update_user_id` bigint(20) DEFAULT NULL COMMENT '更新者用户id',
`update_time` datetime DEFAULT NULL COMMENT '更新时间', `update_time` datetime DEFAULT NULL COMMENT '更新时间',
PRIMARY KEY (`id`) PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8mb4; ) ENGINE = InnoDB
AUTO_INCREMENT = 6
DEFAULT CHARSET = utf8mb4;
-- ---------------------------- -- ----------------------------
-- Records of friend_link -- Records of friend_link
@ -451,17 +480,19 @@ DROP TABLE IF EXISTS `news`;
CREATE TABLE `news` CREATE TABLE `news`
( (
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键', `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键',
`cat_id` int(11) DEFAULT NULL COMMENT '类别ID', `cat_id` int(11) DEFAULT NULL COMMENT '类别ID',
`cat_name` varchar(50) DEFAULT NULL COMMENT '分类名', `cat_name` varchar(50) DEFAULT NULL COMMENT '分类名',
`source_name` varchar(50) DEFAULT NULL COMMENT '来源', `source_name` varchar(50) DEFAULT NULL COMMENT '来源',
`title` varchar(100) DEFAULT NULL COMMENT '标题', `title` varchar(100) DEFAULT NULL COMMENT '标题',
`content` text COMMENT '内容', `content` text COMMENT '内容',
`create_time` datetime DEFAULT NULL COMMENT '发布时间', `create_time` datetime DEFAULT NULL COMMENT '发布时间',
`create_user_id` bigint(20) DEFAULT NULL COMMENT '发布人ID', `create_user_id` bigint(20) DEFAULT NULL COMMENT '发布人ID',
`update_time` datetime DEFAULT NULL COMMENT '更新时间', `update_time` datetime DEFAULT NULL COMMENT '更新时间',
`update_user_id` bigint(20) DEFAULT NULL COMMENT '更新人ID', `update_user_id` bigint(20) DEFAULT NULL COMMENT '更新人ID',
PRIMARY KEY (`id`) PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8mb4 COMMENT='新闻表'; ) ENGINE = InnoDB
AUTO_INCREMENT = 3
DEFAULT CHARSET = utf8mb4 COMMENT ='新闻表';
-- ---------------------------- -- ----------------------------
-- Records of news -- Records of news
@ -481,15 +512,17 @@ VALUES ('2', '3', '资讯', '全媒派公众号', 'AI小说悄然流行人类
DROP TABLE IF EXISTS `news_category`; DROP TABLE IF EXISTS `news_category`;
CREATE TABLE `news_category` CREATE TABLE `news_category`
( (
`id` int(11) NOT NULL AUTO_INCREMENT COMMENT '主键', `id` int(11) NOT NULL AUTO_INCREMENT COMMENT '主键',
`name` varchar(20) NOT NULL COMMENT '分类名', `name` varchar(20) NOT NULL COMMENT '分类名',
`sort` tinyint(4) NOT NULL DEFAULT '10' COMMENT '排序', `sort` tinyint(4) NOT NULL DEFAULT '10' COMMENT '排序',
`create_user_id` bigint(20) DEFAULT NULL, `create_user_id` bigint(20) DEFAULT NULL,
`create_time` datetime DEFAULT NULL, `create_time` datetime DEFAULT NULL,
`update_user_id` bigint(20) DEFAULT NULL, `update_user_id` bigint(20) DEFAULT NULL,
`update_time` datetime DEFAULT NULL, `update_time` datetime DEFAULT NULL,
PRIMARY KEY (`id`) PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8mb4 COMMENT='新闻类别表'; ) ENGINE = InnoDB
AUTO_INCREMENT = 4
DEFAULT CHARSET = utf8mb4 COMMENT ='新闻类别表';
-- ---------------------------- -- ----------------------------
-- Records of news_category -- Records of news_category
@ -507,15 +540,17 @@ CREATE TABLE `order_pay`
( (
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键', `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键',
`out_trade_no` bigint(20) NOT NULL COMMENT '商户订单号', `out_trade_no` bigint(20) NOT NULL COMMENT '商户订单号',
`trade_no` varchar(64) DEFAULT NULL COMMENT '支付宝/微信交易号', `trade_no` varchar(64) DEFAULT NULL COMMENT '支付宝/微信交易号',
`pay_channel` tinyint(1) NOT NULL DEFAULT '1' COMMENT '支付渠道1支付宝2微信', `pay_channel` tinyint(1) NOT NULL DEFAULT '1' COMMENT '支付渠道1支付宝2微信',
`total_amount` int(11) NOT NULL COMMENT '交易金额(单位元)', `total_amount` int(11) NOT NULL COMMENT '交易金额(单位元)',
`user_id` bigint(20) NOT NULL COMMENT '支付用户ID', `user_id` bigint(20) NOT NULL COMMENT '支付用户ID',
`pay_status` tinyint(1) DEFAULT '2' COMMENT '支付状态0支付失败1支付成功2待支付', `pay_status` tinyint(1) DEFAULT '2' COMMENT '支付状态0支付失败1支付成功2待支付',
`create_time` datetime DEFAULT NULL COMMENT '创建时间', `create_time` datetime DEFAULT NULL COMMENT '创建时间',
`update_time` datetime DEFAULT NULL COMMENT '更新时间', `update_time` datetime DEFAULT NULL COMMENT '更新时间',
PRIMARY KEY (`id`) PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=15 DEFAULT CHARSET=utf8mb4 COMMENT='充值订单'; ) ENGINE = InnoDB
AUTO_INCREMENT = 15
DEFAULT CHARSET = utf8mb4 COMMENT ='充值订单';
-- ---------------------------- -- ----------------------------
-- Records of order_pay -- Records of order_pay
@ -534,11 +569,13 @@ CREATE TABLE `sys_data_perm`
`crl_attr_name` varchar(50) DEFAULT NULL COMMENT '用户权限控制属性名', `crl_attr_name` varchar(50) DEFAULT NULL COMMENT '用户权限控制属性名',
`crl_column_name` varchar(50) DEFAULT NULL COMMENT '数据表权限控制列名', `crl_column_name` varchar(50) DEFAULT NULL COMMENT '数据表权限控制列名',
`perm_code` varchar(50) DEFAULT NULL COMMENT '权限codeall_开头表示查看所有数据的权限sup_开头表示查看下级数据的权限own_开头表示查看本级数据的权限', `perm_code` varchar(50) DEFAULT NULL COMMENT '权限codeall_开头表示查看所有数据的权限sup_开头表示查看下级数据的权限own_开头表示查看本级数据的权限',
`order_num` int(11) DEFAULT NULL COMMENT '排序', `order_num` int(11) DEFAULT NULL COMMENT '排序',
`gmt_create` datetime DEFAULT NULL COMMENT '创建时间', `gmt_create` datetime DEFAULT NULL COMMENT '创建时间',
`gmt_modified` datetime DEFAULT NULL COMMENT '修改时间', `gmt_modified` datetime DEFAULT NULL COMMENT '修改时间',
PRIMARY KEY (`id`) PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=216 DEFAULT CHARSET=utf8 COMMENT='数据权限管理'; ) ENGINE = InnoDB
AUTO_INCREMENT = 216
DEFAULT CHARSET = utf8 COMMENT ='数据权限管理';
-- ---------------------------- -- ----------------------------
-- Records of sys_data_perm -- Records of sys_data_perm
@ -563,12 +600,14 @@ DROP TABLE IF EXISTS `sys_dept`;
CREATE TABLE `sys_dept` CREATE TABLE `sys_dept`
( (
`dept_id` bigint(20) NOT NULL AUTO_INCREMENT, `dept_id` bigint(20) NOT NULL AUTO_INCREMENT,
`parent_id` bigint(20) DEFAULT NULL COMMENT '上级部门ID一级部门为0', `parent_id` bigint(20) DEFAULT NULL COMMENT '上级部门ID一级部门为0',
`name` varchar(50) DEFAULT NULL COMMENT '部门名称', `name` varchar(50) DEFAULT NULL COMMENT '部门名称',
`order_num` int(11) DEFAULT NULL COMMENT '排序', `order_num` int(11) DEFAULT NULL COMMENT '排序',
`del_flag` tinyint(4) DEFAULT '0' COMMENT '是否删除 -1已删除 0正常', `del_flag` tinyint(4) DEFAULT '0' COMMENT '是否删除 -1已删除 0正常',
PRIMARY KEY (`dept_id`) PRIMARY KEY (`dept_id`)
) ENGINE=InnoDB AUTO_INCREMENT=17 DEFAULT CHARSET=utf8 COMMENT='部门管理'; ) ENGINE = InnoDB
AUTO_INCREMENT = 17
DEFAULT CHARSET = utf8 COMMENT ='部门管理';
-- ---------------------------- -- ----------------------------
-- Records of sys_dept -- Records of sys_dept
@ -594,18 +633,21 @@ CREATE TABLE `sys_dict`
`type` varchar(100) COLLATE utf8_bin DEFAULT NULL COMMENT '类型', `type` varchar(100) COLLATE utf8_bin DEFAULT NULL COMMENT '类型',
`description` varchar(100) COLLATE utf8_bin DEFAULT NULL COMMENT '描述', `description` varchar(100) COLLATE utf8_bin DEFAULT NULL COMMENT '描述',
`sort` decimal(10, 0) DEFAULT NULL COMMENT '排序升序', `sort` decimal(10, 0) DEFAULT NULL COMMENT '排序升序',
`parent_id` bigint(20) DEFAULT '0' COMMENT '父级编号', `parent_id` bigint(20) DEFAULT '0' COMMENT '父级编号',
`create_by` int(11) DEFAULT NULL COMMENT '创建者', `create_by` int(11) DEFAULT NULL COMMENT '创建者',
`create_date` datetime DEFAULT NULL COMMENT '创建时间', `create_date` datetime DEFAULT NULL COMMENT '创建时间',
`update_by` bigint(20) DEFAULT NULL COMMENT '更新者', `update_by` bigint(20) DEFAULT NULL COMMENT '更新者',
`update_date` datetime DEFAULT NULL COMMENT '更新时间', `update_date` datetime DEFAULT NULL COMMENT '更新时间',
`remarks` varchar(255) COLLATE utf8_bin DEFAULT NULL COMMENT '备注信息', `remarks` varchar(255) COLLATE utf8_bin DEFAULT NULL COMMENT '备注信息',
`del_flag` char(1) COLLATE utf8_bin DEFAULT '0' COMMENT '删除标记', `del_flag` char(1) COLLATE utf8_bin DEFAULT '0' COMMENT '删除标记',
PRIMARY KEY (`id`), PRIMARY KEY (`id`),
KEY `sys_dict_value` (`value`), KEY `sys_dict_value` (`value`),
KEY `sys_dict_label` (`name`), KEY `sys_dict_label` (`name`),
KEY `sys_dict_del_flag` (`del_flag`) KEY `sys_dict_del_flag` (`del_flag`)
) ENGINE=InnoDB AUTO_INCREMENT=142 DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='字典表'; ) ENGINE = InnoDB
AUTO_INCREMENT = 142
DEFAULT CHARSET = utf8
COLLATE = utf8_bin COMMENT ='字典表';
-- ---------------------------- -- ----------------------------
-- Records of sys_dict -- Records of sys_dict
@ -878,11 +920,13 @@ DROP TABLE IF EXISTS `sys_file`;
CREATE TABLE `sys_file` CREATE TABLE `sys_file`
( (
`id` bigint(20) NOT NULL AUTO_INCREMENT, `id` bigint(20) NOT NULL AUTO_INCREMENT,
`type` int(11) DEFAULT NULL COMMENT '文件类型', `type` int(11) DEFAULT NULL COMMENT '文件类型',
`url` varchar(200) DEFAULT NULL COMMENT 'URL地址', `url` varchar(200) DEFAULT NULL COMMENT 'URL地址',
`create_date` datetime DEFAULT NULL COMMENT '创建时间', `create_date` datetime DEFAULT NULL COMMENT '创建时间',
PRIMARY KEY (`id`) PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=183 DEFAULT CHARSET=utf8 COMMENT='文件上传'; ) ENGINE = InnoDB
AUTO_INCREMENT = 183
DEFAULT CHARSET = utf8 COMMENT ='文件上传';
-- ---------------------------- -- ----------------------------
-- Records of sys_file -- Records of sys_file
@ -982,13 +1026,15 @@ CREATE TABLE `sys_gen_columns`
`column_type` varchar(64) CHARACTER SET utf8 DEFAULT NULL COMMENT '列类型', `column_type` varchar(64) CHARACTER SET utf8 DEFAULT NULL COMMENT '列类型',
`java_type` varchar(64) CHARACTER SET utf8 DEFAULT NULL COMMENT '映射java类型', `java_type` varchar(64) CHARACTER SET utf8 DEFAULT NULL COMMENT '映射java类型',
`column_comment` varchar(1024) CHARACTER SET utf8 DEFAULT '' COMMENT '列注释', `column_comment` varchar(1024) CHARACTER SET utf8 DEFAULT '' COMMENT '列注释',
`column_sort` tinyint(4) DEFAULT NULL COMMENT '列排序升序', `column_sort` tinyint(4) DEFAULT NULL COMMENT '列排序升序',
`column_label` varchar(64) DEFAULT NULL COMMENT '鍒楁爣绛惧悕', `column_label` varchar(64) DEFAULT NULL COMMENT '鍒楁爣绛惧悕',
`page_type` tinyint(4) DEFAULT '1' COMMENT '页面显示类型1文本框 2下拉框 3数值4日期 5文本域6富文本 7上传图片单文件 8上传图片多文件9上传文件单文件 10上传文件多文件11隐藏域 12不显示', `page_type` tinyint(4) DEFAULT '1' COMMENT '页面显示类型1文本框 2下拉框 3数值4日期 5文本域6富文本 7上传图片单文件 8上传图片多文件9上传文件单文件 10上传文件多文件11隐藏域 12不显示',
`is_required` tinyint(1) DEFAULT NULL COMMENT '是否必填', `is_required` tinyint(1) DEFAULT NULL COMMENT '是否必填',
`dict_type` varchar(100) CHARACTER SET utf8 DEFAULT '' COMMENT '页面显示为下拉时使用字典类型从字典表中取出', `dict_type` varchar(100) CHARACTER SET utf8 DEFAULT '' COMMENT '页面显示为下拉时使用字典类型从字典表中取出',
PRIMARY KEY (`id`) PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=815 DEFAULT CHARSET=utf8mb4; ) ENGINE = InnoDB
AUTO_INCREMENT = 815
DEFAULT CHARSET = utf8mb4;
-- ---------------------------- -- ----------------------------
-- Records of sys_gen_columns -- Records of sys_gen_columns
@ -1157,26 +1203,27 @@ VALUES ('814', 'author_code', 'create_user_id', 'bigint', 'Long', '创建人ID',
DROP TABLE IF EXISTS `sys_gen_table`; DROP TABLE IF EXISTS `sys_gen_table`;
CREATE TABLE `sys_gen_table` CREATE TABLE `sys_gen_table`
( (
`id` bigint(20) NOT NULL COMMENT '主键', `id` bigint(20) NOT NULL COMMENT '主键',
`table_name` varchar(64) NOT NULL COMMENT '表名', `table_name` varchar(64) NOT NULL COMMENT '表名',
`class_name` varchar(100) NOT NULL COMMENT '实体类名称', `class_name` varchar(100) NOT NULL COMMENT '实体类名称',
`comments` varchar(500) NOT NULL COMMENT '表说明', `comments` varchar(500) NOT NULL COMMENT '表说明',
`category` tinyint(1) NOT NULL DEFAULT '0' COMMENT '分类0数据表1树表', `category` tinyint(1) NOT NULL DEFAULT '0' COMMENT '分类0数据表1树表',
`package_name` varchar(500) DEFAULT NULL COMMENT '生成包路径', `package_name` varchar(500) DEFAULT NULL COMMENT '生成包路径',
`module_name` varchar(30) DEFAULT NULL COMMENT '生成模块名', `module_name` varchar(30) DEFAULT NULL COMMENT '生成模块名',
`sub_module_name` varchar(30) DEFAULT NULL COMMENT '生成子模块名', `sub_module_name` varchar(30) DEFAULT NULL COMMENT '生成子模块名',
`function_name` varchar(200) DEFAULT NULL COMMENT '生成功能名用于类描述', `function_name` varchar(200) DEFAULT NULL COMMENT '生成功能名用于类描述',
`function_name_simple` varchar(50) DEFAULT NULL COMMENT '生成功能名简写用于功能提示保存xx成功', `function_name_simple` varchar(50) DEFAULT NULL COMMENT '生成功能名简写用于功能提示保存xx成功',
`author` varchar(50) DEFAULT NULL COMMENT '生成功能作者', `author` varchar(50) DEFAULT NULL COMMENT '生成功能作者',
`src_dir` varchar(1000) DEFAULT NULL COMMENT 'src目录', `src_dir` varchar(1000) DEFAULT NULL COMMENT 'src目录',
`options` varchar(1000) DEFAULT NULL COMMENT '其它生成选项', `options` varchar(1000) DEFAULT NULL COMMENT '其它生成选项',
`create_by` bigint(20) NOT NULL COMMENT '创建者', `create_by` bigint(20) NOT NULL COMMENT '创建者',
`create_date` datetime NOT NULL COMMENT '创建时间', `create_date` datetime NOT NULL COMMENT '创建时间',
`update_by` bigint(20) NOT NULL COMMENT '更新者', `update_by` bigint(20) NOT NULL COMMENT '更新者',
`update_date` datetime NOT NULL COMMENT '更新时间', `update_date` datetime NOT NULL COMMENT '更新时间',
`remarks` varchar(500) DEFAULT NULL COMMENT '备注信息', `remarks` varchar(500) DEFAULT NULL COMMENT '备注信息',
PRIMARY KEY (`id`) PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='代码生成表'; ) ENGINE = InnoDB
DEFAULT CHARSET = utf8 COMMENT ='代码生成表';
-- ---------------------------- -- ----------------------------
-- Records of sys_gen_table -- Records of sys_gen_table
@ -1191,8 +1238,8 @@ VALUES ('1', '表名', '1', '1', '0', null, null, null, null, null, null, null,
DROP TABLE IF EXISTS `sys_gen_table_column`; DROP TABLE IF EXISTS `sys_gen_table_column`;
CREATE TABLE `sys_gen_table_column` CREATE TABLE `sys_gen_table_column`
( (
`id` bigint(20) NOT NULL COMMENT '主键', `id` bigint(20) NOT NULL COMMENT '主键',
`table_id` bigint(20) NOT NULL COMMENT '表id', `table_id` bigint(20) NOT NULL COMMENT '表id',
`column_name` varchar(64) NOT NULL COMMENT '列名', `column_name` varchar(64) NOT NULL COMMENT '列名',
`column_sort` decimal(10, 0) DEFAULT NULL COMMENT '列排序升序', `column_sort` decimal(10, 0) DEFAULT NULL COMMENT '列排序升序',
`column_type` varchar(100) NOT NULL COMMENT '类型', `column_type` varchar(100) NOT NULL COMMENT '类型',
@ -1211,8 +1258,9 @@ CREATE TABLE `sys_gen_table_column`
`show_type` varchar(200) DEFAULT NULL COMMENT '表单类型', `show_type` varchar(200) DEFAULT NULL COMMENT '表单类型',
`options` varchar(1000) DEFAULT NULL COMMENT '其它生成选项', `options` varchar(1000) DEFAULT NULL COMMENT '其它生成选项',
PRIMARY KEY (`id`), PRIMARY KEY (`id`),
KEY `idx_gen_table_column_tn` (`table_id`) USING BTREE KEY `idx_gen_table_column_tn` (`table_id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='代码生成表列'; ) ENGINE = InnoDB
DEFAULT CHARSET = utf8 COMMENT ='代码生成表列';
-- ---------------------------- -- ----------------------------
-- Records of sys_gen_table_column -- Records of sys_gen_table_column
@ -1225,16 +1273,18 @@ DROP TABLE IF EXISTS `sys_log`;
CREATE TABLE `sys_log` CREATE TABLE `sys_log`
( (
`id` bigint(20) NOT NULL AUTO_INCREMENT, `id` bigint(20) NOT NULL AUTO_INCREMENT,
`user_id` bigint(20) DEFAULT NULL COMMENT '用户id', `user_id` bigint(20) DEFAULT NULL COMMENT '用户id',
`username` varchar(50) DEFAULT NULL COMMENT '用户名', `username` varchar(50) DEFAULT NULL COMMENT '用户名',
`operation` varchar(50) DEFAULT NULL COMMENT '用户操作', `operation` varchar(50) DEFAULT NULL COMMENT '用户操作',
`time` int(11) DEFAULT NULL COMMENT '响应时间', `time` int(11) DEFAULT NULL COMMENT '响应时间',
`method` varchar(200) DEFAULT NULL COMMENT '请求方法', `method` varchar(200) DEFAULT NULL COMMENT '请求方法',
`params` varchar(5000) DEFAULT NULL COMMENT '请求参数', `params` varchar(5000) DEFAULT NULL COMMENT '请求参数',
`ip` varchar(64) DEFAULT NULL COMMENT 'IP地址', `ip` varchar(64) DEFAULT NULL COMMENT 'IP地址',
`gmt_create` datetime DEFAULT NULL COMMENT '创建时间', `gmt_create` datetime DEFAULT NULL COMMENT '创建时间',
PRIMARY KEY (`id`) PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=1412 DEFAULT CHARSET=utf8 COMMENT='系统日志'; ) ENGINE = InnoDB
AUTO_INCREMENT = 1412
DEFAULT CHARSET = utf8 COMMENT ='系统日志';
-- ---------------------------- -- ----------------------------
@ -1244,17 +1294,19 @@ DROP TABLE IF EXISTS `sys_menu`;
CREATE TABLE `sys_menu` CREATE TABLE `sys_menu`
( (
`menu_id` bigint(20) NOT NULL AUTO_INCREMENT, `menu_id` bigint(20) NOT NULL AUTO_INCREMENT,
`parent_id` bigint(20) DEFAULT NULL COMMENT '父菜单ID一级菜单为0', `parent_id` bigint(20) DEFAULT NULL COMMENT '父菜单ID一级菜单为0',
`name` varchar(50) DEFAULT NULL COMMENT '菜单名称', `name` varchar(50) DEFAULT NULL COMMENT '菜单名称',
`url` varchar(200) DEFAULT NULL COMMENT '菜单URL', `url` varchar(200) DEFAULT NULL COMMENT '菜单URL',
`perms` varchar(500) DEFAULT NULL COMMENT '授权(多个用逗号分隔user:list,user:create)', `perms` varchar(500) DEFAULT NULL COMMENT '授权(多个用逗号分隔user:list,user:create)',
`type` int(11) DEFAULT NULL COMMENT '类型 0目录 1菜单 2按钮', `type` int(11) DEFAULT NULL COMMENT '类型 0目录 1菜单 2按钮',
`icon` varchar(50) DEFAULT NULL COMMENT '菜单图标', `icon` varchar(50) DEFAULT NULL COMMENT '菜单图标',
`order_num` int(11) DEFAULT NULL COMMENT '排序', `order_num` int(11) DEFAULT NULL COMMENT '排序',
`gmt_create` datetime DEFAULT NULL COMMENT '创建时间', `gmt_create` datetime DEFAULT NULL COMMENT '创建时间',
`gmt_modified` datetime DEFAULT NULL COMMENT '修改时间', `gmt_modified` datetime DEFAULT NULL COMMENT '修改时间',
PRIMARY KEY (`menu_id`) PRIMARY KEY (`menu_id`)
) ENGINE=InnoDB AUTO_INCREMENT=234 DEFAULT CHARSET=utf8 COMMENT='菜单管理'; ) ENGINE = InnoDB
AUTO_INCREMENT = 234
DEFAULT CHARSET = utf8 COMMENT ='菜单管理';
-- ---------------------------- -- ----------------------------
-- Records of sys_menu -- Records of sys_menu
@ -1400,11 +1452,13 @@ CREATE TABLE `sys_role`
`role_name` varchar(100) DEFAULT NULL COMMENT '角色名称', `role_name` varchar(100) DEFAULT NULL COMMENT '角色名称',
`role_sign` varchar(100) DEFAULT NULL COMMENT '角色标识', `role_sign` varchar(100) DEFAULT NULL COMMENT '角色标识',
`remark` varchar(100) DEFAULT NULL COMMENT '备注', `remark` varchar(100) DEFAULT NULL COMMENT '备注',
`user_id_create` bigint(20) DEFAULT NULL COMMENT '创建用户id', `user_id_create` bigint(20) DEFAULT NULL COMMENT '创建用户id',
`gmt_create` datetime DEFAULT NULL COMMENT '创建时间', `gmt_create` datetime DEFAULT NULL COMMENT '创建时间',
`gmt_modified` datetime DEFAULT NULL COMMENT '创建时间', `gmt_modified` datetime DEFAULT NULL COMMENT '创建时间',
PRIMARY KEY (`role_id`) PRIMARY KEY (`role_id`)
) ENGINE=InnoDB AUTO_INCREMENT=62 DEFAULT CHARSET=utf8 COMMENT='角色'; ) ENGINE = InnoDB
AUTO_INCREMENT = 62
DEFAULT CHARSET = utf8 COMMENT ='角色';
-- ---------------------------- -- ----------------------------
-- Records of sys_role -- Records of sys_role
@ -1422,7 +1476,9 @@ CREATE TABLE `sys_role_data_perm`
`role_id` bigint(20) DEFAULT NULL COMMENT '角色ID', `role_id` bigint(20) DEFAULT NULL COMMENT '角色ID',
`perm_id` bigint(20) DEFAULT NULL COMMENT '权限ID', `perm_id` bigint(20) DEFAULT NULL COMMENT '权限ID',
PRIMARY KEY (`id`) PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=79 DEFAULT CHARSET=utf8 COMMENT='角色与数据权限对应关系'; ) ENGINE = InnoDB
AUTO_INCREMENT = 79
DEFAULT CHARSET = utf8 COMMENT ='角色与数据权限对应关系';
-- ---------------------------- -- ----------------------------
-- Records of sys_role_data_perm -- Records of sys_role_data_perm
@ -1460,7 +1516,9 @@ CREATE TABLE `sys_role_menu`
`role_id` bigint(20) DEFAULT NULL COMMENT '角色ID', `role_id` bigint(20) DEFAULT NULL COMMENT '角色ID',
`menu_id` bigint(20) DEFAULT NULL COMMENT '菜单ID', `menu_id` bigint(20) DEFAULT NULL COMMENT '菜单ID',
PRIMARY KEY (`id`) PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=4830 DEFAULT CHARSET=utf8 COMMENT='角色与菜单对应关系'; ) ENGINE = InnoDB
AUTO_INCREMENT = 4830
DEFAULT CHARSET = utf8 COMMENT ='角色与菜单对应关系';
-- ---------------------------- -- ----------------------------
-- Records of sys_role_menu -- Records of sys_role_menu
@ -2226,23 +2284,25 @@ CREATE TABLE `sys_user`
`username` varchar(50) DEFAULT NULL COMMENT '用户名', `username` varchar(50) DEFAULT NULL COMMENT '用户名',
`name` varchar(100) DEFAULT NULL, `name` varchar(100) DEFAULT NULL,
`password` varchar(50) DEFAULT NULL COMMENT '密码', `password` varchar(50) DEFAULT NULL COMMENT '密码',
`dept_id` bigint(20) DEFAULT NULL, `dept_id` bigint(20) DEFAULT NULL,
`email` varchar(100) DEFAULT NULL COMMENT '邮箱', `email` varchar(100) DEFAULT NULL COMMENT '邮箱',
`mobile` varchar(100) DEFAULT NULL COMMENT '手机号', `mobile` varchar(100) DEFAULT NULL COMMENT '手机号',
`status` tinyint(4) DEFAULT NULL COMMENT '状态 0:禁用1:正常', `status` tinyint(4) DEFAULT NULL COMMENT '状态 0:禁用1:正常',
`user_id_create` bigint(20) DEFAULT NULL COMMENT '创建用户id', `user_id_create` bigint(20) DEFAULT NULL COMMENT '创建用户id',
`gmt_create` datetime DEFAULT NULL COMMENT '创建时间', `gmt_create` datetime DEFAULT NULL COMMENT '创建时间',
`gmt_modified` datetime DEFAULT NULL COMMENT '修改时间', `gmt_modified` datetime DEFAULT NULL COMMENT '修改时间',
`sex` bigint(20) DEFAULT NULL COMMENT '性别', `sex` bigint(20) DEFAULT NULL COMMENT '性别',
`birth` datetime DEFAULT NULL COMMENT '出身日期', `birth` datetime DEFAULT NULL COMMENT '出身日期',
`pic_id` bigint(20) DEFAULT NULL, `pic_id` bigint(20) DEFAULT NULL,
`live_address` varchar(500) DEFAULT NULL COMMENT '现居住地', `live_address` varchar(500) DEFAULT NULL COMMENT '现居住地',
`hobby` varchar(255) DEFAULT NULL COMMENT '爱好', `hobby` varchar(255) DEFAULT NULL COMMENT '爱好',
`province` varchar(255) DEFAULT NULL COMMENT '省份', `province` varchar(255) DEFAULT NULL COMMENT '省份',
`city` varchar(255) DEFAULT NULL COMMENT '所在城市', `city` varchar(255) DEFAULT NULL COMMENT '所在城市',
`district` varchar(255) DEFAULT NULL COMMENT '所在地区', `district` varchar(255) DEFAULT NULL COMMENT '所在地区',
PRIMARY KEY (`user_id`) PRIMARY KEY (`user_id`)
) ENGINE=InnoDB AUTO_INCREMENT=139 DEFAULT CHARSET=utf8; ) ENGINE = InnoDB
AUTO_INCREMENT = 139
DEFAULT CHARSET = utf8;
-- ---------------------------- -- ----------------------------
-- Records of sys_user -- Records of sys_user
@ -2262,7 +2322,9 @@ CREATE TABLE `sys_user_role`
`user_id` bigint(20) DEFAULT NULL COMMENT '用户ID', `user_id` bigint(20) DEFAULT NULL COMMENT '用户ID',
`role_id` bigint(20) DEFAULT NULL COMMENT '角色ID', `role_id` bigint(20) DEFAULT NULL COMMENT '角色ID',
PRIMARY KEY (`id`) PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=137 DEFAULT CHARSET=utf8 COMMENT='用户与角色对应关系'; ) ENGINE = InnoDB
AUTO_INCREMENT = 137
DEFAULT CHARSET = utf8 COMMENT ='用户与角色对应关系';
-- ---------------------------- -- ----------------------------
-- Records of sys_user_role -- Records of sys_user_role
@ -2342,19 +2404,21 @@ VALUES ('136', '138', '60');
DROP TABLE IF EXISTS `user`; DROP TABLE IF EXISTS `user`;
CREATE TABLE `user` CREATE TABLE `user`
( (
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键', `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键',
`username` varchar(50) NOT NULL COMMENT '登录名', `username` varchar(50) NOT NULL COMMENT '登录名',
`password` varchar(100) NOT NULL COMMENT '登录密码', `password` varchar(100) NOT NULL COMMENT '登录密码',
`nick_name` varchar(50) DEFAULT NULL COMMENT '昵称', `nick_name` varchar(50) DEFAULT NULL COMMENT '昵称',
`user_photo` varchar(100) DEFAULT NULL COMMENT '用户头像', `user_photo` varchar(100) DEFAULT NULL COMMENT '用户头像',
`user_sex` tinyint(1) DEFAULT NULL COMMENT '用户性别01', `user_sex` tinyint(1) DEFAULT NULL COMMENT '用户性别01',
`account_balance` bigint(20) NOT NULL DEFAULT '0' COMMENT '账户余额', `account_balance` bigint(20) NOT NULL DEFAULT '0' COMMENT '账户余额',
`status` tinyint(1) NOT NULL DEFAULT '0' COMMENT '用户状态0正常', `status` tinyint(1) NOT NULL DEFAULT '0' COMMENT '用户状态0正常',
`create_time` datetime NOT NULL COMMENT '创建时间', `create_time` datetime NOT NULL COMMENT '创建时间',
`update_time` datetime NOT NULL COMMENT '更新时间', `update_time` datetime NOT NULL COMMENT '更新时间',
PRIMARY KEY (`id`), PRIMARY KEY (`id`),
UNIQUE KEY `key_uq_username` (`username`) USING BTREE UNIQUE KEY `key_uq_username` (`username`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=1255664783722586113 DEFAULT CHARSET=utf8mb4; ) ENGINE = InnoDB
AUTO_INCREMENT = 1255664783722586113
DEFAULT CHARSET = utf8mb4;
-- ---------------------------- -- ----------------------------
-- Records of user -- Records of user
@ -2391,11 +2455,13 @@ CREATE TABLE `user_bookshelf`
`user_id` bigint(20) NOT NULL COMMENT '用户ID', `user_id` bigint(20) NOT NULL COMMENT '用户ID',
`book_id` bigint(20) NOT NULL COMMENT '小说ID', `book_id` bigint(20) NOT NULL COMMENT '小说ID',
`pre_content_id` bigint(20) DEFAULT NULL COMMENT '上一次阅读的章节内容表ID', `pre_content_id` bigint(20) DEFAULT NULL COMMENT '上一次阅读的章节内容表ID',
`create_time` datetime DEFAULT NULL, `create_time` datetime DEFAULT NULL,
`update_time` datetime DEFAULT NULL, `update_time` datetime DEFAULT NULL,
PRIMARY KEY (`id`), PRIMARY KEY (`id`),
UNIQUE KEY `key_uq_userid_bookid` (`user_id`,`book_id`) USING BTREE UNIQUE KEY `key_uq_userid_bookid` (`user_id`, `book_id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=42 DEFAULT CHARSET=utf8mb4 COMMENT='用户书架表'; ) ENGINE = InnoDB
AUTO_INCREMENT = 42
DEFAULT CHARSET = utf8mb4 COMMENT ='用户书架表';
-- ---------------------------- -- ----------------------------
-- Records of user_bookshelf -- Records of user_bookshelf
@ -2420,15 +2486,17 @@ CREATE TABLE `user_buy_record`
( (
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键', `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键',
`user_id` bigint(20) NOT NULL COMMENT '用户ID', `user_id` bigint(20) NOT NULL COMMENT '用户ID',
`book_id` bigint(20) DEFAULT NULL COMMENT '购买的小说ID', `book_id` bigint(20) DEFAULT NULL COMMENT '购买的小说ID',
`book_name` varchar(50) DEFAULT NULL COMMENT '购买的小说名', `book_name` varchar(50) DEFAULT NULL COMMENT '购买的小说名',
`book_index_id` bigint(20) DEFAULT NULL COMMENT '购买的章节ID', `book_index_id` bigint(20) DEFAULT NULL COMMENT '购买的章节ID',
`book_index_name` varchar(100) DEFAULT NULL COMMENT '购买的章节名', `book_index_name` varchar(100) DEFAULT NULL COMMENT '购买的章节名',
`buy_amount` int(11) DEFAULT NULL COMMENT '购买使用的屋币数量', `buy_amount` int(11) DEFAULT NULL COMMENT '购买使用的屋币数量',
`create_time` datetime DEFAULT NULL COMMENT '购买时间', `create_time` datetime DEFAULT NULL COMMENT '购买时间',
PRIMARY KEY (`id`), PRIMARY KEY (`id`),
UNIQUE KEY `key_userId_indexId` (`user_id`,`book_index_id`) UNIQUE KEY `key_userId_indexId` (`user_id`, `book_index_id`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8mb4 COMMENT='用户消费记录表'; ) ENGINE = InnoDB
AUTO_INCREMENT = 3
DEFAULT CHARSET = utf8mb4 COMMENT ='用户消费记录表';
-- ---------------------------- -- ----------------------------
-- Records of user_buy_record -- Records of user_buy_record
@ -2447,11 +2515,13 @@ DROP TABLE IF EXISTS `user_feedback`;
CREATE TABLE `user_feedback` CREATE TABLE `user_feedback`
( (
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键id', `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键id',
`user_id` bigint(20) DEFAULT NULL COMMENT '用户id', `user_id` bigint(20) DEFAULT NULL COMMENT '用户id',
`content` varchar(512) DEFAULT NULL COMMENT '反馈内容', `content` varchar(512) DEFAULT NULL COMMENT '反馈内容',
`create_time` datetime DEFAULT NULL COMMENT '反馈时间', `create_time` datetime DEFAULT NULL COMMENT '反馈时间',
PRIMARY KEY (`id`) PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=9 DEFAULT CHARSET=utf8mb4; ) ENGINE = InnoDB
AUTO_INCREMENT = 9
DEFAULT CHARSET = utf8mb4;
-- ---------------------------- -- ----------------------------
-- Records of user_feedback -- Records of user_feedback
@ -2469,11 +2539,13 @@ CREATE TABLE `user_read_history`
`user_id` bigint(20) NOT NULL COMMENT '用户ID', `user_id` bigint(20) NOT NULL COMMENT '用户ID',
`book_id` bigint(20) NOT NULL COMMENT '小说ID', `book_id` bigint(20) NOT NULL COMMENT '小说ID',
`pre_content_id` bigint(20) DEFAULT NULL COMMENT '上一次阅读的章节内容表ID', `pre_content_id` bigint(20) DEFAULT NULL COMMENT '上一次阅读的章节内容表ID',
`create_time` datetime DEFAULT NULL, `create_time` datetime DEFAULT NULL,
`update_time` datetime DEFAULT NULL, `update_time` datetime DEFAULT NULL,
PRIMARY KEY (`id`), PRIMARY KEY (`id`),
UNIQUE KEY `key_uq_userid_bookid` (`user_id`,`book_id`) USING BTREE UNIQUE KEY `key_uq_userid_bookid` (`user_id`, `book_id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=119 DEFAULT CHARSET=utf8mb4 COMMENT='用户阅读记录表'; ) ENGINE = InnoDB
AUTO_INCREMENT = 119
DEFAULT CHARSET = utf8mb4 COMMENT ='用户阅读记录表';
-- ---------------------------- -- ----------------------------
-- Records of user_read_history -- Records of user_read_history
@ -2539,7 +2611,9 @@ CREATE TABLE `book_content0`
`content` mediumtext COMMENT '小说章节内容', `content` mediumtext COMMENT '小说章节内容',
PRIMARY KEY (`id`), PRIMARY KEY (`id`),
UNIQUE KEY `key_uq_indexId` (`index_id`) USING BTREE UNIQUE KEY `key_uq_indexId` (`index_id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=1155 DEFAULT CHARSET=utf8mb4 COMMENT='小说内容表'; ) ENGINE = InnoDB
AUTO_INCREMENT = 1155
DEFAULT CHARSET = utf8mb4 COMMENT ='小说内容表';
-- ---------------------------- -- ----------------------------
-- Table structure for book_content1 -- Table structure for book_content1
@ -2552,7 +2626,9 @@ CREATE TABLE `book_content1`
`content` mediumtext COMMENT '小说章节内容', `content` mediumtext COMMENT '小说章节内容',
PRIMARY KEY (`id`), PRIMARY KEY (`id`),
UNIQUE KEY `key_uq_indexId` (`index_id`) USING BTREE UNIQUE KEY `key_uq_indexId` (`index_id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=406 DEFAULT CHARSET=utf8mb4 COMMENT='小说内容表'; ) ENGINE = InnoDB
AUTO_INCREMENT = 406
DEFAULT CHARSET = utf8mb4 COMMENT ='小说内容表';
-- ---------------------------- -- ----------------------------
-- Table structure for book_content2 -- Table structure for book_content2
@ -2565,7 +2641,9 @@ CREATE TABLE `book_content2`
`content` mediumtext COMMENT '小说章节内容', `content` mediumtext COMMENT '小说章节内容',
PRIMARY KEY (`id`), PRIMARY KEY (`id`),
UNIQUE KEY `key_uq_indexId` (`index_id`) USING BTREE UNIQUE KEY `key_uq_indexId` (`index_id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=1222 DEFAULT CHARSET=utf8mb4 COMMENT='小说内容表'; ) ENGINE = InnoDB
AUTO_INCREMENT = 1222
DEFAULT CHARSET = utf8mb4 COMMENT ='小说内容表';
-- ---------------------------- -- ----------------------------
-- Table structure for book_content3 -- Table structure for book_content3
@ -2578,7 +2656,9 @@ CREATE TABLE `book_content3`
`content` mediumtext COMMENT '小说章节内容', `content` mediumtext COMMENT '小说章节内容',
PRIMARY KEY (`id`), PRIMARY KEY (`id`),
UNIQUE KEY `key_uq_indexId` (`index_id`) USING BTREE UNIQUE KEY `key_uq_indexId` (`index_id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=410 DEFAULT CHARSET=utf8mb4 COMMENT='小说内容表'; ) ENGINE = InnoDB
AUTO_INCREMENT = 410
DEFAULT CHARSET = utf8mb4 COMMENT ='小说内容表';
-- ---------------------------- -- ----------------------------
-- Table structure for book_content4 -- Table structure for book_content4
@ -2591,7 +2671,9 @@ CREATE TABLE `book_content4`
`content` mediumtext COMMENT '小说章节内容', `content` mediumtext COMMENT '小说章节内容',
PRIMARY KEY (`id`), PRIMARY KEY (`id`),
UNIQUE KEY `key_uq_indexId` (`index_id`) USING BTREE UNIQUE KEY `key_uq_indexId` (`index_id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=1188 DEFAULT CHARSET=utf8mb4 COMMENT='小说内容表'; ) ENGINE = InnoDB
AUTO_INCREMENT = 1188
DEFAULT CHARSET = utf8mb4 COMMENT ='小说内容表';
-- ---------------------------- -- ----------------------------
-- Table structure for book_content5 -- Table structure for book_content5
@ -2604,7 +2686,9 @@ CREATE TABLE `book_content5`
`content` mediumtext COMMENT '小说章节内容', `content` mediumtext COMMENT '小说章节内容',
PRIMARY KEY (`id`), PRIMARY KEY (`id`),
UNIQUE KEY `key_uq_indexId` (`index_id`) USING BTREE UNIQUE KEY `key_uq_indexId` (`index_id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=416 DEFAULT CHARSET=utf8mb4 COMMENT='小说内容表'; ) ENGINE = InnoDB
AUTO_INCREMENT = 416
DEFAULT CHARSET = utf8mb4 COMMENT ='小说内容表';
-- ---------------------------- -- ----------------------------
-- Table structure for book_content6 -- Table structure for book_content6
@ -2617,7 +2701,9 @@ CREATE TABLE `book_content6`
`content` mediumtext COMMENT '小说章节内容', `content` mediumtext COMMENT '小说章节内容',
PRIMARY KEY (`id`), PRIMARY KEY (`id`),
UNIQUE KEY `key_uq_indexId` (`index_id`) USING BTREE UNIQUE KEY `key_uq_indexId` (`index_id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=1180 DEFAULT CHARSET=utf8mb4 COMMENT='小说内容表'; ) ENGINE = InnoDB
AUTO_INCREMENT = 1180
DEFAULT CHARSET = utf8mb4 COMMENT ='小说内容表';
-- ---------------------------- -- ----------------------------
-- Table structure for book_content7 -- Table structure for book_content7
@ -2630,7 +2716,9 @@ CREATE TABLE `book_content7`
`content` mediumtext COMMENT '小说章节内容', `content` mediumtext COMMENT '小说章节内容',
PRIMARY KEY (`id`), PRIMARY KEY (`id`),
UNIQUE KEY `key_uq_indexId` (`index_id`) USING BTREE UNIQUE KEY `key_uq_indexId` (`index_id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=404 DEFAULT CHARSET=utf8mb4 COMMENT='小说内容表'; ) ENGINE = InnoDB
AUTO_INCREMENT = 404
DEFAULT CHARSET = utf8mb4 COMMENT ='小说内容表';
-- ---------------------------- -- ----------------------------
-- Table structure for book_content8 -- Table structure for book_content8
@ -2643,7 +2731,9 @@ CREATE TABLE `book_content8`
`content` mediumtext COMMENT '小说章节内容', `content` mediumtext COMMENT '小说章节内容',
PRIMARY KEY (`id`), PRIMARY KEY (`id`),
UNIQUE KEY `key_uq_indexId` (`index_id`) USING BTREE UNIQUE KEY `key_uq_indexId` (`index_id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=1134 DEFAULT CHARSET=utf8mb4 COMMENT='小说内容表'; ) ENGINE = InnoDB
AUTO_INCREMENT = 1134
DEFAULT CHARSET = utf8mb4 COMMENT ='小说内容表';
-- ---------------------------- -- ----------------------------
-- Table structure for book_content9 -- Table structure for book_content9
@ -2656,24 +2746,28 @@ CREATE TABLE `book_content9`
`content` mediumtext COMMENT '小说章节内容', `content` mediumtext COMMENT '小说章节内容',
PRIMARY KEY (`id`), PRIMARY KEY (`id`),
UNIQUE KEY `key_uq_indexId` (`index_id`) USING BTREE UNIQUE KEY `key_uq_indexId` (`index_id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=415 DEFAULT CHARSET=utf8mb4 COMMENT='小说内容表'; ) ENGINE = InnoDB
AUTO_INCREMENT = 415
DEFAULT CHARSET = utf8mb4 COMMENT ='小说内容表';
DROP TABLE IF EXISTS `crawl_single_task`; DROP TABLE IF EXISTS `crawl_single_task`;
CREATE TABLE `crawl_single_task` CREATE TABLE `crawl_single_task`
( (
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键', `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键',
`source_id` int(11) DEFAULT NULL COMMENT '爬虫源ID', `source_id` int(11) DEFAULT NULL COMMENT '爬虫源ID',
`source_name` varchar(50) DEFAULT NULL COMMENT '爬虫源名', `source_name` varchar(50) DEFAULT NULL COMMENT '爬虫源名',
`source_book_id` varchar(255) DEFAULT NULL COMMENT '源站小说ID', `source_book_id` varchar(255) DEFAULT NULL COMMENT '源站小说ID',
`cat_id` int(11) DEFAULT NULL COMMENT '分类ID', `cat_id` int(11) DEFAULT NULL COMMENT '分类ID',
`book_name` varchar(50) DEFAULT NULL COMMENT '爬取的小说名', `book_name` varchar(50) DEFAULT NULL COMMENT '爬取的小说名',
`author_name` varchar(50) DEFAULT NULL COMMENT '爬取的小说作者名', `author_name` varchar(50) DEFAULT NULL COMMENT '爬取的小说作者名',
`task_status` tinyint(1) DEFAULT '2' COMMENT '任务状态0失败1成功2未执行', `task_status` tinyint(1) DEFAULT '2' COMMENT '任务状态0失败1成功2未执行',
`exc_count` tinyint(2) DEFAULT '0' COMMENT '已经执行次数最多执行5次', `exc_count` tinyint(2) DEFAULT '0' COMMENT '已经执行次数最多执行5次',
`create_time` datetime DEFAULT NULL COMMENT '创建时间', `create_time` datetime DEFAULT NULL COMMENT '创建时间',
PRIMARY KEY (`id`) PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=8 DEFAULT CHARSET=utf8mb4 COMMENT='抓取单本小说任务表'; ) ENGINE = InnoDB
AUTO_INCREMENT = 8
DEFAULT CHARSET = utf8mb4 COMMENT ='抓取单本小说任务表';
-- ---------------------------- -- ----------------------------
-- Records of crawl_single_task -- Records of crawl_single_task
@ -2697,13 +2791,14 @@ CREATE TABLE `author_income_detail`
`user_id` bigint(20) NOT NULL COMMENT '用户ID', `user_id` bigint(20) NOT NULL COMMENT '用户ID',
`author_id` bigint(20) NOT NULL COMMENT '作家ID', `author_id` bigint(20) NOT NULL COMMENT '作家ID',
`book_id` bigint(20) NOT NULL DEFAULT '0' COMMENT '作品ID,0表示全部作品', `book_id` bigint(20) NOT NULL DEFAULT '0' COMMENT '作品ID,0表示全部作品',
`income_date` date NOT NULL COMMENT '收入日期', `income_date` date NOT NULL COMMENT '收入日期',
`income_account` int(11) NOT NULL DEFAULT '0' COMMENT '订阅总额', `income_account` int(11) NOT NULL DEFAULT '0' COMMENT '订阅总额',
`income_count` int(11) NOT NULL DEFAULT '0' COMMENT '订阅次数', `income_count` int(11) NOT NULL DEFAULT '0' COMMENT '订阅次数',
`income_number` int(11) NOT NULL DEFAULT '0' COMMENT '订阅人数', `income_number` int(11) NOT NULL DEFAULT '0' COMMENT '订阅人数',
`create_time` datetime DEFAULT NULL, `create_time` datetime DEFAULT NULL,
PRIMARY KEY (`id`) PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='稿费收入明细统计表'; ) ENGINE = InnoDB
DEFAULT CHARSET = utf8mb4 COMMENT ='稿费收入明细统计表';
CREATE TABLE `author_income` CREATE TABLE `author_income`
( (
@ -2711,15 +2806,16 @@ CREATE TABLE `author_income`
`user_id` bigint(20) NOT NULL COMMENT '用户ID', `user_id` bigint(20) NOT NULL COMMENT '用户ID',
`author_id` bigint(20) NOT NULL COMMENT '作家ID', `author_id` bigint(20) NOT NULL COMMENT '作家ID',
`book_id` bigint(20) NOT NULL COMMENT '作品ID', `book_id` bigint(20) NOT NULL COMMENT '作品ID',
`income_month` date NOT NULL COMMENT '收入月份', `income_month` date NOT NULL COMMENT '收入月份',
`pre_tax_income` bigint(20) NOT NULL DEFAULT '0' COMMENT '税前收入', `pre_tax_income` bigint(20) NOT NULL DEFAULT '0' COMMENT '税前收入',
`after_tax_income` bigint(20) NOT NULL DEFAULT '0' COMMENT '税后收入', `after_tax_income` bigint(20) NOT NULL DEFAULT '0' COMMENT '税后收入',
`pay_status` tinyint(1) NOT NULL DEFAULT '0' COMMENT '支付状态0待支付1已支付', `pay_status` tinyint(1) NOT NULL DEFAULT '0' COMMENT '支付状态0待支付1已支付',
`confirm_status` tinyint(1) NOT NULL DEFAULT '0' COMMENT '稿费确认状态0待确认1已确认', `confirm_status` tinyint(1) NOT NULL DEFAULT '0' COMMENT '稿费确认状态0待确认1已确认',
`detail` varchar(255) DEFAULT NULL COMMENT '详情', `detail` varchar(255) DEFAULT NULL COMMENT '详情',
`create_time` datetime DEFAULT NULL, `create_time` datetime DEFAULT NULL,
PRIMARY KEY (`id`) PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='稿费收入统计表'; ) ENGINE = InnoDB
DEFAULT CHARSET = utf8mb4 COMMENT ='稿费收入统计表';
alter table book alter table book
@ -2819,7 +2915,7 @@ alter table book_index
CREATE TABLE `website_info` CREATE TABLE `website_info`
( (
id bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键', id bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键',
name varchar(50) NOT NULL COMMENT '网站名', name varchar(50) NOT NULL COMMENT '网站名',
domain varchar(50) NOT NULL COMMENT '网站域名', domain varchar(50) NOT NULL COMMENT '网站域名',
keyword varchar(50) NOT NULL COMMENT 'SEO关键词', keyword varchar(50) NOT NULL COMMENT 'SEO关键词',
@ -2827,10 +2923,10 @@ CREATE TABLE `website_info`
qq varchar(20) NOT NULL COMMENT '站长QQ', qq varchar(20) NOT NULL COMMENT '站长QQ',
logo varchar(200) NOT NULL COMMENT '网站logo图片默认', logo varchar(200) NOT NULL COMMENT '网站logo图片默认',
logo_dark varchar(200) NOT NULL COMMENT '网站logo图片深色', logo_dark varchar(200) NOT NULL COMMENT '网站logo图片深色',
create_time datetime null comment '创建时间', create_time datetime null comment '创建时间',
create_user_id bigint null comment '创建人ID', create_user_id bigint null comment '创建人ID',
update_time datetime null comment '更新时间', update_time datetime null comment '更新时间',
update_user_id bigint null comment '更新人ID', update_user_id bigint null comment '更新人ID',
PRIMARY KEY (`id`) PRIMARY KEY (`id`)
) ENGINE = InnoDB ) ENGINE = InnoDB
DEFAULT CHARSET = utf8mb4 COMMENT ='网站信息表'; DEFAULT CHARSET = utf8mb4 COMMENT ='网站信息表';
@ -2998,4 +3094,15 @@ VALUES (1, 305);
update website_info update website_info
set logo = 'https://youdoc.gitee.io/resource/images/logo%20(1).png', set logo = 'https://youdoc.gitee.io/resource/images/logo%20(1).png',
logo_dark='https://youdoc.gitee.io/resource/images/logo%20(1).png' logo_dark='https://youdoc.gitee.io/resource/images/logo%20(1).png'
where id = 1;
update crawl_source
set crawl_rule = replace(crawl_rule, 'ibiquge.net', 'ibiquzw.org')
where id = 16;
update website_info
set logo = '/images/logo.png',
logo_dark='/images/logo.png'
where id = 1; where id = 1;

View File

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

View File

@ -12,6 +12,7 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.redis.core.RedisTemplate; import org.springframework.data.redis.core.RedisTemplate;
import org.springframework.stereotype.Controller; import org.springframework.stereotype.Controller;
import org.springframework.ui.Model; import org.springframework.ui.Model;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
import java.util.List; import java.util.List;
@ -83,7 +84,7 @@ public class FriendLinkController {
@ResponseBody @ResponseBody
@PostMapping("/save") @PostMapping("/save")
@RequiresPermissions("novel:friendLink:add") @RequiresPermissions("novel:friendLink:add")
public R save(FriendLinkDO friendLink) { public R save(@Validated FriendLinkDO friendLink) {
if (friendLinkService.save(friendLink) > 0) { if (friendLinkService.save(friendLink) > 0) {
redisTemplate.delete(CacheKey.INDEX_LINK_KEY); redisTemplate.delete(CacheKey.INDEX_LINK_KEY);
return R.ok(); return R.ok();
@ -98,7 +99,7 @@ public class FriendLinkController {
@ResponseBody @ResponseBody
@RequestMapping("/update") @RequestMapping("/update")
@RequiresPermissions("novel:friendLink:edit") @RequiresPermissions("novel:friendLink:edit")
public R update(FriendLinkDO friendLink) { public R update(@Validated FriendLinkDO friendLink) {
friendLinkService.update(friendLink); friendLinkService.update(friendLink);
redisTemplate.delete(CacheKey.INDEX_LINK_KEY); redisTemplate.delete(CacheKey.INDEX_LINK_KEY);
return R.ok(); return R.ok();

View File

@ -1,163 +1,175 @@
package com.java2nb.novel.domain; package com.java2nb.novel.domain;
import java.io.Serializable;
import java.math.BigDecimal;
import com.fasterxml.jackson.databind.annotation.JsonSerialize; import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.java2nb.common.jsonserializer.LongToStringSerializer; import com.java2nb.common.jsonserializer.LongToStringSerializer;
import org.hibernate.validator.constraints.URL;
import org.springframework.format.annotation.DateTimeFormat; import org.springframework.format.annotation.DateTimeFormat;
import java.io.Serializable;
import java.util.Date; import java.util.Date;
/** /**
*
*
* @author xiongxy * @author xiongxy
* @email 1179705413@qq.com * @email 1179705413@qq.com
* @date 2023-04-14 15:12:25 * @date 2023-04-14 15:12:25
*/ */
public class FriendLinkDO implements Serializable { public class FriendLinkDO implements Serializable {
private static final long serialVersionUID = 1L;
private static final long serialVersionUID = 1L;
//主键
private Integer id;
//链接名
private String linkName;
//链接url
private String linkUrl;
//排序号
private Integer sort;
//是否开启0不开启1开启
private Integer isOpen;
//创建人id
//java中的long能表示的范围比js中number大,也就意味着部分数值在js中存不下(变成不准确的值)
//所以通过序列化成字符串来解决
@JsonSerialize(using = LongToStringSerializer.class)
private Long createUserId;
//创建时间
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date createTime;
//更新者用户id
//java中的long能表示的范围比js中number大,也就意味着部分数值在js中存不下(变成不准确的值)
//所以通过序列化成字符串来解决
@JsonSerialize(using = LongToStringSerializer.class)
private Long updateUserId;
//更新时间
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date updateTime;
/**
* 设置主键 //主键
*/ private Integer id;
public void setId(Integer id) { //链接名
this.id = id; private String linkName;
} //链接url
/** @URL
* 获取主键 private String linkUrl;
*/ //排序号
public Integer getId() { private Integer sort;
return id; //是否开启0不开启1开启
} private Integer isOpen;
/** //创建人id
* 设置链接名 //java中的long能表示的范围比js中number大,也就意味着部分数值在js中存不下(变成不准确的值)
*/ //所以通过序列化成字符串来解决
public void setLinkName(String linkName) { @JsonSerialize(using = LongToStringSerializer.class)
this.linkName = linkName; private Long createUserId;
} //创建时间
/** @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
* 获取链接名 private Date createTime;
*/ //更新者用户id
public String getLinkName() { //java中的long能表示的范围比js中number大,也就意味着部分数值在js中存不下(变成不准确的值)
return linkName; //所以通过序列化成字符串来解决
} @JsonSerialize(using = LongToStringSerializer.class)
/** private Long updateUserId;
* 设置链接url //更新时间
*/ @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
public void setLinkUrl(String linkUrl) { private Date updateTime;
this.linkUrl = linkUrl;
} /**
/** * 设置主键
* 获取链接url */
*/ public void setId(Integer id) {
public String getLinkUrl() { this.id = id;
return linkUrl; }
}
/** /**
* 设置排序号 * 获取主键
*/ */
public void setSort(Integer sort) { public Integer getId() {
this.sort = sort; return id;
} }
/**
* 获取排序号 /**
*/ * 设置链接名
public Integer getSort() { */
return sort; public void setLinkName(String linkName) {
} this.linkName = linkName;
/** }
* 设置是否开启0不开启1开启
*/ /**
public void setIsOpen(Integer isOpen) { * 获取链接名
this.isOpen = isOpen; */
} public String getLinkName() {
/** return linkName;
* 获取是否开启0不开启1开启 }
*/
public Integer getIsOpen() { /**
return isOpen; * 设置链接url
} */
/** public void setLinkUrl(String linkUrl) {
* 设置创建人id this.linkUrl = linkUrl;
*/ }
public void setCreateUserId(Long createUserId) {
this.createUserId = createUserId; /**
} * 获取链接url
/** */
* 获取创建人id public String getLinkUrl() {
*/ return linkUrl;
public Long getCreateUserId() { }
return createUserId;
} /**
/** * 设置排序号
* 设置创建时间 */
*/ public void setSort(Integer sort) {
public void setCreateTime(Date createTime) { this.sort = sort;
this.createTime = createTime; }
}
/** /**
* 获取创建时间 * 获取排序号
*/ */
public Date getCreateTime() { public Integer getSort() {
return createTime; return sort;
} }
/**
* 设置更新者用户id /**
*/ * 设置是否开启0不开启1开启
public void setUpdateUserId(Long updateUserId) { */
this.updateUserId = updateUserId; public void setIsOpen(Integer isOpen) {
} this.isOpen = isOpen;
/** }
* 获取更新者用户id
*/ /**
public Long getUpdateUserId() { * 获取是否开启0不开启1开启
return updateUserId; */
} public Integer getIsOpen() {
/** return isOpen;
* 设置更新时间 }
*/
public void setUpdateTime(Date updateTime) { /**
this.updateTime = updateTime; * 设置创建人id
} */
/** public void setCreateUserId(Long createUserId) {
* 获取更新时间 this.createUserId = createUserId;
*/ }
public Date getUpdateTime() {
return updateTime; /**
} * 获取创建人id
*/
public Long getCreateUserId() {
return createUserId;
}
/**
* 设置创建时间
*/
public void setCreateTime(Date createTime) {
this.createTime = createTime;
}
/**
* 获取创建时间
*/
public Date getCreateTime() {
return createTime;
}
/**
* 设置更新者用户id
*/
public void setUpdateUserId(Long updateUserId) {
this.updateUserId = updateUserId;
}
/**
* 获取更新者用户id
*/
public Long getUpdateUserId() {
return updateUserId;
}
/**
* 设置更新时间
*/
public void setUpdateTime(Date updateTime) {
this.updateTime = updateTime;
}
/**
* 获取更新时间
*/
public Date getUpdateTime() {
return updateTime;
}
} }

View File

@ -18,11 +18,12 @@ spring:
profiles: profiles:
active: dev active: dev
#上传文件的最大值10M #上传文件的最大值100M
servlet: servlet:
multipart: multipart:
max-file-size: 10485760 max-file-size: 100MB
max-request-size: 100MB
devtools: devtools:
restart: restart:
enabled: true enabled: true

View File

@ -23,7 +23,7 @@
<div class="col-sm-8"> <div class="col-sm-8">
<input id="linkUrl" name="linkUrl" <input id="linkUrl" name="linkUrl"
class="form-control" class="form-control"
type="text" required> type="url" required>
</div> </div>
</div> </div>

View File

@ -26,7 +26,7 @@
<input id="linkUrl" name="linkUrl" <input id="linkUrl" name="linkUrl"
th:value="${friendLink.linkUrl}" th:value="${friendLink.linkUrl}"
class="form-control" class="form-control"
type="text" required> type="url" required>
</div> </div>
</div> </div>
<div class="form-group"> <div class="form-group">

View File

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

View File

@ -14,43 +14,48 @@ public class User {
private Long id; private Long id;
@NotBlank(groups = {AddGroup.class},message="手机号不能为空!") @NotBlank(groups = {AddGroup.class}, message = "手机号不能为空!")
@Pattern(groups = {AddGroup.class},regexp="^1[3|4|5|6|7|8|9][0-9]{9}$",message="手机号格式不正确!") @Pattern(groups = {AddGroup.class}, regexp = "^1[3|4|5|6|7|8|9][0-9]{9}$", message = "手机号格式不正确!")
@Null(groups = {UpdateGroup.class})
@Generated("org.mybatis.generator.api.MyBatisGenerator") @Generated("org.mybatis.generator.api.MyBatisGenerator")
private String username; private String username;
@NotBlank(groups = {AddGroup.class},message="密码不能为空!") @NotBlank(groups = {AddGroup.class}, message = "密码不能为空!")
@Null(groups = {UpdateGroup.class}) @Null(groups = {UpdateGroup.class})
@Generated("org.mybatis.generator.api.MyBatisGenerator") @Generated("org.mybatis.generator.api.MyBatisGenerator")
private String password; private String password;
@Null(groups = {AddGroup.class}) @Null(groups = {AddGroup.class})
@Pattern(groups = {
UpdateGroup.class}, regexp = "[\u4E00-\u9FA5A-Za-z0-9_]{1,11}", message = "昵称格式不正确!")
@Generated("org.mybatis.generator.api.MyBatisGenerator") @Generated("org.mybatis.generator.api.MyBatisGenerator")
private String nickName; private String nickName;
@Null(groups = {AddGroup.class}) @Null(groups = {AddGroup.class})
@Pattern(groups = {
UpdateGroup.class}, regexp = "^/localPic/\\d{4}/\\d{2}/\\d{2}/[A-Za-z0-9]+\\.(jpg|jpeg|swf|gif|png|JPG|JPEG|SWF|GIF|PNG)$", message = "只能上传图片格式的文件!")
@Generated("org.mybatis.generator.api.MyBatisGenerator") @Generated("org.mybatis.generator.api.MyBatisGenerator")
private String userPhoto; private String userPhoto;
@Null(groups = {AddGroup.class}) @Null(groups = {AddGroup.class})
@Min(value = 0,groups = {UpdateGroup.class}) @Min(value = 0, groups = {UpdateGroup.class})
@Max(value = 1,groups = {UpdateGroup.class}) @Max(value = 1, groups = {UpdateGroup.class})
@Generated("org.mybatis.generator.api.MyBatisGenerator") @Generated("org.mybatis.generator.api.MyBatisGenerator")
private Byte userSex; private Byte userSex;
@Null(groups = {AddGroup.class,UpdateGroup.class}) @Null(groups = {AddGroup.class, UpdateGroup.class})
@Generated("org.mybatis.generator.api.MyBatisGenerator") @Generated("org.mybatis.generator.api.MyBatisGenerator")
private Long accountBalance; private Long accountBalance;
@Null(groups = {AddGroup.class,UpdateGroup.class}) @Null(groups = {AddGroup.class, UpdateGroup.class})
@Generated("org.mybatis.generator.api.MyBatisGenerator") @Generated("org.mybatis.generator.api.MyBatisGenerator")
private Byte status; private Byte status;
@Null(groups = {AddGroup.class,UpdateGroup.class}) @Null(groups = {AddGroup.class, UpdateGroup.class})
@Generated("org.mybatis.generator.api.MyBatisGenerator") @Generated("org.mybatis.generator.api.MyBatisGenerator")
private Date createTime; private Date createTime;
@Null(groups = {AddGroup.class,UpdateGroup.class}) @Null(groups = {AddGroup.class, UpdateGroup.class})
@Generated("org.mybatis.generator.api.MyBatisGenerator") @Generated("org.mybatis.generator.api.MyBatisGenerator")
private Date updateTime; private Date updateTime;

View File

@ -11,10 +11,11 @@ spring:
generator: generator:
write-numbers-as-strings: true write-numbers-as-strings: true
#上传文件的最大值1M #上传文件的最大值100M
servlet: servlet:
multipart: multipart:
max-file-size: 1048576 max-file-size: 100MB
max-request-size: 100MB
mybatis: mybatis:
configuration: configuration:

View File

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

View File

@ -331,7 +331,7 @@ input::-webkit-input-placeholder, textarea::-webkit-input-placeholder {
} }
.logo { .logo {
width: 198px; width: 160px;
float: left; float: left;
padding: 23px 130px 0 0; padding: 23px 130px 0 0;
display: block display: block

View File

@ -6,9 +6,8 @@
<meta name="description" content=""> <meta name="description" content="">
<meta name="author" content=""> <meta name="author" content="">
<title>爬虫管理系统登录</title> <title>爬虫管理系统登录</title>
<link href="/css/bootstrap.min.css" rel="stylesheet" <link href="/css/bootstrap.min.css" rel="stylesheet"/>
integrity="sha384-/Y6pD6FV/Vv2HJnA6t+vslU6fwYXjCFtcEpHbNJ0lyAFsXTsjBbfaDjzALeQsN6M" crossorigin="anonymous"> <link href="/css/signin.css" rel="stylesheet"/>
<link href="/css/signin.css" rel="stylesheet" crossorigin="anonymous"/>
<style> <style>
.btn-primary { .btn-primary {
color: #fff; color: #fff;

View File

@ -34,7 +34,7 @@ pic:
#模版配置 #模版配置
templates: templates:
name: orange name: green
#小说内容保存配置 #小说内容保存配置
content: content:

View File

@ -51,7 +51,7 @@ public class PayController extends BaseController {
UserDetails userDetails = getUserDetails(request); UserDetails userDetails = getUserDetails(request);
if (userDetails == null) { if (userDetails == null) {
//未登录跳转到登陆页面 //未登录跳转到登陆页面
httpResponse.sendRedirect("/user/login.html?originUrl=/pay/aliPay?payAmount=" + payAmount); httpResponse.sendRedirect("/user/login.html?originUrl=/pay/index.html");
} else { } else {
//创建充值订单 //创建充值订单
Long outTradeNo = orderService.createPayOrder((byte) 1, payAmount, userDetails.getId()); Long outTradeNo = orderService.createPayOrder((byte) 1, payAmount, userDetails.getId());
@ -121,7 +121,7 @@ public class PayController extends BaseController {
PrintWriter out = httpResponse.getWriter(); PrintWriter out = httpResponse.getWriter();
//获取支付宝POST过来反馈信息 //获取支付宝POST过来信息
Map<String, String> params = new HashMap<>(); Map<String, String> params = new HashMap<>();
Map<String, String[]> requestParams = request.getParameterMap(); Map<String, String[]> requestParams = request.getParameterMap();
for (String name : requestParams.keySet()) { for (String name : requestParams.keySet()) {
@ -134,18 +134,10 @@ public class PayController extends BaseController {
params.put(name, valueStr); params.put(name, valueStr);
} }
//调用SDK验证签名 //验证签名
boolean signVerified = AlipaySignature.rsaCheckV1(params, alipayConfig.getPublicKey(), boolean signVerified = AlipaySignature.rsaCheckV1(params, alipayConfig.getPublicKey(),
alipayConfig.getCharset(), alipayConfig.getSignType()); alipayConfig.getCharset(), alipayConfig.getSignType());
//请在这里编写您的程序以下代码仅作参考
/* 实际验证过程建议商户务必添加以下校验
1需要验证该通知数据中的out_trade_no是否为商户系统中创建的订单号
2判断total_amount是否确实为该订单的实际金额即商户订单创建时的金额
3校验通知中的seller_id或者seller_email) 是否为out_trade_no这笔单据的对应的操作方有的时候一个商户可能有多个seller_id/seller_email
4验证app_id是否为该商户本身
*/
if (signVerified) { if (signVerified) {
//验证成功 //验证成功
//商户订单号 //商户订单号
@ -160,21 +152,18 @@ public class PayController extends BaseController {
String tradeStatus = new String(request.getParameter("trade_status").getBytes(StandardCharsets.ISO_8859_1), String tradeStatus = new String(request.getParameter("trade_status").getBytes(StandardCharsets.ISO_8859_1),
StandardCharsets.UTF_8); StandardCharsets.UTF_8);
//更新订单状态 if ("TRADE_SUCCESS".equals(tradeStatus)) {
orderService.updatePayOrder(Long.parseLong(outTradeNo), tradeNo, tradeStatus); //支付成功
orderService.updatePayOrder(Long.parseLong(outTradeNo), tradeNo, 1);
}
out.println("success"); out.println("success");
} else {//验证失败 } else {//验证失败
out.println("fail"); out.println("fail");
//调试用写文本函数记录程序运行情况是否正常
//String sWord = AlipaySignature.getSignCheckContentV1(params);
//AlipayConfig.logResult(sWord);
} }
} }
} }

View File

@ -0,0 +1,15 @@
package com.java2nb.novel.mapper;
import org.apache.ibatis.annotations.Param;
/**
* @author Administrator
*/
public interface FrontUserMapper extends UserMapper {
void addUserBalance(@Param("userId") Long userId, @Param("amount") Integer amount);
}

View File

@ -1,7 +1,6 @@
package com.java2nb.novel.service; package com.java2nb.novel.service;
/** /**
* @author 11797 * @author 11797
*/ */
@ -12,18 +11,19 @@ public interface OrderService {
* 创建充值订单 * 创建充值订单
* *
* @param payChannel 支付渠道 * @param payChannel 支付渠道
* @param payAmount 支付金额 * @param payAmount 支付金额
* @param userId 用户ID * @param userId 用户ID
* @return 商户订单号 * @return 商户订单号
* */ */
Long createPayOrder(Byte payChannel, Integer payAmount, Long userId); Long createPayOrder(Byte payChannel, Integer payAmount, Long userId);
/** /**
* 更新订单状态 * 更新订单状态
*
* @param outTradeNo 商户订单号 * @param outTradeNo 商户订单号
* @param tradeNo 支付宝/微信 订单号 * @param tradeNo 支付宝/微信 订单号
* @param tradeStatus 支付状态 * @param payStatus 支付状态
* */ */
void updatePayOrder(Long outTradeNo, String tradeNo, String tradeStatus); void updatePayOrder(Long outTradeNo, String tradeNo, int payStatus);
} }

View File

@ -9,6 +9,7 @@ import lombok.RequiredArgsConstructor;
import lombok.SneakyThrows; import lombok.SneakyThrows;
import org.mybatis.dynamic.sql.render.RenderingStrategies; import org.mybatis.dynamic.sql.render.RenderingStrategies;
import org.mybatis.dynamic.sql.select.render.SelectStatementProvider; import org.mybatis.dynamic.sql.select.render.SelectStatementProvider;
import org.mybatis.dynamic.sql.update.render.UpdateStatementProvider;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional; import org.springframework.transaction.annotation.Transactional;
@ -17,6 +18,7 @@ import java.util.Date;
import java.util.Random; import java.util.Random;
import static org.mybatis.dynamic.sql.SqlBuilder.isEqualTo; import static org.mybatis.dynamic.sql.SqlBuilder.isEqualTo;
import static org.mybatis.dynamic.sql.SqlBuilder.update;
import static org.mybatis.dynamic.sql.select.SelectDSL.select; import static org.mybatis.dynamic.sql.select.SelectDSL.select;
/** /**
@ -35,7 +37,8 @@ public class OrderServiceImpl implements OrderService {
@Override @Override
public Long createPayOrder(Byte payChannel, Integer payAmount, Long userId) { public Long createPayOrder(Byte payChannel, Integer payAmount, Long userId) {
Date currentDate = new Date(); Date currentDate = new Date();
Long outTradeNo = Long.parseLong(new SimpleDateFormat("yyyyMMddHHmmssSSS").format(currentDate)+new Random().nextInt(10)); Long outTradeNo = Long.parseLong(
new SimpleDateFormat("yyyyMMddHHmmssSSS").format(currentDate) + new Random().nextInt(10));
OrderPay orderPay = new OrderPay(); OrderPay orderPay = new OrderPay();
orderPay.setOutTradeNo(outTradeNo); orderPay.setOutTradeNo(outTradeNo);
orderPay.setPayChannel(payChannel); orderPay.setPayChannel(payChannel);
@ -49,37 +52,39 @@ public class OrderServiceImpl implements OrderService {
@Transactional(rollbackFor = Exception.class) @Transactional(rollbackFor = Exception.class)
@Override @Override
public void updatePayOrder(Long outTradeNo, String tradeNo, String tradeStatus) { public void updatePayOrder(Long outTradeNo, String tradeNo, int payStatus) {
SelectStatementProvider selectStatement = select(OrderPayDynamicSqlSupport.id,OrderPayDynamicSqlSupport.payStatus,OrderPayDynamicSqlSupport.totalAmount,OrderPayDynamicSqlSupport.userId) SelectStatementProvider selectStatement = select(OrderPayDynamicSqlSupport.id,
.from(OrderPayDynamicSqlSupport.orderPay) OrderPayDynamicSqlSupport.payStatus, OrderPayDynamicSqlSupport.totalAmount,
.where(OrderPayDynamicSqlSupport.outTradeNo, isEqualTo(outTradeNo)) OrderPayDynamicSqlSupport.userId)
.build() .from(OrderPayDynamicSqlSupport.orderPay)
.render(RenderingStrategies.MYBATIS3); .where(OrderPayDynamicSqlSupport.outTradeNo, isEqualTo(outTradeNo))
.build()
.render(RenderingStrategies.MYBATIS3);
OrderPay orderPay = orderPayMapper.selectMany(selectStatement).get(0); OrderPay orderPay = orderPayMapper.selectOne(selectStatement).orElse(null);
if(orderPay.getPayStatus()!=1) { if (orderPay.getPayStatus().intValue() == 2) {
//此订单还未处理过 //待支付订单处理
if (payStatus == 1) {
if (tradeStatus.equals("TRADE_SUCCESS") || tradeStatus.equals("TRADE_FINISHED")) {
//支付成功 //支付成功
//1.更新订单状态为成功 //1.更新订单状态为成功
orderPay.setPayStatus((byte) 1); UpdateStatementProvider updateStatement = update(OrderPayDynamicSqlSupport.orderPay)
orderPay.setUpdateTime(new Date()); .set(OrderPayDynamicSqlSupport.tradeNo).equalTo(tradeNo)
orderPayMapper.updateByPrimaryKeySelective(orderPay); .set(OrderPayDynamicSqlSupport.payStatus).equalTo((byte) 1)
.set(OrderPayDynamicSqlSupport.updateTime).equalTo(new Date())
//2.增加用户余额 .where(OrderPayDynamicSqlSupport.id, isEqualTo(orderPay.getId()))
userService.addAmount(orderPay.getUserId(),orderPay.getTotalAmount()*100); .and(OrderPayDynamicSqlSupport.payStatus, isEqualTo((byte) 2))
.build()
.render(RenderingStrategies.MYBATIS3);
int updateRow = orderPayMapper.update(updateStatement);
if (updateRow > 0) {
//更新成功
//2.增加用户余额
userService.addAmount(orderPay.getUserId(), orderPay.getTotalAmount() * 100);
}
} }
} }
} }
} }

View File

@ -1,20 +1,20 @@
package com.java2nb.novel.service.impl; package com.java2nb.novel.service.impl;
import com.github.pagehelper.PageHelper; import com.github.pagehelper.PageHelper;
import io.github.xxyopen.model.page.PageBean;
import com.java2nb.novel.core.bean.UserDetails; import com.java2nb.novel.core.bean.UserDetails;
import com.java2nb.novel.entity.*;
import com.java2nb.novel.entity.User;
import com.java2nb.novel.service.UserService;
import com.java2nb.novel.core.enums.ResponseStatus; import com.java2nb.novel.core.enums.ResponseStatus;
import com.java2nb.novel.entity.User;
import com.java2nb.novel.entity.*;
import com.java2nb.novel.mapper.*;
import com.java2nb.novel.service.UserService;
import com.java2nb.novel.vo.BookReadHistoryVO;
import com.java2nb.novel.vo.BookShelfVO;
import com.java2nb.novel.vo.UserFeedbackVO;
import io.github.xxyopen.model.page.PageBean;
import io.github.xxyopen.model.page.builder.pagehelper.PageBuilder; import io.github.xxyopen.model.page.builder.pagehelper.PageBuilder;
import io.github.xxyopen.util.IdWorker; import io.github.xxyopen.util.IdWorker;
import io.github.xxyopen.util.MD5Util; import io.github.xxyopen.util.MD5Util;
import io.github.xxyopen.web.exception.BusinessException; import io.github.xxyopen.web.exception.BusinessException;
import com.java2nb.novel.mapper.*;
import com.java2nb.novel.vo.BookReadHistoryVO;
import com.java2nb.novel.vo.BookShelfVO;
import com.java2nb.novel.vo.UserFeedbackVO;
import io.github.xxyopen.web.util.BeanUtil; import io.github.xxyopen.web.util.BeanUtil;
import lombok.RequiredArgsConstructor; import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
@ -46,7 +46,7 @@ import static org.mybatis.dynamic.sql.select.SelectDSL.select;
@RequiredArgsConstructor @RequiredArgsConstructor
public class UserServiceImpl implements UserService { public class UserServiceImpl implements UserService {
private final UserMapper userMapper; private final FrontUserMapper userMapper;
private final FrontUserBookshelfMapper userBookshelfMapper; private final FrontUserBookshelfMapper userBookshelfMapper;
@ -63,17 +63,17 @@ public class UserServiceImpl implements UserService {
public UserDetails register(User user) { public UserDetails register(User user) {
//查询用户名是否已注册 //查询用户名是否已注册
SelectStatementProvider selectStatement = select(count(id)) SelectStatementProvider selectStatement = select(count(id))
.from(UserDynamicSqlSupport.user) .from(UserDynamicSqlSupport.user)
.where(username, isEqualTo(user.getUsername())) .where(username, isEqualTo(user.getUsername()))
.build() .build()
.render(RenderingStrategies.MYBATIS3); .render(RenderingStrategies.MYBATIS3);
long count = userMapper.count(selectStatement); long count = userMapper.count(selectStatement);
if (count > 0) { if (count > 0) {
//用户名已注册 //用户名已注册
throw new BusinessException(ResponseStatus.USERNAME_EXIST); throw new BusinessException(ResponseStatus.USERNAME_EXIST);
} }
User entity = new User(); User entity = new User();
BeanUtils.copyProperties(user,entity); BeanUtils.copyProperties(user, entity);
//数据库生成注册记录 //数据库生成注册记录
Long id = idWorker.nextId(); Long id = idWorker.nextId();
entity.setId(id); entity.setId(id);
@ -94,12 +94,12 @@ public class UserServiceImpl implements UserService {
@Override @Override
public UserDetails login(User user) { public UserDetails login(User user) {
//根据用户名密码查询记录 //根据用户名密码查询记录
SelectStatementProvider selectStatement = select(id, username,nickName) SelectStatementProvider selectStatement = select(id, username, nickName)
.from(UserDynamicSqlSupport.user) .from(UserDynamicSqlSupport.user)
.where(username, isEqualTo(user.getUsername())) .where(username, isEqualTo(user.getUsername()))
.and(password, isEqualTo(MD5Util.MD5Encode(user.getPassword(), Charsets.UTF_8.name()))) .and(password, isEqualTo(MD5Util.MD5Encode(user.getPassword(), Charsets.UTF_8.name())))
.build() .build()
.render(RenderingStrategies.MYBATIS3); .render(RenderingStrategies.MYBATIS3);
List<User> users = userMapper.selectMany(selectStatement); List<User> users = userMapper.selectMany(selectStatement);
if (users.size() == 0) { if (users.size() == 0) {
throw new BusinessException(ResponseStatus.USERNAME_PASS_ERROR); throw new BusinessException(ResponseStatus.USERNAME_PASS_ERROR);
@ -116,11 +116,11 @@ public class UserServiceImpl implements UserService {
@Override @Override
public Boolean queryIsInShelf(Long userId, Long bookId) { public Boolean queryIsInShelf(Long userId, Long bookId) {
SelectStatementProvider selectStatement = select(count(UserBookshelfDynamicSqlSupport.id)) SelectStatementProvider selectStatement = select(count(UserBookshelfDynamicSqlSupport.id))
.from(userBookshelf) .from(userBookshelf)
.where(UserBookshelfDynamicSqlSupport.userId, isEqualTo(userId)) .where(UserBookshelfDynamicSqlSupport.userId, isEqualTo(userId))
.and(UserBookshelfDynamicSqlSupport.bookId, isEqualTo(bookId)) .and(UserBookshelfDynamicSqlSupport.bookId, isEqualTo(bookId))
.build() .build()
.render(RenderingStrategies.MYBATIS3); .render(RenderingStrategies.MYBATIS3);
return userBookshelfMapper.count(selectStatement) > 0; return userBookshelfMapper.count(selectStatement) > 0;
} }
@ -141,10 +141,10 @@ public class UserServiceImpl implements UserService {
@Override @Override
public void removeFromBookShelf(Long userId, Long bookId) { public void removeFromBookShelf(Long userId, Long bookId) {
DeleteStatementProvider deleteStatement = deleteFrom(userBookshelf) DeleteStatementProvider deleteStatement = deleteFrom(userBookshelf)
.where(UserBookshelfDynamicSqlSupport.userId, isEqualTo(userId)) .where(UserBookshelfDynamicSqlSupport.userId, isEqualTo(userId))
.and(UserBookshelfDynamicSqlSupport.bookId, isEqualTo(bookId)) .and(UserBookshelfDynamicSqlSupport.bookId, isEqualTo(bookId))
.build() .build()
.render(RenderingStrategies.MYBATIS3); .render(RenderingStrategies.MYBATIS3);
userBookshelfMapper.delete(deleteStatement); userBookshelfMapper.delete(deleteStatement);
} }
@ -162,10 +162,10 @@ public class UserServiceImpl implements UserService {
Date currentDate = new Date(); Date currentDate = new Date();
//删除该书以前的历史记录 //删除该书以前的历史记录
DeleteStatementProvider deleteStatement = deleteFrom(userReadHistory) DeleteStatementProvider deleteStatement = deleteFrom(userReadHistory)
.where(UserReadHistoryDynamicSqlSupport.bookId, isEqualTo(bookId)) .where(UserReadHistoryDynamicSqlSupport.bookId, isEqualTo(bookId))
.and(UserReadHistoryDynamicSqlSupport.userId, isEqualTo(userId)) .and(UserReadHistoryDynamicSqlSupport.userId, isEqualTo(userId))
.build() .build()
.render(RenderingStrategies.MYBATIS3); .render(RenderingStrategies.MYBATIS3);
userReadHistoryMapper.delete(deleteStatement); userReadHistoryMapper.delete(deleteStatement);
//插入该书新的历史记录 //插入该书新的历史记录
@ -177,17 +177,16 @@ public class UserServiceImpl implements UserService {
userReadHistory.setUpdateTime(currentDate); userReadHistory.setUpdateTime(currentDate);
userReadHistoryMapper.insertSelective(userReadHistory); userReadHistoryMapper.insertSelective(userReadHistory);
//更新书架的阅读历史 //更新书架的阅读历史
UpdateStatementProvider updateStatement = update(userBookshelf) UpdateStatementProvider updateStatement = update(userBookshelf)
.set(UserBookshelfDynamicSqlSupport.preContentId) .set(UserBookshelfDynamicSqlSupport.preContentId)
.equalTo(preContentId) .equalTo(preContentId)
.set(UserBookshelfDynamicSqlSupport.updateTime) .set(UserBookshelfDynamicSqlSupport.updateTime)
.equalTo(currentDate) .equalTo(currentDate)
.where(UserBookshelfDynamicSqlSupport.userId, isEqualTo(userId)) .where(UserBookshelfDynamicSqlSupport.userId, isEqualTo(userId))
.and(UserBookshelfDynamicSqlSupport.bookId, isEqualTo(bookId)) .and(UserBookshelfDynamicSqlSupport.bookId, isEqualTo(bookId))
.build() .build()
.render(RenderingStrategies.MYBATIS3); .render(RenderingStrategies.MYBATIS3);
userBookshelfMapper.update(updateStatement); userBookshelfMapper.update(updateStatement);
@ -206,25 +205,26 @@ public class UserServiceImpl implements UserService {
@Override @Override
public PageBean<UserFeedback> listUserFeedBackByPage(Long userId, int page, int pageSize) { public PageBean<UserFeedback> listUserFeedBackByPage(Long userId, int page, int pageSize) {
PageHelper.startPage(page, pageSize); PageHelper.startPage(page, pageSize);
SelectStatementProvider selectStatement = select(UserFeedbackDynamicSqlSupport.content, UserFeedbackDynamicSqlSupport.createTime) SelectStatementProvider selectStatement = select(UserFeedbackDynamicSqlSupport.content,
.from(userFeedback) UserFeedbackDynamicSqlSupport.createTime)
.where(UserFeedbackDynamicSqlSupport.userId, isEqualTo(userId)) .from(userFeedback)
.orderBy(UserFeedbackDynamicSqlSupport.id.descending()) .where(UserFeedbackDynamicSqlSupport.userId, isEqualTo(userId))
.build() .orderBy(UserFeedbackDynamicSqlSupport.id.descending())
.render(RenderingStrategies.MYBATIS3); .build()
.render(RenderingStrategies.MYBATIS3);
List<UserFeedback> userFeedbacks = userFeedbackMapper.selectMany(selectStatement); List<UserFeedback> userFeedbacks = userFeedbackMapper.selectMany(selectStatement);
PageBean<UserFeedback> pageBean = PageBuilder.build(userFeedbacks); PageBean<UserFeedback> pageBean = PageBuilder.build(userFeedbacks);
pageBean.setList(BeanUtil.copyList(userFeedbacks,UserFeedbackVO.class)); pageBean.setList(BeanUtil.copyList(userFeedbacks, UserFeedbackVO.class));
return pageBean; return pageBean;
} }
@Override @Override
public User userInfo(Long userId) { public User userInfo(Long userId) {
SelectStatementProvider selectStatement = select(username, nickName, userPhoto,userSex,accountBalance) SelectStatementProvider selectStatement = select(username, nickName, userPhoto, userSex, accountBalance)
.from(user) .from(user)
.where(id, isEqualTo(userId)) .where(id, isEqualTo(userId))
.build() .build()
.render(RenderingStrategies.MYBATIS3); .render(RenderingStrategies.MYBATIS3);
return userMapper.selectMany(selectStatement).get(0); return userMapper.selectMany(selectStatement).get(0);
} }
@ -245,39 +245,35 @@ public class UserServiceImpl implements UserService {
@Override @Override
public void updatePassword(Long userId, String oldPassword, String newPassword) { public void updatePassword(Long userId, String oldPassword, String newPassword) {
SelectStatementProvider selectStatement = select(password) SelectStatementProvider selectStatement = select(password)
.from(user) .from(user)
.where(id,isEqualTo(userId)) .where(id, isEqualTo(userId))
.build() .build()
.render(RenderingStrategies.MYBATIS3); .render(RenderingStrategies.MYBATIS3);
if(!userMapper.selectMany(selectStatement).get(0).getPassword().equals(MD5Util.MD5Encode(oldPassword, Charsets.UTF_8.name()))){ if (!userMapper.selectMany(selectStatement).get(0).getPassword()
.equals(MD5Util.MD5Encode(oldPassword, Charsets.UTF_8.name()))) {
throw new BusinessException(ResponseStatus.OLD_PASSWORD_ERROR); throw new BusinessException(ResponseStatus.OLD_PASSWORD_ERROR);
} }
UpdateStatementProvider updateStatement = update(user) UpdateStatementProvider updateStatement = update(user)
.set(password) .set(password)
.equalTo(MD5Util.MD5Encode(newPassword, Charsets.UTF_8.name())) .equalTo(MD5Util.MD5Encode(newPassword, Charsets.UTF_8.name()))
.where(id,isEqualTo(userId)) .where(id, isEqualTo(userId))
.build() .build()
.render(RenderingStrategies.MYBATIS3); .render(RenderingStrategies.MYBATIS3);
userMapper.update(updateStatement); userMapper.update(updateStatement);
} }
@Transactional(rollbackFor = Exception.class)
@Override @Override
public void addAmount(Long userId, int amount) { public void addAmount(Long userId, int amount) {
User user = this.userInfo(userId); userMapper.addUserBalance(userId, amount);
user.setId(userId);
user.setAccountBalance(user.getAccountBalance()+amount);
userMapper.updateByPrimaryKeySelective(user);
} }
@Override @Override
public boolean queryIsBuyBookIndex(Long userId, Long bookIndexId) { public boolean queryIsBuyBookIndex(Long userId, Long bookIndexId) {
return userBuyRecordMapper.count(c -> return userBuyRecordMapper.count(c ->
c.where(UserBuyRecordDynamicSqlSupport.userId, isEqualTo(userId)) c.where(UserBuyRecordDynamicSqlSupport.userId, isEqualTo(userId))
.and(UserBuyRecordDynamicSqlSupport.bookIndexId,isEqualTo(bookIndexId))) > 0; .and(UserBuyRecordDynamicSqlSupport.bookIndexId, isEqualTo(bookIndexId))) > 0;
} }
@Transactional(rollbackFor = Exception.class) @Transactional(rollbackFor = Exception.class)
@ -285,7 +281,7 @@ public class UserServiceImpl implements UserService {
public void buyBookIndex(Long userId, UserBuyRecord buyRecord) { public void buyBookIndex(Long userId, UserBuyRecord buyRecord) {
//查询用户余额 //查询用户余额
long balance = userInfo(userId).getAccountBalance(); long balance = userInfo(userId).getAccountBalance();
if(balance<buyRecord.getBuyAmount()){ if (balance < buyRecord.getBuyAmount()) {
//余额不足 //余额不足
throw new BusinessException(ResponseStatus.USER_NO_BALANCE); throw new BusinessException(ResponseStatus.USER_NO_BALANCE);
} }
@ -296,60 +292,56 @@ public class UserServiceImpl implements UserService {
//减少用户余额 //减少用户余额
userMapper.update(update(user) userMapper.update(update(user)
.set(UserDynamicSqlSupport.accountBalance) .set(UserDynamicSqlSupport.accountBalance)
.equalTo(balance-buyRecord.getBuyAmount()) .equalTo(balance - buyRecord.getBuyAmount())
.where(id,isEqualTo(userId)) .where(id, isEqualTo(userId))
.build() .build()
.render(RenderingStrategies.MYBATIS3)); .render(RenderingStrategies.MYBATIS3));
} }
@Override @Override
public int queryBuyMember(Long bookId, Date startTime, Date endTime) { public int queryBuyMember(Long bookId, Date startTime, Date endTime) {
return userMapper.selectStatistic(select(countDistinct(UserBuyRecordDynamicSqlSupport.userId)) return userMapper.selectStatistic(select(countDistinct(UserBuyRecordDynamicSqlSupport.userId))
.from(UserBuyRecordDynamicSqlSupport.userBuyRecord) .from(UserBuyRecordDynamicSqlSupport.userBuyRecord)
.where(UserBuyRecordDynamicSqlSupport.bookId,isEqualTo(bookId)) .where(UserBuyRecordDynamicSqlSupport.bookId, isEqualTo(bookId))
.and(UserBuyRecordDynamicSqlSupport.createTime,isGreaterThanOrEqualTo(startTime)) .and(UserBuyRecordDynamicSqlSupport.createTime, isGreaterThanOrEqualTo(startTime))
.and(UserBuyRecordDynamicSqlSupport.createTime,isLessThanOrEqualTo(endTime)) .and(UserBuyRecordDynamicSqlSupport.createTime, isLessThanOrEqualTo(endTime))
.build() .build()
.render(RenderingStrategies.MYBATIS3)); .render(RenderingStrategies.MYBATIS3));
} }
@Override @Override
public int queryBuyCount(Long bookId, Date startTime, Date endTime) { public int queryBuyCount(Long bookId, Date startTime, Date endTime) {
return userMapper.selectStatistic(select(count(UserBuyRecordDynamicSqlSupport.id)) return userMapper.selectStatistic(select(count(UserBuyRecordDynamicSqlSupport.id))
.from(UserBuyRecordDynamicSqlSupport.userBuyRecord) .from(UserBuyRecordDynamicSqlSupport.userBuyRecord)
.where(UserBuyRecordDynamicSqlSupport.bookId,isEqualTo(bookId)) .where(UserBuyRecordDynamicSqlSupport.bookId, isEqualTo(bookId))
.and(UserBuyRecordDynamicSqlSupport.createTime,isGreaterThanOrEqualTo(startTime)) .and(UserBuyRecordDynamicSqlSupport.createTime, isGreaterThanOrEqualTo(startTime))
.and(UserBuyRecordDynamicSqlSupport.createTime,isLessThanOrEqualTo(endTime)) .and(UserBuyRecordDynamicSqlSupport.createTime, isLessThanOrEqualTo(endTime))
.build() .build()
.render(RenderingStrategies.MYBATIS3)); .render(RenderingStrategies.MYBATIS3));
} }
@Override @Override
public int queryBuyAccount(Long bookId, Date startTime, Date endTime) { public int queryBuyAccount(Long bookId, Date startTime, Date endTime) {
return userMapper.selectStatistic(select(sum(UserBuyRecordDynamicSqlSupport.buyAmount)) return userMapper.selectStatistic(select(sum(UserBuyRecordDynamicSqlSupport.buyAmount))
.from(UserBuyRecordDynamicSqlSupport.userBuyRecord) .from(UserBuyRecordDynamicSqlSupport.userBuyRecord)
.where(UserBuyRecordDynamicSqlSupport.bookId,isEqualTo(bookId)) .where(UserBuyRecordDynamicSqlSupport.bookId, isEqualTo(bookId))
.and(UserBuyRecordDynamicSqlSupport.createTime,isGreaterThanOrEqualTo(startTime)) .and(UserBuyRecordDynamicSqlSupport.createTime, isGreaterThanOrEqualTo(startTime))
.and(UserBuyRecordDynamicSqlSupport.createTime,isLessThanOrEqualTo(endTime)) .and(UserBuyRecordDynamicSqlSupport.createTime, isLessThanOrEqualTo(endTime))
.build() .build()
.render(RenderingStrategies.MYBATIS3)); .render(RenderingStrategies.MYBATIS3));
} }
@Override @Override
public int queryBuyTotalMember(List<Long> bookIds, Date startTime, Date endTime) { public int queryBuyTotalMember(List<Long> bookIds, Date startTime, Date endTime) {
return userMapper.selectStatistic(select(countDistinct(UserBuyRecordDynamicSqlSupport.userId)) return userMapper.selectStatistic(select(countDistinct(UserBuyRecordDynamicSqlSupport.userId))
.from(UserBuyRecordDynamicSqlSupport.userBuyRecord) .from(UserBuyRecordDynamicSqlSupport.userBuyRecord)
.where(UserBuyRecordDynamicSqlSupport.bookId,isIn(bookIds)) .where(UserBuyRecordDynamicSqlSupport.bookId, isIn(bookIds))
.and(UserBuyRecordDynamicSqlSupport.createTime,isGreaterThanOrEqualTo(startTime)) .and(UserBuyRecordDynamicSqlSupport.createTime, isGreaterThanOrEqualTo(startTime))
.and(UserBuyRecordDynamicSqlSupport.createTime,isLessThanOrEqualTo(endTime)) .and(UserBuyRecordDynamicSqlSupport.createTime, isLessThanOrEqualTo(endTime))
.build() .build()
.render(RenderingStrategies.MYBATIS3)); .render(RenderingStrategies.MYBATIS3));
} }
} }

View File

@ -34,35 +34,41 @@
</select> </select>
<update id="addVisitCount" > <update id="addVisitCount">
update book set visit_count = visit_count + ${visitCount} update book
set visit_count = visit_count + ${visitCount}
where id = #{bookId} where id = #{bookId}
</update> </update>
<select id="listRecBookByCatId" parameterType="int" resultType="com.java2nb.novel.entity.Book"> <select id="listRecBookByCatId" parameterType="int" resultType="com.java2nb.novel.entity.Book">
select id,pic_url,book_name,book_desc select id, pic_url, book_name, book_desc
from book from book
where cat_id = #{catId} where cat_id = #{catId}
and word_count > 0
order by RAND() LIMIT 4 order by RAND() LIMIT 4
</select> </select>
<update id="addCommentCount" parameterType="long"> <update id="addCommentCount" parameterType="long">
update book set comment_count = comment_count+1 update book
where id = #{bookId} set comment_count = comment_count + 1
where id = #{bookId}
</update> </update>
<select id="queryNetworkPicBooks" resultType="com.java2nb.novel.entity.Book"> <select id="queryNetworkPicBooks" resultType="com.java2nb.novel.entity.Book">
select select id,
id,pic_url from book pic_url
from book
where pic_url like 'http%' where pic_url like 'http%'
and pic_url not like concat('%',#{localPicPrefix},'%') and pic_url not like concat('%', #{localPicPrefix}, '%')
limit #{limit} limit #{limit}
</select> </select>
<select id="selectIdsByScoreAndRandom" parameterType="int" resultType="com.java2nb.novel.entity.Book"> <select id="selectIdsByScoreAndRandom" parameterType="int" resultType="com.java2nb.novel.entity.Book">
select id,book_name,author_name,pic_url,book_desc,score from book ORDER BY score,RAND() LIMIT #{limit}; select id, book_name, author_name, pic_url, book_desc, score
</select> from book
ORDER BY score, RAND() LIMIT #{limit};
</select>
</mapper> </mapper>

View File

@ -0,0 +1,13 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.java2nb.novel.mapper.FrontUserMapper">
<update id="addUserBalance" >
update user set account_balance = account_balance + ${amount}
where id = #{userId}
</update>
</mapper>

View File

@ -331,7 +331,7 @@ input::-webkit-input-placeholder, textarea::-webkit-input-placeholder {
} }
.logo { .logo {
width: 198px; width: 160px;
float: left; float: left;
padding: 23px 130px 0 0; padding: 23px 130px 0 0;
display: block display: block

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.2 KiB

After

Width:  |  Height:  |  Size: 12 KiB

View File

@ -27,15 +27,14 @@
if (layerStatus == 1) { if (layerStatus == 1) {
$("#cFavs").html("<a class=\"ico_shelf\" href=\"javascript:void(0);\"><b>已收藏</b></a>"); $("#cFavs").html("<a class=\"ico_shelf\" href=\"javascript:void(0);\"><b>已收藏</b></a>");
jQuery.cookie("u-faorites", "1"); jQuery.cookie("u-faorites", "1");
} } else {
else {
$("#cFavs").html("<a class=\"btn_ora_white btn_addsj\" href=\"javascript:void(0);\">已在书架</a>"); $("#cFavs").html("<a class=\"btn_ora_white btn_addsj\" href=\"javascript:void(0);\">已在书架</a>");
} }
} else if (data.code == 1001) { } else if (data.code == 1001) {
//未登录 //未登录
location.href = '/user/login.html?originUrl=' + decodeURIComponent(location.href); location.href = '/user/login.html?originUrl=' + encodeURIComponent(location.href);
} else { } else {
layer.alert(data.msg); layer.alert(data.msg);
@ -91,7 +90,7 @@
} }
}, },
SaveComment: function (cmtBId, cmtCId, cmtDetail) { SaveComment: function (cmtBId, cmtCId, cmtDetail) {
if(!isLogin){ if (!isLogin) {
layer.alert('请先登陆'); layer.alert('请先登陆');
return; return;
} }
@ -121,7 +120,7 @@
} else if (data.code == 1001) { } else if (data.code == 1001) {
//未登录 //未登录
location.href = '/user/login.html?originUrl=' + decodeURIComponent(location.href); location.href = '/user/login.html?originUrl=' + encodeURIComponent(location.href);
} else { } else {
layer.alert(data.msg); layer.alert(data.msg);
@ -187,7 +186,7 @@
localStorage.setItem("fonts", fonts); localStorage.setItem("fonts", fonts);
$(".readBox").css("font-size", fonts + "px"); $(".readBox").css("font-size", fonts + "px");
$("#cFonts").html(fonts); $("#cFonts").html(fonts);
$("#ChapterBody").attr("class","article-content font"+fonts); $("#ChapterBody").attr("class", "article-content font" + fonts);
BookDetail.reShowCover(); BookDetail.reShowCover();
}, },
SetBackUpColor: function (colorNum) { SetBackUpColor: function (colorNum) {

View File

@ -1,10 +1,11 @@
var needLoginPath = ['/user/favorites.html','/user/comment.html','/user/feedback.html', var needLoginPath = ['/user/favorites.html', '/user/comment.html', '/user/feedback.html',
'/user/feedback_list.html','/user/read_history.html','/user/set_name.html', '/user/feedback_list.html', '/user/read_history.html', '/user/set_name.html',
'/user/set_password.html','/user/set_sex.html','/user/setup.html','/user/userinfo.html', '/user/set_password.html', '/user/set_sex.html', '/user/setup.html', '/user/userinfo.html',
"/pay/index.html," + "/pay/index.html," +
"/author/register.html","/author/index.html"]; "/author/register.html", "/author/index.html"];
var isLogin = false; var isLogin = false;
var url = window.location.search; var url = window.location.search;
//key(需要检索的键 //key(需要检索的键
function getSearchString(key) { function getSearchString(key) {
var str = url; var str = url;
@ -14,26 +15,28 @@ function getSearchString(key) {
for (var i = 0; i < arr.length; i++) { for (var i = 0; i < arr.length; i++) {
var tmp_arr = arr[i].split("="); var tmp_arr = arr[i].split("=");
if(tmp_arr[0] == key){ if (tmp_arr[0] == key) {
return decodeURIComponent(tmp_arr[1]); return decodeURIComponent(tmp_arr[1]);
} }
} }
return undefined; return undefined;
} }
var keyword = getSearchString("k"); var keyword = getSearchString("k");
if(keyword != undefined) { if (keyword != undefined) {
$("#searchKey").val(keyword); $("#searchKey").val(keyword);
$("#workDirection").remove(); $("#workDirection").remove();
$("#idGirl").remove(); $("#idGirl").remove();
} }
function searchByK(k){ function searchByK(k) {
if(!k){ if (!k) {
window.location.href='/book/bookclass.html?k='+encodeURIComponent(document.getElementById("searchKey").value) window.location.href = '/book/bookclass.html?k=' + encodeURIComponent(document.getElementById("searchKey").value)
}else{ } else {
window.location.href='/book/bookclass.html?k='+encodeURIComponent(k) window.location.href = '/book/bookclass.html?k=' + encodeURIComponent(k)
} }
} }
$("#searchKey").keypress(function (even) { $("#searchKey").keypress(function (even) {
if (even.which == 13) { if (even.which == 13) {
even.stopPropagation(); even.stopPropagation();
@ -50,37 +53,37 @@ Array.prototype.indexOf = function (val) {
var token = $.cookie('Authorization'); var token = $.cookie('Authorization');
if(!token){ if (!token) {
if(needLoginPath.indexOf(window.location.pathname) != -1){ if (needLoginPath.indexOf(window.location.pathname) != -1) {
location.href = '/user/login.html?originUrl='+decodeURIComponent(location.href); location.href = '/user/login.html?originUrl=' + encodeURIComponent(location.href);
} }
$(".user_link").html("<i class=\"line mr20\">|</i><a href=\"/user/login.html\" class=\"mr15\">登录</a><a href=\"/user/register.html\" >注册</a>"); $(".user_link").html("<i class=\"line mr20\">|</i><a href=\"/user/login.html\" class=\"mr15\">登录</a><a href=\"/user/register.html\" >注册</a>");
}else{ } else {
$.ajax({ $.ajax({
type: "POST", type: "POST",
url: "/user/refreshToken", url: "/user/refreshToken",
data: {}, data: {},
dataType: "json", dataType: "json",
success: function(data){ success: function (data) {
if(data.code == 200){ if (data.code == 200) {
$(".user_link").html("<i class=\"line mr20\">|</i>" + $(".user_link").html("<i class=\"line mr20\">|</i>" +
"<a href=\"/user/userinfo.html\" class=\"mr15\">"+data.data.nickName+"</a>" + "<a href=\"/user/userinfo.html\" class=\"mr15\">" + data.data.nickName + "</a>" +
"<a href=\"javascript:logout()\" >退出</a>"); "<a href=\"javascript:logout()\" >退出</a>");
; ;
if("/user/login.html" == window.location.pathname){ if ("/user/login.html" == window.location.pathname) {
var orginUrl = getSearchString("originUrl"); var orginUrl = getSearchString("originUrl");
window.location.href = orginUrl == undefined || orginUrl.isBlank() ? "/" : orginUrl; window.location.href = orginUrl == undefined || orginUrl.isBlank() ? "/" : orginUrl;
return; return;
} }
isLogin = true; isLogin = true;
if(localStorage.getItem("autoLogin") == 1){ if (localStorage.getItem("autoLogin") == 1) {
$.cookie('Authorization', data.data.token, { expires: 7 ,path: '/' }); $.cookie('Authorization', data.data.token, {expires: 7, path: '/'});
}else { } else {
$.cookie('Authorization', data.data.token,{ path: '/' }); $.cookie('Authorization', data.data.token, {path: '/'});
} }
}else{ } else {
if(needLoginPath.indexOf(window.location.pathname) != -1){ if (needLoginPath.indexOf(window.location.pathname) != -1) {
location.href = '/user/login.html'; location.href = '/user/login.html';
} }
$(".user_link").html("<i class=\"line mr20\">|</i><a href=\"/user/login.html\" class=\"mr15\">登录</a><a href=\"/user/register.html\" >注册</a>"); $(".user_link").html("<i class=\"line mr20\">|</i><a href=\"/user/login.html\" class=\"mr15\">登录</a><a href=\"/user/register.html\" >注册</a>");
@ -94,7 +97,6 @@ if(!token){
} }
String.prototype.isPhone = function () { String.prototype.isPhone = function () {
var strTemp = /^1[3|4|5|6|7|8|9][0-9]{9}$/; var strTemp = /^1[3|4|5|6|7|8|9][0-9]{9}$/;
if (strTemp.test(this)) { if (strTemp.test(this)) {
@ -104,7 +106,7 @@ String.prototype.isPhone = function () {
}; };
String.prototype.isBlank = function () { String.prototype.isBlank = function () {
if(this == null || $.trim(this) == ""){ if (this == null || $.trim(this) == "") {
return true; return true;
} }
return false; return false;
@ -118,11 +120,8 @@ String.prototype.isNickName = function () {
}; };
function logout() { function logout() {
$.cookie('Authorization', null,{ path: '/' }); $.cookie('Authorization', null, {path: '/'});
location.reload(); location.reload();
} }
@ -133,9 +132,9 @@ function isImg(str) {
//校验图片上传 //校验图片上传
function checkPicUpload(file){ function checkPicUpload(file) {
if(!isImg(file.value.substr(file.value.lastIndexOf(".")))){ if (!isImg(file.value.substr(file.value.lastIndexOf(".")))) {
layer.alert('只能上传图片格式的文件'); layer.alert('只能上传图片格式的文件');
return false; return false;
} }
@ -144,13 +143,13 @@ function checkPicUpload(file){
if (isIE && !file.files) { if (isIE && !file.files) {
var filePath = file.value; var filePath = file.value;
var fileSystem = new ActiveXObject("Scripting.FileSystemfileect"); var fileSystem = new ActiveXObject("Scripting.FileSystemfileect");
var file = fileSystem.GetFile (filePath); var file = fileSystem.GetFile(filePath);
fileSize = file.Size; fileSize = file.Size;
}else { } else {
fileSize = file.files[0].size; fileSize = file.files[0].size;
} }
fileSize=Math.round(fileSize/1024*100)/100; //单位为KB fileSize = Math.round(fileSize / 1024 * 100) / 100; //单位为KB
if(fileSize>=1024){ if (fileSize >= 1024) {
layer.alert('上传的图片大小不能超过1M'); layer.alert('上传的图片大小不能超过1M');
return false; return false;
} }

View File

@ -106,10 +106,10 @@ Array.prototype.remove = function (val) {
var token = $.cookie('Authorization'); var token = $.cookie('Authorization');
if (!token) { if (!token) {
if (needLoginPath.indexOf(window.location.pathname) != -1) { if (needLoginPath.indexOf(window.location.pathname) != -1) {
location.href = '/user/login.html?originUrl=' + decodeURIComponent(location.href); location.href = '/user/login.html?originUrl=' + encodeURIComponent(location.href);
} }
$(".user_link").html("<a href=\"/user/login.html\">登录</a><a href=\"/user/register.html\">注册</a>"); // $(".user_link").html("<a href=\"/user/login.html\">登录</a><a href=\"/user/register.html\">注册</a>");
} else { } else {
$.ajax({ $.ajax({
type: "POST", type: "POST",
@ -118,10 +118,10 @@ if (!token) {
dataType: "json", dataType: "json",
success: function (data) { success: function (data) {
if (data.code == 200) { if (data.code == 200) {
$(".user_link").html("<a href=\"/user/userinfo.html\"><i style=\"font-size: 20px;\" class=\"layui-icon \n" + // $(".user_link").html("<a href=\"/user/userinfo.html\"><i style=\"font-size: 20px;\" class=\"layui-icon \n" +
"\">&#xe66f;" + // "\">&#xe66f;" +
"\n" + // "\n" +
"</i></a>"); // "</i></a>");
if ("/user/login.html" == window.location.pathname) { if ("/user/login.html" == window.location.pathname) {
var orginUrl = getSearchString("originUrl"); var orginUrl = getSearchString("originUrl");
window.location.href = orginUrl == undefined || orginUrl.isBlank() ? "/" : orginUrl; window.location.href = orginUrl == undefined || orginUrl.isBlank() ? "/" : orginUrl;
@ -137,7 +137,7 @@ if (!token) {
if (needLoginPath.indexOf(window.location.pathname) != -1) { if (needLoginPath.indexOf(window.location.pathname) != -1) {
location.href = '/user/login.html'; location.href = '/user/login.html';
} }
$(".user_link").html("<a href=\"/user/login.html\">登录</a><a href=\"/user/register.html\">注册</a>"); // $(".user_link").html("<a href=\"/user/login.html\">登录</a><a href=\"/user/register.html\">注册</a>");
} }
}, },
error: function () { error: function () {

View File

@ -1,5 +1,5 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"> <html xmlns="http://www.w3.org/1999/xhtml">
<head> <head>
<head> <head>
@ -7,14 +7,15 @@
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"/> <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"/>
<title>作家管理系统-小说精品屋</title> <title>作家管理系统-小说精品屋</title>
<link rel="stylesheet" href="/css/base.css?v=1"/> <link rel="stylesheet" href="/css/base.css?v=1"/>
<link rel="stylesheet" href="/css/user.css" /> <link rel="stylesheet" href="/css/user.css"/>
</head> </head>
</head> </head>
<body class=""> <body class="">
<div class="header"> <div class="header">
<div class="mainNav" id="mainNav"> <div class="mainNav" id="mainNav">
<div class="box_center cf" style="text-align: center;height: 44px;line-height: 48px;color: #fff;font-size: 16px;"> <div class="box_center cf"
style="text-align: center;height: 44px;line-height: 48px;color: #fff;font-size: 16px;">
小说精品屋作家管理 小说精品屋作家管理
@ -37,7 +38,9 @@
<div class="my_r"> <div class="my_r">
<div class="my_bookshelf"> <div class="my_bookshelf">
<div class="title cf"> <div class="title cf">
<h2 class="fl ml10"><a href="/author/author_income_detail.html">订阅明细</a></h2><i class="fl ml20 mr20 font16">|</i><h2 class="fl"><a href="/author/author_income.html" class="red">稿费汇总</a></h2> <h2 class="fl ml10"><a href="/author/author_income_detail.html">订阅明细</a></h2><i
class="fl ml20 mr20 font16">|</i>
<h2 class="fl"><a href="/author/author_income.html" class="red">稿费汇总</a></h2>
</div> </div>
<div id="divData" class="updateTable"> <div id="divData" class="updateTable">
@ -62,7 +65,6 @@
<tbody id="bookList"> <tbody id="bookList">
</tbody> </tbody>
</table> </table>
<div class="pageBox cf" id="shellPage"> <div class="pageBox cf" id="shellPage">
@ -120,24 +122,24 @@
$.ajax({ $.ajax({
type: "get", type: "get",
url: "/author/listIncomeMonthByPage", url: "/author/listIncomeMonthByPage",
data: {'curr':curr,'limit':limit}, data: {'curr': curr, 'limit': limit},
dataType: "json", dataType: "json",
success: function (data) { success: function (data) {
if (data.code == 200) { if (data.code == 200) {
var bookList = data.data.list; var bookList = data.data.list;
if (bookList.length > 0) { if (bookList.length > 0) {
var bookListHtml = ""; var bookListHtml = "";
for(var i=0;i<bookList.length;i++){ for (var i = 0; i < bookList.length; i++) {
var book = bookList[i]; var book = bookList[i];
bookListHtml+=(" <tr class=\"book_list\" >\n" + bookListHtml += (" <tr class=\"book_list\" >\n" +
" <td class=\"goread\">\n" + " <td class=\"goread\">\n" +
" "+book.incomeMonth+"</td>\n" + " " + book.incomeMonth + "</td>\n" +
" <td class=\"goread\" >" " <td class=\"goread\" >"
+book.preTaxIncome/100+"</td>\n" + + book.preTaxIncome / 100 + "</td>\n" +
" <td class=\"goread\">\n" + " <td class=\"goread\">\n" +
" "+book.afterTaxIncome/100+"\n" + " " + book.afterTaxIncome / 100 + "\n" +
" </td>\n" + " </td>\n" +
" <td class=\"goread\">"+(book.payStatus == 1 ? '已支付' : '待支付')+ " <td class=\"goread\">" + (book.payStatus == 1 ? '已支付' : '待支付') +
" </td>\n" + " </td>\n" +
" </tr>"); " </tr>");
@ -176,9 +178,9 @@
} else if (data.code == 1001) { } else if (data.code == 1001) {
//未登录 //未登录
location.href = '/user/login.html?originUrl=' + decodeURIComponent(location.href); location.href = '/user/login.html?originUrl=' + encodeURIComponent(location.href);
}else { } else {
layer.alert(data.msg); layer.alert(data.msg);
} }
@ -191,12 +193,12 @@
} }
function updateBookStatus(bookId,status) { function updateBookStatus(bookId, status) {
$.ajax({ $.ajax({
type: "POST", type: "POST",
url: "/author/updateBookStatus", url: "/author/updateBookStatus",
data: {'bookId':bookId,'status':status==0?1:0}, data: {'bookId': bookId, 'status': status == 0 ? 1 : 0},
dataType: "json", dataType: "json",
success: function (data) { success: function (data) {
if (data.code == 200) { if (data.code == 200) {
@ -206,9 +208,9 @@
} else if (data.code == 1001) { } else if (data.code == 1001) {
//未登录 //未登录
location.href = '/user/login.html?originUrl=' + decodeURIComponent(location.href); location.href = '/user/login.html?originUrl=' + encodeURIComponent(location.href);
}else { } else {
layer.alert(data.msg); layer.alert(data.msg);
} }
@ -219,9 +221,6 @@
}) })
} }
</script> </script>
</html> </html>

View File

@ -1,5 +1,5 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"> <html xmlns="http://www.w3.org/1999/xhtml">
<head> <head>
<head> <head>
@ -7,14 +7,15 @@
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"/> <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"/>
<title>作家管理系统-小说精品屋</title> <title>作家管理系统-小说精品屋</title>
<link rel="stylesheet" href="/css/base.css?v=1"/> <link rel="stylesheet" href="/css/base.css?v=1"/>
<link rel="stylesheet" href="/css/user.css" /> <link rel="stylesheet" href="/css/user.css"/>
</head> </head>
</head> </head>
<body class=""> <body class="">
<div class="header"> <div class="header">
<div class="mainNav" id="mainNav"> <div class="mainNav" id="mainNav">
<div class="box_center cf" style="text-align: center;height: 44px;line-height: 48px;color: #fff;font-size: 16px;"> <div class="box_center cf"
style="text-align: center;height: 44px;line-height: 48px;color: #fff;font-size: 16px;">
小说精品屋作家管理 小说精品屋作家管理
@ -37,7 +38,9 @@
<div class="my_r"> <div class="my_r">
<div class="my_bookshelf"> <div class="my_bookshelf">
<div class="title cf"> <div class="title cf">
<h2 class="fl ml10"><a href="/author/author_income_detail.html" class="red">订阅明细</a></h2><i class="fl ml20 mr20 font16">|</i><h2 class="fl"><a href="/author/author_income.html">稿费汇总</a></h2> <h2 class="fl ml10"><a href="/author/author_income_detail.html" class="red">订阅明细</a></h2><i
class="fl ml20 mr20 font16">|</i>
<h2 class="fl"><a href="/author/author_income.html">稿费汇总</a></h2>
</div> </div>
<div id="divData" class="updateTable"> <div id="divData" class="updateTable">
@ -61,7 +64,6 @@
<tbody id="bookList"> <tbody id="bookList">
</tbody> </tbody>
</table> </table>
<div class="pageBox cf" id="shellPage"> <div class="pageBox cf" id="shellPage">
@ -117,9 +119,9 @@
function search(curr, limit) { function search(curr, limit) {
var data = {'curr':curr,'limit':limit}; var data = {'curr': curr, 'limit': limit};
if(bookId){ if (bookId) {
data.bookId = bookId; data.bookId = bookId;
} }
@ -133,17 +135,17 @@
var bookList = data.data.list; var bookList = data.data.list;
if (bookList.length > 0) { if (bookList.length > 0) {
var bookListHtml = ""; var bookListHtml = "";
for(var i=0;i<bookList.length;i++){ for (var i = 0; i < bookList.length; i++) {
var book = bookList[i]; var book = bookList[i];
bookListHtml+=(" <tr class=\"book_list\" >\n" + bookListHtml += (" <tr class=\"book_list\" >\n" +
" <td class=\"goread\">\n" + " <td class=\"goread\">\n" +
" "+book.incomeDate+"</td>\n" + " " + book.incomeDate + "</td>\n" +
" <td class=\"goread\" >" " <td class=\"goread\" >"
+book.incomeAccount+"</td>\n" + + book.incomeAccount + "</td>\n" +
" <td class=\"goread\">\n" + " <td class=\"goread\">\n" +
" "+book.incomeCount+"\n" + " " + book.incomeCount + "\n" +
" </td>\n" + " </td>\n" +
" <td class=\"goread\">"+book.incomeNumber+ " <td class=\"goread\">" + book.incomeNumber +
" </td>\n" + " </td>\n" +
" </tr>"); " </tr>");
@ -182,9 +184,9 @@
} else if (data.code == 1001) { } else if (data.code == 1001) {
//未登录 //未登录
location.href = '/user/login.html?originUrl=' + decodeURIComponent(location.href); location.href = '/user/login.html?originUrl=' + encodeURIComponent(location.href);
}else { } else {
layer.alert(data.msg); layer.alert(data.msg);
} }
@ -197,12 +199,12 @@
} }
function updateBookStatus(bookId,status) { function updateBookStatus(bookId, status) {
$.ajax({ $.ajax({
type: "POST", type: "POST",
url: "/author/updateBookStatus", url: "/author/updateBookStatus",
data: {'bookId':bookId,'status':status==0?1:0}, data: {'bookId': bookId, 'status': status == 0 ? 1 : 0},
dataType: "json", dataType: "json",
success: function (data) { success: function (data) {
if (data.code == 200) { if (data.code == 200) {
@ -212,9 +214,9 @@
} else if (data.code == 1001) { } else if (data.code == 1001) {
//未登录 //未登录
location.href = '/user/login.html?originUrl=' + decodeURIComponent(location.href); location.href = '/user/login.html?originUrl=' + encodeURIComponent(location.href);
}else { } else {
layer.alert(data.msg); layer.alert(data.msg);
} }
@ -225,9 +227,6 @@
}) })
} }
</script> </script>
</html> </html>

View File

@ -231,7 +231,7 @@
} else if (data.code == 1001) { } else if (data.code == 1001) {
//未登录 //未登录
location.href = '/user/login.html?originUrl=' + decodeURIComponent(location.href); location.href = '/user/login.html?originUrl=' + encodeURIComponent(location.href);
} else { } else {
layer.alert(data.msg); layer.alert(data.msg);
@ -261,7 +261,7 @@
} else if (data.code == 1001) { } else if (data.code == 1001) {
//未登录 //未登录
location.href = '/user/login.html?originUrl=' + decodeURIComponent(location.href); location.href = '/user/login.html?originUrl=' + encodeURIComponent(location.href);
} else { } else {
layer.alert(data.msg); layer.alert(data.msg);

View File

@ -213,7 +213,7 @@
} else if (data.code == 1001) { } else if (data.code == 1001) {
//未登录 //未登录
location.href = '/user/login.html?originUrl=' + decodeURIComponent(location.href); location.href = '/user/login.html?originUrl=' + encodeURIComponent(location.href);
} else { } else {
layer.alert(data.msg); layer.alert(data.msg);
@ -300,7 +300,7 @@
layer.close(index); layer.close(index);
$.ajax({ $.ajax({
type: "delete", type: "delete",
url: "/author/deleteIndex/"+indexId, url: "/author/deleteIndex/" + indexId,
data: {}, data: {},
dataType: "json", dataType: "json",
success: function (data) { success: function (data) {
@ -311,7 +311,7 @@
} else if (data.code == 1001) { } else if (data.code == 1001) {
//未登录 //未登录
location.href = '/user/login.html?originUrl=' + decodeURIComponent(location.href); location.href = '/user/login.html?originUrl=' + encodeURIComponent(location.href);
} else { } else {
layer.alert(data.msg); layer.alert(data.msg);

View File

@ -380,7 +380,7 @@
} else if (data.code == 1001) { } else if (data.code == 1001) {
//未登录 //未登录
location.href = '/user/login.html?originUrl=' + decodeURIComponent(location.href); location.href = '/user/login.html?originUrl=' + encodeURIComponent(location.href);
} else { } else {
layer.alert(data.msg); layer.alert(data.msg);

View File

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

View File

@ -161,11 +161,6 @@
text-align: center; text-align: center;
} }
#footer {
padding-top: 10px;
line-height: 43px;
}
</style> </style>
</head> </head>
@ -210,6 +205,26 @@
字体<a id="fontbig" class="sizebg" onclick="nr_setbg('big')">大</a> <a id="fontmiddle" class="button sizebgon" 字体<a id="fontbig" class="sizebg" onclick="nr_setbg('big')">大</a> <a id="fontmiddle" class="button sizebgon"
onclick="nr_setbg('middle')"></a> <a onclick="nr_setbg('middle')"></a> <a
id="fontsmall" class="sizebg" onclick="nr_setbg('small')">小</a> id="fontsmall" class="sizebg" onclick="nr_setbg('small')">小</a>
<a href="javascript:speakChapter()" style="margin-left: 10px">
<svg t="1707099868768" class="icon" viewBox="0 0 800 800" version="1.1" xmlns="http://www.w3.org/2000/svg"
p-id="1783" id="mx_n_1707099868769" width="22" height="22">
<path d="M393.707231 292.571429L343.13933 487.619048l46.955908 234.779541-97.523809-45.149912-66.82187-108.359788-21.671958-86.687831 66.82187-113.777778z"
fill="#3eaf7c" p-id="1784"></path>
<path d="M451.499118 509.291005a104.747795 61.40388 90 1 0 122.80776 0 104.747795 61.40388 90 1 0-122.80776 0Z"
fill="#3eaf7c" p-id="1785"></path>
<path d="M426.215168 781.996473c-3.611993 0-7.223986-1.805996-10.835979-3.611993l-117.389771-86.687831c-36.119929-23.477954-65.015873-57.791887-83.075838-99.329806-10.835979-25.283951-16.253968-52.373898-16.253968-81.269841s5.417989-55.985891 16.253968-81.269842c16.253968-41.537919 45.149912-74.045855 83.075838-97.523809l110.165785-77.657848c9.029982-5.417989 19.865961-3.611993 25.28395 3.611993 5.417989 9.029982 3.611993 19.865961-3.611993 25.28395L319.661376 361.199295c-32.507937 19.865961-55.985891 48.761905-70.433863 81.269841-9.029982 21.671958-14.447972 45.149912-14.447972 68.627866 0 23.477954 3.611993 45.149912 12.641976 66.821869 14.447972 34.313933 37.925926 63.209877 68.627866 83.075838l117.38977 86.687831c7.223986 5.417989 9.029982 18.059965 3.611993 25.28395 0 5.417989-5.417989 9.029982-10.835978 9.029983z"
fill="#3eaf7c" p-id="1786"></path>
<path d="M523.738977 830.758377c-108.359788 0-193.241623-140.867725-193.241623-317.855379S415.379189 193.241623 523.738977 193.241623c25.283951 0 50.567901 7.223986 74.045855 23.477954 9.029982 5.417989 10.835979 16.253968 5.41799 25.28395s-16.253968 10.835979-25.283951 5.41799c-18.059965-10.835979-34.313933-18.059965-54.179894-18.059965-84.881834 0-157.121693 130.031746-157.121693 281.73545S438.857143 794.638448 523.738977 794.638448s157.121693-130.031746 157.121693-281.73545c0-74.045855-16.253968-146.285714-46.955908-198.659612-5.417989-9.029982-1.805996-19.865961 7.223986-25.28395 9.029982-5.417989 19.865961-1.805996 25.28395 7.223986 32.507937 59.597884 50.567901 135.449735 50.567902 216.719576C718.786596 689.890653 633.904762 830.758377 523.738977 830.758377z"
fill="#3eaf7c" p-id="1787"></path>
<path d="M523.738977 646.546737c-48.761905 0-86.687831-59.597884-86.687831-133.643739S474.977072 379.259259 523.738977 379.259259s86.687831 59.597884 86.687831 133.643739-37.925926 133.643739-86.687831 133.643739z m0-232.973545c-23.477954 0-50.567901 39.731922-50.567901 97.52381s27.089947 97.52381 50.567901 97.523809 50.567901-39.731922 50.567901-97.523809-27.089947-97.52381-50.567901-97.52381z"
fill="#3eaf7c" p-id="1788"></path>
<path d="M523.738977 413.573192h-1.805996l-92.105821-10.835979c-9.029982-1.805996-16.253968-10.835979-16.253968-19.865961 1.805996-9.029982 10.835979-16.253968 19.865961-16.253968l92.105821 10.835979c9.029982 1.805996 16.253968 10.835979 16.253968 19.865961 0 9.029982-9.029982 16.253968-18.059965 16.253968zM372.035273 662.800705c-9.029982 0-16.253968-7.223986-18.059964-16.253968-1.805996-9.029982 5.417989-18.059965 16.253968-19.865961l153.5097-16.253968c9.029982-1.805996 18.059965 5.417989 19.865961 16.253968 1.805996 9.029982-5.417989 18.059965-16.253968 19.865961l-153.5097 16.253968h-1.805997z"
fill="#3eaf7c" p-id="1789"></path>
<path d="M763.936508 364.811287c-5.417989 0-9.029982-1.805996-12.641975-5.417989-7.223986-7.223986-7.223986-18.059965 0-25.283951l25.28395-25.28395c7.223986-7.223986 18.059965-7.223986 25.283951 0s7.223986 18.059965 0 25.28395L776.578483 359.393298c-3.611993 3.611993-9.029982 5.417989-12.641975 5.417989zM771.160494 720.592593c-5.417989 0-9.029982-1.805996-12.641975-5.41799l-25.283951-25.28395c-7.223986-7.223986-7.223986-18.059965 0-25.283951s18.059965-7.223986 25.283951 0l25.28395 25.283951c7.223986 7.223986 7.223986 18.059965 0 25.28395-3.611993 3.611993-7.223986 5.417989-12.641975 5.41799zM819.922399 529.156966h-54.179895c-10.835979 0-18.059965-7.223986-18.059964-18.059964s7.223986-18.059965 18.059964-18.059965h54.179895c10.835979 0 18.059965 7.223986 18.059964 18.059965s-9.029982 18.059965-18.059964 18.059964z"
fill="#3eaf7c" p-id="1790"></path>
</svg>
</a>
</p> </p>
<div class="indexDiv" style="height: 42px;line-height: 42px;text-align:center;background: #f2f2f2"> <div class="indexDiv" style="height: 42px;line-height: 42px;text-align:center;background: #f2f2f2">
@ -241,7 +256,7 @@
</div> </div>
<div id="chaptercontent" class="Readarea ReadAjax_content screen_container" <div id="chaptercontent" class="Readarea ReadAjax_content screen_container"
style="color: rgb(0, 0, 0); font-size: 20px;" th:if="${!needBuy}"> style="color: rgb(0, 0, 0); font-size: 20px;" th:if="${!needBuy}">
<p style="width:100%;text-alight:center; overflow: auto;-webkit-overflow-scrolling:touch;">&nbsp;&nbsp;&nbsp;&nbsp; <p style="width:100%;text-alight:center; overflow: auto;-webkit-overflow-scrolling:touch;">
<span <span
th:utext="${bookContent.content}"></span></p> th:utext="${bookContent.content}"></span></p>
</div> </div>
@ -300,8 +315,6 @@
} }
}) })
$("#content").css("min-height", ($(window).height() - 60) + "px");
})(); })();
@ -352,7 +365,7 @@
} else if (data.code == 1001) { } else if (data.code == 1001) {
//未登录 //未登录
location.href = '/user/login.html?originUrl=' + decodeURIComponent(location.href); location.href = '/user/login.html?originUrl=' + encodeURIComponent(location.href);
} else { } else {
@ -389,6 +402,79 @@
} }
console.log(speechSynthesis.getVoices());
$(window).on('beforeunload', function () {
if (speechSynthesis.speaking) {
speechSynthesis.cancel()
}
});
function speakChapter() {
console.log('speechSynthesis.paused', speechSynthesis.paused)
console.log('speechSynthesis.pending', speechSynthesis.pending)
console.log('speechSynthesis.speaking', speechSynthesis.speaking)
if (speechSynthesis.speaking && !speechSynthesis.paused) {
speechSynthesis.pause();
return;
}
if (speechSynthesis.speaking && speechSynthesis.paused) {
speechSynthesis.resume();
}
speak({
'text': $('#chaptercontent').text(),
'speechRate': 0.5,
'pitch': 1,
'lang': 'zh-CN'
}, function () {
console.log('语音播放结束');
}, function () {
console.log('语音开始播放');
});
}
/**
* @description 文字转语音方法
* @public
* @param { text, rate, lang, volume, pitch } object
* @param text 要合成的文字内容字符串
* @param speechRate 读取文字的语速 0.1~10 正常1
* @param lang 读取文字时的语言
* @param volume 读取时声音的音量 0~1 正常1
* @param voice 读取文字的语音服务
* @param pitch 读取时声音的音高 0~2 正常1
* @returns SpeechSynthesisUtterance
*/
function speak({text, speechRate, lang, volume, pitch, voice}, endEvent, startEvent) {
if (!window.SpeechSynthesisUtterance) {
console.warn('当前浏览器不支持文字转语音服务')
return;
}
if (!text) {
return;
}
const speechUtterance = new SpeechSynthesisUtterance();
speechUtterance.text = text;
speechUtterance.rate = speechRate || 1;
speechUtterance.lang = lang || 'zh-CN';
speechUtterance.volume = volume || 1;
speechUtterance.pitch = pitch || 1;
speechUtterance.voice = voice || null;
speechUtterance.onend = function () {
endEvent && endEvent();
};
speechUtterance.onstart = function () {
startEvent && startEvent();
};
speechSynthesis.speak(speechUtterance);
return speechUtterance;
}
</script> </script>

View File

@ -274,7 +274,7 @@
} else if (data.code == 1001) { } else if (data.code == 1001) {
//未登录 //未登录
location.href = '/user/login.html?originUrl=' + decodeURIComponent(location.href); location.href = '/user/login.html?originUrl=' + encodeURIComponent(location.href);
} else { } else {
layer.alert(data.msg); layer.alert(data.msg);
@ -289,8 +289,6 @@
} }
$("#content").css("min-height", ($(window).height() - 60) + "px");
function downloadFile() { function downloadFile() {
var fileUrl = '/book/download?bookId=' + $("#bookIdHidden").val() + '&bookName=' + $("#bookNamedHidden").val(); var fileUrl = '/book/download?bookId=' + $("#bookIdHidden").val() + '&bookName=' + $("#bookNamedHidden").val();
window.location.href = fileUrl; window.location.href = fileUrl;

View File

@ -36,41 +36,43 @@
</div> </div>
</head> </head>
<body> <body>
<div id="content"> <div id="content">
<input type="hidden" id="bookIdHidden" th:value="${book.id}"/> <input type="hidden" id="bookIdHidden" th:value="${book.id}"/>
<div style="height: 50px;line-height: 50px;text-align: center" class="layui-header header header-doc layui-bg-cyan"> <div style="height: 50px;line-height: 50px;text-align: center"
class="layui-header header header-doc layui-bg-cyan">
<div style="float: left;margin-left: 10px"> <div style="float: left;margin-left: 10px">
<a href="javascript:history.go(-1)"> <a href="javascript:history.go(-1)">
<i style="font-size: 20px;color: #fff;" class="layui-icon">&#xe65c;</i></a> <i style="font-size: 20px;color: #fff;" class="layui-icon">&#xe65c;</i></a>
</div>
<a style="color: #ffffff;" th:href="'/book/'+ ${book.id} + '.html'"><b class="layui-icon"
th:utext="${book.bookName}"></b></a>
<div style="float: right;margin-right: 10px">
<a href="/"><i style="font-size: 20px;color: #fff;" class="layui-icon">&#xe68e;</i></a>
</div>
</div> </div>
<a style="color: #ffffff;" th:href="'/book/'+ ${book.id} + '.html'"><b class="layui-icon" th:utext="${book.bookName}"></b></a>
<div style="float: right;margin-right: 10px">
<a href="/"><i style="font-size: 20px;color: #fff;" class="layui-icon">&#xe68e;</i></a>
</div>
</div>
<p style="height: 30px;line-height: 30px;padding: 10px"> <p style="height: 30px;line-height: 30px;padding: 10px">
<a href="#buttom" style="color: red">&nbsp;&nbsp;直达页面底部</a> <a href="#buttom" style="color: red">&nbsp;&nbsp;直达页面底部</a>
</p>
<div class="layui-colla-content layui-show indexP layui-row">
<p class="line-limit-length layui-col-xs12 layui-col-sm4 layui-col-md3 layui-col-lg2" style="padding-left:10px;height: 50px;line-height: 50px;" th:each="index : ${bookIndexList}">
<a style="color:#333;" th:href="'/book/'+${index.bookId}+'/'+${index.id}+'.html'" th:utext="${index.indexName}">
</a>
</p> </p>
<div class="layui-colla-content layui-show indexP layui-row">
<p class="line-limit-length layui-col-xs12 layui-col-sm4 layui-col-md3 layui-col-lg2"
style="padding-left:10px;height: 50px;line-height: 50px;" th:each="index : ${bookIndexList}">
<a style="color:#333;" th:href="'/book/'+${index.bookId}+'/'+${index.id}+'.html'"
th:utext="${index.indexName}">
</div> </a>
</p>
</div>
</div> </div>
<div th:replace="mobile/common/footer :: footer"> <div th:replace="mobile/common/footer :: footer">
</div> </div>
@ -80,13 +82,14 @@
<div th:replace="mobile/common/js :: js"> <div th:replace="mobile/common/js :: js">
</div> </div>
<script> <script>
$("#content").css("min-height",($(window).height()-60)+"px"); $.get("/book/addVisit", {"bookId": $("#bookIdHidden").val()}, function () {
$.get("/book/addVisit",{"bookId":$("#bookIdHidden").val()},function(){}); });
function toMyCollect(){
function toMyCollect() {
var token = localStorage.getItem("token"); var token = localStorage.getItem("token");
if(token) { if (token) {
window.location.href = "/book/search?token=" + token; window.location.href = "/book/search?token=" + token;
}else{ } else {
window.location.href = "/user/login.html"; window.location.href = "/user/login.html";
} }
} }

View File

@ -62,10 +62,6 @@
height: 180px; height: 180px;
} }
#footer {
padding-top: 10px;
line-height: 43px;
}
</style> </style>
</head> </head>
<body> <body>

View File

@ -1,6 +1,11 @@
<div th:fragment="css"> <div th:fragment="css">
<link rel="stylesheet" href="/mobile/layui/css/layui.css"> <link rel="stylesheet" href="/mobile/layui/css/layui.css">
<style type="text/css"> <style type="text/css">
body {
min-height: 100vh;
position: relative;
}
.app { .app {
display: none; display: none;
} }
@ -22,9 +27,12 @@
} }
#footer { #footer {
padding-top: 6px; position: absolute;
height: 60px; bottom: 0px;
line-height: 54px; left: 0;
right: 0;
height: 50px;
line-height: 48px;
text-align: center; text-align: center;
} }
</style> </style>

View File

@ -1,15 +1,19 @@
<div th:fragment="footer" id="footer" <div th:fragment="footer">
class="layui-footer footer footer-demo layui-bg-cyan"> <div style="height: 50px"></div>
<!--<a href="/mobile/book/searchSoftBook.html" style="font-size: 14px;color: #fff;">轻小说</a> <div id="footer"
<a href="/mobile/book/searchSoftBook.html?catId=9" style="font-size: 14px;color: #fff;margin-left: 8px">漫画</a>--> class="layui-footer footer footer-demo layui-bg-cyan">
<a href="/?to=pc" style="font-size: 14px;color: #fff;margin-left: 8px">电脑站</a> <!--<a href="/mobile/book/searchSoftBook.html" style="font-size: 14px;color: #fff;">轻小说</a>
<a href="/user/read_history.html" style="font-size: 14px;color: #fff;margin-left: 8px">阅读记录</a> <a href="/mobile/book/searchSoftBook.html?catId=9" 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="/?to=pc" 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="/" style="font-size: 16px;color: #fff;">首页</a>
<!--<a href="https://www.zinglizingli.xyz/me/index.html" style="font-size: 14px;color: #fff;margin-left: 8px">开发者</a>--> <a href="/user/read_history.html" style="font-size: 16px;color: #fff;margin-left: 18px">阅读记录</a>
<a href="/user/favorites.html" style="font-size: 16px;color: #fff;margin-left: 18px">书架</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>-->
<div style="float: right"><a href="#top"><i class="layui-icon" <div style="margin-top:-3px;float: right"><a href="#top"><i class="layui-icon"
style="margin-right:15px;font-size: 30px;color:#fff ">&#xe604;</i></a> style="margin-right:15px;font-size: 25px;color:#fff ">&#xe604;</i></a>
</div>
</div> </div>
</div> </div>

View File

@ -1,3 +1,3 @@
<script th:fragment="js" src="/mobile/js/jquery-1.9.1.js"></script> <script th:fragment="js" src="/mobile/js/jquery-1.9.1.js"></script>
<script th:fragment="js" src="/mobile/layui/layui.all.js"></script> <script th:fragment="js" src="/mobile/layui/layui.all.js"></script>
<script th:fragment="js" src="/mobile/js/common.js"></script> <script th:fragment="js" src="/mobile/js/common.js?v2"></script>

View File

@ -41,18 +41,16 @@
} }
.user_link { .user_link {
position: relative;
display: inline-block;
vertical-align: middle; vertical-align: middle;
line-height: 50px; line-height: 40px;
padding: 0 5px;
color: #fff;
float: right; float: right;
color: #3eaf7c;
padding: 11px 12px 0;
} }
.user_link a { .user_link a {
color: #fff; color: #3eaf7c;
} }
</style> </style>
@ -64,92 +62,39 @@
<!-- 你的HTML代码 --> <!-- 你的HTML代码 -->
<a name="top"></a> <a name="top"></a>
<ul class="layui-nav app" lay-filter="" style="display:none;padding:0 10px;text-align: center"> <div style="height: 40px;">
<li class="layui-nav-item"><a>分类</a> <div style="line-height: 50px;width: 120px;float:left;padding-left: 10px"><img style="width: 150px;"
<dl class="layui-nav-child"> th:src="${application.website.logo}">
<dd><a href="/book/book_ranking.html?catId=1&sort=last_index_update_time">玄幻小说</a></dd> </div>
<dd><a href="/book/book_ranking.html?catId=2&sort=last_index_update_time">修真小说</a></dd> <div class="user_link">
<dd><a href="/book/book_ranking.html?catId=3&sort=last_index_update_time">都市小说</a></dd> <a style="padding-right: 3px" href="/user/favorites.html">
<dd><a href="/book/book_ranking.html?catId=4&sort=last_index_update_time">历史小说</a></dd> <svg t="1693622464904" class="icon" viewBox="0 0 1097 1024" version="1.1"
<dd><a href="/book/book_ranking.html?catId=6&sort=last_index_update_time">网游小说</a></dd> xmlns="http://www.w3.org/2000/svg" p-id="3653" width="23px" height="23px">
<dd><a href="/book/book_ranking.html?catId=5&sort=last_index_update_time">科幻小说</a></dd> <path d="M998.58390632 852.14701166H126.84569332A41.51236 41.51236 0 0 0 85.33333332 893.65937166v62.26854a41.51236 41.51236 0 0 0 41.51236 41.51236h871.738213a41.51236 41.51236 0 0 0 41.51236-41.51236v-62.26854a41.51236 41.51236 0 0 0-41.51236-41.51236z m-29.293426 83.014048h-813.172704a8.537246 8.537246 0 0 1-8.537246-8.537246v-3.681687a8.537246 8.537246 0 0 1 8.537246-8.537247h813.172704a8.537246 8.537246 0 0 1 8.537246 8.537247v3.681687a8.537246 8.537246 0 0 1-8.537246 8.537246zM126.84569332 810.63465166h124.537079a41.51236 41.51236 0 0 0 41.51236-41.51236V229.47228566a41.51236 41.51236 0 0 0-41.51236-41.51236H126.84569332A41.51236 41.51236 0 0 0 85.33333332 229.47228566v539.650006a41.51236 41.51236 0 0 0 41.51236 41.51236zM156.72605532 246.49342066h64.883071a12.805869 12.805869 0 0 1 12.805869 12.805869v479.995998a12.805869 12.805869 0 0 1-12.805869 12.80587H156.72605532a12.805869 12.805869 0 0 1-12.80587-12.80587V259.29928966a12.805869 12.805869 0 0 1 12.80587-12.805869z m239.939305 564.141231h124.53708a41.51236 41.51236 0 0 0 41.51236-41.51236V278.62548066l291.653674 510.335237 0.266789 0.480221a41.619075 41.619075 0 0 0 56.826045 15.527116l107.932136-62.962191A42.600859 42.600859 0 0 0 1034.18422332 684.02729066L727.73976932 147.49337866l-0.266789-0.48022a41.619075 41.619075 0 0 0-56.826045-15.527116l-107.932135 62.962191V84.17902666A41.51236 41.51236 0 0 0 521.20244032 42.66666666h-124.53708a41.51236 41.51236 0 0 0-41.51236 41.51236v684.943265a41.51236 41.51236 0 0 0 41.51236 41.51236z m296.295802-597.938055a3.735045 3.735045 0 0 1 5.122348 1.376631l259.841761 454.608363a12.805869 12.805869 0 0 1-4.663471 17.415982l-56.271124 32.825712a12.805869 12.805869 0 0 1-17.544041-4.663471L624.11894332 267.59109066a12.805869 12.805869 0 0 1 4.663471-17.415983zM426.49236432 101.20016166h64.883072a12.805869 12.805869 0 0 1 12.805869 12.805869v625.289257a12.805869 12.805869 0 0 1-12.805869 12.80587h-64.883072a12.805869 12.805869 0 0 1-12.805869-12.80587V114.00603066a12.805869 12.805869 0 0 1 12.805869-12.805869z m0 0"
<dd><a href="/book/book_ranking.html?catId=7&sort=last_index_update_time">女频小说</a></dd> p-id="3654" fill="#3eaf7c"></path>
</dl> </svg>
</li> </a>
<li class="layui-nav-item"><a>全本</a> <a href="/user/userinfo.html">
<dl class="layui-nav-child"> <svg t="1698639187751" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg"
<dd><a href="/book/book_ranking.html?bookStatus=1">全部小说</a></dd> p-id="4190" width="23" height="23">
<dd><a href="/book/book_ranking.html?bookStatus=1&catId=1">玄幻小说</a></dd> <path d="M704 329.152C704 209.365333 622.848 128 512 128s-192 81.365333-192 201.152C320 454.762667 407.146667 554.666667 512 554.666667s192-99.904 192-225.514667z m42.666667 0C746.666667 476.714667 642.176 597.333333 512 597.333333s-234.666667-120.618667-234.666667-268.181333C277.333333 181.546667 381.824 85.333333 512 85.333333s234.666667 96.213333 234.666667 243.818667zM512.106667 640c408.96 0 404.864 256.512 404.864 256.512 3.093333 23.274667-13.482667 42.154667-37.098667 42.154667H144.32c-23.573333 0-41.088-19.136-37.077333-42.154667 0 0-4.096-256.512 404.864-256.512zM149.909333 896l0.064 3.861333-0.704 3.968c0.682667-3.882667-2.837333-7.829333-4.949333-7.829333H879.872c-2.154667 0-5.504 3.818667-5.205333 6.144l-0.426667-3.157333 0.064-3.157334c0-0.853333-0.128-3.349333-0.533333-7.125333a161.813333 161.813333 0 0 0-4.266667-23.082667 192.96 192.96 0 0 0-35.242667-71.104C780.330667 725.461333 678.634667 682.666667 512.106667 682.666667c-166.549333 0-268.224 42.794667-322.176 111.850666a192.96 192.96 0 0 0-35.242667 71.104c-2.176 8.426667-3.541333 16.192-4.266667 23.082667a81.045333 81.045333 0 0 0-0.512 7.296z"
<dd><a href="/book/book_ranking.html?bookStatus=1&catId=2">修真小说</a></dd> fill="#3eaf7c" p-id="4191"></path>
<dd><a href="/book/book_ranking.html?bookStatus=1&catId=3">都市小说</a></dd> </svg>
<dd><a href="/book/book_ranking.html?bookStatus=1&catId=4">历史小说</a></dd> </a>
<dd><a href="/book/book_ranking.html?bookStatus=1&catId=6">网游小说</a></dd>
<dd><a href="/book/book_ranking.html?bookStatus=1&catId=5">科幻小说</a></dd>
<dd><a href="/book/book_ranking.html?bookStatus=1&catId=7">女频小说</a></dd>
</dl>
</li>
<li class="layui-nav-item"><a>排行</a>
<dl class="layui-nav-child">
<dd><a href="/book/book_ranking.html?sortBy=visit_count">全部小说</a></dd>
<dd><a href="/book/book_ranking.html?sortBy=visit_count&catId=1">玄幻小说</a></dd>
<dd><a href="/book/book_ranking.html?sortBy=visit_count&catId=2">修真小说</a></dd>
<dd><a href="/book/book_ranking.html?sortBy=visit_count&catId=3">都市小说</a></dd>
<dd><a href="/book/book_ranking.html?sortBy=visit_count&catId=4">历史小说</a></dd>
<dd><a href="/book/book_ranking.html?sortBy=visit_count&catId=6">网游小说</a></dd>
<dd><a href="/book/book_ranking.html?sortBy=visit_count&catId=5">科幻小说</a></dd>
<dd><a href="/book/book_ranking.html?sortBy=visit_count&catId=7">女频小说</a></dd>
</dl>
</li>
<li class="user_link"></li>
</ul> </div>
<ul class="layui-nav pc" lay-filter="" style="padding:0 36px;text-align: center"> </div>
<li class="layui-nav-item"><a href="/book/book_ranking.html?catId=1&sort=last_index_update_time">玄幻小说</a></li>
<li class="layui-nav-item"><a href="/book/book_ranking.html?catId=2&sort=last_index_update_time">修真小说</a></li>
<li class="layui-nav-item"><a href="/book/book_ranking.html?catId=3&sort=last_index_update_time">都市小说</a></li>
<li class="layui-nav-item"><a href="/book/book_ranking.html?catId=4&sort=last_index_update_time">历史小说</a></li>
<li class="layui-nav-item"><a href="/book/book_ranking.html?catId=6&sort=last_index_update_time">网游小说</a></li>
<li class="layui-nav-item"><a href="/book/book_ranking.html?catId=5&sort=last_index_update_time">科幻小说</a></li>
<li class="layui-nav-item"><a href="/book/book_ranking.html?catId=7&sort=last_index_update_time">女频小说</a></li>
<li class="layui-nav-item"><a>完本小说</a>
<dl class="layui-nav-child"> <!-- 二级菜单 -->
<dd><a href="/book/book_ranking.html?bookStatus=1">全部小说</a></dd>
<dd><a href="/book/book_ranking.html?bookStatus=1&catId=1">玄幻小说</a></dd>
<dd><a href="/book/book_ranking.html?bookStatus=1&catId=2">修真小说</a></dd>
<dd><a href="/book/book_ranking.html?bookStatus=1&catId=3">都市小说</a></dd>
<dd><a href="/book/book_ranking.html?bookStatus=1&catId=4">历史小说</a></dd>
<dd><a href="/book/book_ranking.html?bookStatus=1&catId=6">网游小说</a></dd>
<dd><a href="/book/book_ranking.html?bookStatus=1&catId=5">科幻小说</a></dd>
<dd><a href="/book/book_ranking.html?bookStatus=1&catId=7">女频小说</a></dd>
</dl>
</li>
<li class="layui-nav-item"><a>小说排行</a>
<dl class="layui-nav-child"> <!-- 二级菜单 -->
<dd><a href="/book/book_ranking.html?sortBy=visit_count">全部小说</a></dd>
<dd><a href="/book/book_ranking.html?sortBy=visit_count&catId=1">玄幻小说</a></dd>
<dd><a href="/book/book_ranking.html?sortBy=visit_count&catId=2">修真小说</a></dd>
<dd><a href="/book/book_ranking.html?sortBy=visit_count&catId=3">都市小说</a></dd>
<dd><a href="/book/book_ranking.html?sortBy=visit_count&catId=4">历史小说</a></dd>
<dd><a href="/book/book_ranking.html?sortBy=visit_count&catId=6">网游小说</a></dd>
<dd><a href="/book/book_ranking.html?sortBy=visit_count&catId=5">科幻小说</a></dd>
<dd><a href="/book/book_ranking.html?sortBy=visit_count&catId=7">女频小说</a></dd>
</dl>
</li>
<li class="user_link"></li>
</ul> <div class="layui-container" style="padding-left: 2%">
<div class="layui-container">
<div class="layui-row"> <div class="layui-row">
<div class="layui-col-xs10 layui-col-sm10 layui-col-md11 layui-col-lg11" style="padding-top:1%"> <div class="layui-col-xs10 layui-col-sm10 layui-col-md11 layui-col-lg11">
<input id="title" type="text" name="title" required lay-verify="required" placeholder="请输入书名·作者" <input id="title" type="text" name="title" required lay-verify="required" placeholder="请输入书名·作者"
autocomplete="off" autocomplete="off"
class="layui-input"> class="layui-input">
</div> </div>
<div class="layui-col-xs1" style="padding: 1%"> <div class="layui-col-xs1" style="padding: 0 1% 1%">
<button onclick="searchBooks()" class="layui-btn" lay-submit lay-filter="formDemo">搜索</button> <button onclick="searchBooks()" class="layui-btn" lay-submit lay-filter="formDemo">搜索</button>
</div> </div>
</div> </div>
@ -263,7 +208,7 @@
if (data.code == 200) { if (data.code == 200) {
var updateRankBooks = data.data; var updateRankBooks = data.data;
var updateRankBookHtml = ""; var updateRankBookHtml = "";
for (var i = 0; i < 10; i++) { for (var i = 0; i < updateRankBooks.length; i++) {
var updateRankBook = updateRankBooks[i]; var updateRankBook = updateRankBooks[i];
if (updateRankBook.bookDesc) { if (updateRankBook.bookDesc) {

View File

@ -5,7 +5,7 @@
<head> <head>
<meta charset="utf-8"> <meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1"> <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
<title th:text="${application.website.name}+'列表'"></title> <title th:text="${application.website.name}+'充值'"></title>
<meta name="keywords" <meta name="keywords"
th:content="${application.website.name}+',精品小说,弹幕网站,弹幕,弹幕小说网站,免费小说,小说阅读,小说排行,轻小说,txt小说下载,电子书下载,动漫轻小说,日本轻小说'"> th:content="${application.website.name}+',精品小说,弹幕网站,弹幕,弹幕小说网站,免费小说,小说阅读,小说排行,轻小说,txt小说下载,电子书下载,动漫轻小说,日本轻小说'">
@ -79,11 +79,6 @@
padding-bottom: 20px; padding-bottom: 20px;
} }
#footer {
padding-top: 10px;
line-height: 43px;
}
</style> </style>
</head> </head>
<body> <body>
@ -170,7 +165,6 @@
<div th:replace="mobile/common/js :: js"></div> <div th:replace="mobile/common/js :: js"></div>
<script> <script>
$("#body").css("min-height", ($(window).height() - 110) + "px")
//查询用户信息 //查询用户信息
$.ajax({ $.ajax({
@ -190,7 +184,7 @@
} else if (data.code == 1001) { } else if (data.code == 1001) {
//未登录 //未登录
location.href = '/user/login.html?originUrl=' + decodeURIComponent(location.href); location.href = '/user/login.html?originUrl=' + encodeURIComponent(location.href);
} else { } else {
layer.alert(data.msg); layer.alert(data.msg);

View File

@ -62,10 +62,6 @@
height: 180px; height: 180px;
} }
#footer {
padding-top: 10px;
line-height: 43px;
}
</style> </style>
</head> </head>
<body> <body>
@ -113,7 +109,6 @@
<div th:replace="mobile/common/js :: js"></div> <div th:replace="mobile/common/js :: js"></div>
<script> <script>
$("#body").css("min-height", ($(window).height() - 110) + "px")
search(1, 20); search(1, 20);

View File

@ -25,19 +25,20 @@
</a> </a>
</div> </div>
</div> </div>
<form lay-filter="loginForm" id="form1" style="height: 500px;padding-top:30px;padding-right: 20px" class="layui-form" action=""> <form lay-filter="loginForm" id="form1" style="height: 500px;padding-top:30px;padding-right: 20px" class="layui-form"
action="">
<input type="hidden" id="bookIdHidden" name="bookId" th:value="${bookId}"/> <input type="hidden" id="bookIdHidden" name="bookId" th:value="${bookId}"/>
<div class="layui-form-item"> <div class="layui-form-item">
<label class="layui-form-label">手机号码</label> <label class="layui-form-label">手机号码</label>
<div class="layui-input-inline"> <div class="layui-input-inline">
<input name="txtUName" type="text" id="txtUName" placeholder="请输入手机号" <input name="txtUName" type="text" id="txtUName" placeholder="请输入手机号"
autocomplete="off" class="layui-input"> autocomplete="off" class="layui-input">
</div> </div>
</div> </div>
<div class="layui-form-item"> <div class="layui-form-item">
<label class="layui-form-label">密码</label> <label class="layui-form-label">密码</label>
<div class="layui-input-inline"> <div class="layui-input-inline">
<input name="txtPassword" type="password" id="txtPassword" placeholder="请输入密码" <input name="txtPassword" type="password" id="txtPassword" placeholder="请输入密码"
autocomplete="off" class="layui-input"> autocomplete="off" class="layui-input">
</div> </div>
@ -49,8 +50,8 @@
</div> </div>
<div class="layui-form-item"> <div class="layui-form-item">
<div class="layui-input-block"> <div class="layui-input-block">
<input type="button" value="登录" id="btnLogin" class="layui-btn" /> <input type="button" value="登录" id="btnLogin" class="layui-btn"/>
<button type="reset" class="layui-btn layui-btn-primary">重置</button> <a class="layui-btn layui-btn-primary" href="/user/register.html">注册</a>
</div> </div>
</div> </div>
</form> </form>
@ -62,25 +63,24 @@
<div th:replace="mobile/common/js :: js"> <div th:replace="mobile/common/js :: js">
</div> </div>
<script type="text/javascript"> <script type="text/javascript">
$("#form1").css("min-height",($(window).height() - 140)+"px") if (localStorage.getItem("autoLogin") == 1) {
if(localStorage.getItem("autoLogin")==1){ $("#autoLogin").prop("checked", 'true');
$("#autoLogin").prop("checked",'true'); layui.form.render('checkbox', 'loginForm');
layui.form.render('checkbox','loginForm'); } else {
}else{
$("#autoLogin").removeAttr("checked"); $("#autoLogin").removeAttr("checked");
} }
$("#btnLogin").click(function () { $("#btnLogin").click(function () {
var username = $("#txtUName").val(); var username = $("#txtUName").val();
if(username.isBlank()){ if (username.isBlank()) {
layer.alert("手机号不能为空!"); layer.alert("手机号不能为空!");
return; return;
} }
if(!username.isPhone()){ if (!username.isPhone()) {
layer.alert("手机号格式不正确!"); layer.alert("手机号格式不正确!");
return; return;
} }
var password = $("#txtPassword").val(); var password = $("#txtPassword").val();
if(password.isBlank()){ if (password.isBlank()) {
layer.alert("密码不能为空!"); layer.alert("密码不能为空!");
return; return;
} }
@ -91,12 +91,12 @@
dataType: "json", dataType: "json",
success: function (data) { success: function (data) {
if (data.code == 200) { if (data.code == 200) {
if($("#autoLogin").is(':checked')){ if ($("#autoLogin").is(':checked')) {
$.cookie('Authorization', data.data.token, { expires: 7 ,path: '/' }); $.cookie('Authorization', data.data.token, {expires: 7, path: '/'});
localStorage.setItem("autoLogin","1"); localStorage.setItem("autoLogin", "1");
}else { } else {
$.cookie('Authorization', data.data.token,{ path: '/' }); $.cookie('Authorization', data.data.token, {path: '/'});
localStorage.setItem("autoLogin","0"); localStorage.setItem("autoLogin", "0");
} }
var orginUrl = getSearchString("originUrl"); var orginUrl = getSearchString("originUrl");
window.location.href = orginUrl == undefined || orginUrl.isBlank() ? "/" : orginUrl; window.location.href = orginUrl == undefined || orginUrl.isBlank() ? "/" : orginUrl;
@ -114,5 +114,4 @@
</script> </script>
</html> </html>

View File

@ -62,10 +62,6 @@
height: 180px; height: 180px;
} }
#footer {
padding-top: 10px;
line-height: 43px;
}
</style> </style>
</head> </head>
<body> <body>
@ -113,7 +109,6 @@
<div th:replace="mobile/common/js :: js"></div> <div th:replace="mobile/common/js :: js"></div>
<script> <script>
$("#body").css("min-height", ($(window).height() - 110) + "px")
search(1, 20); search(1, 20);

View File

@ -25,20 +25,21 @@
</a> </a>
</div> </div>
</div> </div>
<form lay-filter="loginForm" id="form1" style="height: 500px;padding-top:30px;padding-right: 20px" class="layui-form" action=""> <form lay-filter="loginForm" id="form1" style="height: 500px;padding-top:30px;padding-right: 20px" class="layui-form"
action="">
<input type="hidden" id="bookIdHidden" name="bookId" th:value="${bookId}"/> <input type="hidden" id="bookIdHidden" name="bookId" th:value="${bookId}"/>
<div class="layui-form-item"> <div class="layui-form-item">
<label class="layui-form-label">手机号码</label> <label class="layui-form-label">手机号码</label>
<div class="layui-input-inline"> <div class="layui-input-inline">
<input name="txtUName" type="text" id="txtUName" placeholder="请输入手机号" <input name="txtUName" type="text" id="txtUName" placeholder="请输入手机号"
autocomplete="off" class="layui-input"> autocomplete="off" class="layui-input">
</div> </div>
</div> </div>
<div class="layui-form-item"> <div class="layui-form-item">
<label class="layui-form-label">密码</label> <label class="layui-form-label">密码</label>
<div class="layui-input-inline"> <div class="layui-input-inline">
<input name="txtPassword" type="password" id="txtPassword" placeholder="请输入密码" <input name="txtPassword" type="password" id="txtPassword" placeholder="请输入密码"
autocomplete="off" class="layui-input"> autocomplete="off" class="layui-input">
</div> </div>
@ -46,7 +47,7 @@
<div class="layui-form-item "> <div class="layui-form-item ">
<label class="layui-form-label">验证码</label> <label class="layui-form-label">验证码</label>
<div class="layui-input-inline"> <div class="layui-input-inline">
<input name="txtUName" type="text" id="TxtChkCode" placeholder="请输入验证码" <input name="txtUName" type="text" id="TxtChkCode" placeholder="请输入验证码"
autocomplete="off" class="layui-input"> autocomplete="off" class="layui-input">
</div> </div>
<div class="layui-input-inline"><img <div class="layui-input-inline"><img
@ -55,8 +56,8 @@
</div> </div>
<div class="layui-form-item"> <div class="layui-form-item">
<div class="layui-input-block"> <div class="layui-input-block">
<input type="button" value="注册" id="btnRegister" class="layui-btn" /> <input type="button" value="注册" id="btnRegister" class="layui-btn"/>
<button type="reset" class="layui-btn layui-btn-primary">重置</button> <a class="layui-btn layui-btn-primary" href="/user/login.html">登录</a>
</div> </div>
</div> </div>
</form> </form>
@ -68,9 +69,8 @@
<div th:replace="mobile/common/js :: js"> <div th:replace="mobile/common/js :: js">
</div> </div>
<script type="text/javascript"> <script type="text/javascript">
$("#form1").css("min-height",($(window).height() - 140)+"px")
$("#chkd").click(); $("#chkd").click();
$("#btnRegister").click(function () { $("#btnRegister").click(function () {
var username = $("#txtUName").val(); var username = $("#txtUName").val();
if (username.isBlank()) { if (username.isBlank()) {
@ -94,12 +94,12 @@
$.ajax({ $.ajax({
type: "POST", type: "POST",
url: "/user/register", url: "/user/register",
data: {"username": username, "password": password,"velCode":velCode}, data: {"username": username, "password": password, "velCode": velCode},
dataType: "json", dataType: "json",
success: function (data) { success: function (data) {
if (data.code == 200) { if (data.code == 200) {
$.cookie('Authorization', data.data.token, {path: '/'}); $.cookie('Authorization', data.data.token, {path: '/'});
window.location.href="/"; window.location.href = "/";
} else { } else {
layer.alert(data.msg); layer.alert(data.msg);
} }
@ -111,6 +111,7 @@
}) })
}) })
//获取验证码 //获取验证码
function getVerify(obj) { function getVerify(obj) {
obj.src = "/file/getVerify?" + Math.random(); obj.src = "/file/getVerify?" + Math.random();
@ -118,5 +119,4 @@
</script> </script>
</html> </html>

View File

@ -213,7 +213,6 @@
<script> <script>
$("#body").css("min-height", ($(window).height() - 60) + "px")
//查询用户信息 //查询用户信息
$.ajax({ $.ajax({
@ -244,7 +243,7 @@
} else if (data.code == 1001) { } else if (data.code == 1001) {
//未登录 //未登录
location.href = '/user/login.html?originUrl=' + decodeURIComponent(location.href); location.href = '/user/login.html?originUrl=' + encodeURIComponent(location.href);
} else { } else {
layer.alert(data.msg); layer.alert(data.msg);

View File

@ -1,6 +1,5 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<!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"> <html xmlns="http://www.w3.org/1999/xhtml">
<head th:replace="common/header :: common_head(~{::title},~{},~{::link},~{})"> <head th:replace="common/header :: common_head(~{::title},~{},~{::link},~{})">
<title th:text="'充值_'+${application.website.name}"></title> <title th:text="'充值_'+${application.website.name}"></title>
@ -20,39 +19,51 @@
<div class="payBox cf"> <div class="payBox cf">
<div class="payHead cf"> <div class="payHead cf">
<div class="fl"> <div class="fl">
充值账号<span class="user_name" id="my_name"></span>余额:<em class="red" id="accountBalance">0</em>屋币<!--<em class="red">+0</em>代金券--> 充值账号<span class="user_name" id="my_name"></span>余额:<em class="red" id="accountBalance">0</em>屋币
<!--<em class="red">+0</em>代金券-->
</div> </div>
</div> </div>
<div class="payCon"> <div class="payCon">
<h5>选择充值方式</h5> <h5>选择充值方式</h5>
<ul class="pay_way cf" id="ulPayType"> <ul class="pay_way cf" id="ulPayType">
<li class="on" valp="1"><img class="pay_pic" src="../images/pay_zfb.png" alt="支付宝支付" /></li> <li class="on" valp="1"><img class="pay_pic" src="../images/pay_zfb.png" alt="支付宝支付"/></li>
<li valp="2"><img class="pay_pic" src="../images/pay_wx.png" alt="微信支付" /></li> <li valp="2"><img class="pay_pic" src="../images/pay_wx.png" alt="微信支付"/></li>
</ul> </ul>
<h5>选择充值金额</h5> <h5>选择充值金额</h5>
<ul class="pay_way cf" id="ulZFWX"> <ul class="pay_way cf" id="ulZFWX">
<li vals="10"><strong>10元</strong><span class="pay_mn">1000屋币</span></li> <li vals="10"><strong>10元</strong><span class="pay_mn">1000屋币</span></li>
<li vals="30"><strong>30元</strong><span class="pay_mn">3000屋币</span></li> <li vals="30"><strong>30元</strong><span class="pay_mn">3000屋币</span></li>
<li vals="50"><strong>50元</strong><span class="pay_mn">5000屋币<!--<em class="red">+ 送500代金券</em>--></span></li> <li vals="50"><strong>50元</strong><span class="pay_mn">5000屋币
<li vals="100"><strong>100元</strong><span class="pay_mn">10000屋币<!--<em class="red">+ 送1200代金券</em>--></span></li> <!--<em class="red">+ 送500代金券</em>--></span></li>
<li vals="200"><strong>200元</strong><span class="pay_mn">20000屋币<!--<em class="red">+ 送3000代金券</em>--></span></li> <li vals="100"><strong>100元</strong><span class="pay_mn">10000屋币
<li vals="500"><strong>500元</strong><span class="pay_mn">50000屋币<!--<em class="red">+ 送10000代金券</em>--></span></li> <!--<em class="red">+ 送1200代金券</em>--></span></li>
<li vals="200"><strong>200元</strong><span class="pay_mn">20000屋币
<!--<em class="red">+ 送3000代金券</em>--></span></li>
<li vals="500"><strong>500元</strong><span class="pay_mn">50000屋币
<!--<em class="red">+ 送10000代金券</em>--></span></li>
</ul> </ul>
<ul class="pay_way cf" style="display:none;" id="ulPayPal"> <ul class="pay_way cf" style="display:none;" id="ulPayPal">
<li vals="20"><strong>20美元</strong><span class="pay_mn">10000屋币</span></li> <li vals="20"><strong>20美元</strong><span class="pay_mn">10000屋币</span></li>
<li vals="50" class="on"><strong>50美元</strong><span class="pay_mn">25000屋币<em class="red"></em></span></li> <li vals="50" class="on"><strong>50美元</strong><span class="pay_mn">25000屋币<em class="red"></em></span>
<li vals="100"><strong>100美元</strong><span class="pay_mn">50000屋币<em class="red"></em></span></li> </li>
<li vals="100"><strong>100美元</strong><span class="pay_mn">50000屋币<em class="red"></em></span>
</li>
</ul> </ul>
<ul class="pay_Checkout" id="ulZFWXXJ"> <ul class="pay_Checkout" id="ulZFWXXJ">
<li>当前汇率1元=100屋币</li> <li>当前汇率1元=100屋币</li>
<li>总计金额<em class="red" id="showTotal">¥50元</em> 获得 <em class="red" id="showRemark">5000屋币<!--+500代金券--></em></li> <li>总计金额<em class="red" id="showTotal">¥50元</em> 获得 <em class="red" id="showRemark">5000屋币
<li style="display:none"><a class="btn_red" href="pay_success.html" onclick="javascript:UserPay.sendPay();">立即支付</a></li> <!--+500代金券--></em></li>
<li style="display:none"><a class="btn_red" href="pay_success.html"
onclick="javascript:UserPay.sendPay();">立即支付</a></li>
</ul> </ul>
<ul class="pay_Checkout" style="display:none;" id="ulPayPalXJ"> <ul class="pay_Checkout" style="display:none;" id="ulPayPalXJ">
<li>当前汇率1美元=500屋币</li> <li>当前汇率1美元=500屋币</li>
<li>总计金额<em class="red" id="showPayPalTotal">50美元</em> 获得 <em class="red" id="showPayPalRemark">25000屋币</em></li> <li>总计金额<em class="red" id="showPayPalTotal">50美元</em> 获得 <em class="red"
<li style="display:none"><a class="btn_red" href="javascript:void(0);" onclick="javascript:UserPay.sendPay();">立即支付</a></li> id="showPayPalRemark">25000屋币</em>
</li>
<li style="display:none"><a class="btn_red" href="javascript:void(0);"
onclick="javascript:UserPay.sendPay();">立即支付</a></li>
</ul> </ul>
</div> </div>
<div class="payFoot"> <div class="payFoot">
@ -68,7 +79,7 @@
</div> </div>
</div> </div>
<input type="hidden" id="pValue" name="payAmount" /> <input type="hidden" id="pValue" name="payAmount"/>
</form> </form>
@ -80,7 +91,6 @@
<script type="text/javascript"> <script type="text/javascript">
//查询用户信息 //查询用户信息
$.ajax({ $.ajax({
type: "get", type: "get",
@ -89,9 +99,9 @@
dataType: "json", dataType: "json",
success: function (data) { success: function (data) {
if (data.code == 200) { if (data.code == 200) {
if(data.data.nickName){ if (data.data.nickName) {
$("#my_name").html(data.data.nickName); $("#my_name").html(data.data.nickName);
}else{ } else {
$("#my_name").html(data.data.username); $("#my_name").html(data.data.username);
} }
@ -99,7 +109,7 @@
} else if (data.code == 1001) { } else if (data.code == 1001) {
//未登录 //未登录
location.href = '/user/login.html?originUrl=' + decodeURIComponent(location.href); location.href = '/user/login.html?originUrl=' + encodeURIComponent(location.href);
} else { } else {
layer.alert(data.msg); layer.alert(data.msg);
@ -115,9 +125,9 @@
var payType = $("#ulPayType").find("li.on").attr("valp"); var payType = $("#ulPayType").find("li.on").attr("valp");
if(payType == 2){ if (payType == 2) {
layer.alert("微信支付暂未开通,敬请期待"); layer.alert("微信支付暂未开通,敬请期待");
return ; return;
} }
$("#pValue").val($(this).attr("vals")); $("#pValue").val($(this).attr("vals"));
@ -125,9 +135,6 @@
$("#payform").submit(); $("#payform").submit();
}); });
</script> </script>

View File

@ -1,4 +1,5 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <!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"> <html xmlns="http://www.w3.org/1999/xhtml">
<head th:replace="common/header :: common_head(~{::title},~{},~{::link},~{})"> <head th:replace="common/header :: common_head(~{::title},~{},~{::link},~{})">
<title th:text="'我的书评_'+${application.website.name}"></title> <title th:text="'我的书评_'+${application.website.name}"></title>
@ -54,24 +55,24 @@
$.ajax({ $.ajax({
type: "get", type: "get",
url: "/user/listCommentByPage", url: "/user/listCommentByPage",
data: {'curr':curr,'limit':limit}, data: {'curr': curr, 'limit': limit},
dataType: "json", dataType: "json",
success: function (data) { success: function (data) {
if (data.code == 200) { if (data.code == 200) {
var commentList = data.data.list; var commentList = data.data.list;
if (commentList.length > 0) { if (commentList.length > 0) {
$("#bookCommentTotal").html("("+data.data.total+"条)"); $("#bookCommentTotal").html("(" + data.data.total + "条)");
var commentListHtml = ""; var commentListHtml = "";
for (var i = 0; i < commentList.length; i++) { for (var i = 0; i < commentList.length; i++) {
var comment = commentList[i]; var comment = commentList[i];
commentListHtml += ("<div class=\"comment_list cf\">" + commentListHtml += ("<div class=\"comment_list cf\">" +
"<div class=\"user_heads fl\" vals=\"389\">" + "<div class=\"user_heads fl\" vals=\"389\">" +
"<img src=\""+(comment.createUserPhoto ? comment.createUserPhoto : '/images/man.png')+"\" class=\"user_head\" alt=\"\">" + "<img src=\"" + (comment.createUserPhoto ? comment.createUserPhoto : '/images/man.png') + "\" class=\"user_head\" alt=\"\">" +
"<span class=\"user_level1\" style=\"display: none;\">见习</span></div>" + "<span class=\"user_level1\" style=\"display: none;\">见习</span></div>" +
"<ul class=\"pl_bar fr\">\t\t\t<li class=\"name\">"+(comment.createUserName.substr(0, 4) + "****" + comment.createUserName.substr(comment.createUserName.length - 3, 3))+"</li><li class=\"dec\">" + "<ul class=\"pl_bar fr\">\t\t\t<li class=\"name\">" + (comment.createUserName.substr(0, 4) + "****" + comment.createUserName.substr(comment.createUserName.length - 3, 3)) + "</li><li class=\"dec\">" +
comment.commentContent+ comment.commentContent +
"</li><li class=\"other cf\">" + "</li><li class=\"other cf\">" +
"<span class=\"time fl\">"+comment.createTime+"</span>" + "<span class=\"time fl\">" + comment.createTime + "</span>" +
"<span class=\"fr\"><a href=\"javascript:void(0);\" onclick=\"javascript:BookDetail.AddAgreeTotal(77,this);\" class=\"zan\" style=\"display: none;\">赞<i class=\"num\">(0)</i></a>" + "<span class=\"fr\"><a href=\"javascript:void(0);\" onclick=\"javascript:BookDetail.AddAgreeTotal(77,this);\" class=\"zan\" style=\"display: none;\">赞<i class=\"num\">(0)</i></a>" +
"</span></li>\t\t</ul>\t</div>"); "</span></li>\t\t</ul>\t</div>");
} }
@ -109,9 +110,9 @@
} else if (data.code == 1001) { } else if (data.code == 1001) {
//未登录 //未登录
location.href = '/user/login.html?originUrl=' + decodeURIComponent(location.href); location.href = '/user/login.html?originUrl=' + encodeURIComponent(location.href);
}else { } else {
layer.alert(data.msg); layer.alert(data.msg);
} }

View File

@ -1,11 +1,13 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <!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"> <html xmlns="http://www.w3.org/1999/xhtml">
<head> <head>
<head th:replace="common/header :: common_head(~{::title},~{::meta},~{::link},~{})"> <head th:replace="common/header :: common_head(~{::title},~{::meta},~{::link},~{})">
<title th:text="'我的书架_'+${application.website.name}"></title> <title th:text="'我的书架_'+${application.website.name}"></title>
<meta name="keywords" th:content="'我的书架,个人中心,'+${application.website.name}+'小说,'+${application.website.name}" /> <meta name="keywords" th:content="'我的书架,个人中心,'+${application.website.name}+'小说,'+${application.website.name}"/>
<meta name="description" th:content="${application.website.name}+'小说每日更新小说连载,小说排行榜,提供言情小说,都市小说,玄幻小说,穿越小说,青春小说,总裁豪门小说,网络小说,免费小说,全本小说,首发小说,最新章节免费小说阅读,精彩尽在'+${application.website.name}+'小说!'" /> <meta name="description"
<link rel="stylesheet" href="/css/user.css" /> th:content="${application.website.name}+'小说每日更新小说连载,小说排行榜,提供言情小说,都市小说,玄幻小说,穿越小说,青春小说,总裁豪门小说,网络小说,免费小说,全本小说,首发小说,最新章节免费小说阅读,精彩尽在'+${application.website.name}+'小说!'"/>
<link rel="stylesheet" href="/css/user.css"/>
</head> </head>
</head> </head>
<body class=""> <body class="">
@ -29,7 +31,9 @@
<div class="my_r"> <div class="my_r">
<div class="my_bookshelf"> <div class="my_bookshelf">
<div class="title cf"> <div class="title cf">
<h2 class="fl"><a href="javascript:void(0);" class="red">我的书架</a></h2><i class="fl ml20 mr20 font16">|</i><h2 class="fl"><a href="/user/read_history.html" >最近阅读</a></h2> <h2 class="fl"><a href="javascript:void(0);" class="red">我的书架</a></h2><i
class="fl ml20 mr20 font16">|</i>
<h2 class="fl"><a href="/user/read_history.html">最近阅读</a></h2>
</div> </div>
<div id="divData" class="updateTable"> <div id="divData" class="updateTable">
@ -56,7 +60,6 @@
<tbody id="bookShelfList"> <tbody id="bookShelfList">
</tbody> </tbody>
</table> </table>
<div class="pageBox cf" id="shellPage"> <div class="pageBox cf" id="shellPage">
@ -82,31 +85,31 @@
$.ajax({ $.ajax({
type: "get", type: "get",
url: "/user/listBookShelfByPage", url: "/user/listBookShelfByPage",
data: {'curr':curr,'limit':limit}, data: {'curr': curr, 'limit': limit},
dataType: "json", dataType: "json",
success: function (data) { success: function (data) {
if (data.code == 200) { if (data.code == 200) {
var bookShelfList = data.data.list; var bookShelfList = data.data.list;
if (bookShelfList.length > 0) { if (bookShelfList.length > 0) {
var bookShelfListHtml = ""; var bookShelfListHtml = "";
for(var i=0;i<bookShelfList.length;i++){ for (var i = 0; i < bookShelfList.length; i++) {
var book = bookShelfList[i]; var book = bookShelfList[i];
bookShelfListHtml+=(" <tr class=\"book_list\" vals=\"291\">\n" + bookShelfListHtml += (" <tr class=\"book_list\" vals=\"291\">\n" +
" <td class=\"style bookclass\">\n" + " <td class=\"style bookclass\">\n" +
" <a href=\"/book/bookclass.html?c="+book.catId+"\" >["+book.catName+"]</a>\n" + " <a href=\"/book/bookclass.html?c=" + book.catId + "\" >[" + book.catName + "]</a>\n" +
" </td>\n" + " </td>\n" +
" <td class=\"name\">\n" + " <td class=\"name\">\n" +
" <a href=\"/book/"+book.bookId+".html\">\n" + " <a href=\"/book/" + book.bookId + ".html\">\n" +
" "+book.bookName+"</a>\n" + " " + book.bookName + "</a>\n" +
" </td>\n" + " </td>\n" +
" <td class=\"chapter\" valsc=\"291|2037554|1\">\n" + " <td class=\"chapter\" valsc=\"291|2037554|1\">\n" +
"<a href='/book/"+book.bookId+"/"+book.lastIndexId+".html'>"+book.lastIndexName+"</a>"+ "<a href='/book/" + book.bookId + "/" + book.lastIndexId + ".html'>" + book.lastIndexName + "</a>" +
" </td>\n" + " </td>\n" +
" <td class=\"time\">\n" + " <td class=\"time\">\n" +
" "+book.lastIndexUpdateTime+"\n" + " " + book.lastIndexUpdateTime + "\n" +
" </td>\n" + " </td>\n" +
" <td class=\"goread\">\n" + " <td class=\"goread\">\n" +
"<a href='/book/"+book.bookId+"/"+book.preContentId+".html'>继续阅读</a>"+ "<a href='/book/" + book.bookId + "/" + book.preContentId + ".html'>继续阅读</a>" +
" </td>\n" + " </td>\n" +
" </tr>"); " </tr>");
} }
@ -144,9 +147,9 @@
} else if (data.code == 1001) { } else if (data.code == 1001) {
//未登录 //未登录
location.href = '/user/login.html?originUrl=' + decodeURIComponent(location.href); location.href = '/user/login.html?originUrl=' + encodeURIComponent(location.href);
}else { } else {
layer.alert(data.msg); layer.alert(data.msg);
} }

View File

@ -74,7 +74,7 @@
} else if (data.code == 1001) { } else if (data.code == 1001) {
//未登录 //未登录
location.href = '/user/login.html?originUrl=' + decodeURIComponent(location.href); location.href = '/user/login.html?originUrl=' + encodeURIComponent(location.href);
} else { } else {
layer.alert(data.msg); layer.alert(data.msg);

View File

@ -1,6 +1,5 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<!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"> <html xmlns="http://www.w3.org/1999/xhtml">
<head th:replace="common/header :: common_head(~{::title},~{},~{::link},~{})"> <head th:replace="common/header :: common_head(~{::title},~{},~{::link},~{})">
<title th:text="'我的反馈_'+${application.website.name}"></title> <title th:text="'我的反馈_'+${application.website.name}"></title>
@ -34,8 +33,6 @@
<dd id="feedbackList"> <dd id="feedbackList">
</dd> </dd>
</dl> </dl>
<div class="cf"> <div class="cf">
@ -61,7 +58,7 @@
$.ajax({ $.ajax({
type: "get", type: "get",
url: "/user/listUserFeedBackByPage", url: "/user/listUserFeedBackByPage",
data: {'curr':curr,'limit':limit}, data: {'curr': curr, 'limit': limit},
dataType: "json", dataType: "json",
success: function (data) { success: function (data) {
if (data.code == 200) { if (data.code == 200) {
@ -71,8 +68,8 @@
for (var i = 0; i < feedbackList.length; i++) { for (var i = 0; i < feedbackList.length; i++) {
var feedback = feedbackList[i]; var feedback = feedbackList[i];
feedbackListHtml += (" <div class=\"comment_list clear\" ><ul>\n" + feedbackListHtml += (" <div class=\"comment_list clear\" ><ul>\n" +
" <li class=\"li_1\"><span class=\"user_name fl\"></span><span class=\"time fl\">"+feedback.createTime+"</span></li>\n" + " <li class=\"li_1\"><span class=\"user_name fl\"></span><span class=\"time fl\">" + feedback.createTime + "</span></li>\n" +
" <li class=\"li_2\">"+feedback.content+"</li>\n" + " <li class=\"li_2\">" + feedback.content + "</li>\n" +
" </ul></div>"); " </ul></div>");
} }
$("#feedbackList").html(feedbackListHtml); $("#feedbackList").html(feedbackListHtml);
@ -109,9 +106,9 @@
} else if (data.code == 1001) { } else if (data.code == 1001) {
//未登录 //未登录
location.href = '/user/login.html?originUrl=' + decodeURIComponent(location.href); location.href = '/user/login.html?originUrl=' + encodeURIComponent(location.href);
}else { } else {
layer.alert(data.msg); layer.alert(data.msg);
} }

View File

@ -1,4 +1,5 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <!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"> <html xmlns="http://www.w3.org/1999/xhtml">
<head th:replace="common/header :: common_head(~{::title},~{},~{::link},~{})"> <head th:replace="common/header :: common_head(~{::title},~{},~{::link},~{})">
<title th:text="'最近阅读_'+${application.website.name}"></title> <title th:text="'最近阅读_'+${application.website.name}"></title>
@ -13,7 +14,9 @@
<div class="viewhistoryBox"> <div class="viewhistoryBox">
<div class="my_bookshelf"> <div class="my_bookshelf">
<div class="title cf"> <div class="title cf">
<h2 class="fl ml10"><a href="javascript:void(0);" class="red">最近阅读</a></h2><i class="fl ml20 mr20 font16">|</i><h2 class="fl"><a href="/user/favorites.html">我的书架</a></h2> <h2 class="fl ml10"><a href="javascript:void(0);" class="red">最近阅读</a></h2><i
class="fl ml20 mr20 font16">|</i>
<h2 class="fl"><a href="/user/favorites.html">我的书架</a></h2>
</div> </div>
<div id="divData" class="updateTable"> <div id="divData" class="updateTable">
<table cellpadding="0" cellspacing="0"> <table cellpadding="0" cellspacing="0">
@ -69,31 +72,31 @@
$.ajax({ $.ajax({
type: "get", type: "get",
url: "/user/listReadHistoryByPage", url: "/user/listReadHistoryByPage",
data: {'curr':curr,'limit':limit}, data: {'curr': curr, 'limit': limit},
dataType: "json", dataType: "json",
success: function (data) { success: function (data) {
if (data.code == 200) { if (data.code == 200) {
var bookHistoryList = data.data.list; var bookHistoryList = data.data.list;
if (bookHistoryList.length > 0) { if (bookHistoryList.length > 0) {
var bookHistoryListHtml = ""; var bookHistoryListHtml = "";
for(var i=0;i<bookHistoryList.length;i++){ for (var i = 0; i < bookHistoryList.length; i++) {
var book = bookHistoryList[i]; var book = bookHistoryList[i];
bookHistoryListHtml+=(" <tr class=\"book_list\" vals=\"291\">\n" + bookHistoryListHtml += (" <tr class=\"book_list\" vals=\"291\">\n" +
" <td class=\"style bookclass\">\n" + " <td class=\"style bookclass\">\n" +
" <a href=\"/book/bookclass.html?c="+book.catId+"\" >["+book.catName+"]</a>\n" + " <a href=\"/book/bookclass.html?c=" + book.catId + "\" >[" + book.catName + "]</a>\n" +
" </td>\n" + " </td>\n" +
" <td class=\"name\">\n" + " <td class=\"name\">\n" +
" <a href=\"/book/"+book.bookId+".html\">\n" + " <a href=\"/book/" + book.bookId + ".html\">\n" +
" "+book.bookName+"</a>\n" + " " + book.bookName + "</a>\n" +
" </td>\n" + " </td>\n" +
" <td class=\"chapter\" valsc=\"291|2037554|1\">\n" + " <td class=\"chapter\" valsc=\"291|2037554|1\">\n" +
"<a href='/book/"+book.bookId+"/"+book.lastIndexId+".html'>"+book.lastIndexName+"</a>"+ "<a href='/book/" + book.bookId + "/" + book.lastIndexId + ".html'>" + book.lastIndexName + "</a>" +
" </td>\n" + " </td>\n" +
" <td class=\"time\">\n" + " <td class=\"time\">\n" +
" "+book.lastIndexUpdateTime+"\n" + " " + book.lastIndexUpdateTime + "\n" +
" </td>\n" + " </td>\n" +
" <td class=\"goread\">\n" + " <td class=\"goread\">\n" +
"<a href='/book/"+book.bookId+"/"+book.preContentId+".html'>继续阅读</a>"+ "<a href='/book/" + book.bookId + "/" + book.preContentId + ".html'>继续阅读</a>" +
" </td>\n" + " </td>\n" +
" </tr>"); " </tr>");
} }
@ -131,9 +134,9 @@
} else if (data.code == 1001) { } else if (data.code == 1001) {
//未登录 //未登录
location.href = '/user/login.html?originUrl=' + decodeURIComponent(location.href); location.href = '/user/login.html?originUrl=' + encodeURIComponent(location.href);
}else { } else {
layer.alert(data.msg); layer.alert(data.msg);
} }

View File

@ -27,7 +27,7 @@
<div class="my_info_txt"> <div class="my_info_txt">
<ul class="mytab_list"> <ul class="mytab_list">
<li><i class="tit">我的昵称</i><input name="txtNiceName" type="text" value="15171695474" <li><i class="tit">我的昵称</i><input name="txtNiceName" type="text" value="15171695474"
maxlength="20" id="txtNiceName" class="s_input" maxlength="11" id="txtNiceName" class="s_input"
placeholder=""/></li> placeholder=""/></li>
<li><i class="tit">&nbsp;</i>用户名只能包括汉字、英文字母、数字和下划线</li> <li><i class="tit">&nbsp;</i>用户名只能包括汉字、英文字母、数字和下划线</li>
<li><i class="tit">&nbsp;</i><input type="button" onclick="updateName()" name="btn" value="修改" <li><i class="tit">&nbsp;</i><input type="button" onclick="updateName()" name="btn" value="修改"
@ -61,7 +61,7 @@
} else if (data.code == 1001) { } else if (data.code == 1001) {
//未登录 //未登录
location.href = '/user/login.html?originUrl=' + decodeURIComponent(location.href); location.href = '/user/login.html?originUrl=' + encodeURIComponent(location.href);
} else { } else {
layer.alert(data.msg); layer.alert(data.msg);
@ -96,7 +96,7 @@
} else if (data.code == 1001) { } else if (data.code == 1001) {
//未登录 //未登录
location.href = '/user/login.html?originUrl=' + decodeURIComponent(location.href); location.href = '/user/login.html?originUrl=' + encodeURIComponent(location.href);
} else { } else {
$("#LabErr").html(data.msg); $("#LabErr").html(data.msg);

View File

@ -1,4 +1,5 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <!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"> <html xmlns="http://www.w3.org/1999/xhtml">
<head th:replace="common/header :: common_head(~{::title},~{},~{::link},~{})"> <head th:replace="common/header :: common_head(~{::title},~{},~{::link},~{})">
<title th:text="'修改密码_'+${application.website.name}"></title> <title th:text="'修改密码_'+${application.website.name}"></title>
@ -24,13 +25,18 @@
<div class="my_r"> <div class="my_r">
<div class="my_info cf"> <div class="my_info cf">
<div class="my_info_txt"> <div class="my_info_txt">
<ul class="mytab_list"> <ul class="mytab_list">
<li><i class="tit">我的密码</i><input name="oldPass" type="password" id="txtOldPass" class="s_input" placeholder="请输入原密码" /></li> <li><i class="tit">我的密码</i><input name="oldPass" type="password" id="txtOldPass" class="s_input"
<li><i class="tit">&nbsp;</i><input name="txtNewPass1" type="password" id="txtNewPass1" class="s_input" placeholder="请输入新密码" /></li> placeholder="请输入原密码"/></li>
<li><i class="tit">&nbsp;</i><input name="txtNewPass2" type="password" id="txtNewPass2" class="s_input" placeholder="请确认新密码" /></li> <li><i class="tit">&nbsp;</i><input name="txtNewPass1" type="password" id="txtNewPass1"
<li><i class="tit">&nbsp;</i><input type="submit" name="btnExchangePassword" value="修改" id="btnExchangePassword" onclick="updatePassword()" class="s_btn btn_red" /></li> class="s_input" placeholder="请输入新密码"/></li>
<li><i class="tit">&nbsp;</i><span id="LabErr"></span></li> <li><i class="tit">&nbsp;</i><input name="txtNewPass2" type="password" id="txtNewPass2"
</ul> class="s_input" placeholder="请确认新密码"/></li>
<li><i class="tit">&nbsp;</i><input type="submit" name="btnExchangePassword" value="修改"
id="btnExchangePassword" onclick="updatePassword()"
class="s_btn btn_red"/></li>
<li><i class="tit">&nbsp;</i><span id="LabErr"></span></li>
</ul>
</div> </div>
</div> </div>
</div> </div>
@ -57,14 +63,14 @@
$("#LabErr").html("确认密码不能为空!"); $("#LabErr").html("确认密码不能为空!");
return; return;
} }
if(newPassword1 !== newPassword2){ if (newPassword1 !== newPassword2) {
$("#LabErr").html("两次输入的新密码不匹配!"); $("#LabErr").html("两次输入的新密码不匹配!");
return; return;
} }
$.ajax({ $.ajax({
type: "POST", type: "POST",
url: "/user/updatePassword", url: "/user/updatePassword",
data: {'oldPassword':oldPassword,'newPassword1':newPassword1,'newPassword2':newPassword2}, data: {'oldPassword': oldPassword, 'newPassword1': newPassword1, 'newPassword2': newPassword2},
dataType: "json", dataType: "json",
success: function (data) { success: function (data) {
if (data.code == 200) { if (data.code == 200) {
@ -72,7 +78,7 @@
} else if (data.code == 1001) { } else if (data.code == 1001) {
//未登录 //未登录
location.href = '/user/login.html?originUrl=' + decodeURIComponent(location.href); location.href = '/user/login.html?originUrl=' + encodeURIComponent(location.href);
} else { } else {
$("#LabErr").html(data.msg); $("#LabErr").html(data.msg);

View File

@ -1,4 +1,5 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <!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"> <html xmlns="http://www.w3.org/1999/xhtml">
<head th:replace="common/header :: common_head(~{::title},~{},~{::link},~{})"> <head th:replace="common/header :: common_head(~{::title},~{},~{::link},~{})">
<title th:text="'修改性别_'+${application.website.name}"></title> <title th:text="'修改性别_'+${application.website.name}"></title>
@ -24,14 +25,16 @@
<div class="my_r"> <div class="my_r">
<div class="my_info cf"> <div class="my_info cf">
<div class="my_info_txt"> <div class="my_info_txt">
<ul class="mytab_list"> <ul class="mytab_list">
<li><i class="tit">我的性别</i> <li><i class="tit">我的性别</i>
<label><input type="radio" name="sex" value="0" />&nbsp;男生</label> <label><input type="radio" name="sex" value="0"/>&nbsp;男生</label>
<label><input class="ml20" type="radio" name="sex" value="1" checked />&nbsp;女生</label> <label><input class="ml20" type="radio" name="sex" value="1" checked/>&nbsp;女生</label>
</li> </li>
<li class="mt20"><i class="tit">&nbsp;</i><input type="button" onclick="updateSex()" name="btn" value="修改" id="btn" class="s_btn btn_red" /></li> <li class="mt20"><i class="tit">&nbsp;</i><input type="button" onclick="updateSex()" name="btn"
<li><i class="tit">&nbsp;</i><span id="LabErr"></span></li> value="修改" id="btn" class="s_btn btn_red"/>
</ul> </li>
<li><i class="tit">&nbsp;</i><span id="LabErr"></span></li>
</ul>
</div> </div>
</div> </div>
</div> </div>
@ -50,15 +53,14 @@
dataType: "json", dataType: "json",
success: function (data) { success: function (data) {
if (data.code == 200) { if (data.code == 200) {
if(data.data.userSex === '0'){ if (data.data.userSex === '0') {
$("input[name=sex]").eq(0).attr("checked",true); $("input[name=sex]").eq(0).attr("checked", true);
} }
} else if (data.code == 1001) { } else if (data.code == 1001) {
//未登录 //未登录
location.href = '/user/login.html?originUrl=' + decodeURIComponent(location.href); location.href = '/user/login.html?originUrl=' + encodeURIComponent(location.href);
} else { } else {
layer.alert(data.msg); layer.alert(data.msg);
@ -69,11 +71,12 @@
layer.alert('网络异常'); layer.alert('网络异常');
} }
}) })
function updateSex() { function updateSex() {
$.ajax({ $.ajax({
type: "POST", type: "POST",
url: "/user/updateUserInfo", url: "/user/updateUserInfo",
data: {'userSex':$("input[name=sex]:checked").val()}, data: {'userSex': $("input[name=sex]:checked").val()},
dataType: "json", dataType: "json",
success: function (data) { success: function (data) {
if (data.code == 200) { if (data.code == 200) {
@ -81,7 +84,7 @@
} else if (data.code == 1001) { } else if (data.code == 1001) {
//未登录 //未登录
location.href = '/user/login.html?originUrl=' + decodeURIComponent(location.href); location.href = '/user/login.html?originUrl=' + encodeURIComponent(location.href);
} else { } else {
layer.alert(data.msg); layer.alert(data.msg);

View File

@ -1,4 +1,5 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <!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"> <html xmlns="http://www.w3.org/1999/xhtml">
<head th:replace="common/header :: common_head(~{::title},~{},~{::link},~{})"> <head th:replace="common/header :: common_head(~{::title},~{},~{::link},~{})">
<title th:text="'账号设置_'+${application.website.name}"></title> <title th:text="'账号设置_'+${application.website.name}"></title>
@ -25,10 +26,12 @@
<div class="my_info cf"> <div class="my_info cf">
<div class="my_info_txt"> <div class="my_info_txt">
<ul class="mytab_list"> <ul class="mytab_list">
<li ><i class="tit">我的头像</i> <li><i class="tit">我的头像</i>
<a style="position: relative" > <a style="position: relative">
<img id="imgLogo" class="user_img" alt="我的头像" src="/images/man.png" /> <img id="imgLogo" class="user_img" alt="我的头像" src="/images/man.png"/>
<input class="opacity" onchange="picChange()" type="file" id="file0" name="file" title="点击上传图片" style="z-index: 100;cursor: pointer;left: 0px; top: -25px; width: 60px; height: 80px; opacity: 0; position: absolute; "/> <input class="opacity" onchange="picChange()" type="file" id="file0" name="file"
title="点击上传图片"
style="z-index: 100;cursor: pointer;left: 0px; top: -25px; width: 60px; height: 80px; opacity: 0; position: absolute; "/>
</a> </a>
@ -59,27 +62,26 @@
dataType: "json", dataType: "json",
success: function (data) { success: function (data) {
if (data.code == 200) { if (data.code == 200) {
if(data.data.userPhoto){ if (data.data.userPhoto) {
$("#imgLogo").attr("src",data.data.userPhoto); $("#imgLogo").attr("src", data.data.userPhoto);
} }
if(data.data.nickName){ if (data.data.nickName) {
$("#my_name").html(data.data.nickName+"<em class=\"ml10\">[修改]</em>"); $("#my_name").html(data.data.nickName + "<em class=\"ml10\">[修改]</em>");
}else{ } else {
$("#my_name").html(data.data.username+"<em class=\"ml10\">[修改]</em>"); $("#my_name").html(data.data.username + "<em class=\"ml10\">[修改]</em>");
} }
if(data.data.userSex === '0'){ if (data.data.userSex === '0') {
$("#my_sex").html("男<em class=\"ml10\">[修改]</em>"); $("#my_sex").html("男<em class=\"ml10\">[修改]</em>");
}else if(data.data.userSex === '1'){ } else if (data.data.userSex === '1') {
$("#my_sex").html("女<em class=\"ml10\">[修改]</em>"); $("#my_sex").html("女<em class=\"ml10\">[修改]</em>");
}else{ } else {
$("#my_sex").html("请选择"); $("#my_sex").html("请选择");
} }
} else if (data.code == 1001) { } else if (data.code == 1001) {
//未登录 //未登录
location.href = '/user/login.html?originUrl=' + decodeURIComponent(location.href); location.href = '/user/login.html?originUrl=' + encodeURIComponent(location.href);
} else { } else {
layer.alert(data.msg); layer.alert(data.msg);
@ -96,7 +98,7 @@
var file = $("#file0").val(); //文件名称 var file = $("#file0").val(); //文件名称
if (file != "") { if (file != "") {
if(checkPicUpload($("#file0")[0])) { if (checkPicUpload($("#file0")[0])) {
$.ajaxFileUpload({ $.ajaxFileUpload({
url: "/file/picUpload", //用于文件上传的服务器端请求地址 url: "/file/picUpload", //用于文件上传的服务器端请求地址
@ -118,7 +120,7 @@
} else if (data.code == 1001) { } else if (data.code == 1001) {
//未登录 //未登录
location.href = '/user/login.html?originUrl=' + decodeURIComponent(location.href); location.href = '/user/login.html?originUrl=' + encodeURIComponent(location.href);
} else { } else {
layer.alert(data.msg); layer.alert(data.msg);
@ -143,7 +145,6 @@
} }
} }
</script> </script>
</body> </body>

View File

@ -1,6 +1,5 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<!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"> <html xmlns="http://www.w3.org/1999/xhtml">
<head th:replace="common/header :: common_head(~{::title},~{},~{::link},~{})"> <head th:replace="common/header :: common_head(~{::title},~{},~{::link},~{})">
<title th:text="'个人中心_'+${application.website.name}"></title> <title th:text="'个人中心_'+${application.website.name}"></title>
@ -25,12 +24,14 @@
</div> </div>
<div class="my_r"> <div class="my_r">
<div class="my_info cf"> <div class="my_info cf">
<img id="imgLogo" class="user_big_head" src="/images/man.png" /> <img id="imgLogo" class="user_big_head" src="/images/man.png"/>
<div class="my_info_txt"> <div class="my_info_txt">
<p class="my_name" id="my_name"> <p class="my_name" id="my_name">
</p> </p>
<ul class="my_list"> <ul class="my_list">
<li class="my_gold"><i>账户余额:</i><em class="red" id="accountBalance">0</em>屋币<!--<em class="red">+</em><em class="red">0</em>代金券--><a href="/pay/index.html" class="btn_link">立即充值</a></li> <li class="my_gold"><i>账户余额:</i><em class="red" id="accountBalance">0</em>屋币
<!--<em class="red">+</em><em class="red">0</em>代金券--><a href="/pay/index.html"
class="btn_link">立即充值</a></li>
<li class="my_baonian"></li> <li class="my_baonian"></li>
</ul> </ul>
@ -87,12 +88,12 @@
dataType: "json", dataType: "json",
success: function (data) { success: function (data) {
if (data.code == 200) { if (data.code == 200) {
if(data.data.userPhoto){ if (data.data.userPhoto) {
$("#imgLogo").attr("src",data.data.userPhoto); $("#imgLogo").attr("src", data.data.userPhoto);
} }
if(data.data.nickName){ if (data.data.nickName) {
$("#my_name").html(data.data.nickName); $("#my_name").html(data.data.nickName);
}else{ } else {
$("#my_name").html(data.data.username); $("#my_name").html(data.data.username);
} }
@ -100,7 +101,7 @@
} else if (data.code == 1001) { } else if (data.code == 1001) {
//未登录 //未登录
location.href = '/user/login.html?originUrl=' + decodeURIComponent(location.href); location.href = '/user/login.html?originUrl=' + encodeURIComponent(location.href);
} else { } else {
layer.alert(data.msg); layer.alert(data.msg);
@ -115,7 +116,7 @@
$.ajax({ $.ajax({
type: "get", type: "get",
url: "/user/listBookShelfByPage", url: "/user/listBookShelfByPage",
data: {'limit':2}, data: {'limit': 2},
dataType: "json", dataType: "json",
success: function (data) { success: function (data) {
if (data.code == 200) { if (data.code == 200) {
@ -126,7 +127,7 @@
var book = bookShelfList[i]; var book = bookShelfList[i];
bookShelfListHtml += (" <tr class=\"book_list\" vals=\"291\">\n" + bookShelfListHtml += (" <tr class=\"book_list\" vals=\"291\">\n" +
" <td class=\"style bookclass\">\n" + " <td class=\"style bookclass\">\n" +
" <a href=\"/book/bookclass.html?c="+book.catId+"\" >[" + book.catName + "]</a>\n" + " <a href=\"/book/bookclass.html?c=" + book.catId + "\" >[" + book.catName + "]</a>\n" +
" </td>\n" + " </td>\n" +
" <td class=\"name\">\n" + " <td class=\"name\">\n" +
" <a href=\"/book/" + book.bookId + ".html\">\n" + " <a href=\"/book/" + book.bookId + ".html\">\n" +

View File

@ -5,7 +5,7 @@
<groupId>com.java2nb</groupId> <groupId>com.java2nb</groupId>
<artifactId>novel</artifactId> <artifactId>novel</artifactId>
<version>4.3.0-RC1</version> <version>4.3.0</version>
<modules> <modules>
<module>novel-common</module> <module>novel-common</module>
<module>novel-front</module> <module>novel-front</module>

View File

@ -1,5 +1,5 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"> <html xmlns="http://www.w3.org/1999/xhtml">
<head> <head>
<head> <head>
@ -7,14 +7,15 @@
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"/> <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"/>
<title>作家管理系统-小说精品屋</title> <title>作家管理系统-小说精品屋</title>
<link rel="stylesheet" href="/css/base.css?v=1"/> <link rel="stylesheet" href="/css/base.css?v=1"/>
<link rel="stylesheet" href="/css/user.css" /> <link rel="stylesheet" href="/css/user.css"/>
</head> </head>
</head> </head>
<body class=""> <body class="">
<div class="header"> <div class="header">
<div class="mainNav" id="mainNav"> <div class="mainNav" id="mainNav">
<div class="box_center cf" style="text-align: center;height: 44px;line-height: 48px;color: #fff;font-size: 16px;"> <div class="box_center cf"
style="text-align: center;height: 44px;line-height: 48px;color: #fff;font-size: 16px;">
小说精品屋作家管理 小说精品屋作家管理
@ -37,7 +38,9 @@
<div class="my_r"> <div class="my_r">
<div class="my_bookshelf"> <div class="my_bookshelf">
<div class="title cf"> <div class="title cf">
<h2 class="fl ml10"><a href="/author/author_income_detail.html">订阅明细</a></h2><i class="fl ml20 mr20 font16">|</i><h2 class="fl"><a href="/author/author_income.html" class="red">稿费汇总</a></h2> <h2 class="fl ml10"><a href="/author/author_income_detail.html">订阅明细</a></h2><i
class="fl ml20 mr20 font16">|</i>
<h2 class="fl"><a href="/author/author_income.html" class="red">稿费汇总</a></h2>
</div> </div>
<div id="divData" class="updateTable"> <div id="divData" class="updateTable">
@ -62,7 +65,6 @@
<tbody id="bookList"> <tbody id="bookList">
</tbody> </tbody>
</table> </table>
<div class="pageBox cf" id="shellPage"> <div class="pageBox cf" id="shellPage">
@ -120,24 +122,24 @@
$.ajax({ $.ajax({
type: "get", type: "get",
url: "/author/listIncomeMonthByPage", url: "/author/listIncomeMonthByPage",
data: {'curr':curr,'limit':limit}, data: {'curr': curr, 'limit': limit},
dataType: "json", dataType: "json",
success: function (data) { success: function (data) {
if (data.code == 200) { if (data.code == 200) {
var bookList = data.data.list; var bookList = data.data.list;
if (bookList.length > 0) { if (bookList.length > 0) {
var bookListHtml = ""; var bookListHtml = "";
for(var i=0;i<bookList.length;i++){ for (var i = 0; i < bookList.length; i++) {
var book = bookList[i]; var book = bookList[i];
bookListHtml+=(" <tr class=\"book_list\" >\n" + bookListHtml += (" <tr class=\"book_list\" >\n" +
" <td class=\"goread\">\n" + " <td class=\"goread\">\n" +
" "+book.incomeMonth+"</td>\n" + " " + book.incomeMonth + "</td>\n" +
" <td class=\"goread\" >" " <td class=\"goread\" >"
+book.preTaxIncome/100+"</td>\n" + + book.preTaxIncome / 100 + "</td>\n" +
" <td class=\"goread\">\n" + " <td class=\"goread\">\n" +
" "+book.afterTaxIncome/100+"\n" + " " + book.afterTaxIncome / 100 + "\n" +
" </td>\n" + " </td>\n" +
" <td class=\"goread\">"+(book.payStatus == 1 ? '已支付' : '待支付')+ " <td class=\"goread\">" + (book.payStatus == 1 ? '已支付' : '待支付') +
" </td>\n" + " </td>\n" +
" </tr>"); " </tr>");
@ -176,9 +178,9 @@
} else if (data.code == 1001) { } else if (data.code == 1001) {
//未登录 //未登录
location.href = '/user/login.html?originUrl=' + decodeURIComponent(location.href); location.href = '/user/login.html?originUrl=' + encodeURIComponent(location.href);
}else { } else {
layer.alert(data.msg); layer.alert(data.msg);
} }
@ -191,12 +193,12 @@
} }
function updateBookStatus(bookId,status) { function updateBookStatus(bookId, status) {
$.ajax({ $.ajax({
type: "POST", type: "POST",
url: "/author/updateBookStatus", url: "/author/updateBookStatus",
data: {'bookId':bookId,'status':status==0?1:0}, data: {'bookId': bookId, 'status': status == 0 ? 1 : 0},
dataType: "json", dataType: "json",
success: function (data) { success: function (data) {
if (data.code == 200) { if (data.code == 200) {
@ -206,9 +208,9 @@
} else if (data.code == 1001) { } else if (data.code == 1001) {
//未登录 //未登录
location.href = '/user/login.html?originUrl=' + decodeURIComponent(location.href); location.href = '/user/login.html?originUrl=' + encodeURIComponent(location.href);
}else { } else {
layer.alert(data.msg); layer.alert(data.msg);
} }
@ -219,9 +221,6 @@
}) })
} }
</script> </script>
</html> </html>

View File

@ -1,5 +1,5 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"> <html xmlns="http://www.w3.org/1999/xhtml">
<head> <head>
<head> <head>
@ -7,14 +7,15 @@
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"/> <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"/>
<title>作家管理系统-小说精品屋</title> <title>作家管理系统-小说精品屋</title>
<link rel="stylesheet" href="/css/base.css?v=1"/> <link rel="stylesheet" href="/css/base.css?v=1"/>
<link rel="stylesheet" href="/css/user.css" /> <link rel="stylesheet" href="/css/user.css"/>
</head> </head>
</head> </head>
<body class=""> <body class="">
<div class="header"> <div class="header">
<div class="mainNav" id="mainNav"> <div class="mainNav" id="mainNav">
<div class="box_center cf" style="text-align: center;height: 44px;line-height: 48px;color: #fff;font-size: 16px;"> <div class="box_center cf"
style="text-align: center;height: 44px;line-height: 48px;color: #fff;font-size: 16px;">
小说精品屋作家管理 小说精品屋作家管理
@ -37,7 +38,9 @@
<div class="my_r"> <div class="my_r">
<div class="my_bookshelf"> <div class="my_bookshelf">
<div class="title cf"> <div class="title cf">
<h2 class="fl ml10"><a href="/author/author_income_detail.html" class="red">订阅明细</a></h2><i class="fl ml20 mr20 font16">|</i><h2 class="fl"><a href="/author/author_income.html">稿费汇总</a></h2> <h2 class="fl ml10"><a href="/author/author_income_detail.html" class="red">订阅明细</a></h2><i
class="fl ml20 mr20 font16">|</i>
<h2 class="fl"><a href="/author/author_income.html">稿费汇总</a></h2>
</div> </div>
<div id="divData" class="updateTable"> <div id="divData" class="updateTable">
@ -61,7 +64,6 @@
<tbody id="bookList"> <tbody id="bookList">
</tbody> </tbody>
</table> </table>
<div class="pageBox cf" id="shellPage"> <div class="pageBox cf" id="shellPage">
@ -117,9 +119,9 @@
function search(curr, limit) { function search(curr, limit) {
var data = {'curr':curr,'limit':limit}; var data = {'curr': curr, 'limit': limit};
if(bookId){ if (bookId) {
data.bookId = bookId; data.bookId = bookId;
} }
@ -133,17 +135,17 @@
var bookList = data.data.list; var bookList = data.data.list;
if (bookList.length > 0) { if (bookList.length > 0) {
var bookListHtml = ""; var bookListHtml = "";
for(var i=0;i<bookList.length;i++){ for (var i = 0; i < bookList.length; i++) {
var book = bookList[i]; var book = bookList[i];
bookListHtml+=(" <tr class=\"book_list\" >\n" + bookListHtml += (" <tr class=\"book_list\" >\n" +
" <td class=\"goread\">\n" + " <td class=\"goread\">\n" +
" "+book.incomeDate+"</td>\n" + " " + book.incomeDate + "</td>\n" +
" <td class=\"goread\" >" " <td class=\"goread\" >"
+book.incomeAccount+"</td>\n" + + book.incomeAccount + "</td>\n" +
" <td class=\"goread\">\n" + " <td class=\"goread\">\n" +
" "+book.incomeCount+"\n" + " " + book.incomeCount + "\n" +
" </td>\n" + " </td>\n" +
" <td class=\"goread\">"+book.incomeNumber+ " <td class=\"goread\">" + book.incomeNumber +
" </td>\n" + " </td>\n" +
" </tr>"); " </tr>");
@ -182,9 +184,9 @@
} else if (data.code == 1001) { } else if (data.code == 1001) {
//未登录 //未登录
location.href = '/user/login.html?originUrl=' + decodeURIComponent(location.href); location.href = '/user/login.html?originUrl=' + encodeURIComponent(location.href);
}else { } else {
layer.alert(data.msg); layer.alert(data.msg);
} }
@ -197,12 +199,12 @@
} }
function updateBookStatus(bookId,status) { function updateBookStatus(bookId, status) {
$.ajax({ $.ajax({
type: "POST", type: "POST",
url: "/author/updateBookStatus", url: "/author/updateBookStatus",
data: {'bookId':bookId,'status':status==0?1:0}, data: {'bookId': bookId, 'status': status == 0 ? 1 : 0},
dataType: "json", dataType: "json",
success: function (data) { success: function (data) {
if (data.code == 200) { if (data.code == 200) {
@ -212,9 +214,9 @@
} else if (data.code == 1001) { } else if (data.code == 1001) {
//未登录 //未登录
location.href = '/user/login.html?originUrl=' + decodeURIComponent(location.href); location.href = '/user/login.html?originUrl=' + encodeURIComponent(location.href);
}else { } else {
layer.alert(data.msg); layer.alert(data.msg);
} }
@ -225,9 +227,6 @@
}) })
} }
</script> </script>
</html> </html>

View File

@ -231,7 +231,7 @@
} else if (data.code == 1001) { } else if (data.code == 1001) {
//未登录 //未登录
location.href = '/user/login.html?originUrl=' + decodeURIComponent(location.href); location.href = '/user/login.html?originUrl=' + encodeURIComponent(location.href);
} else { } else {
layer.alert(data.msg); layer.alert(data.msg);
@ -261,7 +261,7 @@
} else if (data.code == 1001) { } else if (data.code == 1001) {
//未登录 //未登录
location.href = '/user/login.html?originUrl=' + decodeURIComponent(location.href); location.href = '/user/login.html?originUrl=' + encodeURIComponent(location.href);
} else { } else {
layer.alert(data.msg); layer.alert(data.msg);

View File

@ -213,7 +213,7 @@
} else if (data.code == 1001) { } else if (data.code == 1001) {
//未登录 //未登录
location.href = '/user/login.html?originUrl=' + decodeURIComponent(location.href); location.href = '/user/login.html?originUrl=' + encodeURIComponent(location.href);
} else { } else {
layer.alert(data.msg); layer.alert(data.msg);
@ -300,7 +300,7 @@
layer.close(index); layer.close(index);
$.ajax({ $.ajax({
type: "delete", type: "delete",
url: "/author/deleteIndex/"+indexId, url: "/author/deleteIndex/" + indexId,
data: {}, data: {},
dataType: "json", dataType: "json",
success: function (data) { success: function (data) {
@ -311,7 +311,7 @@
} else if (data.code == 1001) { } else if (data.code == 1001) {
//未登录 //未登录
location.href = '/user/login.html?originUrl=' + decodeURIComponent(location.href); location.href = '/user/login.html?originUrl=' + encodeURIComponent(location.href);
} else { } else {
layer.alert(data.msg); layer.alert(data.msg);

View File

@ -380,7 +380,7 @@
} else if (data.code == 1001) { } else if (data.code == 1001) {
//未登录 //未登录
location.href = '/user/login.html?originUrl=' + decodeURIComponent(location.href); location.href = '/user/login.html?originUrl=' + encodeURIComponent(location.href);
} else { } else {
layer.alert(data.msg); layer.alert(data.msg);

View File

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

View File

@ -161,11 +161,6 @@
text-align: center; text-align: center;
} }
#footer {
padding-top: 10px;
line-height: 43px;
}
</style> </style>
</head> </head>
@ -210,6 +205,26 @@
字体<a id="fontbig" class="sizebg" onclick="nr_setbg('big')">大</a> <a id="fontmiddle" class="button sizebgon" 字体<a id="fontbig" class="sizebg" onclick="nr_setbg('big')">大</a> <a id="fontmiddle" class="button sizebgon"
onclick="nr_setbg('middle')"></a> <a onclick="nr_setbg('middle')"></a> <a
id="fontsmall" class="sizebg" onclick="nr_setbg('small')">小</a> id="fontsmall" class="sizebg" onclick="nr_setbg('small')">小</a>
<a href="javascript:speakChapter()" style="margin-left: 10px">
<svg t="1707099868768" class="icon" viewBox="0 0 800 800" version="1.1" xmlns="http://www.w3.org/2000/svg"
p-id="1783" id="mx_n_1707099868769" width="22" height="22">
<path d="M393.707231 292.571429L343.13933 487.619048l46.955908 234.779541-97.523809-45.149912-66.82187-108.359788-21.671958-86.687831 66.82187-113.777778z"
fill="#3eaf7c" p-id="1784"></path>
<path d="M451.499118 509.291005a104.747795 61.40388 90 1 0 122.80776 0 104.747795 61.40388 90 1 0-122.80776 0Z"
fill="#3eaf7c" p-id="1785"></path>
<path d="M426.215168 781.996473c-3.611993 0-7.223986-1.805996-10.835979-3.611993l-117.389771-86.687831c-36.119929-23.477954-65.015873-57.791887-83.075838-99.329806-10.835979-25.283951-16.253968-52.373898-16.253968-81.269841s5.417989-55.985891 16.253968-81.269842c16.253968-41.537919 45.149912-74.045855 83.075838-97.523809l110.165785-77.657848c9.029982-5.417989 19.865961-3.611993 25.28395 3.611993 5.417989 9.029982 3.611993 19.865961-3.611993 25.28395L319.661376 361.199295c-32.507937 19.865961-55.985891 48.761905-70.433863 81.269841-9.029982 21.671958-14.447972 45.149912-14.447972 68.627866 0 23.477954 3.611993 45.149912 12.641976 66.821869 14.447972 34.313933 37.925926 63.209877 68.627866 83.075838l117.38977 86.687831c7.223986 5.417989 9.029982 18.059965 3.611993 25.28395 0 5.417989-5.417989 9.029982-10.835978 9.029983z"
fill="#3eaf7c" p-id="1786"></path>
<path d="M523.738977 830.758377c-108.359788 0-193.241623-140.867725-193.241623-317.855379S415.379189 193.241623 523.738977 193.241623c25.283951 0 50.567901 7.223986 74.045855 23.477954 9.029982 5.417989 10.835979 16.253968 5.41799 25.28395s-16.253968 10.835979-25.283951 5.41799c-18.059965-10.835979-34.313933-18.059965-54.179894-18.059965-84.881834 0-157.121693 130.031746-157.121693 281.73545S438.857143 794.638448 523.738977 794.638448s157.121693-130.031746 157.121693-281.73545c0-74.045855-16.253968-146.285714-46.955908-198.659612-5.417989-9.029982-1.805996-19.865961 7.223986-25.28395 9.029982-5.417989 19.865961-1.805996 25.28395 7.223986 32.507937 59.597884 50.567901 135.449735 50.567902 216.719576C718.786596 689.890653 633.904762 830.758377 523.738977 830.758377z"
fill="#3eaf7c" p-id="1787"></path>
<path d="M523.738977 646.546737c-48.761905 0-86.687831-59.597884-86.687831-133.643739S474.977072 379.259259 523.738977 379.259259s86.687831 59.597884 86.687831 133.643739-37.925926 133.643739-86.687831 133.643739z m0-232.973545c-23.477954 0-50.567901 39.731922-50.567901 97.52381s27.089947 97.52381 50.567901 97.523809 50.567901-39.731922 50.567901-97.523809-27.089947-97.52381-50.567901-97.52381z"
fill="#3eaf7c" p-id="1788"></path>
<path d="M523.738977 413.573192h-1.805996l-92.105821-10.835979c-9.029982-1.805996-16.253968-10.835979-16.253968-19.865961 1.805996-9.029982 10.835979-16.253968 19.865961-16.253968l92.105821 10.835979c9.029982 1.805996 16.253968 10.835979 16.253968 19.865961 0 9.029982-9.029982 16.253968-18.059965 16.253968zM372.035273 662.800705c-9.029982 0-16.253968-7.223986-18.059964-16.253968-1.805996-9.029982 5.417989-18.059965 16.253968-19.865961l153.5097-16.253968c9.029982-1.805996 18.059965 5.417989 19.865961 16.253968 1.805996 9.029982-5.417989 18.059965-16.253968 19.865961l-153.5097 16.253968h-1.805997z"
fill="#3eaf7c" p-id="1789"></path>
<path d="M763.936508 364.811287c-5.417989 0-9.029982-1.805996-12.641975-5.417989-7.223986-7.223986-7.223986-18.059965 0-25.283951l25.28395-25.28395c7.223986-7.223986 18.059965-7.223986 25.283951 0s7.223986 18.059965 0 25.28395L776.578483 359.393298c-3.611993 3.611993-9.029982 5.417989-12.641975 5.417989zM771.160494 720.592593c-5.417989 0-9.029982-1.805996-12.641975-5.41799l-25.283951-25.28395c-7.223986-7.223986-7.223986-18.059965 0-25.283951s18.059965-7.223986 25.283951 0l25.28395 25.283951c7.223986 7.223986 7.223986 18.059965 0 25.28395-3.611993 3.611993-7.223986 5.417989-12.641975 5.41799zM819.922399 529.156966h-54.179895c-10.835979 0-18.059965-7.223986-18.059964-18.059964s7.223986-18.059965 18.059964-18.059965h54.179895c10.835979 0 18.059965 7.223986 18.059964 18.059965s-9.029982 18.059965-18.059964 18.059964z"
fill="#3eaf7c" p-id="1790"></path>
</svg>
</a>
</p> </p>
<div class="indexDiv" style="height: 42px;line-height: 42px;text-align:center;background: #f2f2f2"> <div class="indexDiv" style="height: 42px;line-height: 42px;text-align:center;background: #f2f2f2">
@ -241,7 +256,7 @@
</div> </div>
<div id="chaptercontent" class="Readarea ReadAjax_content screen_container" <div id="chaptercontent" class="Readarea ReadAjax_content screen_container"
style="color: rgb(0, 0, 0); font-size: 20px;" th:if="${!needBuy}"> style="color: rgb(0, 0, 0); font-size: 20px;" th:if="${!needBuy}">
<p style="width:100%;text-alight:center; overflow: auto;-webkit-overflow-scrolling:touch;">&nbsp;&nbsp;&nbsp;&nbsp; <p style="width:100%;text-alight:center; overflow: auto;-webkit-overflow-scrolling:touch;">
<span <span
th:utext="${bookContent.content}"></span></p> th:utext="${bookContent.content}"></span></p>
</div> </div>
@ -300,8 +315,6 @@
} }
}) })
$("#content").css("min-height", ($(window).height() - 60) + "px");
})(); })();
@ -352,7 +365,7 @@
} else if (data.code == 1001) { } else if (data.code == 1001) {
//未登录 //未登录
location.href = '/user/login.html?originUrl=' + decodeURIComponent(location.href); location.href = '/user/login.html?originUrl=' + encodeURIComponent(location.href);
} else { } else {
@ -389,6 +402,79 @@
} }
console.log(speechSynthesis.getVoices());
$(window).on('beforeunload', function () {
if (speechSynthesis.speaking) {
speechSynthesis.cancel()
}
});
function speakChapter() {
console.log('speechSynthesis.paused', speechSynthesis.paused)
console.log('speechSynthesis.pending', speechSynthesis.pending)
console.log('speechSynthesis.speaking', speechSynthesis.speaking)
if (speechSynthesis.speaking && !speechSynthesis.paused) {
speechSynthesis.pause();
return;
}
if (speechSynthesis.speaking && speechSynthesis.paused) {
speechSynthesis.resume();
}
speak({
'text': $('#chaptercontent').text(),
'speechRate': 0.5,
'pitch': 1,
'lang': 'zh-CN'
}, function () {
console.log('语音播放结束');
}, function () {
console.log('语音开始播放');
});
}
/**
* @description 文字转语音方法
* @public
* @param { text, rate, lang, volume, pitch } object
* @param text 要合成的文字内容字符串
* @param speechRate 读取文字的语速 0.1~10 正常1
* @param lang 读取文字时的语言
* @param volume 读取时声音的音量 0~1 正常1
* @param voice 读取文字的语音服务
* @param pitch 读取时声音的音高 0~2 正常1
* @returns SpeechSynthesisUtterance
*/
function speak({text, speechRate, lang, volume, pitch, voice}, endEvent, startEvent) {
if (!window.SpeechSynthesisUtterance) {
console.warn('当前浏览器不支持文字转语音服务')
return;
}
if (!text) {
return;
}
const speechUtterance = new SpeechSynthesisUtterance();
speechUtterance.text = text;
speechUtterance.rate = speechRate || 1;
speechUtterance.lang = lang || 'zh-CN';
speechUtterance.volume = volume || 1;
speechUtterance.pitch = pitch || 1;
speechUtterance.voice = voice || null;
speechUtterance.onend = function () {
endEvent && endEvent();
};
speechUtterance.onstart = function () {
startEvent && startEvent();
};
speechSynthesis.speak(speechUtterance);
return speechUtterance;
}
</script> </script>

View File

@ -274,7 +274,7 @@
} else if (data.code == 1001) { } else if (data.code == 1001) {
//未登录 //未登录
location.href = '/user/login.html?originUrl=' + decodeURIComponent(location.href); location.href = '/user/login.html?originUrl=' + encodeURIComponent(location.href);
} else { } else {
layer.alert(data.msg); layer.alert(data.msg);
@ -289,8 +289,6 @@
} }
$("#content").css("min-height", ($(window).height() - 60) + "px");
function downloadFile() { function downloadFile() {
var fileUrl = '/book/download?bookId=' + $("#bookIdHidden").val() + '&bookName=' + $("#bookNamedHidden").val(); var fileUrl = '/book/download?bookId=' + $("#bookIdHidden").val() + '&bookName=' + $("#bookNamedHidden").val();
window.location.href = fileUrl; window.location.href = fileUrl;

View File

@ -36,41 +36,43 @@
</div> </div>
</head> </head>
<body> <body>
<div id="content"> <div id="content">
<input type="hidden" id="bookIdHidden" th:value="${book.id}"/> <input type="hidden" id="bookIdHidden" th:value="${book.id}"/>
<div style="height: 50px;line-height: 50px;text-align: center" class="layui-header header header-doc layui-bg-cyan"> <div style="height: 50px;line-height: 50px;text-align: center"
class="layui-header header header-doc layui-bg-cyan">
<div style="float: left;margin-left: 10px"> <div style="float: left;margin-left: 10px">
<a href="javascript:history.go(-1)"> <a href="javascript:history.go(-1)">
<i style="font-size: 20px;color: #fff;" class="layui-icon">&#xe65c;</i></a> <i style="font-size: 20px;color: #fff;" class="layui-icon">&#xe65c;</i></a>
</div>
<a style="color: #ffffff;" th:href="'/book/'+ ${book.id} + '.html'"><b class="layui-icon"
th:utext="${book.bookName}"></b></a>
<div style="float: right;margin-right: 10px">
<a href="/"><i style="font-size: 20px;color: #fff;" class="layui-icon">&#xe68e;</i></a>
</div>
</div> </div>
<a style="color: #ffffff;" th:href="'/book/'+ ${book.id} + '.html'"><b class="layui-icon" th:utext="${book.bookName}"></b></a>
<div style="float: right;margin-right: 10px">
<a href="/"><i style="font-size: 20px;color: #fff;" class="layui-icon">&#xe68e;</i></a>
</div>
</div>
<p style="height: 30px;line-height: 30px;padding: 10px"> <p style="height: 30px;line-height: 30px;padding: 10px">
<a href="#buttom" style="color: red">&nbsp;&nbsp;直达页面底部</a> <a href="#buttom" style="color: red">&nbsp;&nbsp;直达页面底部</a>
</p>
<div class="layui-colla-content layui-show indexP layui-row">
<p class="line-limit-length layui-col-xs12 layui-col-sm4 layui-col-md3 layui-col-lg2" style="padding-left:10px;height: 50px;line-height: 50px;" th:each="index : ${bookIndexList}">
<a style="color:#333;" th:href="'/book/'+${index.bookId}+'/'+${index.id}+'.html'" th:utext="${index.indexName}">
</a>
</p> </p>
<div class="layui-colla-content layui-show indexP layui-row">
<p class="line-limit-length layui-col-xs12 layui-col-sm4 layui-col-md3 layui-col-lg2"
style="padding-left:10px;height: 50px;line-height: 50px;" th:each="index : ${bookIndexList}">
<a style="color:#333;" th:href="'/book/'+${index.bookId}+'/'+${index.id}+'.html'"
th:utext="${index.indexName}">
</div> </a>
</p>
</div>
</div> </div>
<div th:replace="mobile/common/footer :: footer"> <div th:replace="mobile/common/footer :: footer">
</div> </div>
@ -80,13 +82,14 @@
<div th:replace="mobile/common/js :: js"> <div th:replace="mobile/common/js :: js">
</div> </div>
<script> <script>
$("#content").css("min-height",($(window).height()-60)+"px"); $.get("/book/addVisit", {"bookId": $("#bookIdHidden").val()}, function () {
$.get("/book/addVisit",{"bookId":$("#bookIdHidden").val()},function(){}); });
function toMyCollect(){
function toMyCollect() {
var token = localStorage.getItem("token"); var token = localStorage.getItem("token");
if(token) { if (token) {
window.location.href = "/book/search?token=" + token; window.location.href = "/book/search?token=" + token;
}else{ } else {
window.location.href = "/user/login.html"; window.location.href = "/user/login.html";
} }
} }

View File

@ -62,10 +62,6 @@
height: 180px; height: 180px;
} }
#footer {
padding-top: 10px;
line-height: 43px;
}
</style> </style>
</head> </head>
<body> <body>

View File

@ -1,6 +1,11 @@
<div th:fragment="css"> <div th:fragment="css">
<link rel="stylesheet" href="/mobile/layui/css/layui.css"> <link rel="stylesheet" href="/mobile/layui/css/layui.css">
<style type="text/css"> <style type="text/css">
body {
min-height: 100vh;
position: relative;
}
.app { .app {
display: none; display: none;
} }
@ -22,9 +27,12 @@
} }
#footer { #footer {
padding-top: 6px; position: absolute;
height: 60px; bottom: 0px;
line-height: 54px; left: 0;
right: 0;
height: 50px;
line-height: 48px;
text-align: center; text-align: center;
} }
</style> </style>

View File

@ -1,15 +1,19 @@
<div th:fragment="footer" id="footer" <div th:fragment="footer">
class="layui-footer footer footer-demo layui-bg-cyan"> <div style="height: 50px"></div>
<!--<a href="/mobile/book/searchSoftBook.html" style="font-size: 14px;color: #fff;">轻小说</a> <div id="footer"
<a href="/mobile/book/searchSoftBook.html?catId=9" style="font-size: 14px;color: #fff;margin-left: 8px">漫画</a>--> class="layui-footer footer footer-demo layui-bg-cyan">
<a href="/?to=pc" style="font-size: 14px;color: #fff;margin-left: 8px">电脑站</a> <!--<a href="/mobile/book/searchSoftBook.html" style="font-size: 14px;color: #fff;">轻小说</a>
<a href="/user/read_history.html" style="font-size: 14px;color: #fff;margin-left: 8px">阅读记录</a> <a href="/mobile/book/searchSoftBook.html?catId=9" 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="/?to=pc" 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="/" style="font-size: 16px;color: #fff;">首页</a>
<!--<a href="https://www.zinglizingli.xyz/me/index.html" style="font-size: 14px;color: #fff;margin-left: 8px">开发者</a>--> <a href="/user/read_history.html" style="font-size: 16px;color: #fff;margin-left: 18px">阅读记录</a>
<a href="/user/favorites.html" style="font-size: 16px;color: #fff;margin-left: 18px">书架</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>-->
<div style="float: right"><a href="#top"><i class="layui-icon" <div style="margin-top:-3px;float: right"><a href="#top"><i class="layui-icon"
style="margin-right:15px;font-size: 30px;color:#fff ">&#xe604;</i></a> style="margin-right:15px;font-size: 25px;color:#fff ">&#xe604;</i></a>
</div>
</div> </div>
</div> </div>

View File

@ -1,3 +1,3 @@
<script th:fragment="js" src="/mobile/js/jquery-1.9.1.js"></script> <script th:fragment="js" src="/mobile/js/jquery-1.9.1.js"></script>
<script th:fragment="js" src="/mobile/layui/layui.all.js"></script> <script th:fragment="js" src="/mobile/layui/layui.all.js"></script>
<script th:fragment="js" src="/mobile/js/common.js"></script> <script th:fragment="js" src="/mobile/js/common.js?v2"></script>

View File

@ -41,18 +41,16 @@
} }
.user_link { .user_link {
position: relative;
display: inline-block;
vertical-align: middle; vertical-align: middle;
line-height: 50px; line-height: 40px;
padding: 0 5px;
color: #fff;
float: right; float: right;
color: #3eaf7c;
padding: 11px 12px 0;
} }
.user_link a { .user_link a {
color: #fff; color: #3eaf7c;
} }
</style> </style>
@ -64,92 +62,39 @@
<!-- 你的HTML代码 --> <!-- 你的HTML代码 -->
<a name="top"></a> <a name="top"></a>
<ul class="layui-nav app" lay-filter="" style="display:none;padding:0 10px;text-align: center"> <div style="height: 40px;">
<li class="layui-nav-item"><a>分类</a> <div style="line-height: 50px;width: 120px;float:left;padding-left: 10px"><img style="width: 150px;"
<dl class="layui-nav-child"> th:src="${application.website.logo}">
<dd><a href="/book/book_ranking.html?catId=1&sort=last_index_update_time">玄幻小说</a></dd> </div>
<dd><a href="/book/book_ranking.html?catId=2&sort=last_index_update_time">修真小说</a></dd> <div class="user_link">
<dd><a href="/book/book_ranking.html?catId=3&sort=last_index_update_time">都市小说</a></dd> <a style="padding-right: 3px" href="/user/favorites.html">
<dd><a href="/book/book_ranking.html?catId=4&sort=last_index_update_time">历史小说</a></dd> <svg t="1693622464904" class="icon" viewBox="0 0 1097 1024" version="1.1"
<dd><a href="/book/book_ranking.html?catId=6&sort=last_index_update_time">网游小说</a></dd> xmlns="http://www.w3.org/2000/svg" p-id="3653" width="23px" height="23px">
<dd><a href="/book/book_ranking.html?catId=5&sort=last_index_update_time">科幻小说</a></dd> <path d="M998.58390632 852.14701166H126.84569332A41.51236 41.51236 0 0 0 85.33333332 893.65937166v62.26854a41.51236 41.51236 0 0 0 41.51236 41.51236h871.738213a41.51236 41.51236 0 0 0 41.51236-41.51236v-62.26854a41.51236 41.51236 0 0 0-41.51236-41.51236z m-29.293426 83.014048h-813.172704a8.537246 8.537246 0 0 1-8.537246-8.537246v-3.681687a8.537246 8.537246 0 0 1 8.537246-8.537247h813.172704a8.537246 8.537246 0 0 1 8.537246 8.537247v3.681687a8.537246 8.537246 0 0 1-8.537246 8.537246zM126.84569332 810.63465166h124.537079a41.51236 41.51236 0 0 0 41.51236-41.51236V229.47228566a41.51236 41.51236 0 0 0-41.51236-41.51236H126.84569332A41.51236 41.51236 0 0 0 85.33333332 229.47228566v539.650006a41.51236 41.51236 0 0 0 41.51236 41.51236zM156.72605532 246.49342066h64.883071a12.805869 12.805869 0 0 1 12.805869 12.805869v479.995998a12.805869 12.805869 0 0 1-12.805869 12.80587H156.72605532a12.805869 12.805869 0 0 1-12.80587-12.80587V259.29928966a12.805869 12.805869 0 0 1 12.80587-12.805869z m239.939305 564.141231h124.53708a41.51236 41.51236 0 0 0 41.51236-41.51236V278.62548066l291.653674 510.335237 0.266789 0.480221a41.619075 41.619075 0 0 0 56.826045 15.527116l107.932136-62.962191A42.600859 42.600859 0 0 0 1034.18422332 684.02729066L727.73976932 147.49337866l-0.266789-0.48022a41.619075 41.619075 0 0 0-56.826045-15.527116l-107.932135 62.962191V84.17902666A41.51236 41.51236 0 0 0 521.20244032 42.66666666h-124.53708a41.51236 41.51236 0 0 0-41.51236 41.51236v684.943265a41.51236 41.51236 0 0 0 41.51236 41.51236z m296.295802-597.938055a3.735045 3.735045 0 0 1 5.122348 1.376631l259.841761 454.608363a12.805869 12.805869 0 0 1-4.663471 17.415982l-56.271124 32.825712a12.805869 12.805869 0 0 1-17.544041-4.663471L624.11894332 267.59109066a12.805869 12.805869 0 0 1 4.663471-17.415983zM426.49236432 101.20016166h64.883072a12.805869 12.805869 0 0 1 12.805869 12.805869v625.289257a12.805869 12.805869 0 0 1-12.805869 12.80587h-64.883072a12.805869 12.805869 0 0 1-12.805869-12.80587V114.00603066a12.805869 12.805869 0 0 1 12.805869-12.805869z m0 0"
<dd><a href="/book/book_ranking.html?catId=7&sort=last_index_update_time">女频小说</a></dd> p-id="3654" fill="#3eaf7c"></path>
</dl> </svg>
</li> </a>
<li class="layui-nav-item"><a>全本</a> <a href="/user/userinfo.html">
<dl class="layui-nav-child"> <svg t="1698639187751" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg"
<dd><a href="/book/book_ranking.html?bookStatus=1">全部小说</a></dd> p-id="4190" width="23" height="23">
<dd><a href="/book/book_ranking.html?bookStatus=1&catId=1">玄幻小说</a></dd> <path d="M704 329.152C704 209.365333 622.848 128 512 128s-192 81.365333-192 201.152C320 454.762667 407.146667 554.666667 512 554.666667s192-99.904 192-225.514667z m42.666667 0C746.666667 476.714667 642.176 597.333333 512 597.333333s-234.666667-120.618667-234.666667-268.181333C277.333333 181.546667 381.824 85.333333 512 85.333333s234.666667 96.213333 234.666667 243.818667zM512.106667 640c408.96 0 404.864 256.512 404.864 256.512 3.093333 23.274667-13.482667 42.154667-37.098667 42.154667H144.32c-23.573333 0-41.088-19.136-37.077333-42.154667 0 0-4.096-256.512 404.864-256.512zM149.909333 896l0.064 3.861333-0.704 3.968c0.682667-3.882667-2.837333-7.829333-4.949333-7.829333H879.872c-2.154667 0-5.504 3.818667-5.205333 6.144l-0.426667-3.157333 0.064-3.157334c0-0.853333-0.128-3.349333-0.533333-7.125333a161.813333 161.813333 0 0 0-4.266667-23.082667 192.96 192.96 0 0 0-35.242667-71.104C780.330667 725.461333 678.634667 682.666667 512.106667 682.666667c-166.549333 0-268.224 42.794667-322.176 111.850666a192.96 192.96 0 0 0-35.242667 71.104c-2.176 8.426667-3.541333 16.192-4.266667 23.082667a81.045333 81.045333 0 0 0-0.512 7.296z"
<dd><a href="/book/book_ranking.html?bookStatus=1&catId=2">修真小说</a></dd> fill="#3eaf7c" p-id="4191"></path>
<dd><a href="/book/book_ranking.html?bookStatus=1&catId=3">都市小说</a></dd> </svg>
<dd><a href="/book/book_ranking.html?bookStatus=1&catId=4">历史小说</a></dd> </a>
<dd><a href="/book/book_ranking.html?bookStatus=1&catId=6">网游小说</a></dd>
<dd><a href="/book/book_ranking.html?bookStatus=1&catId=5">科幻小说</a></dd>
<dd><a href="/book/book_ranking.html?bookStatus=1&catId=7">女频小说</a></dd>
</dl>
</li>
<li class="layui-nav-item"><a>排行</a>
<dl class="layui-nav-child">
<dd><a href="/book/book_ranking.html?sortBy=visit_count">全部小说</a></dd>
<dd><a href="/book/book_ranking.html?sortBy=visit_count&catId=1">玄幻小说</a></dd>
<dd><a href="/book/book_ranking.html?sortBy=visit_count&catId=2">修真小说</a></dd>
<dd><a href="/book/book_ranking.html?sortBy=visit_count&catId=3">都市小说</a></dd>
<dd><a href="/book/book_ranking.html?sortBy=visit_count&catId=4">历史小说</a></dd>
<dd><a href="/book/book_ranking.html?sortBy=visit_count&catId=6">网游小说</a></dd>
<dd><a href="/book/book_ranking.html?sortBy=visit_count&catId=5">科幻小说</a></dd>
<dd><a href="/book/book_ranking.html?sortBy=visit_count&catId=7">女频小说</a></dd>
</dl>
</li>
<li class="user_link"></li>
</ul> </div>
<ul class="layui-nav pc" lay-filter="" style="padding:0 36px;text-align: center"> </div>
<li class="layui-nav-item"><a href="/book/book_ranking.html?catId=1&sort=last_index_update_time">玄幻小说</a></li>
<li class="layui-nav-item"><a href="/book/book_ranking.html?catId=2&sort=last_index_update_time">修真小说</a></li>
<li class="layui-nav-item"><a href="/book/book_ranking.html?catId=3&sort=last_index_update_time">都市小说</a></li>
<li class="layui-nav-item"><a href="/book/book_ranking.html?catId=4&sort=last_index_update_time">历史小说</a></li>
<li class="layui-nav-item"><a href="/book/book_ranking.html?catId=6&sort=last_index_update_time">网游小说</a></li>
<li class="layui-nav-item"><a href="/book/book_ranking.html?catId=5&sort=last_index_update_time">科幻小说</a></li>
<li class="layui-nav-item"><a href="/book/book_ranking.html?catId=7&sort=last_index_update_time">女频小说</a></li>
<li class="layui-nav-item"><a>完本小说</a>
<dl class="layui-nav-child"> <!-- 二级菜单 -->
<dd><a href="/book/book_ranking.html?bookStatus=1">全部小说</a></dd>
<dd><a href="/book/book_ranking.html?bookStatus=1&catId=1">玄幻小说</a></dd>
<dd><a href="/book/book_ranking.html?bookStatus=1&catId=2">修真小说</a></dd>
<dd><a href="/book/book_ranking.html?bookStatus=1&catId=3">都市小说</a></dd>
<dd><a href="/book/book_ranking.html?bookStatus=1&catId=4">历史小说</a></dd>
<dd><a href="/book/book_ranking.html?bookStatus=1&catId=6">网游小说</a></dd>
<dd><a href="/book/book_ranking.html?bookStatus=1&catId=5">科幻小说</a></dd>
<dd><a href="/book/book_ranking.html?bookStatus=1&catId=7">女频小说</a></dd>
</dl>
</li>
<li class="layui-nav-item"><a>小说排行</a>
<dl class="layui-nav-child"> <!-- 二级菜单 -->
<dd><a href="/book/book_ranking.html?sortBy=visit_count">全部小说</a></dd>
<dd><a href="/book/book_ranking.html?sortBy=visit_count&catId=1">玄幻小说</a></dd>
<dd><a href="/book/book_ranking.html?sortBy=visit_count&catId=2">修真小说</a></dd>
<dd><a href="/book/book_ranking.html?sortBy=visit_count&catId=3">都市小说</a></dd>
<dd><a href="/book/book_ranking.html?sortBy=visit_count&catId=4">历史小说</a></dd>
<dd><a href="/book/book_ranking.html?sortBy=visit_count&catId=6">网游小说</a></dd>
<dd><a href="/book/book_ranking.html?sortBy=visit_count&catId=5">科幻小说</a></dd>
<dd><a href="/book/book_ranking.html?sortBy=visit_count&catId=7">女频小说</a></dd>
</dl>
</li>
<li class="user_link"></li>
</ul> <div class="layui-container" style="padding-left: 2%">
<div class="layui-container">
<div class="layui-row"> <div class="layui-row">
<div class="layui-col-xs10 layui-col-sm10 layui-col-md11 layui-col-lg11" style="padding-top:1%"> <div class="layui-col-xs10 layui-col-sm10 layui-col-md11 layui-col-lg11">
<input id="title" type="text" name="title" required lay-verify="required" placeholder="请输入书名·作者" <input id="title" type="text" name="title" required lay-verify="required" placeholder="请输入书名·作者"
autocomplete="off" autocomplete="off"
class="layui-input"> class="layui-input">
</div> </div>
<div class="layui-col-xs1" style="padding: 1%"> <div class="layui-col-xs1" style="padding: 0 1% 1%">
<button onclick="searchBooks()" class="layui-btn" lay-submit lay-filter="formDemo">搜索</button> <button onclick="searchBooks()" class="layui-btn" lay-submit lay-filter="formDemo">搜索</button>
</div> </div>
</div> </div>
@ -263,7 +208,7 @@
if (data.code == 200) { if (data.code == 200) {
var updateRankBooks = data.data; var updateRankBooks = data.data;
var updateRankBookHtml = ""; var updateRankBookHtml = "";
for (var i = 0; i < 10; i++) { for (var i = 0; i < updateRankBooks.length; i++) {
var updateRankBook = updateRankBooks[i]; var updateRankBook = updateRankBooks[i];
if (updateRankBook.bookDesc) { if (updateRankBook.bookDesc) {

View File

@ -5,7 +5,7 @@
<head> <head>
<meta charset="utf-8"> <meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1"> <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
<title th:text="${application.website.name}+'列表'"></title> <title th:text="${application.website.name}+'充值'"></title>
<meta name="keywords" <meta name="keywords"
th:content="${application.website.name}+',精品小说,弹幕网站,弹幕,弹幕小说网站,免费小说,小说阅读,小说排行,轻小说,txt小说下载,电子书下载,动漫轻小说,日本轻小说'"> th:content="${application.website.name}+',精品小说,弹幕网站,弹幕,弹幕小说网站,免费小说,小说阅读,小说排行,轻小说,txt小说下载,电子书下载,动漫轻小说,日本轻小说'">
@ -79,11 +79,6 @@
padding-bottom: 20px; padding-bottom: 20px;
} }
#footer {
padding-top: 10px;
line-height: 43px;
}
</style> </style>
</head> </head>
<body> <body>
@ -170,7 +165,6 @@
<div th:replace="mobile/common/js :: js"></div> <div th:replace="mobile/common/js :: js"></div>
<script> <script>
$("#body").css("min-height", ($(window).height() - 110) + "px")
//查询用户信息 //查询用户信息
$.ajax({ $.ajax({
@ -190,7 +184,7 @@
} else if (data.code == 1001) { } else if (data.code == 1001) {
//未登录 //未登录
location.href = '/user/login.html?originUrl=' + decodeURIComponent(location.href); location.href = '/user/login.html?originUrl=' + encodeURIComponent(location.href);
} else { } else {
layer.alert(data.msg); layer.alert(data.msg);

View File

@ -62,10 +62,6 @@
height: 180px; height: 180px;
} }
#footer {
padding-top: 10px;
line-height: 43px;
}
</style> </style>
</head> </head>
<body> <body>
@ -113,7 +109,6 @@
<div th:replace="mobile/common/js :: js"></div> <div th:replace="mobile/common/js :: js"></div>
<script> <script>
$("#body").css("min-height", ($(window).height() - 110) + "px")
search(1, 20); search(1, 20);

View File

@ -25,19 +25,20 @@
</a> </a>
</div> </div>
</div> </div>
<form lay-filter="loginForm" id="form1" style="height: 500px;padding-top:30px;padding-right: 20px" class="layui-form" action=""> <form lay-filter="loginForm" id="form1" style="height: 500px;padding-top:30px;padding-right: 20px" class="layui-form"
action="">
<input type="hidden" id="bookIdHidden" name="bookId" th:value="${bookId}"/> <input type="hidden" id="bookIdHidden" name="bookId" th:value="${bookId}"/>
<div class="layui-form-item"> <div class="layui-form-item">
<label class="layui-form-label">手机号码</label> <label class="layui-form-label">手机号码</label>
<div class="layui-input-inline"> <div class="layui-input-inline">
<input name="txtUName" type="text" id="txtUName" placeholder="请输入手机号" <input name="txtUName" type="text" id="txtUName" placeholder="请输入手机号"
autocomplete="off" class="layui-input"> autocomplete="off" class="layui-input">
</div> </div>
</div> </div>
<div class="layui-form-item"> <div class="layui-form-item">
<label class="layui-form-label">密码</label> <label class="layui-form-label">密码</label>
<div class="layui-input-inline"> <div class="layui-input-inline">
<input name="txtPassword" type="password" id="txtPassword" placeholder="请输入密码" <input name="txtPassword" type="password" id="txtPassword" placeholder="请输入密码"
autocomplete="off" class="layui-input"> autocomplete="off" class="layui-input">
</div> </div>
@ -49,8 +50,8 @@
</div> </div>
<div class="layui-form-item"> <div class="layui-form-item">
<div class="layui-input-block"> <div class="layui-input-block">
<input type="button" value="登录" id="btnLogin" class="layui-btn" /> <input type="button" value="登录" id="btnLogin" class="layui-btn"/>
<button type="reset" class="layui-btn layui-btn-primary">重置</button> <a class="layui-btn layui-btn-primary" href="/user/register.html">注册</a>
</div> </div>
</div> </div>
</form> </form>
@ -62,25 +63,24 @@
<div th:replace="mobile/common/js :: js"> <div th:replace="mobile/common/js :: js">
</div> </div>
<script type="text/javascript"> <script type="text/javascript">
$("#form1").css("min-height",($(window).height() - 140)+"px") if (localStorage.getItem("autoLogin") == 1) {
if(localStorage.getItem("autoLogin")==1){ $("#autoLogin").prop("checked", 'true');
$("#autoLogin").prop("checked",'true'); layui.form.render('checkbox', 'loginForm');
layui.form.render('checkbox','loginForm'); } else {
}else{
$("#autoLogin").removeAttr("checked"); $("#autoLogin").removeAttr("checked");
} }
$("#btnLogin").click(function () { $("#btnLogin").click(function () {
var username = $("#txtUName").val(); var username = $("#txtUName").val();
if(username.isBlank()){ if (username.isBlank()) {
layer.alert("手机号不能为空!"); layer.alert("手机号不能为空!");
return; return;
} }
if(!username.isPhone()){ if (!username.isPhone()) {
layer.alert("手机号格式不正确!"); layer.alert("手机号格式不正确!");
return; return;
} }
var password = $("#txtPassword").val(); var password = $("#txtPassword").val();
if(password.isBlank()){ if (password.isBlank()) {
layer.alert("密码不能为空!"); layer.alert("密码不能为空!");
return; return;
} }
@ -91,12 +91,12 @@
dataType: "json", dataType: "json",
success: function (data) { success: function (data) {
if (data.code == 200) { if (data.code == 200) {
if($("#autoLogin").is(':checked')){ if ($("#autoLogin").is(':checked')) {
$.cookie('Authorization', data.data.token, { expires: 7 ,path: '/' }); $.cookie('Authorization', data.data.token, {expires: 7, path: '/'});
localStorage.setItem("autoLogin","1"); localStorage.setItem("autoLogin", "1");
}else { } else {
$.cookie('Authorization', data.data.token,{ path: '/' }); $.cookie('Authorization', data.data.token, {path: '/'});
localStorage.setItem("autoLogin","0"); localStorage.setItem("autoLogin", "0");
} }
var orginUrl = getSearchString("originUrl"); var orginUrl = getSearchString("originUrl");
window.location.href = orginUrl == undefined || orginUrl.isBlank() ? "/" : orginUrl; window.location.href = orginUrl == undefined || orginUrl.isBlank() ? "/" : orginUrl;
@ -114,5 +114,4 @@
</script> </script>
</html> </html>

View File

@ -62,10 +62,6 @@
height: 180px; height: 180px;
} }
#footer {
padding-top: 10px;
line-height: 43px;
}
</style> </style>
</head> </head>
<body> <body>
@ -113,7 +109,6 @@
<div th:replace="mobile/common/js :: js"></div> <div th:replace="mobile/common/js :: js"></div>
<script> <script>
$("#body").css("min-height", ($(window).height() - 110) + "px")
search(1, 20); search(1, 20);

View File

@ -25,20 +25,21 @@
</a> </a>
</div> </div>
</div> </div>
<form lay-filter="loginForm" id="form1" style="height: 500px;padding-top:30px;padding-right: 20px" class="layui-form" action=""> <form lay-filter="loginForm" id="form1" style="height: 500px;padding-top:30px;padding-right: 20px" class="layui-form"
action="">
<input type="hidden" id="bookIdHidden" name="bookId" th:value="${bookId}"/> <input type="hidden" id="bookIdHidden" name="bookId" th:value="${bookId}"/>
<div class="layui-form-item"> <div class="layui-form-item">
<label class="layui-form-label">手机号码</label> <label class="layui-form-label">手机号码</label>
<div class="layui-input-inline"> <div class="layui-input-inline">
<input name="txtUName" type="text" id="txtUName" placeholder="请输入手机号" <input name="txtUName" type="text" id="txtUName" placeholder="请输入手机号"
autocomplete="off" class="layui-input"> autocomplete="off" class="layui-input">
</div> </div>
</div> </div>
<div class="layui-form-item"> <div class="layui-form-item">
<label class="layui-form-label">密码</label> <label class="layui-form-label">密码</label>
<div class="layui-input-inline"> <div class="layui-input-inline">
<input name="txtPassword" type="password" id="txtPassword" placeholder="请输入密码" <input name="txtPassword" type="password" id="txtPassword" placeholder="请输入密码"
autocomplete="off" class="layui-input"> autocomplete="off" class="layui-input">
</div> </div>
@ -46,7 +47,7 @@
<div class="layui-form-item "> <div class="layui-form-item ">
<label class="layui-form-label">验证码</label> <label class="layui-form-label">验证码</label>
<div class="layui-input-inline"> <div class="layui-input-inline">
<input name="txtUName" type="text" id="TxtChkCode" placeholder="请输入验证码" <input name="txtUName" type="text" id="TxtChkCode" placeholder="请输入验证码"
autocomplete="off" class="layui-input"> autocomplete="off" class="layui-input">
</div> </div>
<div class="layui-input-inline"><img <div class="layui-input-inline"><img
@ -55,8 +56,8 @@
</div> </div>
<div class="layui-form-item"> <div class="layui-form-item">
<div class="layui-input-block"> <div class="layui-input-block">
<input type="button" value="注册" id="btnRegister" class="layui-btn" /> <input type="button" value="注册" id="btnRegister" class="layui-btn"/>
<button type="reset" class="layui-btn layui-btn-primary">重置</button> <a class="layui-btn layui-btn-primary" href="/user/login.html">登录</a>
</div> </div>
</div> </div>
</form> </form>
@ -68,9 +69,8 @@
<div th:replace="mobile/common/js :: js"> <div th:replace="mobile/common/js :: js">
</div> </div>
<script type="text/javascript"> <script type="text/javascript">
$("#form1").css("min-height",($(window).height() - 140)+"px")
$("#chkd").click(); $("#chkd").click();
$("#btnRegister").click(function () { $("#btnRegister").click(function () {
var username = $("#txtUName").val(); var username = $("#txtUName").val();
if (username.isBlank()) { if (username.isBlank()) {
@ -94,12 +94,12 @@
$.ajax({ $.ajax({
type: "POST", type: "POST",
url: "/user/register", url: "/user/register",
data: {"username": username, "password": password,"velCode":velCode}, data: {"username": username, "password": password, "velCode": velCode},
dataType: "json", dataType: "json",
success: function (data) { success: function (data) {
if (data.code == 200) { if (data.code == 200) {
$.cookie('Authorization', data.data.token, {path: '/'}); $.cookie('Authorization', data.data.token, {path: '/'});
window.location.href="/"; window.location.href = "/";
} else { } else {
layer.alert(data.msg); layer.alert(data.msg);
} }
@ -111,6 +111,7 @@
}) })
}) })
//获取验证码 //获取验证码
function getVerify(obj) { function getVerify(obj) {
obj.src = "/file/getVerify?" + Math.random(); obj.src = "/file/getVerify?" + Math.random();
@ -118,5 +119,4 @@
</script> </script>
</html> </html>

View File

@ -213,7 +213,6 @@
<script> <script>
$("#body").css("min-height", ($(window).height() - 60) + "px")
//查询用户信息 //查询用户信息
$.ajax({ $.ajax({
@ -244,7 +243,7 @@
} else if (data.code == 1001) { } else if (data.code == 1001) {
//未登录 //未登录
location.href = '/user/login.html?originUrl=' + decodeURIComponent(location.href); location.href = '/user/login.html?originUrl=' + encodeURIComponent(location.href);
} else { } else {
layer.alert(data.msg); layer.alert(data.msg);

View File

@ -1,6 +1,5 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<!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"> <html xmlns="http://www.w3.org/1999/xhtml">
<head th:replace="common/header :: common_head(~{::title},~{},~{::link},~{})"> <head th:replace="common/header :: common_head(~{::title},~{},~{::link},~{})">
<title th:text="'充值_'+${application.website.name}"></title> <title th:text="'充值_'+${application.website.name}"></title>
@ -20,39 +19,51 @@
<div class="payBox cf"> <div class="payBox cf">
<div class="payHead cf"> <div class="payHead cf">
<div class="fl"> <div class="fl">
充值账号<span class="user_name" id="my_name"></span>余额:<em class="red" id="accountBalance">0</em>屋币<!--<em class="red">+0</em>代金券--> 充值账号<span class="user_name" id="my_name"></span>余额:<em class="red" id="accountBalance">0</em>屋币
<!--<em class="red">+0</em>代金券-->
</div> </div>
</div> </div>
<div class="payCon"> <div class="payCon">
<h5>选择充值方式</h5> <h5>选择充值方式</h5>
<ul class="pay_way cf" id="ulPayType"> <ul class="pay_way cf" id="ulPayType">
<li class="on" valp="1"><img class="pay_pic" src="../images/pay_zfb.png" alt="支付宝支付" /></li> <li class="on" valp="1"><img class="pay_pic" src="../images/pay_zfb.png" alt="支付宝支付"/></li>
<li valp="2"><img class="pay_pic" src="../images/pay_wx.png" alt="微信支付" /></li> <li valp="2"><img class="pay_pic" src="../images/pay_wx.png" alt="微信支付"/></li>
</ul> </ul>
<h5>选择充值金额</h5> <h5>选择充值金额</h5>
<ul class="pay_way cf" id="ulZFWX"> <ul class="pay_way cf" id="ulZFWX">
<li vals="10"><strong>10元</strong><span class="pay_mn">1000屋币</span></li> <li vals="10"><strong>10元</strong><span class="pay_mn">1000屋币</span></li>
<li vals="30"><strong>30元</strong><span class="pay_mn">3000屋币</span></li> <li vals="30"><strong>30元</strong><span class="pay_mn">3000屋币</span></li>
<li vals="50"><strong>50元</strong><span class="pay_mn">5000屋币<!--<em class="red">+ 送500代金券</em>--></span></li> <li vals="50"><strong>50元</strong><span class="pay_mn">5000屋币
<li vals="100"><strong>100元</strong><span class="pay_mn">10000屋币<!--<em class="red">+ 送1200代金券</em>--></span></li> <!--<em class="red">+ 送500代金券</em>--></span></li>
<li vals="200"><strong>200元</strong><span class="pay_mn">20000屋币<!--<em class="red">+ 送3000代金券</em>--></span></li> <li vals="100"><strong>100元</strong><span class="pay_mn">10000屋币
<li vals="500"><strong>500元</strong><span class="pay_mn">50000屋币<!--<em class="red">+ 送10000代金券</em>--></span></li> <!--<em class="red">+ 送1200代金券</em>--></span></li>
<li vals="200"><strong>200元</strong><span class="pay_mn">20000屋币
<!--<em class="red">+ 送3000代金券</em>--></span></li>
<li vals="500"><strong>500元</strong><span class="pay_mn">50000屋币
<!--<em class="red">+ 送10000代金券</em>--></span></li>
</ul> </ul>
<ul class="pay_way cf" style="display:none;" id="ulPayPal"> <ul class="pay_way cf" style="display:none;" id="ulPayPal">
<li vals="20"><strong>20美元</strong><span class="pay_mn">10000屋币</span></li> <li vals="20"><strong>20美元</strong><span class="pay_mn">10000屋币</span></li>
<li vals="50" class="on"><strong>50美元</strong><span class="pay_mn">25000屋币<em class="red"></em></span></li> <li vals="50" class="on"><strong>50美元</strong><span class="pay_mn">25000屋币<em class="red"></em></span>
<li vals="100"><strong>100美元</strong><span class="pay_mn">50000屋币<em class="red"></em></span></li> </li>
<li vals="100"><strong>100美元</strong><span class="pay_mn">50000屋币<em class="red"></em></span>
</li>
</ul> </ul>
<ul class="pay_Checkout" id="ulZFWXXJ"> <ul class="pay_Checkout" id="ulZFWXXJ">
<li>当前汇率1元=100屋币</li> <li>当前汇率1元=100屋币</li>
<li>总计金额<em class="red" id="showTotal">¥50元</em> 获得 <em class="red" id="showRemark">5000屋币<!--+500代金券--></em></li> <li>总计金额<em class="red" id="showTotal">¥50元</em> 获得 <em class="red" id="showRemark">5000屋币
<li style="display:none"><a class="btn_red" href="pay_success.html" onclick="javascript:UserPay.sendPay();">立即支付</a></li> <!--+500代金券--></em></li>
<li style="display:none"><a class="btn_red" href="pay_success.html"
onclick="javascript:UserPay.sendPay();">立即支付</a></li>
</ul> </ul>
<ul class="pay_Checkout" style="display:none;" id="ulPayPalXJ"> <ul class="pay_Checkout" style="display:none;" id="ulPayPalXJ">
<li>当前汇率1美元=500屋币</li> <li>当前汇率1美元=500屋币</li>
<li>总计金额<em class="red" id="showPayPalTotal">50美元</em> 获得 <em class="red" id="showPayPalRemark">25000屋币</em></li> <li>总计金额<em class="red" id="showPayPalTotal">50美元</em> 获得 <em class="red"
<li style="display:none"><a class="btn_red" href="javascript:void(0);" onclick="javascript:UserPay.sendPay();">立即支付</a></li> id="showPayPalRemark">25000屋币</em>
</li>
<li style="display:none"><a class="btn_red" href="javascript:void(0);"
onclick="javascript:UserPay.sendPay();">立即支付</a></li>
</ul> </ul>
</div> </div>
<div class="payFoot"> <div class="payFoot">
@ -68,7 +79,7 @@
</div> </div>
</div> </div>
<input type="hidden" id="pValue" name="payAmount" /> <input type="hidden" id="pValue" name="payAmount"/>
</form> </form>
@ -80,7 +91,6 @@
<script type="text/javascript"> <script type="text/javascript">
//查询用户信息 //查询用户信息
$.ajax({ $.ajax({
type: "get", type: "get",
@ -89,9 +99,9 @@
dataType: "json", dataType: "json",
success: function (data) { success: function (data) {
if (data.code == 200) { if (data.code == 200) {
if(data.data.nickName){ if (data.data.nickName) {
$("#my_name").html(data.data.nickName); $("#my_name").html(data.data.nickName);
}else{ } else {
$("#my_name").html(data.data.username); $("#my_name").html(data.data.username);
} }
@ -99,7 +109,7 @@
} else if (data.code == 1001) { } else if (data.code == 1001) {
//未登录 //未登录
location.href = '/user/login.html?originUrl=' + decodeURIComponent(location.href); location.href = '/user/login.html?originUrl=' + encodeURIComponent(location.href);
} else { } else {
layer.alert(data.msg); layer.alert(data.msg);
@ -115,9 +125,9 @@
var payType = $("#ulPayType").find("li.on").attr("valp"); var payType = $("#ulPayType").find("li.on").attr("valp");
if(payType == 2){ if (payType == 2) {
layer.alert("微信支付暂未开通,敬请期待"); layer.alert("微信支付暂未开通,敬请期待");
return ; return;
} }
$("#pValue").val($(this).attr("vals")); $("#pValue").val($(this).attr("vals"));
@ -125,9 +135,6 @@
$("#payform").submit(); $("#payform").submit();
}); });
</script> </script>

View File

@ -1,4 +1,5 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <!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"> <html xmlns="http://www.w3.org/1999/xhtml">
<head th:replace="common/header :: common_head(~{::title},~{},~{::link},~{})"> <head th:replace="common/header :: common_head(~{::title},~{},~{::link},~{})">
<title th:text="'我的书评_'+${application.website.name}"></title> <title th:text="'我的书评_'+${application.website.name}"></title>
@ -54,24 +55,24 @@
$.ajax({ $.ajax({
type: "get", type: "get",
url: "/user/listCommentByPage", url: "/user/listCommentByPage",
data: {'curr':curr,'limit':limit}, data: {'curr': curr, 'limit': limit},
dataType: "json", dataType: "json",
success: function (data) { success: function (data) {
if (data.code == 200) { if (data.code == 200) {
var commentList = data.data.list; var commentList = data.data.list;
if (commentList.length > 0) { if (commentList.length > 0) {
$("#bookCommentTotal").html("("+data.data.total+"条)"); $("#bookCommentTotal").html("(" + data.data.total + "条)");
var commentListHtml = ""; var commentListHtml = "";
for (var i = 0; i < commentList.length; i++) { for (var i = 0; i < commentList.length; i++) {
var comment = commentList[i]; var comment = commentList[i];
commentListHtml += ("<div class=\"comment_list cf\">" + commentListHtml += ("<div class=\"comment_list cf\">" +
"<div class=\"user_heads fl\" vals=\"389\">" + "<div class=\"user_heads fl\" vals=\"389\">" +
"<img src=\""+(comment.createUserPhoto ? comment.createUserPhoto : '/images/man.png')+"\" class=\"user_head\" alt=\"\">" + "<img src=\"" + (comment.createUserPhoto ? comment.createUserPhoto : '/images/man.png') + "\" class=\"user_head\" alt=\"\">" +
"<span class=\"user_level1\" style=\"display: none;\">见习</span></div>" + "<span class=\"user_level1\" style=\"display: none;\">见习</span></div>" +
"<ul class=\"pl_bar fr\">\t\t\t<li class=\"name\">"+(comment.createUserName.substr(0, 4) + "****" + comment.createUserName.substr(comment.createUserName.length - 3, 3))+"</li><li class=\"dec\">" + "<ul class=\"pl_bar fr\">\t\t\t<li class=\"name\">" + (comment.createUserName.substr(0, 4) + "****" + comment.createUserName.substr(comment.createUserName.length - 3, 3)) + "</li><li class=\"dec\">" +
comment.commentContent+ comment.commentContent +
"</li><li class=\"other cf\">" + "</li><li class=\"other cf\">" +
"<span class=\"time fl\">"+comment.createTime+"</span>" + "<span class=\"time fl\">" + comment.createTime + "</span>" +
"<span class=\"fr\"><a href=\"javascript:void(0);\" onclick=\"javascript:BookDetail.AddAgreeTotal(77,this);\" class=\"zan\" style=\"display: none;\">赞<i class=\"num\">(0)</i></a>" + "<span class=\"fr\"><a href=\"javascript:void(0);\" onclick=\"javascript:BookDetail.AddAgreeTotal(77,this);\" class=\"zan\" style=\"display: none;\">赞<i class=\"num\">(0)</i></a>" +
"</span></li>\t\t</ul>\t</div>"); "</span></li>\t\t</ul>\t</div>");
} }
@ -109,9 +110,9 @@
} else if (data.code == 1001) { } else if (data.code == 1001) {
//未登录 //未登录
location.href = '/user/login.html?originUrl=' + decodeURIComponent(location.href); location.href = '/user/login.html?originUrl=' + encodeURIComponent(location.href);
}else { } else {
layer.alert(data.msg); layer.alert(data.msg);
} }

View File

@ -1,11 +1,13 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <!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"> <html xmlns="http://www.w3.org/1999/xhtml">
<head> <head>
<head th:replace="common/header :: common_head(~{::title},~{::meta},~{::link},~{})"> <head th:replace="common/header :: common_head(~{::title},~{::meta},~{::link},~{})">
<title th:text="'我的书架_'+${application.website.name}"></title> <title th:text="'我的书架_'+${application.website.name}"></title>
<meta name="keywords" th:content="'我的书架,个人中心,'+${application.website.name}+'小说,'+${application.website.name}" /> <meta name="keywords" th:content="'我的书架,个人中心,'+${application.website.name}+'小说,'+${application.website.name}"/>
<meta name="description" th:content="${application.website.name}+'小说每日更新小说连载,小说排行榜,提供言情小说,都市小说,玄幻小说,穿越小说,青春小说,总裁豪门小说,网络小说,免费小说,全本小说,首发小说,最新章节免费小说阅读,精彩尽在'+${application.website.name}+'小说!'" /> <meta name="description"
<link rel="stylesheet" href="/css/user.css" /> th:content="${application.website.name}+'小说每日更新小说连载,小说排行榜,提供言情小说,都市小说,玄幻小说,穿越小说,青春小说,总裁豪门小说,网络小说,免费小说,全本小说,首发小说,最新章节免费小说阅读,精彩尽在'+${application.website.name}+'小说!'"/>
<link rel="stylesheet" href="/css/user.css"/>
</head> </head>
</head> </head>
<body class=""> <body class="">
@ -29,7 +31,9 @@
<div class="my_r"> <div class="my_r">
<div class="my_bookshelf"> <div class="my_bookshelf">
<div class="title cf"> <div class="title cf">
<h2 class="fl"><a href="javascript:void(0);" class="red">我的书架</a></h2><i class="fl ml20 mr20 font16">|</i><h2 class="fl"><a href="/user/read_history.html" >最近阅读</a></h2> <h2 class="fl"><a href="javascript:void(0);" class="red">我的书架</a></h2><i
class="fl ml20 mr20 font16">|</i>
<h2 class="fl"><a href="/user/read_history.html">最近阅读</a></h2>
</div> </div>
<div id="divData" class="updateTable"> <div id="divData" class="updateTable">
@ -56,7 +60,6 @@
<tbody id="bookShelfList"> <tbody id="bookShelfList">
</tbody> </tbody>
</table> </table>
<div class="pageBox cf" id="shellPage"> <div class="pageBox cf" id="shellPage">
@ -82,31 +85,31 @@
$.ajax({ $.ajax({
type: "get", type: "get",
url: "/user/listBookShelfByPage", url: "/user/listBookShelfByPage",
data: {'curr':curr,'limit':limit}, data: {'curr': curr, 'limit': limit},
dataType: "json", dataType: "json",
success: function (data) { success: function (data) {
if (data.code == 200) { if (data.code == 200) {
var bookShelfList = data.data.list; var bookShelfList = data.data.list;
if (bookShelfList.length > 0) { if (bookShelfList.length > 0) {
var bookShelfListHtml = ""; var bookShelfListHtml = "";
for(var i=0;i<bookShelfList.length;i++){ for (var i = 0; i < bookShelfList.length; i++) {
var book = bookShelfList[i]; var book = bookShelfList[i];
bookShelfListHtml+=(" <tr class=\"book_list\" vals=\"291\">\n" + bookShelfListHtml += (" <tr class=\"book_list\" vals=\"291\">\n" +
" <td class=\"style bookclass\">\n" + " <td class=\"style bookclass\">\n" +
" <a href=\"/book/bookclass.html?c="+book.catId+"\" >["+book.catName+"]</a>\n" + " <a href=\"/book/bookclass.html?c=" + book.catId + "\" >[" + book.catName + "]</a>\n" +
" </td>\n" + " </td>\n" +
" <td class=\"name\">\n" + " <td class=\"name\">\n" +
" <a href=\"/book/"+book.bookId+".html\">\n" + " <a href=\"/book/" + book.bookId + ".html\">\n" +
" "+book.bookName+"</a>\n" + " " + book.bookName + "</a>\n" +
" </td>\n" + " </td>\n" +
" <td class=\"chapter\" valsc=\"291|2037554|1\">\n" + " <td class=\"chapter\" valsc=\"291|2037554|1\">\n" +
"<a href='/book/"+book.bookId+"/"+book.lastIndexId+".html'>"+book.lastIndexName+"</a>"+ "<a href='/book/" + book.bookId + "/" + book.lastIndexId + ".html'>" + book.lastIndexName + "</a>" +
" </td>\n" + " </td>\n" +
" <td class=\"time\">\n" + " <td class=\"time\">\n" +
" "+book.lastIndexUpdateTime+"\n" + " " + book.lastIndexUpdateTime + "\n" +
" </td>\n" + " </td>\n" +
" <td class=\"goread\">\n" + " <td class=\"goread\">\n" +
"<a href='/book/"+book.bookId+"/"+book.preContentId+".html'>继续阅读</a>"+ "<a href='/book/" + book.bookId + "/" + book.preContentId + ".html'>继续阅读</a>" +
" </td>\n" + " </td>\n" +
" </tr>"); " </tr>");
} }
@ -144,9 +147,9 @@
} else if (data.code == 1001) { } else if (data.code == 1001) {
//未登录 //未登录
location.href = '/user/login.html?originUrl=' + decodeURIComponent(location.href); location.href = '/user/login.html?originUrl=' + encodeURIComponent(location.href);
}else { } else {
layer.alert(data.msg); layer.alert(data.msg);
} }

View File

@ -74,7 +74,7 @@
} else if (data.code == 1001) { } else if (data.code == 1001) {
//未登录 //未登录
location.href = '/user/login.html?originUrl=' + decodeURIComponent(location.href); location.href = '/user/login.html?originUrl=' + encodeURIComponent(location.href);
} else { } else {
layer.alert(data.msg); layer.alert(data.msg);

View File

@ -1,6 +1,5 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<!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"> <html xmlns="http://www.w3.org/1999/xhtml">
<head th:replace="common/header :: common_head(~{::title},~{},~{::link},~{})"> <head th:replace="common/header :: common_head(~{::title},~{},~{::link},~{})">
<title th:text="'我的反馈_'+${application.website.name}"></title> <title th:text="'我的反馈_'+${application.website.name}"></title>
@ -34,8 +33,6 @@
<dd id="feedbackList"> <dd id="feedbackList">
</dd> </dd>
</dl> </dl>
<div class="cf"> <div class="cf">
@ -61,7 +58,7 @@
$.ajax({ $.ajax({
type: "get", type: "get",
url: "/user/listUserFeedBackByPage", url: "/user/listUserFeedBackByPage",
data: {'curr':curr,'limit':limit}, data: {'curr': curr, 'limit': limit},
dataType: "json", dataType: "json",
success: function (data) { success: function (data) {
if (data.code == 200) { if (data.code == 200) {
@ -71,8 +68,8 @@
for (var i = 0; i < feedbackList.length; i++) { for (var i = 0; i < feedbackList.length; i++) {
var feedback = feedbackList[i]; var feedback = feedbackList[i];
feedbackListHtml += (" <div class=\"comment_list clear\" ><ul>\n" + feedbackListHtml += (" <div class=\"comment_list clear\" ><ul>\n" +
" <li class=\"li_1\"><span class=\"user_name fl\"></span><span class=\"time fl\">"+feedback.createTime+"</span></li>\n" + " <li class=\"li_1\"><span class=\"user_name fl\"></span><span class=\"time fl\">" + feedback.createTime + "</span></li>\n" +
" <li class=\"li_2\">"+feedback.content+"</li>\n" + " <li class=\"li_2\">" + feedback.content + "</li>\n" +
" </ul></div>"); " </ul></div>");
} }
$("#feedbackList").html(feedbackListHtml); $("#feedbackList").html(feedbackListHtml);
@ -109,9 +106,9 @@
} else if (data.code == 1001) { } else if (data.code == 1001) {
//未登录 //未登录
location.href = '/user/login.html?originUrl=' + decodeURIComponent(location.href); location.href = '/user/login.html?originUrl=' + encodeURIComponent(location.href);
}else { } else {
layer.alert(data.msg); layer.alert(data.msg);
} }

View File

@ -1,4 +1,5 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <!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"> <html xmlns="http://www.w3.org/1999/xhtml">
<head th:replace="common/header :: common_head(~{::title},~{},~{::link},~{})"> <head th:replace="common/header :: common_head(~{::title},~{},~{::link},~{})">
<title th:text="'最近阅读_'+${application.website.name}"></title> <title th:text="'最近阅读_'+${application.website.name}"></title>
@ -13,7 +14,9 @@
<div class="viewhistoryBox"> <div class="viewhistoryBox">
<div class="my_bookshelf"> <div class="my_bookshelf">
<div class="title cf"> <div class="title cf">
<h2 class="fl ml10"><a href="javascript:void(0);" class="red">最近阅读</a></h2><i class="fl ml20 mr20 font16">|</i><h2 class="fl"><a href="/user/favorites.html">我的书架</a></h2> <h2 class="fl ml10"><a href="javascript:void(0);" class="red">最近阅读</a></h2><i
class="fl ml20 mr20 font16">|</i>
<h2 class="fl"><a href="/user/favorites.html">我的书架</a></h2>
</div> </div>
<div id="divData" class="updateTable"> <div id="divData" class="updateTable">
<table cellpadding="0" cellspacing="0"> <table cellpadding="0" cellspacing="0">
@ -69,31 +72,31 @@
$.ajax({ $.ajax({
type: "get", type: "get",
url: "/user/listReadHistoryByPage", url: "/user/listReadHistoryByPage",
data: {'curr':curr,'limit':limit}, data: {'curr': curr, 'limit': limit},
dataType: "json", dataType: "json",
success: function (data) { success: function (data) {
if (data.code == 200) { if (data.code == 200) {
var bookHistoryList = data.data.list; var bookHistoryList = data.data.list;
if (bookHistoryList.length > 0) { if (bookHistoryList.length > 0) {
var bookHistoryListHtml = ""; var bookHistoryListHtml = "";
for(var i=0;i<bookHistoryList.length;i++){ for (var i = 0; i < bookHistoryList.length; i++) {
var book = bookHistoryList[i]; var book = bookHistoryList[i];
bookHistoryListHtml+=(" <tr class=\"book_list\" vals=\"291\">\n" + bookHistoryListHtml += (" <tr class=\"book_list\" vals=\"291\">\n" +
" <td class=\"style bookclass\">\n" + " <td class=\"style bookclass\">\n" +
" <a href=\"/book/bookclass.html?c="+book.catId+"\" >["+book.catName+"]</a>\n" + " <a href=\"/book/bookclass.html?c=" + book.catId + "\" >[" + book.catName + "]</a>\n" +
" </td>\n" + " </td>\n" +
" <td class=\"name\">\n" + " <td class=\"name\">\n" +
" <a href=\"/book/"+book.bookId+".html\">\n" + " <a href=\"/book/" + book.bookId + ".html\">\n" +
" "+book.bookName+"</a>\n" + " " + book.bookName + "</a>\n" +
" </td>\n" + " </td>\n" +
" <td class=\"chapter\" valsc=\"291|2037554|1\">\n" + " <td class=\"chapter\" valsc=\"291|2037554|1\">\n" +
"<a href='/book/"+book.bookId+"/"+book.lastIndexId+".html'>"+book.lastIndexName+"</a>"+ "<a href='/book/" + book.bookId + "/" + book.lastIndexId + ".html'>" + book.lastIndexName + "</a>" +
" </td>\n" + " </td>\n" +
" <td class=\"time\">\n" + " <td class=\"time\">\n" +
" "+book.lastIndexUpdateTime+"\n" + " " + book.lastIndexUpdateTime + "\n" +
" </td>\n" + " </td>\n" +
" <td class=\"goread\">\n" + " <td class=\"goread\">\n" +
"<a href='/book/"+book.bookId+"/"+book.preContentId+".html'>继续阅读</a>"+ "<a href='/book/" + book.bookId + "/" + book.preContentId + ".html'>继续阅读</a>" +
" </td>\n" + " </td>\n" +
" </tr>"); " </tr>");
} }
@ -131,9 +134,9 @@
} else if (data.code == 1001) { } else if (data.code == 1001) {
//未登录 //未登录
location.href = '/user/login.html?originUrl=' + decodeURIComponent(location.href); location.href = '/user/login.html?originUrl=' + encodeURIComponent(location.href);
}else { } else {
layer.alert(data.msg); layer.alert(data.msg);
} }

View File

@ -27,7 +27,7 @@
<div class="my_info_txt"> <div class="my_info_txt">
<ul class="mytab_list"> <ul class="mytab_list">
<li><i class="tit">我的昵称</i><input name="txtNiceName" type="text" value="15171695474" <li><i class="tit">我的昵称</i><input name="txtNiceName" type="text" value="15171695474"
maxlength="20" id="txtNiceName" class="s_input" maxlength="11" id="txtNiceName" class="s_input"
placeholder=""/></li> placeholder=""/></li>
<li><i class="tit">&nbsp;</i>用户名只能包括汉字、英文字母、数字和下划线</li> <li><i class="tit">&nbsp;</i>用户名只能包括汉字、英文字母、数字和下划线</li>
<li><i class="tit">&nbsp;</i><input type="button" onclick="updateName()" name="btn" value="修改" <li><i class="tit">&nbsp;</i><input type="button" onclick="updateName()" name="btn" value="修改"
@ -61,7 +61,7 @@
} else if (data.code == 1001) { } else if (data.code == 1001) {
//未登录 //未登录
location.href = '/user/login.html?originUrl=' + decodeURIComponent(location.href); location.href = '/user/login.html?originUrl=' + encodeURIComponent(location.href);
} else { } else {
layer.alert(data.msg); layer.alert(data.msg);
@ -96,7 +96,7 @@
} else if (data.code == 1001) { } else if (data.code == 1001) {
//未登录 //未登录
location.href = '/user/login.html?originUrl=' + decodeURIComponent(location.href); location.href = '/user/login.html?originUrl=' + encodeURIComponent(location.href);
} else { } else {
$("#LabErr").html(data.msg); $("#LabErr").html(data.msg);

View File

@ -1,4 +1,5 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <!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"> <html xmlns="http://www.w3.org/1999/xhtml">
<head th:replace="common/header :: common_head(~{::title},~{},~{::link},~{})"> <head th:replace="common/header :: common_head(~{::title},~{},~{::link},~{})">
<title th:text="'修改密码_'+${application.website.name}"></title> <title th:text="'修改密码_'+${application.website.name}"></title>
@ -24,13 +25,18 @@
<div class="my_r"> <div class="my_r">
<div class="my_info cf"> <div class="my_info cf">
<div class="my_info_txt"> <div class="my_info_txt">
<ul class="mytab_list"> <ul class="mytab_list">
<li><i class="tit">我的密码</i><input name="oldPass" type="password" id="txtOldPass" class="s_input" placeholder="请输入原密码" /></li> <li><i class="tit">我的密码</i><input name="oldPass" type="password" id="txtOldPass" class="s_input"
<li><i class="tit">&nbsp;</i><input name="txtNewPass1" type="password" id="txtNewPass1" class="s_input" placeholder="请输入新密码" /></li> placeholder="请输入原密码"/></li>
<li><i class="tit">&nbsp;</i><input name="txtNewPass2" type="password" id="txtNewPass2" class="s_input" placeholder="请确认新密码" /></li> <li><i class="tit">&nbsp;</i><input name="txtNewPass1" type="password" id="txtNewPass1"
<li><i class="tit">&nbsp;</i><input type="submit" name="btnExchangePassword" value="修改" id="btnExchangePassword" onclick="updatePassword()" class="s_btn btn_red" /></li> class="s_input" placeholder="请输入新密码"/></li>
<li><i class="tit">&nbsp;</i><span id="LabErr"></span></li> <li><i class="tit">&nbsp;</i><input name="txtNewPass2" type="password" id="txtNewPass2"
</ul> class="s_input" placeholder="请确认新密码"/></li>
<li><i class="tit">&nbsp;</i><input type="submit" name="btnExchangePassword" value="修改"
id="btnExchangePassword" onclick="updatePassword()"
class="s_btn btn_red"/></li>
<li><i class="tit">&nbsp;</i><span id="LabErr"></span></li>
</ul>
</div> </div>
</div> </div>
</div> </div>
@ -57,14 +63,14 @@
$("#LabErr").html("确认密码不能为空!"); $("#LabErr").html("确认密码不能为空!");
return; return;
} }
if(newPassword1 !== newPassword2){ if (newPassword1 !== newPassword2) {
$("#LabErr").html("两次输入的新密码不匹配!"); $("#LabErr").html("两次输入的新密码不匹配!");
return; return;
} }
$.ajax({ $.ajax({
type: "POST", type: "POST",
url: "/user/updatePassword", url: "/user/updatePassword",
data: {'oldPassword':oldPassword,'newPassword1':newPassword1,'newPassword2':newPassword2}, data: {'oldPassword': oldPassword, 'newPassword1': newPassword1, 'newPassword2': newPassword2},
dataType: "json", dataType: "json",
success: function (data) { success: function (data) {
if (data.code == 200) { if (data.code == 200) {
@ -72,7 +78,7 @@
} else if (data.code == 1001) { } else if (data.code == 1001) {
//未登录 //未登录
location.href = '/user/login.html?originUrl=' + decodeURIComponent(location.href); location.href = '/user/login.html?originUrl=' + encodeURIComponent(location.href);
} else { } else {
$("#LabErr").html(data.msg); $("#LabErr").html(data.msg);

View File

@ -1,4 +1,5 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <!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"> <html xmlns="http://www.w3.org/1999/xhtml">
<head th:replace="common/header :: common_head(~{::title},~{},~{::link},~{})"> <head th:replace="common/header :: common_head(~{::title},~{},~{::link},~{})">
<title th:text="'修改性别_'+${application.website.name}"></title> <title th:text="'修改性别_'+${application.website.name}"></title>
@ -24,14 +25,16 @@
<div class="my_r"> <div class="my_r">
<div class="my_info cf"> <div class="my_info cf">
<div class="my_info_txt"> <div class="my_info_txt">
<ul class="mytab_list"> <ul class="mytab_list">
<li><i class="tit">我的性别</i> <li><i class="tit">我的性别</i>
<label><input type="radio" name="sex" value="0" />&nbsp;男生</label> <label><input type="radio" name="sex" value="0"/>&nbsp;男生</label>
<label><input class="ml20" type="radio" name="sex" value="1" checked />&nbsp;女生</label> <label><input class="ml20" type="radio" name="sex" value="1" checked/>&nbsp;女生</label>
</li> </li>
<li class="mt20"><i class="tit">&nbsp;</i><input type="button" onclick="updateSex()" name="btn" value="修改" id="btn" class="s_btn btn_red" /></li> <li class="mt20"><i class="tit">&nbsp;</i><input type="button" onclick="updateSex()" name="btn"
<li><i class="tit">&nbsp;</i><span id="LabErr"></span></li> value="修改" id="btn" class="s_btn btn_red"/>
</ul> </li>
<li><i class="tit">&nbsp;</i><span id="LabErr"></span></li>
</ul>
</div> </div>
</div> </div>
</div> </div>
@ -50,15 +53,14 @@
dataType: "json", dataType: "json",
success: function (data) { success: function (data) {
if (data.code == 200) { if (data.code == 200) {
if(data.data.userSex === '0'){ if (data.data.userSex === '0') {
$("input[name=sex]").eq(0).attr("checked",true); $("input[name=sex]").eq(0).attr("checked", true);
} }
} else if (data.code == 1001) { } else if (data.code == 1001) {
//未登录 //未登录
location.href = '/user/login.html?originUrl=' + decodeURIComponent(location.href); location.href = '/user/login.html?originUrl=' + encodeURIComponent(location.href);
} else { } else {
layer.alert(data.msg); layer.alert(data.msg);
@ -69,11 +71,12 @@
layer.alert('网络异常'); layer.alert('网络异常');
} }
}) })
function updateSex() { function updateSex() {
$.ajax({ $.ajax({
type: "POST", type: "POST",
url: "/user/updateUserInfo", url: "/user/updateUserInfo",
data: {'userSex':$("input[name=sex]:checked").val()}, data: {'userSex': $("input[name=sex]:checked").val()},
dataType: "json", dataType: "json",
success: function (data) { success: function (data) {
if (data.code == 200) { if (data.code == 200) {
@ -81,7 +84,7 @@
} else if (data.code == 1001) { } else if (data.code == 1001) {
//未登录 //未登录
location.href = '/user/login.html?originUrl=' + decodeURIComponent(location.href); location.href = '/user/login.html?originUrl=' + encodeURIComponent(location.href);
} else { } else {
layer.alert(data.msg); layer.alert(data.msg);

View File

@ -1,4 +1,5 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <!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"> <html xmlns="http://www.w3.org/1999/xhtml">
<head th:replace="common/header :: common_head(~{::title},~{},~{::link},~{})"> <head th:replace="common/header :: common_head(~{::title},~{},~{::link},~{})">
<title th:text="'账号设置_'+${application.website.name}"></title> <title th:text="'账号设置_'+${application.website.name}"></title>
@ -25,10 +26,12 @@
<div class="my_info cf"> <div class="my_info cf">
<div class="my_info_txt"> <div class="my_info_txt">
<ul class="mytab_list"> <ul class="mytab_list">
<li ><i class="tit">我的头像</i> <li><i class="tit">我的头像</i>
<a style="position: relative" > <a style="position: relative">
<img id="imgLogo" class="user_img" alt="我的头像" src="/images/man.png" /> <img id="imgLogo" class="user_img" alt="我的头像" src="/images/man.png"/>
<input class="opacity" onchange="picChange()" type="file" id="file0" name="file" title="点击上传图片" style="z-index: 100;cursor: pointer;left: 0px; top: -25px; width: 60px; height: 80px; opacity: 0; position: absolute; "/> <input class="opacity" onchange="picChange()" type="file" id="file0" name="file"
title="点击上传图片"
style="z-index: 100;cursor: pointer;left: 0px; top: -25px; width: 60px; height: 80px; opacity: 0; position: absolute; "/>
</a> </a>
@ -59,27 +62,26 @@
dataType: "json", dataType: "json",
success: function (data) { success: function (data) {
if (data.code == 200) { if (data.code == 200) {
if(data.data.userPhoto){ if (data.data.userPhoto) {
$("#imgLogo").attr("src",data.data.userPhoto); $("#imgLogo").attr("src", data.data.userPhoto);
} }
if(data.data.nickName){ if (data.data.nickName) {
$("#my_name").html(data.data.nickName+"<em class=\"ml10\">[修改]</em>"); $("#my_name").html(data.data.nickName + "<em class=\"ml10\">[修改]</em>");
}else{ } else {
$("#my_name").html(data.data.username+"<em class=\"ml10\">[修改]</em>"); $("#my_name").html(data.data.username + "<em class=\"ml10\">[修改]</em>");
} }
if(data.data.userSex === '0'){ if (data.data.userSex === '0') {
$("#my_sex").html("男<em class=\"ml10\">[修改]</em>"); $("#my_sex").html("男<em class=\"ml10\">[修改]</em>");
}else if(data.data.userSex === '1'){ } else if (data.data.userSex === '1') {
$("#my_sex").html("女<em class=\"ml10\">[修改]</em>"); $("#my_sex").html("女<em class=\"ml10\">[修改]</em>");
}else{ } else {
$("#my_sex").html("请选择"); $("#my_sex").html("请选择");
} }
} else if (data.code == 1001) { } else if (data.code == 1001) {
//未登录 //未登录
location.href = '/user/login.html?originUrl=' + decodeURIComponent(location.href); location.href = '/user/login.html?originUrl=' + encodeURIComponent(location.href);
} else { } else {
layer.alert(data.msg); layer.alert(data.msg);
@ -96,7 +98,7 @@
var file = $("#file0").val(); //文件名称 var file = $("#file0").val(); //文件名称
if (file != "") { if (file != "") {
if(checkPicUpload($("#file0")[0])) { if (checkPicUpload($("#file0")[0])) {
$.ajaxFileUpload({ $.ajaxFileUpload({
url: "/file/picUpload", //用于文件上传的服务器端请求地址 url: "/file/picUpload", //用于文件上传的服务器端请求地址
@ -118,7 +120,7 @@
} else if (data.code == 1001) { } else if (data.code == 1001) {
//未登录 //未登录
location.href = '/user/login.html?originUrl=' + decodeURIComponent(location.href); location.href = '/user/login.html?originUrl=' + encodeURIComponent(location.href);
} else { } else {
layer.alert(data.msg); layer.alert(data.msg);
@ -143,7 +145,6 @@
} }
} }
</script> </script>
</body> </body>

View File

@ -1,6 +1,5 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<!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"> <html xmlns="http://www.w3.org/1999/xhtml">
<head th:replace="common/header :: common_head(~{::title},~{},~{::link},~{})"> <head th:replace="common/header :: common_head(~{::title},~{},~{::link},~{})">
<title th:text="'个人中心_'+${application.website.name}"></title> <title th:text="'个人中心_'+${application.website.name}"></title>
@ -25,12 +24,14 @@
</div> </div>
<div class="my_r"> <div class="my_r">
<div class="my_info cf"> <div class="my_info cf">
<img id="imgLogo" class="user_big_head" src="/images/man.png" /> <img id="imgLogo" class="user_big_head" src="/images/man.png"/>
<div class="my_info_txt"> <div class="my_info_txt">
<p class="my_name" id="my_name"> <p class="my_name" id="my_name">
</p> </p>
<ul class="my_list"> <ul class="my_list">
<li class="my_gold"><i>账户余额:</i><em class="red" id="accountBalance">0</em>屋币<!--<em class="red">+</em><em class="red">0</em>代金券--><a href="/pay/index.html" class="btn_link">立即充值</a></li> <li class="my_gold"><i>账户余额:</i><em class="red" id="accountBalance">0</em>屋币
<!--<em class="red">+</em><em class="red">0</em>代金券--><a href="/pay/index.html"
class="btn_link">立即充值</a></li>
<li class="my_baonian"></li> <li class="my_baonian"></li>
</ul> </ul>
@ -87,12 +88,12 @@
dataType: "json", dataType: "json",
success: function (data) { success: function (data) {
if (data.code == 200) { if (data.code == 200) {
if(data.data.userPhoto){ if (data.data.userPhoto) {
$("#imgLogo").attr("src",data.data.userPhoto); $("#imgLogo").attr("src", data.data.userPhoto);
} }
if(data.data.nickName){ if (data.data.nickName) {
$("#my_name").html(data.data.nickName); $("#my_name").html(data.data.nickName);
}else{ } else {
$("#my_name").html(data.data.username); $("#my_name").html(data.data.username);
} }
@ -100,7 +101,7 @@
} else if (data.code == 1001) { } else if (data.code == 1001) {
//未登录 //未登录
location.href = '/user/login.html?originUrl=' + decodeURIComponent(location.href); location.href = '/user/login.html?originUrl=' + encodeURIComponent(location.href);
} else { } else {
layer.alert(data.msg); layer.alert(data.msg);
@ -115,7 +116,7 @@
$.ajax({ $.ajax({
type: "get", type: "get",
url: "/user/listBookShelfByPage", url: "/user/listBookShelfByPage",
data: {'limit':2}, data: {'limit': 2},
dataType: "json", dataType: "json",
success: function (data) { success: function (data) {
if (data.code == 200) { if (data.code == 200) {
@ -126,7 +127,7 @@
var book = bookShelfList[i]; var book = bookShelfList[i];
bookShelfListHtml += (" <tr class=\"book_list\" vals=\"291\">\n" + bookShelfListHtml += (" <tr class=\"book_list\" vals=\"291\">\n" +
" <td class=\"style bookclass\">\n" + " <td class=\"style bookclass\">\n" +
" <a href=\"/book/bookclass.html?c="+book.catId+"\" >[" + book.catName + "]</a>\n" + " <a href=\"/book/bookclass.html?c=" + book.catId + "\" >[" + book.catName + "]</a>\n" +
" </td>\n" + " </td>\n" +
" <td class=\"name\">\n" + " <td class=\"name\">\n" +
" <a href=\"/book/" + book.bookId + ".html\">\n" + " <a href=\"/book/" + book.bookId + ".html\">\n" +

View File

@ -331,7 +331,7 @@ input::-webkit-input-placeholder, textarea::-webkit-input-placeholder {
} }
.logo { .logo {
width: 198px; width: 160px;
float: left; float: left;
padding: 23px 130px 0 0; padding: 23px 130px 0 0;
display: block display: block

View File

@ -27,15 +27,14 @@
if (layerStatus == 1) { if (layerStatus == 1) {
$("#cFavs").html("<a class=\"ico_shelf\" href=\"javascript:void(0);\"><b>已收藏</b></a>"); $("#cFavs").html("<a class=\"ico_shelf\" href=\"javascript:void(0);\"><b>已收藏</b></a>");
jQuery.cookie("u-faorites", "1"); jQuery.cookie("u-faorites", "1");
} } else {
else {
$("#cFavs").html("<a class=\"btn_ora_white btn_addsj\" href=\"javascript:void(0);\">已在书架</a>"); $("#cFavs").html("<a class=\"btn_ora_white btn_addsj\" href=\"javascript:void(0);\">已在书架</a>");
} }
} else if (data.code == 1001) { } else if (data.code == 1001) {
//未登录 //未登录
location.href = '/user/login.html?originUrl=' + decodeURIComponent(location.href); location.href = '/user/login.html?originUrl=' + encodeURIComponent(location.href);
} else { } else {
layer.alert(data.msg); layer.alert(data.msg);
@ -91,7 +90,7 @@
} }
}, },
SaveComment: function (cmtBId, cmtCId, cmtDetail) { SaveComment: function (cmtBId, cmtCId, cmtDetail) {
if(!isLogin){ if (!isLogin) {
layer.alert('请先登陆'); layer.alert('请先登陆');
return; return;
} }
@ -121,7 +120,7 @@
} else if (data.code == 1001) { } else if (data.code == 1001) {
//未登录 //未登录
location.href = '/user/login.html?originUrl=' + decodeURIComponent(location.href); location.href = '/user/login.html?originUrl=' + encodeURIComponent(location.href);
} else { } else {
layer.alert(data.msg); layer.alert(data.msg);
@ -187,7 +186,7 @@
localStorage.setItem("fonts", fonts); localStorage.setItem("fonts", fonts);
$(".readBox").css("font-size", fonts + "px"); $(".readBox").css("font-size", fonts + "px");
$("#cFonts").html(fonts); $("#cFonts").html(fonts);
$("#ChapterBody").attr("class","article-content font"+fonts); $("#ChapterBody").attr("class", "article-content font" + fonts);
BookDetail.reShowCover(); BookDetail.reShowCover();
}, },
SetBackUpColor: function (colorNum) { SetBackUpColor: function (colorNum) {

View File

@ -1,10 +1,11 @@
var needLoginPath = ['/user/favorites.html','/user/comment.html','/user/feedback.html', var needLoginPath = ['/user/favorites.html', '/user/comment.html', '/user/feedback.html',
'/user/feedback_list.html','/user/read_history.html','/user/set_name.html', '/user/feedback_list.html', '/user/read_history.html', '/user/set_name.html',
'/user/set_password.html','/user/set_sex.html','/user/setup.html','/user/userinfo.html', '/user/set_password.html', '/user/set_sex.html', '/user/setup.html', '/user/userinfo.html',
"/pay/index.html," + "/pay/index.html," +
"/author/register.html","/author/index.html"]; "/author/register.html", "/author/index.html"];
var isLogin = false; var isLogin = false;
var url = window.location.search; var url = window.location.search;
//key(需要检索的键 //key(需要检索的键
function getSearchString(key) { function getSearchString(key) {
var str = url; var str = url;
@ -14,26 +15,28 @@ function getSearchString(key) {
for (var i = 0; i < arr.length; i++) { for (var i = 0; i < arr.length; i++) {
var tmp_arr = arr[i].split("="); var tmp_arr = arr[i].split("=");
if(tmp_arr[0] == key){ if (tmp_arr[0] == key) {
return decodeURIComponent(tmp_arr[1]); return decodeURIComponent(tmp_arr[1]);
} }
} }
return undefined; return undefined;
} }
var keyword = getSearchString("k"); var keyword = getSearchString("k");
if(keyword != undefined) { if (keyword != undefined) {
$("#searchKey").val(keyword); $("#searchKey").val(keyword);
$("#workDirection").remove(); $("#workDirection").remove();
$("#idGirl").remove(); $("#idGirl").remove();
} }
function searchByK(k){ function searchByK(k) {
if(!k){ if (!k) {
window.location.href='/book/bookclass.html?k='+encodeURIComponent(document.getElementById("searchKey").value) window.location.href = '/book/bookclass.html?k=' + encodeURIComponent(document.getElementById("searchKey").value)
}else{ } else {
window.location.href='/book/bookclass.html?k='+encodeURIComponent(k) window.location.href = '/book/bookclass.html?k=' + encodeURIComponent(k)
} }
} }
$("#searchKey").keypress(function (even) { $("#searchKey").keypress(function (even) {
if (even.which == 13) { if (even.which == 13) {
even.stopPropagation(); even.stopPropagation();
@ -50,37 +53,37 @@ Array.prototype.indexOf = function (val) {
var token = $.cookie('Authorization'); var token = $.cookie('Authorization');
if(!token){ if (!token) {
if(needLoginPath.indexOf(window.location.pathname) != -1){ if (needLoginPath.indexOf(window.location.pathname) != -1) {
location.href = '/user/login.html?originUrl='+decodeURIComponent(location.href); location.href = '/user/login.html?originUrl=' + encodeURIComponent(location.href);
} }
$(".user_link").html("<i class=\"line mr20\">|</i><a href=\"/user/login.html\" class=\"mr15\">登录</a><a href=\"/user/register.html\" >注册</a>"); $(".user_link").html("<i class=\"line mr20\">|</i><a href=\"/user/login.html\" class=\"mr15\">登录</a><a href=\"/user/register.html\" >注册</a>");
}else{ } else {
$.ajax({ $.ajax({
type: "POST", type: "POST",
url: "/user/refreshToken", url: "/user/refreshToken",
data: {}, data: {},
dataType: "json", dataType: "json",
success: function(data){ success: function (data) {
if(data.code == 200){ if (data.code == 200) {
$(".user_link").html("<i class=\"line mr20\">|</i>" + $(".user_link").html("<i class=\"line mr20\">|</i>" +
"<a href=\"/user/userinfo.html\" class=\"mr15\">"+data.data.nickName+"</a>" + "<a href=\"/user/userinfo.html\" class=\"mr15\">" + data.data.nickName + "</a>" +
"<a href=\"javascript:logout()\" >退出</a>"); "<a href=\"javascript:logout()\" >退出</a>");
; ;
if("/user/login.html" == window.location.pathname){ if ("/user/login.html" == window.location.pathname) {
var orginUrl = getSearchString("originUrl"); var orginUrl = getSearchString("originUrl");
window.location.href = orginUrl == undefined || orginUrl.isBlank() ? "/" : orginUrl; window.location.href = orginUrl == undefined || orginUrl.isBlank() ? "/" : orginUrl;
return; return;
} }
isLogin = true; isLogin = true;
if(localStorage.getItem("autoLogin") == 1){ if (localStorage.getItem("autoLogin") == 1) {
$.cookie('Authorization', data.data.token, { expires: 7 ,path: '/' }); $.cookie('Authorization', data.data.token, {expires: 7, path: '/'});
}else { } else {
$.cookie('Authorization', data.data.token,{ path: '/' }); $.cookie('Authorization', data.data.token, {path: '/'});
} }
}else{ } else {
if(needLoginPath.indexOf(window.location.pathname) != -1){ if (needLoginPath.indexOf(window.location.pathname) != -1) {
location.href = '/user/login.html'; location.href = '/user/login.html';
} }
$(".user_link").html("<i class=\"line mr20\">|</i><a href=\"/user/login.html\" class=\"mr15\">登录</a><a href=\"/user/register.html\" >注册</a>"); $(".user_link").html("<i class=\"line mr20\">|</i><a href=\"/user/login.html\" class=\"mr15\">登录</a><a href=\"/user/register.html\" >注册</a>");
@ -94,7 +97,6 @@ if(!token){
} }
String.prototype.isPhone = function () { String.prototype.isPhone = function () {
var strTemp = /^1[3|4|5|6|7|8|9][0-9]{9}$/; var strTemp = /^1[3|4|5|6|7|8|9][0-9]{9}$/;
if (strTemp.test(this)) { if (strTemp.test(this)) {
@ -104,7 +106,7 @@ String.prototype.isPhone = function () {
}; };
String.prototype.isBlank = function () { String.prototype.isBlank = function () {
if(this == null || $.trim(this) == ""){ if (this == null || $.trim(this) == "") {
return true; return true;
} }
return false; return false;
@ -118,11 +120,8 @@ String.prototype.isNickName = function () {
}; };
function logout() { function logout() {
$.cookie('Authorization', null,{ path: '/' }); $.cookie('Authorization', null, {path: '/'});
location.reload(); location.reload();
} }
@ -133,9 +132,9 @@ function isImg(str) {
//校验图片上传 //校验图片上传
function checkPicUpload(file){ function checkPicUpload(file) {
if(!isImg(file.value.substr(file.value.lastIndexOf(".")))){ if (!isImg(file.value.substr(file.value.lastIndexOf(".")))) {
layer.alert('只能上传图片格式的文件'); layer.alert('只能上传图片格式的文件');
return false; return false;
} }
@ -144,13 +143,13 @@ function checkPicUpload(file){
if (isIE && !file.files) { if (isIE && !file.files) {
var filePath = file.value; var filePath = file.value;
var fileSystem = new ActiveXObject("Scripting.FileSystemfileect"); var fileSystem = new ActiveXObject("Scripting.FileSystemfileect");
var file = fileSystem.GetFile (filePath); var file = fileSystem.GetFile(filePath);
fileSize = file.Size; fileSize = file.Size;
}else { } else {
fileSize = file.files[0].size; fileSize = file.files[0].size;
} }
fileSize=Math.round(fileSize/1024*100)/100; //单位为KB fileSize = Math.round(fileSize / 1024 * 100) / 100; //单位为KB
if(fileSize>=1024){ if (fileSize >= 1024) {
layer.alert('上传的图片大小不能超过1M'); layer.alert('上传的图片大小不能超过1M');
return false; return false;
} }

View File

@ -106,10 +106,10 @@ Array.prototype.remove = function (val) {
var token = $.cookie('Authorization'); var token = $.cookie('Authorization');
if (!token) { if (!token) {
if (needLoginPath.indexOf(window.location.pathname) != -1) { if (needLoginPath.indexOf(window.location.pathname) != -1) {
location.href = '/user/login.html?originUrl=' + decodeURIComponent(location.href); location.href = '/user/login.html?originUrl=' + encodeURIComponent(location.href);
} }
$(".user_link").html("<a href=\"/user/login.html\">登录</a><a href=\"/user/register.html\">注册</a>"); // $(".user_link").html("<a href=\"/user/login.html\">登录</a><a href=\"/user/register.html\">注册</a>");
} else { } else {
$.ajax({ $.ajax({
type: "POST", type: "POST",
@ -118,10 +118,10 @@ if (!token) {
dataType: "json", dataType: "json",
success: function (data) { success: function (data) {
if (data.code == 200) { if (data.code == 200) {
$(".user_link").html("<a href=\"/user/userinfo.html\"><i style=\"font-size: 20px;\" class=\"layui-icon \n" + // $(".user_link").html("<a href=\"/user/userinfo.html\"><i style=\"font-size: 20px;\" class=\"layui-icon \n" +
"\">&#xe66f;" + // "\">&#xe66f;" +
"\n" + // "\n" +
"</i></a>"); // "</i></a>");
if ("/user/login.html" == window.location.pathname) { if ("/user/login.html" == window.location.pathname) {
var orginUrl = getSearchString("originUrl"); var orginUrl = getSearchString("originUrl");
window.location.href = orginUrl == undefined || orginUrl.isBlank() ? "/" : orginUrl; window.location.href = orginUrl == undefined || orginUrl.isBlank() ? "/" : orginUrl;
@ -137,7 +137,7 @@ if (!token) {
if (needLoginPath.indexOf(window.location.pathname) != -1) { if (needLoginPath.indexOf(window.location.pathname) != -1) {
location.href = '/user/login.html'; location.href = '/user/login.html';
} }
$(".user_link").html("<a href=\"/user/login.html\">登录</a><a href=\"/user/register.html\">注册</a>"); // $(".user_link").html("<a href=\"/user/login.html\">登录</a><a href=\"/user/register.html\">注册</a>");
} }
}, },
error: function () { error: function () {

File diff suppressed because it is too large Load Diff