├── .gitattributes ├── src ├── main │ ├── webapp │ │ ├── images │ │ │ ├── close.png │ │ │ ├── code.jpg │ │ │ ├── face.jpg │ │ │ ├── fly.png │ │ │ ├── git.png │ │ │ ├── layui.png │ │ │ ├── mayun.png │ │ │ ├── alipay.jpg │ │ │ ├── favicon.ico │ │ │ ├── genre │ │ │ │ ├── 2.jpg │ │ │ │ └── 3.jpg │ │ │ ├── lunbo │ │ │ │ ├── 1.jpg │ │ │ │ ├── 2.jpg │ │ │ │ ├── 3.jpg │ │ │ │ ├── 4.jpg │ │ │ │ └── 5.jpg │ │ │ ├── site │ │ │ │ ├── ma.png │ │ │ │ ├── 7day.png │ │ │ │ ├── end.png │ │ │ │ ├── face.jpg │ │ │ │ ├── guoji.png │ │ │ │ ├── logo.gif │ │ │ │ ├── alipay.png │ │ │ │ ├── buyflow.png │ │ │ │ ├── canvas.png │ │ │ │ ├── catear.png │ │ │ │ ├── cateye.png │ │ │ │ ├── chaoshi.png │ │ │ │ ├── ensure.png │ │ │ │ ├── li_dot.png │ │ │ │ ├── promise.png │ │ │ │ ├── star │ │ │ │ │ └── 5.png │ │ │ │ ├── warning.png │ │ │ │ ├── alipay2wei.png │ │ │ │ ├── copyRight1.jpg │ │ │ │ ├── copyRight2.jpg │ │ │ │ ├── creditcard.png │ │ │ │ ├── decrease.png │ │ │ │ ├── gouwujuan.png │ │ │ │ ├── increase.png │ │ │ │ ├── paySuccess.png │ │ │ │ ├── renzheng.png │ │ │ │ ├── simpleLogo.png │ │ │ │ ├── tmallbuy.png │ │ │ │ ├── wangwang.gif │ │ │ │ ├── wangwang.png │ │ │ │ ├── cartSelected.png │ │ │ │ ├── eachcategory.png │ │ │ │ ├── leaveMessage.png │ │ │ │ ├── orderFinish.png │ │ │ │ ├── reviewLight.png │ │ │ │ ├── cartNotSelected.png │ │ │ │ ├── comformPayFlow.png │ │ │ │ ├── loginBackground.png │ │ │ │ ├── orderItemTmall.png │ │ │ │ ├── priceBackground.png │ │ │ │ ├── registerSuccess.png │ │ │ │ ├── confirmOrderTmall.png │ │ │ │ └── TB1LF0CKFXXXXcAXFXXXXXXXXXX-21-20.png │ │ │ ├── wechat.jpg │ │ │ ├── login_bg.jpg │ │ │ ├── userface1.jpg │ │ │ ├── userface2.jpg │ │ │ ├── userface3.jpg │ │ │ ├── userface4.jpg │ │ │ └── userface5.jpg │ │ ├── layui │ │ │ ├── font │ │ │ │ ├── iconfont.eot │ │ │ │ ├── iconfont.ttf │ │ │ │ └── iconfont.woff │ │ │ ├── images │ │ │ │ └── face │ │ │ │ │ ├── 0.gif │ │ │ │ │ ├── 1.gif │ │ │ │ │ ├── 2.gif │ │ │ │ │ ├── 3.gif │ │ │ │ │ ├── 4.gif │ │ │ │ │ ├── 5.gif │ │ │ │ │ ├── 6.gif │ │ │ │ │ ├── 7.gif │ │ │ │ │ ├── 8.gif │ │ │ │ │ ├── 9.gif │ │ │ │ │ ├── 10.gif │ │ │ │ │ ├── 11.gif │ │ │ │ │ ├── 12.gif │ │ │ │ │ ├── 13.gif │ │ │ │ │ ├── 14.gif │ │ │ │ │ ├── 15.gif │ │ │ │ │ ├── 16.gif │ │ │ │ │ ├── 17.gif │ │ │ │ │ ├── 18.gif │ │ │ │ │ ├── 19.gif │ │ │ │ │ ├── 20.gif │ │ │ │ │ ├── 21.gif │ │ │ │ │ ├── 22.gif │ │ │ │ │ ├── 23.gif │ │ │ │ │ ├── 24.gif │ │ │ │ │ ├── 25.gif │ │ │ │ │ ├── 26.gif │ │ │ │ │ ├── 27.gif │ │ │ │ │ ├── 28.gif │ │ │ │ │ ├── 29.gif │ │ │ │ │ ├── 30.gif │ │ │ │ │ ├── 31.gif │ │ │ │ │ ├── 32.gif │ │ │ │ │ ├── 33.gif │ │ │ │ │ ├── 34.gif │ │ │ │ │ ├── 35.gif │ │ │ │ │ ├── 36.gif │ │ │ │ │ ├── 37.gif │ │ │ │ │ ├── 38.gif │ │ │ │ │ ├── 39.gif │ │ │ │ │ ├── 40.gif │ │ │ │ │ ├── 41.gif │ │ │ │ │ ├── 42.gif │ │ │ │ │ ├── 43.gif │ │ │ │ │ ├── 44.gif │ │ │ │ │ ├── 45.gif │ │ │ │ │ ├── 46.gif │ │ │ │ │ ├── 47.gif │ │ │ │ │ ├── 48.gif │ │ │ │ │ ├── 49.gif │ │ │ │ │ ├── 50.gif │ │ │ │ │ ├── 51.gif │ │ │ │ │ ├── 52.gif │ │ │ │ │ ├── 53.gif │ │ │ │ │ ├── 54.gif │ │ │ │ │ ├── 55.gif │ │ │ │ │ ├── 56.gif │ │ │ │ │ ├── 57.gif │ │ │ │ │ ├── 58.gif │ │ │ │ │ ├── 59.gif │ │ │ │ │ ├── 60.gif │ │ │ │ │ ├── 61.gif │ │ │ │ │ ├── 62.gif │ │ │ │ │ ├── 63.gif │ │ │ │ │ ├── 64.gif │ │ │ │ │ ├── 65.gif │ │ │ │ │ ├── 66.gif │ │ │ │ │ ├── 67.gif │ │ │ │ │ ├── 68.gif │ │ │ │ │ ├── 69.gif │ │ │ │ │ ├── 70.gif │ │ │ │ │ └── 71.gif │ │ │ ├── css │ │ │ │ └── modules │ │ │ │ │ ├── layer │ │ │ │ │ └── default │ │ │ │ │ │ ├── icon.png │ │ │ │ │ │ ├── icon-ext.png │ │ │ │ │ │ ├── loading-0.gif │ │ │ │ │ │ ├── loading-1.gif │ │ │ │ │ │ └── loading-2.gif │ │ │ │ │ └── code.css │ │ │ └── lay │ │ │ │ └── modules │ │ │ │ ├── code.js │ │ │ │ ├── laytpl.js │ │ │ │ ├── flow.js │ │ │ │ ├── util.js │ │ │ │ ├── tree.js │ │ │ │ ├── carousel.js │ │ │ │ └── laypage.js │ │ ├── json │ │ │ ├── newsImg.json │ │ │ ├── linkLogo.json │ │ │ ├── userface.json │ │ │ ├── systemParameter.json │ │ │ ├── userList.json │ │ │ ├── linkList.json │ │ │ ├── userGrade.json │ │ │ ├── navs.json │ │ │ └── logs.json │ │ ├── css │ │ │ ├── bootstrap │ │ │ │ └── fonts │ │ │ │ │ ├── glyphicons-halflings-regular.eot │ │ │ │ │ ├── glyphicons-halflings-regular.ttf │ │ │ │ │ ├── glyphicons-halflings-regular.woff │ │ │ │ │ └── glyphicons-halflings-regular.woff2 │ │ │ └── back │ │ │ │ └── style.css │ │ ├── js │ │ │ ├── bootstrap │ │ │ │ └── 3.3.6 │ │ │ │ │ └── npm.js │ │ │ ├── address.js │ │ │ ├── cacheUserInfo.js │ │ │ └── main.js │ │ ├── page │ │ │ ├── systemSetting │ │ │ │ ├── logs.html │ │ │ │ ├── icons.js │ │ │ │ ├── icons.html │ │ │ │ ├── linkList.html │ │ │ │ ├── logs.js │ │ │ │ ├── linksAdd.html │ │ │ │ ├── basicParameter.js │ │ │ │ └── basicParameter.html │ │ │ ├── 404.html │ │ │ ├── login │ │ │ │ ├── login.js │ │ │ │ └── login.html │ │ │ ├── img │ │ │ │ └── images.html │ │ │ ├── user │ │ │ │ ├── userAdd.js │ │ │ │ ├── userList.html │ │ │ │ ├── userGrade.html │ │ │ │ ├── changePwd.html │ │ │ │ ├── userInfo.js │ │ │ │ └── userAdd.html │ │ │ ├── news │ │ │ │ ├── newsList.html │ │ │ │ ├── genreList.html │ │ │ │ ├── genreAdd.js │ │ │ │ └── newsAdd.js │ │ │ ├── doc │ │ │ │ ├── navDoc.html │ │ │ │ └── addressDoc.html │ │ │ └── main.html │ │ ├── LICENSE │ │ └── README.md │ ├── resources │ │ ├── application.properties │ │ └── templates │ │ │ ├── admin │ │ │ ├── chapterEdit.html │ │ │ ├── index.html │ │ │ ├── adminEdit.html │ │ │ ├── genreEdit.html │ │ │ ├── readerEdit.html │ │ │ ├── novelEdit.html │ │ │ ├── adminList.html │ │ │ └── readerList.html │ │ │ └── include │ │ │ └── admin │ │ │ ├── adminFooter.html │ │ │ ├── adminNavigator.html │ │ │ ├── adminPage.html │ │ │ └── adminHeader.html │ └── java │ │ └── com │ │ └── zhujinghui │ │ └── novel │ │ ├── enum │ │ └── NovelEnum.kt │ │ ├── dao │ │ ├── GenreDAO.java │ │ ├── ReaderDAO.java │ │ ├── AdminDAO.java │ │ ├── AuthorDAO.java │ │ ├── NovelDAO.java │ │ └── ChapterDAO.java │ │ ├── Application.java │ │ ├── controller │ │ ├── AuthorController.java │ │ ├── AdminController.java │ │ ├── ReaderController.java │ │ ├── ChapterController.java │ │ ├── NovelController.java │ │ ├── AdminPageController.java │ │ └── GenreController.java │ │ ├── configuration │ │ └── CORSConfiguration.java │ │ ├── exception │ │ └── GloabalExceptionHandler.java │ │ ├── service │ │ ├── NovelService.java │ │ ├── ChapterService.java │ │ ├── GenreService.java │ │ ├── ReaderService.java │ │ ├── AdminService.java │ │ └── AuthorService.java │ │ ├── pojo │ │ ├── Genre.java │ │ └── Chapter.java │ │ └── util │ │ └── ImageUtil.java └── test │ └── java │ └── com │ └── zhujinghui │ └── novel │ └── NovelApplicationTests.java └── .gitignore /.gitattributes: -------------------------------------------------------------------------------- 1 | *.js linguist-language=java 2 | *.css linguist-language=java 3 | *.html linguist-language=java 4 | -------------------------------------------------------------------------------- /src/main/webapp/images/close.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zjh123456789/novel/HEAD/src/main/webapp/images/close.png -------------------------------------------------------------------------------- /src/main/webapp/images/code.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zjh123456789/novel/HEAD/src/main/webapp/images/code.jpg -------------------------------------------------------------------------------- /src/main/webapp/images/face.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zjh123456789/novel/HEAD/src/main/webapp/images/face.jpg -------------------------------------------------------------------------------- /src/main/webapp/images/fly.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zjh123456789/novel/HEAD/src/main/webapp/images/fly.png -------------------------------------------------------------------------------- /src/main/webapp/images/git.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zjh123456789/novel/HEAD/src/main/webapp/images/git.png -------------------------------------------------------------------------------- /src/main/webapp/images/layui.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zjh123456789/novel/HEAD/src/main/webapp/images/layui.png -------------------------------------------------------------------------------- /src/main/webapp/images/mayun.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zjh123456789/novel/HEAD/src/main/webapp/images/mayun.png -------------------------------------------------------------------------------- /src/main/webapp/images/alipay.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zjh123456789/novel/HEAD/src/main/webapp/images/alipay.jpg -------------------------------------------------------------------------------- /src/main/webapp/images/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zjh123456789/novel/HEAD/src/main/webapp/images/favicon.ico -------------------------------------------------------------------------------- /src/main/webapp/images/genre/2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zjh123456789/novel/HEAD/src/main/webapp/images/genre/2.jpg -------------------------------------------------------------------------------- /src/main/webapp/images/genre/3.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zjh123456789/novel/HEAD/src/main/webapp/images/genre/3.jpg -------------------------------------------------------------------------------- /src/main/webapp/images/lunbo/1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zjh123456789/novel/HEAD/src/main/webapp/images/lunbo/1.jpg -------------------------------------------------------------------------------- /src/main/webapp/images/lunbo/2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zjh123456789/novel/HEAD/src/main/webapp/images/lunbo/2.jpg -------------------------------------------------------------------------------- /src/main/webapp/images/lunbo/3.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zjh123456789/novel/HEAD/src/main/webapp/images/lunbo/3.jpg -------------------------------------------------------------------------------- /src/main/webapp/images/lunbo/4.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zjh123456789/novel/HEAD/src/main/webapp/images/lunbo/4.jpg -------------------------------------------------------------------------------- /src/main/webapp/images/lunbo/5.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zjh123456789/novel/HEAD/src/main/webapp/images/lunbo/5.jpg -------------------------------------------------------------------------------- /src/main/webapp/images/site/ma.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zjh123456789/novel/HEAD/src/main/webapp/images/site/ma.png -------------------------------------------------------------------------------- /src/main/webapp/images/wechat.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zjh123456789/novel/HEAD/src/main/webapp/images/wechat.jpg -------------------------------------------------------------------------------- /src/main/webapp/images/login_bg.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zjh123456789/novel/HEAD/src/main/webapp/images/login_bg.jpg -------------------------------------------------------------------------------- /src/main/webapp/images/site/7day.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zjh123456789/novel/HEAD/src/main/webapp/images/site/7day.png -------------------------------------------------------------------------------- /src/main/webapp/images/site/end.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zjh123456789/novel/HEAD/src/main/webapp/images/site/end.png -------------------------------------------------------------------------------- /src/main/webapp/images/site/face.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zjh123456789/novel/HEAD/src/main/webapp/images/site/face.jpg -------------------------------------------------------------------------------- /src/main/webapp/images/site/guoji.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zjh123456789/novel/HEAD/src/main/webapp/images/site/guoji.png -------------------------------------------------------------------------------- /src/main/webapp/images/site/logo.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zjh123456789/novel/HEAD/src/main/webapp/images/site/logo.gif -------------------------------------------------------------------------------- /src/main/webapp/images/userface1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zjh123456789/novel/HEAD/src/main/webapp/images/userface1.jpg -------------------------------------------------------------------------------- /src/main/webapp/images/userface2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zjh123456789/novel/HEAD/src/main/webapp/images/userface2.jpg -------------------------------------------------------------------------------- /src/main/webapp/images/userface3.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zjh123456789/novel/HEAD/src/main/webapp/images/userface3.jpg -------------------------------------------------------------------------------- /src/main/webapp/images/userface4.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zjh123456789/novel/HEAD/src/main/webapp/images/userface4.jpg -------------------------------------------------------------------------------- /src/main/webapp/images/userface5.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zjh123456789/novel/HEAD/src/main/webapp/images/userface5.jpg -------------------------------------------------------------------------------- /src/main/webapp/images/site/alipay.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zjh123456789/novel/HEAD/src/main/webapp/images/site/alipay.png -------------------------------------------------------------------------------- /src/main/webapp/images/site/buyflow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zjh123456789/novel/HEAD/src/main/webapp/images/site/buyflow.png -------------------------------------------------------------------------------- /src/main/webapp/images/site/canvas.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zjh123456789/novel/HEAD/src/main/webapp/images/site/canvas.png -------------------------------------------------------------------------------- /src/main/webapp/images/site/catear.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zjh123456789/novel/HEAD/src/main/webapp/images/site/catear.png -------------------------------------------------------------------------------- /src/main/webapp/images/site/cateye.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zjh123456789/novel/HEAD/src/main/webapp/images/site/cateye.png -------------------------------------------------------------------------------- /src/main/webapp/images/site/chaoshi.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zjh123456789/novel/HEAD/src/main/webapp/images/site/chaoshi.png -------------------------------------------------------------------------------- /src/main/webapp/images/site/ensure.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zjh123456789/novel/HEAD/src/main/webapp/images/site/ensure.png -------------------------------------------------------------------------------- /src/main/webapp/images/site/li_dot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zjh123456789/novel/HEAD/src/main/webapp/images/site/li_dot.png -------------------------------------------------------------------------------- /src/main/webapp/images/site/promise.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zjh123456789/novel/HEAD/src/main/webapp/images/site/promise.png -------------------------------------------------------------------------------- /src/main/webapp/images/site/star/5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zjh123456789/novel/HEAD/src/main/webapp/images/site/star/5.png -------------------------------------------------------------------------------- /src/main/webapp/images/site/warning.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zjh123456789/novel/HEAD/src/main/webapp/images/site/warning.png -------------------------------------------------------------------------------- /src/main/webapp/layui/font/iconfont.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zjh123456789/novel/HEAD/src/main/webapp/layui/font/iconfont.eot -------------------------------------------------------------------------------- /src/main/webapp/layui/font/iconfont.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zjh123456789/novel/HEAD/src/main/webapp/layui/font/iconfont.ttf -------------------------------------------------------------------------------- /src/main/webapp/layui/images/face/0.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zjh123456789/novel/HEAD/src/main/webapp/layui/images/face/0.gif -------------------------------------------------------------------------------- /src/main/webapp/layui/images/face/1.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zjh123456789/novel/HEAD/src/main/webapp/layui/images/face/1.gif -------------------------------------------------------------------------------- /src/main/webapp/layui/images/face/2.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zjh123456789/novel/HEAD/src/main/webapp/layui/images/face/2.gif -------------------------------------------------------------------------------- /src/main/webapp/layui/images/face/3.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zjh123456789/novel/HEAD/src/main/webapp/layui/images/face/3.gif -------------------------------------------------------------------------------- /src/main/webapp/layui/images/face/4.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zjh123456789/novel/HEAD/src/main/webapp/layui/images/face/4.gif -------------------------------------------------------------------------------- /src/main/webapp/layui/images/face/5.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zjh123456789/novel/HEAD/src/main/webapp/layui/images/face/5.gif -------------------------------------------------------------------------------- /src/main/webapp/layui/images/face/6.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zjh123456789/novel/HEAD/src/main/webapp/layui/images/face/6.gif -------------------------------------------------------------------------------- /src/main/webapp/layui/images/face/7.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zjh123456789/novel/HEAD/src/main/webapp/layui/images/face/7.gif -------------------------------------------------------------------------------- /src/main/webapp/layui/images/face/8.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zjh123456789/novel/HEAD/src/main/webapp/layui/images/face/8.gif -------------------------------------------------------------------------------- /src/main/webapp/layui/images/face/9.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zjh123456789/novel/HEAD/src/main/webapp/layui/images/face/9.gif -------------------------------------------------------------------------------- /src/main/resources/application.properties: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zjh123456789/novel/HEAD/src/main/resources/application.properties -------------------------------------------------------------------------------- /src/main/webapp/images/site/alipay2wei.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zjh123456789/novel/HEAD/src/main/webapp/images/site/alipay2wei.png -------------------------------------------------------------------------------- /src/main/webapp/images/site/copyRight1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zjh123456789/novel/HEAD/src/main/webapp/images/site/copyRight1.jpg -------------------------------------------------------------------------------- /src/main/webapp/images/site/copyRight2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zjh123456789/novel/HEAD/src/main/webapp/images/site/copyRight2.jpg -------------------------------------------------------------------------------- /src/main/webapp/images/site/creditcard.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zjh123456789/novel/HEAD/src/main/webapp/images/site/creditcard.png -------------------------------------------------------------------------------- /src/main/webapp/images/site/decrease.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zjh123456789/novel/HEAD/src/main/webapp/images/site/decrease.png -------------------------------------------------------------------------------- /src/main/webapp/images/site/gouwujuan.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zjh123456789/novel/HEAD/src/main/webapp/images/site/gouwujuan.png -------------------------------------------------------------------------------- /src/main/webapp/images/site/increase.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zjh123456789/novel/HEAD/src/main/webapp/images/site/increase.png -------------------------------------------------------------------------------- /src/main/webapp/images/site/paySuccess.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zjh123456789/novel/HEAD/src/main/webapp/images/site/paySuccess.png -------------------------------------------------------------------------------- /src/main/webapp/images/site/renzheng.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zjh123456789/novel/HEAD/src/main/webapp/images/site/renzheng.png -------------------------------------------------------------------------------- /src/main/webapp/images/site/simpleLogo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zjh123456789/novel/HEAD/src/main/webapp/images/site/simpleLogo.png -------------------------------------------------------------------------------- /src/main/webapp/images/site/tmallbuy.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zjh123456789/novel/HEAD/src/main/webapp/images/site/tmallbuy.png -------------------------------------------------------------------------------- /src/main/webapp/images/site/wangwang.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zjh123456789/novel/HEAD/src/main/webapp/images/site/wangwang.gif -------------------------------------------------------------------------------- /src/main/webapp/images/site/wangwang.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zjh123456789/novel/HEAD/src/main/webapp/images/site/wangwang.png -------------------------------------------------------------------------------- /src/main/webapp/layui/font/iconfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zjh123456789/novel/HEAD/src/main/webapp/layui/font/iconfont.woff -------------------------------------------------------------------------------- /src/main/webapp/layui/images/face/10.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zjh123456789/novel/HEAD/src/main/webapp/layui/images/face/10.gif -------------------------------------------------------------------------------- /src/main/webapp/layui/images/face/11.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zjh123456789/novel/HEAD/src/main/webapp/layui/images/face/11.gif -------------------------------------------------------------------------------- /src/main/webapp/layui/images/face/12.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zjh123456789/novel/HEAD/src/main/webapp/layui/images/face/12.gif -------------------------------------------------------------------------------- /src/main/webapp/layui/images/face/13.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zjh123456789/novel/HEAD/src/main/webapp/layui/images/face/13.gif -------------------------------------------------------------------------------- /src/main/webapp/layui/images/face/14.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zjh123456789/novel/HEAD/src/main/webapp/layui/images/face/14.gif -------------------------------------------------------------------------------- /src/main/webapp/layui/images/face/15.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zjh123456789/novel/HEAD/src/main/webapp/layui/images/face/15.gif -------------------------------------------------------------------------------- /src/main/webapp/layui/images/face/16.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zjh123456789/novel/HEAD/src/main/webapp/layui/images/face/16.gif -------------------------------------------------------------------------------- /src/main/webapp/layui/images/face/17.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zjh123456789/novel/HEAD/src/main/webapp/layui/images/face/17.gif -------------------------------------------------------------------------------- /src/main/webapp/layui/images/face/18.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zjh123456789/novel/HEAD/src/main/webapp/layui/images/face/18.gif -------------------------------------------------------------------------------- /src/main/webapp/layui/images/face/19.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zjh123456789/novel/HEAD/src/main/webapp/layui/images/face/19.gif -------------------------------------------------------------------------------- /src/main/webapp/layui/images/face/20.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zjh123456789/novel/HEAD/src/main/webapp/layui/images/face/20.gif -------------------------------------------------------------------------------- /src/main/webapp/layui/images/face/21.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zjh123456789/novel/HEAD/src/main/webapp/layui/images/face/21.gif -------------------------------------------------------------------------------- /src/main/webapp/layui/images/face/22.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zjh123456789/novel/HEAD/src/main/webapp/layui/images/face/22.gif -------------------------------------------------------------------------------- /src/main/webapp/layui/images/face/23.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zjh123456789/novel/HEAD/src/main/webapp/layui/images/face/23.gif -------------------------------------------------------------------------------- /src/main/webapp/layui/images/face/24.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zjh123456789/novel/HEAD/src/main/webapp/layui/images/face/24.gif -------------------------------------------------------------------------------- /src/main/webapp/layui/images/face/25.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zjh123456789/novel/HEAD/src/main/webapp/layui/images/face/25.gif -------------------------------------------------------------------------------- /src/main/webapp/layui/images/face/26.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zjh123456789/novel/HEAD/src/main/webapp/layui/images/face/26.gif -------------------------------------------------------------------------------- /src/main/webapp/layui/images/face/27.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zjh123456789/novel/HEAD/src/main/webapp/layui/images/face/27.gif -------------------------------------------------------------------------------- /src/main/webapp/layui/images/face/28.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zjh123456789/novel/HEAD/src/main/webapp/layui/images/face/28.gif -------------------------------------------------------------------------------- /src/main/webapp/layui/images/face/29.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zjh123456789/novel/HEAD/src/main/webapp/layui/images/face/29.gif -------------------------------------------------------------------------------- /src/main/webapp/layui/images/face/30.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zjh123456789/novel/HEAD/src/main/webapp/layui/images/face/30.gif -------------------------------------------------------------------------------- /src/main/webapp/layui/images/face/31.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zjh123456789/novel/HEAD/src/main/webapp/layui/images/face/31.gif -------------------------------------------------------------------------------- /src/main/webapp/layui/images/face/32.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zjh123456789/novel/HEAD/src/main/webapp/layui/images/face/32.gif -------------------------------------------------------------------------------- /src/main/webapp/layui/images/face/33.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zjh123456789/novel/HEAD/src/main/webapp/layui/images/face/33.gif -------------------------------------------------------------------------------- /src/main/webapp/layui/images/face/34.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zjh123456789/novel/HEAD/src/main/webapp/layui/images/face/34.gif -------------------------------------------------------------------------------- /src/main/webapp/layui/images/face/35.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zjh123456789/novel/HEAD/src/main/webapp/layui/images/face/35.gif -------------------------------------------------------------------------------- /src/main/webapp/layui/images/face/36.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zjh123456789/novel/HEAD/src/main/webapp/layui/images/face/36.gif -------------------------------------------------------------------------------- /src/main/webapp/layui/images/face/37.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zjh123456789/novel/HEAD/src/main/webapp/layui/images/face/37.gif -------------------------------------------------------------------------------- /src/main/webapp/layui/images/face/38.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zjh123456789/novel/HEAD/src/main/webapp/layui/images/face/38.gif -------------------------------------------------------------------------------- /src/main/webapp/layui/images/face/39.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zjh123456789/novel/HEAD/src/main/webapp/layui/images/face/39.gif -------------------------------------------------------------------------------- /src/main/webapp/layui/images/face/40.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zjh123456789/novel/HEAD/src/main/webapp/layui/images/face/40.gif -------------------------------------------------------------------------------- /src/main/webapp/layui/images/face/41.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zjh123456789/novel/HEAD/src/main/webapp/layui/images/face/41.gif -------------------------------------------------------------------------------- /src/main/webapp/layui/images/face/42.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zjh123456789/novel/HEAD/src/main/webapp/layui/images/face/42.gif -------------------------------------------------------------------------------- /src/main/webapp/layui/images/face/43.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zjh123456789/novel/HEAD/src/main/webapp/layui/images/face/43.gif -------------------------------------------------------------------------------- /src/main/webapp/layui/images/face/44.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zjh123456789/novel/HEAD/src/main/webapp/layui/images/face/44.gif -------------------------------------------------------------------------------- /src/main/webapp/layui/images/face/45.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zjh123456789/novel/HEAD/src/main/webapp/layui/images/face/45.gif -------------------------------------------------------------------------------- /src/main/webapp/layui/images/face/46.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zjh123456789/novel/HEAD/src/main/webapp/layui/images/face/46.gif -------------------------------------------------------------------------------- /src/main/webapp/layui/images/face/47.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zjh123456789/novel/HEAD/src/main/webapp/layui/images/face/47.gif -------------------------------------------------------------------------------- /src/main/webapp/layui/images/face/48.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zjh123456789/novel/HEAD/src/main/webapp/layui/images/face/48.gif -------------------------------------------------------------------------------- /src/main/webapp/layui/images/face/49.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zjh123456789/novel/HEAD/src/main/webapp/layui/images/face/49.gif -------------------------------------------------------------------------------- /src/main/webapp/layui/images/face/50.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zjh123456789/novel/HEAD/src/main/webapp/layui/images/face/50.gif -------------------------------------------------------------------------------- /src/main/webapp/layui/images/face/51.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zjh123456789/novel/HEAD/src/main/webapp/layui/images/face/51.gif -------------------------------------------------------------------------------- /src/main/webapp/layui/images/face/52.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zjh123456789/novel/HEAD/src/main/webapp/layui/images/face/52.gif -------------------------------------------------------------------------------- /src/main/webapp/layui/images/face/53.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zjh123456789/novel/HEAD/src/main/webapp/layui/images/face/53.gif -------------------------------------------------------------------------------- /src/main/webapp/layui/images/face/54.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zjh123456789/novel/HEAD/src/main/webapp/layui/images/face/54.gif -------------------------------------------------------------------------------- /src/main/webapp/layui/images/face/55.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zjh123456789/novel/HEAD/src/main/webapp/layui/images/face/55.gif -------------------------------------------------------------------------------- /src/main/webapp/layui/images/face/56.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zjh123456789/novel/HEAD/src/main/webapp/layui/images/face/56.gif -------------------------------------------------------------------------------- /src/main/webapp/layui/images/face/57.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zjh123456789/novel/HEAD/src/main/webapp/layui/images/face/57.gif -------------------------------------------------------------------------------- /src/main/webapp/layui/images/face/58.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zjh123456789/novel/HEAD/src/main/webapp/layui/images/face/58.gif -------------------------------------------------------------------------------- /src/main/webapp/layui/images/face/59.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zjh123456789/novel/HEAD/src/main/webapp/layui/images/face/59.gif -------------------------------------------------------------------------------- /src/main/webapp/layui/images/face/60.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zjh123456789/novel/HEAD/src/main/webapp/layui/images/face/60.gif -------------------------------------------------------------------------------- /src/main/webapp/layui/images/face/61.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zjh123456789/novel/HEAD/src/main/webapp/layui/images/face/61.gif -------------------------------------------------------------------------------- /src/main/webapp/layui/images/face/62.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zjh123456789/novel/HEAD/src/main/webapp/layui/images/face/62.gif -------------------------------------------------------------------------------- /src/main/webapp/layui/images/face/63.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zjh123456789/novel/HEAD/src/main/webapp/layui/images/face/63.gif -------------------------------------------------------------------------------- /src/main/webapp/layui/images/face/64.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zjh123456789/novel/HEAD/src/main/webapp/layui/images/face/64.gif -------------------------------------------------------------------------------- /src/main/webapp/layui/images/face/65.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zjh123456789/novel/HEAD/src/main/webapp/layui/images/face/65.gif -------------------------------------------------------------------------------- /src/main/webapp/layui/images/face/66.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zjh123456789/novel/HEAD/src/main/webapp/layui/images/face/66.gif -------------------------------------------------------------------------------- /src/main/webapp/layui/images/face/67.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zjh123456789/novel/HEAD/src/main/webapp/layui/images/face/67.gif -------------------------------------------------------------------------------- /src/main/webapp/layui/images/face/68.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zjh123456789/novel/HEAD/src/main/webapp/layui/images/face/68.gif -------------------------------------------------------------------------------- /src/main/webapp/layui/images/face/69.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zjh123456789/novel/HEAD/src/main/webapp/layui/images/face/69.gif -------------------------------------------------------------------------------- /src/main/webapp/layui/images/face/70.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zjh123456789/novel/HEAD/src/main/webapp/layui/images/face/70.gif -------------------------------------------------------------------------------- /src/main/webapp/layui/images/face/71.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zjh123456789/novel/HEAD/src/main/webapp/layui/images/face/71.gif -------------------------------------------------------------------------------- /src/main/webapp/images/site/cartSelected.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zjh123456789/novel/HEAD/src/main/webapp/images/site/cartSelected.png -------------------------------------------------------------------------------- /src/main/webapp/images/site/eachcategory.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zjh123456789/novel/HEAD/src/main/webapp/images/site/eachcategory.png -------------------------------------------------------------------------------- /src/main/webapp/images/site/leaveMessage.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zjh123456789/novel/HEAD/src/main/webapp/images/site/leaveMessage.png -------------------------------------------------------------------------------- /src/main/webapp/images/site/orderFinish.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zjh123456789/novel/HEAD/src/main/webapp/images/site/orderFinish.png -------------------------------------------------------------------------------- /src/main/webapp/images/site/reviewLight.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zjh123456789/novel/HEAD/src/main/webapp/images/site/reviewLight.png -------------------------------------------------------------------------------- /src/main/webapp/images/site/cartNotSelected.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zjh123456789/novel/HEAD/src/main/webapp/images/site/cartNotSelected.png -------------------------------------------------------------------------------- /src/main/webapp/images/site/comformPayFlow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zjh123456789/novel/HEAD/src/main/webapp/images/site/comformPayFlow.png -------------------------------------------------------------------------------- /src/main/webapp/images/site/loginBackground.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zjh123456789/novel/HEAD/src/main/webapp/images/site/loginBackground.png -------------------------------------------------------------------------------- /src/main/webapp/images/site/orderItemTmall.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zjh123456789/novel/HEAD/src/main/webapp/images/site/orderItemTmall.png -------------------------------------------------------------------------------- /src/main/webapp/images/site/priceBackground.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zjh123456789/novel/HEAD/src/main/webapp/images/site/priceBackground.png -------------------------------------------------------------------------------- /src/main/webapp/images/site/registerSuccess.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zjh123456789/novel/HEAD/src/main/webapp/images/site/registerSuccess.png -------------------------------------------------------------------------------- /src/main/webapp/images/site/confirmOrderTmall.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zjh123456789/novel/HEAD/src/main/webapp/images/site/confirmOrderTmall.png -------------------------------------------------------------------------------- /src/main/webapp/json/newsImg.json: -------------------------------------------------------------------------------- 1 | { 2 | "code": 0, 3 | "msg": "", 4 | "data":{ 5 | "src": "../../images/userface1.jpg", 6 | "title" : "文章内容图片" 7 | } 8 | } -------------------------------------------------------------------------------- /src/main/webapp/layui/css/modules/layer/default/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zjh123456789/novel/HEAD/src/main/webapp/layui/css/modules/layer/default/icon.png -------------------------------------------------------------------------------- /src/main/webapp/layui/css/modules/layer/default/icon-ext.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zjh123456789/novel/HEAD/src/main/webapp/layui/css/modules/layer/default/icon-ext.png -------------------------------------------------------------------------------- /src/main/webapp/layui/css/modules/layer/default/loading-0.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zjh123456789/novel/HEAD/src/main/webapp/layui/css/modules/layer/default/loading-0.gif -------------------------------------------------------------------------------- /src/main/webapp/layui/css/modules/layer/default/loading-1.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zjh123456789/novel/HEAD/src/main/webapp/layui/css/modules/layer/default/loading-1.gif -------------------------------------------------------------------------------- /src/main/webapp/layui/css/modules/layer/default/loading-2.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zjh123456789/novel/HEAD/src/main/webapp/layui/css/modules/layer/default/loading-2.gif -------------------------------------------------------------------------------- /src/main/webapp/images/site/TB1LF0CKFXXXXcAXFXXXXXXXXXX-21-20.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zjh123456789/novel/HEAD/src/main/webapp/images/site/TB1LF0CKFXXXXcAXFXXXXXXXXXX-21-20.png -------------------------------------------------------------------------------- /src/main/webapp/css/bootstrap/fonts/glyphicons-halflings-regular.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zjh123456789/novel/HEAD/src/main/webapp/css/bootstrap/fonts/glyphicons-halflings-regular.eot -------------------------------------------------------------------------------- /src/main/webapp/css/bootstrap/fonts/glyphicons-halflings-regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zjh123456789/novel/HEAD/src/main/webapp/css/bootstrap/fonts/glyphicons-halflings-regular.ttf -------------------------------------------------------------------------------- /src/main/webapp/css/bootstrap/fonts/glyphicons-halflings-regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zjh123456789/novel/HEAD/src/main/webapp/css/bootstrap/fonts/glyphicons-halflings-regular.woff -------------------------------------------------------------------------------- /src/main/webapp/css/bootstrap/fonts/glyphicons-halflings-regular.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zjh123456789/novel/HEAD/src/main/webapp/css/bootstrap/fonts/glyphicons-halflings-regular.woff2 -------------------------------------------------------------------------------- /src/main/resources/templates/admin/chapterEdit.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 编辑章节 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /src/main/resources/templates/include/admin/adminFooter.html: -------------------------------------------------------------------------------- 1 |
2 | 3 | 4 | 5 |
6 | -------------------------------------------------------------------------------- /src/main/java/com/zhujinghui/novel/enum/NovelEnum.kt: -------------------------------------------------------------------------------- 1 | package com.zhujinghui.novel.enum 2 | 3 | /** 4 | * @Author: JinghuiZhu 5 | * @Description: 小说枚举类 6 | * @Date: Created in 9:25 2019/2/28 7 | * @Modified By: 8 | */ 9 | 10 | enum class NovelEnum { 11 | 12 | } -------------------------------------------------------------------------------- /src/main/webapp/json/linkLogo.json: -------------------------------------------------------------------------------- 1 | { 2 | "code": 0, 3 | "msg": "", 4 | "data": [ 5 | { 6 | "src": "../../images/fly.png" 7 | },{ 8 | "src": "../../images/git.png" 9 | },{ 10 | "src": "../../images/layui.png" 11 | },{ 12 | "src": "../../images/mayun.png" 13 | } 14 | ] 15 | } -------------------------------------------------------------------------------- /src/main/webapp/json/userface.json: -------------------------------------------------------------------------------- 1 | { 2 | "code": 0, 3 | "msg": "", 4 | "data": [ 5 | { 6 | "src": "../../images/userface1.jpg" 7 | },{ 8 | "src": "../../images/userface2.jpg" 9 | },{ 10 | "src": "../../images/userface3.jpg" 11 | },{ 12 | "src": "../../images/userface4.jpg" 13 | },{ 14 | "src": "../../images/userface5.jpg" 15 | } 16 | ] 17 | } -------------------------------------------------------------------------------- /src/main/java/com/zhujinghui/novel/dao/GenreDAO.java: -------------------------------------------------------------------------------- 1 | package com.zhujinghui.novel.dao; 2 | 3 | import com.zhujinghui.novel.pojo.Genre; 4 | import org.springframework.data.jpa.repository.JpaRepository; 5 | 6 | /** 7 | * @Author: JinghuiZhu 8 | * @Description: 小说类别DAO 9 | * @Date: Created in 15:42 2019/2/21 10 | * @Modified By: 11 | */ 12 | 13 | public interface GenreDAO extends JpaRepository { 14 | } 15 | -------------------------------------------------------------------------------- /src/main/java/com/zhujinghui/novel/dao/ReaderDAO.java: -------------------------------------------------------------------------------- 1 | package com.zhujinghui.novel.dao; 2 | 3 | import com.zhujinghui.novel.pojo.Reader; 4 | import org.springframework.data.jpa.repository.JpaRepository; 5 | 6 | /** 7 | * @Author: JinghuiZhu 8 | * @Description: 读者DAO 9 | * @Date: Created in 14:08 2019/2/26 10 | * @Modified By: 11 | */ 12 | 13 | public interface ReaderDAO extends JpaRepository { 14 | } 15 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .metadata 2 | .gradle 3 | bin/ 4 | tmp/ 5 | log/ 6 | logs/ 7 | *.tmp 8 | *.log 9 | *.svn/ 10 | *.bak 11 | *.swp 12 | *~.nib 13 | local.properties 14 | .settings/ 15 | .loadpath 16 | .project 17 | .classpath 18 | .buildpath 19 | .target 20 | target/ 21 | .idea/ 22 | .mvn/ 23 | *.iml 24 | dependency-reduced-pom.xml 25 | ConfigCenter_* 26 | /test-output 27 | *.log 28 | *.cmd/ 29 | Help.md 30 | mvnw 31 | mvnw.cmd 32 | 33 | 34 | -------------------------------------------------------------------------------- /src/main/java/com/zhujinghui/novel/dao/AdminDAO.java: -------------------------------------------------------------------------------- 1 | package com.zhujinghui.novel.dao; 2 | 3 | import com.zhujinghui.novel.pojo.Admin; 4 | import org.springframework.data.jpa.repository.JpaRepository; 5 | 6 | /** 7 | * @Description: 管理员DAO 8 | * @Author: jinghui.zhu 9 | * @CreateDate: 2019/2/27 22:40 10 | * @Version: 1.0 11 | */ 12 | public interface AdminDAO extends JpaRepository { 13 | } 14 | -------------------------------------------------------------------------------- /src/main/java/com/zhujinghui/novel/dao/AuthorDAO.java: -------------------------------------------------------------------------------- 1 | package com.zhujinghui.novel.dao; 2 | 3 | import com.zhujinghui.novel.pojo.Author; 4 | import org.springframework.data.jpa.repository.JpaRepository; 5 | 6 | /** 7 | * @Description: 作者DAO 8 | * @Author: jinghui.zhu 9 | * @CreateDate: 2019/2/27 22:41 10 | * @Version: 1.0 11 | */ 12 | public interface AuthorDAO extends JpaRepository { 13 | } 14 | -------------------------------------------------------------------------------- /src/main/webapp/json/systemParameter.json: -------------------------------------------------------------------------------- 1 | { 2 | "cmsName": "layuiCMS后台管理模版", 3 | "version": "v2.0", 4 | "author": "驊驊龔頾", 5 | "homePage": "index.html", 6 | "server": "windows", 7 | "dataBase": "8.00.2039", 8 | "maxUpload": "2M", 9 | "userRights": "超级管理员", 10 | "description": "这是马哥闲来无事做的一套基于layui的cms模版,纯静态页面,不包含数据库", 11 | "powerby": "copyright @2017 驊驊龔頾", 12 | "record": "京ICP备14040xxx号-1", 13 | "keywords": "layuicms,马哥,layuicms2.0,后台模版,请叫我马哥,驊驊龔頾" 14 | } -------------------------------------------------------------------------------- /src/test/java/com/zhujinghui/novel/NovelApplicationTests.java: -------------------------------------------------------------------------------- 1 | package com.zhujinghui.novel; 2 | 3 | import org.junit.Test; 4 | import org.junit.runner.RunWith; 5 | import org.springframework.boot.test.context.SpringBootTest; 6 | import org.springframework.test.context.junit4.SpringRunner; 7 | 8 | @RunWith(SpringRunner.class) 9 | @SpringBootTest 10 | public class NovelApplicationTests { 11 | 12 | @Test 13 | public void contextLoads() { 14 | } 15 | 16 | } 17 | -------------------------------------------------------------------------------- /src/main/resources/templates/include/admin/adminNavigator.html: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/main/java/com/zhujinghui/novel/Application.java: -------------------------------------------------------------------------------- 1 | package com.zhujinghui.novel; 2 | 3 | import org.springframework.boot.SpringApplication; 4 | import org.springframework.boot.autoconfigure.SpringBootApplication; 5 | 6 | /** 7 | * @Author: JinghuiZhu 8 | * @Description: 项目启动类 9 | * @Date: Created in 15:51 2019/2/21 10 | * @Modified By: 11 | */ 12 | 13 | @SpringBootApplication 14 | public class Application { 15 | public static void main(String[] args) { 16 | SpringApplication.run(Application.class, args); 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /src/main/webapp/js/bootstrap/3.3.6/npm.js: -------------------------------------------------------------------------------- 1 | // This file is autogenerated via the `commonjs` Grunt task. You can require() this file in a CommonJS environment. 2 | require('../../js/transition.js') 3 | require('../../js/alert.js') 4 | require('../../js/button.js') 5 | require('../../js/carousel.js') 6 | require('../../js/collapse.js') 7 | require('../../js/dropdown.js') 8 | require('../../js/modal.js') 9 | require('../../js/tooltip.js') 10 | require('../../js/popover.js') 11 | require('../../js/scrollspy.js') 12 | require('../../js/tab.js') 13 | require('../../js/affix.js') -------------------------------------------------------------------------------- /src/main/java/com/zhujinghui/novel/controller/AuthorController.java: -------------------------------------------------------------------------------- 1 | package com.zhujinghui.novel.controller; 2 | 3 | import com.zhujinghui.novel.service.AuthorService; 4 | import org.springframework.beans.factory.annotation.Autowired; 5 | import org.springframework.web.bind.annotation.RestController; 6 | 7 | /** 8 | * @Description: 作者控制器 9 | * @Author: jinghui.zhu 10 | * @CreateDate: 2019/2/27 22:54 11 | * @Version: 1.0 12 | */ 13 | 14 | @RestController 15 | public class AuthorController { 16 | 17 | @Autowired 18 | AuthorService authorService; 19 | } 20 | -------------------------------------------------------------------------------- /src/main/resources/templates/admin/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 小说网站后台管理 6 | 7 | 8 | 13 | 14 | 15 | 16 |
17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /src/main/java/com/zhujinghui/novel/controller/AdminController.java: -------------------------------------------------------------------------------- 1 | package com.zhujinghui.novel.controller; 2 | 3 | import com.zhujinghui.novel.service.AdminService; 4 | import org.springframework.beans.factory.annotation.Autowired; 5 | import org.springframework.web.bind.annotation.RestController; 6 | 7 | /** 8 | * @Description: 管理员控制器 9 | * @Author: jinghui.zhu 10 | * @CreateDate: 2019/2/27 22:53 11 | * @Version: 1.0 12 | */ 13 | 14 | @RestController 15 | public class AdminController { 16 | 17 | @Autowired 18 | AdminService adminService; 19 | 20 | } 21 | -------------------------------------------------------------------------------- /src/main/java/com/zhujinghui/novel/dao/NovelDAO.java: -------------------------------------------------------------------------------- 1 | package com.zhujinghui.novel.dao; 2 | 3 | import com.zhujinghui.novel.pojo.Genre; 4 | import com.zhujinghui.novel.pojo.Novel; 5 | import org.springframework.data.domain.Page; 6 | import org.springframework.data.domain.Pageable; 7 | import org.springframework.data.jpa.repository.JpaRepository; 8 | 9 | /** 10 | * @Author: JinghuiZhu 11 | * @Description: 小说DAO 12 | * @Date: Created in 17:28 2019/2/22 13 | * @Modified By: 14 | */ 15 | 16 | public interface NovelDAO extends JpaRepository { 17 | Page findByGenre(Genre genre, Pageable pageable); 18 | } 19 | -------------------------------------------------------------------------------- /src/main/java/com/zhujinghui/novel/dao/ChapterDAO.java: -------------------------------------------------------------------------------- 1 | package com.zhujinghui.novel.dao; 2 | 3 | import com.zhujinghui.novel.pojo.Chapter; 4 | import com.zhujinghui.novel.pojo.Novel; 5 | import org.springframework.data.domain.Page; 6 | import org.springframework.data.domain.Pageable; 7 | import org.springframework.data.jpa.repository.JpaRepository; 8 | 9 | /** 10 | * @Author: JinghuiZhu 11 | * @Description: 小说章节DAO 12 | * @Date: Created in 16:41 2019/2/25 13 | * @Modified By: 14 | */ 15 | public interface ChapterDAO extends JpaRepository { 16 | Page findByNovel(Novel novel, Pageable pageable); 17 | } 18 | -------------------------------------------------------------------------------- /src/main/java/com/zhujinghui/novel/configuration/CORSConfiguration.java: -------------------------------------------------------------------------------- 1 | package com.zhujinghui.novel.configuration; 2 | 3 | import org.springframework.context.annotation.Configuration; 4 | import org.springframework.web.servlet.config.annotation.CorsRegistry; 5 | import org.springframework.web.servlet.config.annotation.WebMvcConfigurer; 6 | 7 | /** 8 | * @Author: JinghuiZhu 9 | * @Description: 配置类, 允许所有的请求都跨域 10 | * @Date: Created in 15:53 2019/2/21 11 | * @Modified By: 12 | */ 13 | 14 | @Configuration 15 | public class CORSConfiguration implements WebMvcConfigurer { 16 | 17 | @Override 18 | public void addCorsMappings(CorsRegistry registry){ 19 | //所有请求都允许跨域 20 | registry.addMapping("/**") 21 | .allowedOrigins("*") 22 | .allowedMethods("*") 23 | .allowedHeaders("*"); 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /src/main/resources/templates/include/admin/adminPage.html: -------------------------------------------------------------------------------- 1 |
2 | 25 |
26 | -------------------------------------------------------------------------------- /src/main/webapp/page/systemSetting/logs.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 系统日志--layui后台管理模板 2.0 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 |
18 | 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /src/main/webapp/json/userList.json: -------------------------------------------------------------------------------- 1 | { 2 | "code": 0, 3 | "msg": "", 4 | "count": 3, 5 | "data": [ 6 | { 7 | "usersId": "1", 8 | "userName": "驊驊龔頾", 9 | "userEmail": "mage@layui.com", 10 | "userSex": "男", 11 | "userStatus": "0", 12 | "userGrade": "4", 13 | "userEndTime": "2018-01-31 10:00", 14 | "userDesc" : "layuiCMS作者,原名‘请叫我马哥’" 15 | },{ 16 | "usersId": "2", 17 | "userName": "贤心", 18 | "userEmail": "xianxin@layui.com", 19 | "userSex": "保密", 20 | "userStatus": "0", 21 | "userGrade": "3", 22 | "userEndTime": "2018-01-14 15:35", 23 | "userDesc" : "layui框架作者,性别至今是个谜。。。" 24 | }, 25 | { 26 | "usersId": "3", 27 | "userName": "纸飞机", 28 | "userEmail": "fly@layui.com", 29 | "userSex": "男", 30 | "userStatus": "1", 31 | "userGrade": "2", 32 | "userEndTime": "2018-01-25 16:25", 33 | "userDesc" : "fly社区管理员,据传与layui作者有奸情,故帐号被封。" 34 | } 35 | ] 36 | } -------------------------------------------------------------------------------- /src/main/webapp/layui/css/modules/code.css: -------------------------------------------------------------------------------- 1 | /** layui-v2.2.5 MIT License By https://www.layui.com */ 2 | html #layuicss-skincodecss{display:none;position:absolute;width:1989px}.layui-code-h3,.layui-code-view{position:relative;font-size:12px}.layui-code-view{display:block;margin:10px 0;padding:0;border:1px solid #e2e2e2;border-left-width:6px;background-color:#F2F2F2;color:#333;font-family:Courier New}.layui-code-h3{padding:0 10px;height:32px;line-height:32px;border-bottom:1px solid #e2e2e2}.layui-code-h3 a{position:absolute;right:10px;top:0;color:#999}.layui-code-view .layui-code-ol{position:relative;overflow:auto}.layui-code-view .layui-code-ol li{position:relative;margin-left:45px;line-height:20px;padding:0 5px;border-left:1px solid #e2e2e2;list-style-type:decimal-leading-zero;*list-style-type:decimal;background-color:#fff}.layui-code-view pre{margin:0}.layui-code-notepad{border:1px solid #0C0C0C;border-left-color:#3F3F3F;background-color:#0C0C0C;color:#C2BE9E}.layui-code-notepad .layui-code-h3{border-bottom:none}.layui-code-notepad .layui-code-ol li{background-color:#3F3F3F;border-left:none} -------------------------------------------------------------------------------- /src/main/webapp/page/404.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 404--layui后台管理模板 2.0 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 |
17 |
18 | 19 | 20 |
21 |
22 | 23 |

我勒个去,页面被外星人挟持了!

24 |
25 |
26 | 27 | 28 | -------------------------------------------------------------------------------- /src/main/java/com/zhujinghui/novel/exception/GloabalExceptionHandler.java: -------------------------------------------------------------------------------- 1 | package com.zhujinghui.novel.exception; 2 | 3 | import org.springframework.web.bind.annotation.ControllerAdvice; 4 | import org.springframework.web.bind.annotation.ExceptionHandler; 5 | import org.springframework.web.bind.annotation.RestController; 6 | 7 | import javax.servlet.http.HttpServletRequest; 8 | 9 | /** 10 | * @Author: JinghuiZhu 11 | * @Description: 异常处理 12 | * @Date: Created in 16:00 2019/2/21 13 | * @Modified By: 14 | */ 15 | 16 | @RestController 17 | @ControllerAdvice 18 | public class GloabalExceptionHandler { 19 | @ExceptionHandler(value = Exception.class) 20 | public String defaultErrorHandler(HttpServletRequest req, Exception e) throws Exception { 21 | e.printStackTrace(); 22 | Class constraintViolationException = Class.forName("org.hibernate.exception.ConstraintViolationException"); 23 | if(null!=e.getCause() && constraintViolationException==e.getCause().getClass()) { 24 | return "违反了约束,多半是外键约束"; 25 | } 26 | return e.getMessage(); 27 | } 28 | 29 | } 30 | -------------------------------------------------------------------------------- /src/main/webapp/LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2018 Admin 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy of 6 | this software and associated documentation files (the "Software"), to deal in 7 | the Software without restriction, including without limitation the rights to 8 | use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 9 | the Software, and to permit persons to whom the Software is furnished to do so, 10 | subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 17 | FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 18 | COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 19 | IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 20 | CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -------------------------------------------------------------------------------- /src/main/webapp/page/systemSetting/icons.js: -------------------------------------------------------------------------------- 1 | layui.use(['form','layer','jquery'],function(){ 2 | var form = layui.form, 3 | layer = parent.layer === undefined ? layui.layer : top.layer, 4 | element = layui.element; 5 | $ = layui.jquery; 6 | 7 | $.get(iconUrl,function(data){ 8 | var iconHtml = ''; 9 | for(var i=1;i" + 12 | "icon-" + data.split('.icon-')[i].split(':before')[0] + 13 | ""; 14 | } 15 | $(".icons").html(iconHtml); 16 | $(".iconsLength").text(data.split(".icon-").length-1); 17 | }) 18 | 19 | $("body").on("click",".icons li",function(){ 20 | var copyText = document.getElementById("copyText"); 21 | copyText.innerText = $(this).text(); 22 | copyText.select(); 23 | document.execCommand("copy"); 24 | layer.msg("复制成功",{anim: 2}); 25 | }) 26 | }) 27 | -------------------------------------------------------------------------------- /src/main/webapp/layui/lay/modules/code.js: -------------------------------------------------------------------------------- 1 | /** layui-v2.2.5 MIT License By https://www.layui.com */ 2 | ;layui.define("jquery",function(e){"use strict";var a=layui.$,l="http://www.layui.com/doc/modules/code.html";e("code",function(e){var t=[];e=e||{},e.elem=a(e.elem||".layui-code"),e.about=!("about"in e)||e.about,e.elem.each(function(){t.push(this)}),layui.each(t.reverse(),function(t,i){var c=a(i),o=c.html();(c.attr("lay-encode")||e.encode)&&(o=o.replace(/&(?!#?[a-zA-Z0-9]+;)/g,"&").replace(//g,">").replace(/'/g,"'").replace(/"/g,""")),c.html('
  1. '+o.replace(/[\r\t\n]+/g,"
  2. ")+"
"),c.find(">.layui-code-h3")[0]||c.prepend('

'+(c.attr("lay-title")||e.title||"code")+(e.about?'layui.code':"")+"

");var d=c.find(">.layui-code-ol");c.addClass("layui-box layui-code-view"),(c.attr("lay-skin")||e.skin)&&c.addClass("layui-code-"+(c.attr("lay-skin")||e.skin)),(d.find("li").length/100|0)>0&&d.css("margin-left",(d.find("li").length/100|0)+"px"),(c.attr("lay-height")||e.height)&&d.css("max-height",c.attr("lay-height")||e.height)})})}).addcss("modules/code.css","skincodecss"); -------------------------------------------------------------------------------- /src/main/webapp/page/systemSetting/icons.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 图标管理--layui后台管理模板 2.0 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 |
17 | layuiCMS 2.0当前共引入个外部图标。【点击可复制】此页面并非后台模版需要的,只是为了让大家了解都引入了哪些外部图标,实际应用中可删除。 18 |
19 | 20 |
    21 | 22 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /src/main/webapp/json/linkList.json: -------------------------------------------------------------------------------- 1 | { 2 | "code": 0, 3 | "msg": "", 4 | "count": 4, 5 | "data": [ 6 | { 7 | "linkId": "1", 8 | "logo": "../../images/layui.png", 9 | "websiteName": "layui - 经典模块化前端框架", 10 | "websiteUrl": "http://www.layui.com", 11 | "masterEmail": "xianxin@layui.com", 12 | "addTime": "2017-05-14", 13 | "showAddress": "checked" 14 | },{ 15 | "linkId": "2", 16 | "logo": "../../images/fly.png", 17 | "websiteName": "fly - 前端框架官方社区", 18 | "websiteUrl": "http://fly.layui.com", 19 | "masterEmail": "xianxin@layui.com", 20 | "addTime": "2017-05-14", 21 | "showAddress": "" 22 | },{ 23 | "linkId": "3", 24 | "logo": "../../images/mayun.png", 25 | "websiteName": "layuicms2.0 - 码云 - 开源中国", 26 | "websiteUrl": "https://gitee.com/layuicms/layuicms2.0", 27 | "masterEmail": "git@oschina.cn", 28 | "addTime": "2017-05-14", 29 | "showAddress": "" 30 | },{ 31 | "linkId": "4", 32 | "logo": "../../images/git.png", 33 | "websiteName": "layuicms2.0 - Github", 34 | "websiteUrl": "https://github.com/BrotherMa/layuiCMS2.0", 35 | "masterEmail": "github@github.cn", 36 | "addTime": "2017-05-14", 37 | "showAddress": "" 38 | } 39 | ] 40 | } -------------------------------------------------------------------------------- /src/main/webapp/page/login/login.js: -------------------------------------------------------------------------------- 1 | layui.use(['form','layer','jquery'],function(){ 2 | var form = layui.form, 3 | layer = parent.layer === undefined ? layui.layer : top.layer 4 | $ = layui.jquery; 5 | 6 | $(".loginBody .seraph").click(function(){ 7 | layer.msg("这只是做个样式,至于功能,你见过哪个后台能这样登录的?还是老老实实的找管理员去注册吧",{ 8 | time:5000 9 | }); 10 | }) 11 | 12 | //登录按钮 13 | form.on("submit(login)",function(data){ 14 | $(this).text("登录中...").attr("disabled","disabled").addClass("layui-disabled"); 15 | setTimeout(function(){ 16 | window.location.href = "/layuicms2.0"; 17 | },1000); 18 | return false; 19 | }) 20 | 21 | //表单输入效果 22 | $(".loginBody .input-item").click(function(e){ 23 | e.stopPropagation(); 24 | $(this).addClass("layui-input-focus").find(".layui-input").focus(); 25 | }) 26 | $(".loginBody .layui-form-item .layui-input").focus(function(){ 27 | $(this).parent().addClass("layui-input-focus"); 28 | }) 29 | $(".loginBody .layui-form-item .layui-input").blur(function(){ 30 | $(this).parent().removeClass("layui-input-focus"); 31 | if($(this).val() != ''){ 32 | $(this).parent().addClass("layui-input-active"); 33 | }else{ 34 | $(this).parent().removeClass("layui-input-active"); 35 | } 36 | }) 37 | }) 38 | -------------------------------------------------------------------------------- /src/main/webapp/page/img/images.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 图片总数--小说后台管理模板 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 |
    17 | 28 |
      29 |
      30 | 31 | 32 | 33 | -------------------------------------------------------------------------------- /src/main/webapp/json/userGrade.json: -------------------------------------------------------------------------------- 1 | { 2 | "code": 0, 3 | "msg": "", 4 | "count": 1000, 5 | "data": [ 6 | { 7 | "id": 1, 8 | "gradeIcon": "icon-vip1", 9 | "gradeName": "倔强青铜", 10 | "gradePoint": "0", 11 | "gradeGold": "0", 12 | "gradeValue": "0" 13 | }, 14 | { 15 | "id": 2, 16 | "gradeIcon": "icon-vip2", 17 | "gradeName": "秩序白银", 18 | "gradePoint": "100", 19 | "gradeGold": "200", 20 | "gradeValue": "500" 21 | }, 22 | { 23 | "id": 3, 24 | "gradeIcon": "icon-vip3", 25 | "gradeName": "荣耀黄金", 26 | "gradePoint": "300", 27 | "gradeGold": "300", 28 | "gradeValue": "1000" 29 | }, 30 | { 31 | "id": 4, 32 | "gradeIcon": "icon-vip4", 33 | "gradeName": "尊贵铂金", 34 | "gradePoint": "800", 35 | "gradeGold": "400", 36 | "gradeValue": "2000" 37 | }, 38 | { 39 | "id": 5, 40 | "gradeIcon": "icon-vip5", 41 | "gradeName": "永恒钻石", 42 | "gradePoint": "1500", 43 | "gradeGold": "500", 44 | "gradeValue": "5000" 45 | }, 46 | { 47 | "id": 6, 48 | "gradeIcon": "icon-vip6", 49 | "gradeName": "至尊星耀", 50 | "gradePoint": "3000", 51 | "gradeGold": "600", 52 | "gradeValue": "10000" 53 | }, 54 | { 55 | "id": 7, 56 | "gradeIcon": "icon-vip7", 57 | "gradeName": "最强王者", 58 | "gradePoint": "5000", 59 | "gradeGold": "700", 60 | "gradeValue": "35000" 61 | } 62 | ] 63 | } -------------------------------------------------------------------------------- /src/main/webapp/page/systemSetting/linkList.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 友情链接--layui后台管理模板 2.0 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 |
      17 |
      18 |
      19 |
      20 | 21 |
      22 | 搜索 23 |
      24 |
      25 | 添加友链 26 |
      27 |
      28 | 批量删除 29 |
      30 |
      31 |
      32 | 33 | 34 | 35 | 36 | 37 | -------------------------------------------------------------------------------- /src/main/webapp/page/user/userAdd.js: -------------------------------------------------------------------------------- 1 | layui.use(['form','layer'],function(){ 2 | var form = layui.form 3 | layer = parent.layer === undefined ? layui.layer : top.layer, 4 | $ = layui.jquery; 5 | 6 | form.on("submit(addUser)",function(data){ 7 | //弹出loading 8 | var index = top.layer.msg('数据提交中,请稍候',{icon: 16,time:false,shade:0.8}); 9 | // 实际使用时的提交信息 10 | // $.post("上传路径",{ 11 | // userName : $(".userName").val(), //登录名 12 | // userEmail : $(".userEmail").val(), //邮箱 13 | // userSex : data.field.sex, //性别 14 | // userGrade : data.field.userGrade, //会员等级 15 | // userStatus : data.field.userStatus, //用户状态 16 | // newsTime : submitTime, //添加时间 17 | // userDesc : $(".userDesc").text(), //用户简介 18 | // },function(res){ 19 | // 20 | // }) 21 | setTimeout(function(){ 22 | top.layer.close(index); 23 | top.layer.msg("用户添加成功!"); 24 | layer.closeAll("iframe"); 25 | //刷新父页面 26 | parent.location.reload(); 27 | },2000); 28 | return false; 29 | }) 30 | 31 | //格式化时间 32 | function filterTime(val){ 33 | if(val < 10){ 34 | return "0" + val; 35 | }else{ 36 | return val; 37 | } 38 | } 39 | //定时发布 40 | var time = new Date(); 41 | var submitTime = time.getFullYear()+'-'+filterTime(time.getMonth()+1)+'-'+filterTime(time.getDate())+' '+filterTime(time.getHours())+':'+filterTime(time.getMinutes())+':'+filterTime(time.getSeconds()); 42 | 43 | }) -------------------------------------------------------------------------------- /src/main/java/com/zhujinghui/novel/controller/ReaderController.java: -------------------------------------------------------------------------------- 1 | package com.zhujinghui.novel.controller; 2 | 3 | import com.zhujinghui.novel.pojo.Reader; 4 | import com.zhujinghui.novel.service.ReaderService; 5 | import com.zhujinghui.novel.util.Page4Navigator; 6 | import org.springframework.beans.factory.annotation.Autowired; 7 | import org.springframework.web.bind.annotation.*; 8 | 9 | /** 10 | * @Author: JinghuiZhu 11 | * @Description: 读者控制器 12 | * @Date: Created in 14:23 2019/2/26 13 | * @Modified By: 14 | */ 15 | 16 | @RestController 17 | public class ReaderController { 18 | 19 | @Autowired 20 | ReaderService readerService; 21 | 22 | @GetMapping("/readers") 23 | public Page4Navigator list(@RequestParam(value = "start", defaultValue = "0") int start, 24 | @RequestParam(value = "size", defaultValue = "5") int size){ 25 | start = start<0?0:start; 26 | Page4Navigator page4Navigator = readerService.list(start,size,5); 27 | return page4Navigator; 28 | } 29 | 30 | @PostMapping("/readers") 31 | public Object add(Reader reader){ 32 | readerService.add(reader); 33 | return reader; 34 | } 35 | 36 | @DeleteMapping("/readers/{id}") 37 | public String delete(@PathVariable("id") int id){ 38 | readerService.delete(id); 39 | return null; 40 | } 41 | 42 | @GetMapping("/readers/{id}") 43 | public Reader get(@PathVariable("id") int id){ 44 | Reader reader = readerService.get(id); 45 | return reader; 46 | } 47 | 48 | @PutMapping("/readers/{id}") 49 | public Object update(Reader reader){ 50 | readerService.update(reader); 51 | return reader; 52 | } 53 | } 54 | -------------------------------------------------------------------------------- /src/main/webapp/layui/lay/modules/laytpl.js: -------------------------------------------------------------------------------- 1 | /** layui-v2.2.5 MIT License By https://www.layui.com */ 2 | ;layui.define(function(e){"use strict";var r={open:"{{",close:"}}"},c={exp:function(e){return new RegExp(e,"g")},query:function(e,c,t){var o=["#([\\s\\S])+?","([^{#}])*?"][e||0];return n((c||"")+r.open+o+r.close+(t||""))},escape:function(e){return String(e||"").replace(/&(?!#?[a-zA-Z0-9]+;)/g,"&").replace(//g,">").replace(/'/g,"'").replace(/"/g,""")},error:function(e,r){var c="Laytpl Error:";return"object"==typeof console&&console.error(c+e+"\n"+(r||"")),c+e}},n=c.exp,t=function(e){this.tpl=e};t.pt=t.prototype,window.errors=0,t.pt.parse=function(e,t){var o=this,p=e,a=n("^"+r.open+"#",""),l=n(r.close+"$","");e=e.replace(/\s+|\r|\t|\n/g," ").replace(n(r.open+"#"),r.open+"# ").replace(n(r.close+"}"),"} "+r.close).replace(/\\/g,"\\\\").replace(n(r.open+"!(.+?)!"+r.close),function(e){return e=e.replace(n("^"+r.open+"!"),"").replace(n("!"+r.close),"").replace(n(r.open+"|"+r.close),function(e){return e.replace(/(.)/g,"\\$1")})}).replace(/(?="|')/g,"\\").replace(c.query(),function(e){return e=e.replace(a,"").replace(l,""),'";'+e.replace(/\\/g,"")+';view+="'}).replace(c.query(1),function(e){var c='"+(';return e.replace(/\s/g,"")===r.open+r.close?"":(e=e.replace(n(r.open+"|"+r.close),""),/^=/.test(e)&&(e=e.replace(/^=/,""),c='"+_escape_('),c+e.replace(/\\/g,"")+')+"')}),e='"use strict";var view = "'+e+'";return view;';try{return o.cache=e=new Function("d, _escape_",e),e(t,c.escape)}catch(u){return delete o.cache,c.error(u,p)}},t.pt.render=function(e,r){var n,t=this;return e?(n=t.cache?t.cache(e,c.escape):t.parse(t.tpl,e),r?void r(n):n):c.error("no data")};var o=function(e){return"string"!=typeof e?c.error("Template not found"):new t(e)};o.config=function(e){e=e||{};for(var c in e)r[c]=e[c]},o.v="1.2.0",e("laytpl",o)}); -------------------------------------------------------------------------------- /src/main/webapp/css/back/style.css: -------------------------------------------------------------------------------- 1 | body{ 2 | padding-top:70px; 3 | } 4 | 5 | div#workingArea{ 6 | margin:0px 40px; 7 | } 8 | 9 | div.addDiv{ 10 | width:400px; 11 | margin:0px auto; 12 | } 13 | div.editDiv{ 14 | width:400px; 15 | margin:0px auto; 16 | 17 | } 18 | 19 | table.addTable{ 20 | width:100%; 21 | } 22 | table.editTable{ 23 | width:100%; 24 | } 25 | table.editTable td{ 26 | padding:5px; 27 | } 28 | 29 | table.addTable td{ 30 | padding:5px; 31 | } 32 | 33 | div.pageDiv{ 34 | text-align:center; 35 | } 36 | div.listDataTableDiv{ 37 | min-height:220px; 38 | } 39 | div.footer{ 40 | margin:20px; 41 | } 42 | div.editPVDiv{ 43 | width:800px; 44 | margin:0 auto; 45 | 46 | } 47 | span.pvName{ 48 | display:inline-block; 49 | width:100px; 50 | color:#555555; 51 | font-size:16px; 52 | /* font-weight:bold; */ 53 | margin-left:20px; 54 | 55 | } 56 | div.eachPV{ 57 | float:left; 58 | margin:5px; 59 | } 60 | span.pvValue{ 61 | display:inline-block; 62 | width:200px; 63 | padding:0px; 64 | } 65 | 66 | 67 | span.pvValue input{ 68 | outline: none; 69 | border:2px solid lightGray; 70 | } 71 | div.addPictureDiv{ 72 | width:400px; 73 | } 74 | table.addPictureTable{ 75 | 76 | } 77 | td.addPictureTableTD{ 78 | padding:10px 100px; 79 | text-align:center; 80 | vertical-align: top; 81 | } 82 | div.orderPageOrderItem{ 83 | width:100%; 84 | padding:20px; 85 | } 86 | table.orderPageOrderItemTable td{ 87 | padding:5px; 88 | } 89 | tr.orderPageOrderItemTR{ 90 | display:none; 91 | } 92 | ul.pagination a.current{ 93 | font-weight:bold; 94 | color:black; 95 | } 96 | td{ 97 | font-size:14px; 98 | } 99 | th{ 100 | font-size:14px; 101 | } 102 | .disableHref{ 103 | cursor:default; 104 | color:#E5E0E0; 105 | text-decoration:none; 106 | } 107 | -------------------------------------------------------------------------------- /src/main/webapp/page/systemSetting/logs.js: -------------------------------------------------------------------------------- 1 | layui.use(['table'],function(){ 2 | var table = layui.table; 3 | 4 | //系统日志 5 | table.render({ 6 | elem: '#logs', 7 | url : '../../json/logs.json', 8 | cellMinWidth : 95, 9 | page : true, 10 | height : "full-20", 11 | limit : 20, 12 | limits : [10,15,20,25], 13 | id : "systemLog", 14 | cols : [[ 15 | {type: "checkbox", fixed:"left", width:50}, 16 | {field: 'logId', title: '序号', width:60, align:"center"}, 17 | {field: 'url', title: '请求地址', width:350}, 18 | {field: 'method', title: '操作方式', align:'center',templet:function(d){ 19 | if(d.method.toUpperCase() == "GET"){ 20 | return ''+d.method+'' 21 | }else{ 22 | return ''+d.method+'' 23 | } 24 | }}, 25 | {field: 'ip', title: '操作IP', align:'center',minWidth:130}, 26 | {field: 'timeConsuming', title: '耗时', align:'center',templet:function(d){ 27 | return ''+d.timeConsuming+'' 28 | }}, 29 | {field: 'isAbnormal', title: '是否异常', align:'center',templet:function(d){ 30 | if(d.isAbnormal == "正常"){ 31 | return ''+d.isAbnormal+'' 32 | }else{ 33 | return ''+d.isAbnormal+'' 34 | } 35 | }}, 36 | {field: 'operator',title: '操作人', minWidth:100, templet:'#newsListBar',align:"center"}, 37 | {field: 'operatingTime', title: '操作时间', align:'center', width:170} 38 | ]] 39 | }); 40 | 41 | }) 42 | -------------------------------------------------------------------------------- /src/main/webapp/page/user/userList.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 用户中心--layui后台管理模板 2.0 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 |
      17 |
      18 | 19 |
      20 |
      21 | 22 |
      23 | 搜索 24 |
      25 |
      26 | 添加用户 27 |
      28 |
      29 | 批量删除 30 |
      31 | 32 |
      33 |
      34 | 35 | 36 | 41 | 42 | 43 | 44 | 45 | -------------------------------------------------------------------------------- /src/main/webapp/layui/lay/modules/flow.js: -------------------------------------------------------------------------------- 1 | /** layui-v2.2.5 MIT License By https://www.layui.com */ 2 | ;layui.define("jquery",function(e){"use strict";var l=layui.$,o=function(e){},t='';o.prototype.load=function(e){var o,i,n,r,a=this,c=0;e=e||{};var f=l(e.elem);if(f[0]){var m=l(e.scrollElem||document),u=e.mb||50,s=!("isAuto"in e)||e.isAuto,v=e.end||"没有更多了",y=e.scrollElem&&e.scrollElem!==document,d="加载更多",h=l('");f.find(".layui-flow-more")[0]||f.append(h);var p=function(e,t){e=l(e),h.before(e),t=0==t||null,t?h.html(v):h.find("a").html(d),i=t,o=null,n&&n()},g=function(){o=!0,h.find("a").html(t),"function"==typeof e.done&&e.done(++c,p)};if(g(),h.find("a").on("click",function(){l(this);i||o||g()}),e.isLazyimg)var n=a.lazyimg({elem:e.elem+" img",scrollElem:e.scrollElem});return s?(m.on("scroll",function(){var e=l(this),t=e.scrollTop();r&&clearTimeout(r),i||(r=setTimeout(function(){var i=y?e.height():l(window).height(),n=y?e.prop("scrollHeight"):document.documentElement.scrollHeight;n-t-i<=u&&(o||g())},100))}),a):a}},o.prototype.lazyimg=function(e){var o,t=this,i=0;e=e||{};var n=l(e.scrollElem||document),r=e.elem||"img",a=e.scrollElem&&e.scrollElem!==document,c=function(e,l){var o=n.scrollTop(),r=o+l,c=a?function(){return e.offset().top-n.offset().top+o}():e.offset().top;if(c>=o&&c<=r&&!e.attr("src")){var m=e.attr("lay-src");layui.img(m,function(){var l=t.lazyimg.elem.eq(i);e.attr("src",m).removeAttr("lay-src"),l[0]&&f(l),i++})}},f=function(e,o){var f=a?(o||n).height():l(window).height(),m=n.scrollTop(),u=m+f;if(t.lazyimg.elem=l(r),e)c(e,f);else for(var s=0;su)break}};if(f(),!o){var m;n.on("scroll",function(){var e=l(this);m&&clearTimeout(m),m=setTimeout(function(){f(null,e)},50)}),o=!0}return f},e("flow",new o)}); -------------------------------------------------------------------------------- /src/main/java/com/zhujinghui/novel/controller/ChapterController.java: -------------------------------------------------------------------------------- 1 | package com.zhujinghui.novel.controller; 2 | 3 | import com.zhujinghui.novel.pojo.Chapter; 4 | import com.zhujinghui.novel.service.ChapterService; 5 | import com.zhujinghui.novel.service.NovelService; 6 | import com.zhujinghui.novel.util.Page4Navigator; 7 | import org.springframework.beans.factory.annotation.Autowired; 8 | import org.springframework.web.bind.annotation.*; 9 | 10 | import java.util.Date; 11 | 12 | /** 13 | * @Author: JinghuiZhu 14 | * @Description: 小说章节控制器 15 | * @Date: Created in 16:36 2019/2/25 16 | * @Modified By: 17 | */ 18 | 19 | @RestController 20 | public class ChapterController { 21 | @Autowired 22 | ChapterService chapterService; 23 | 24 | @Autowired 25 | NovelService novelService; 26 | 27 | @GetMapping("/novels/{novelId}/chapters") 28 | public Page4Navigator list(@PathVariable("novelId") int novelId, @RequestParam(value = "start", defaultValue = "0") int start, 29 | @RequestParam(value = "size", defaultValue = "5") int size){ 30 | start = start<0?0:start; 31 | Page4Navigator page4Navigator = chapterService.list(novelId, start, size, 5); 32 | return page4Navigator; 33 | } 34 | 35 | @GetMapping("/chapters/{id}") 36 | public Chapter get(@PathVariable("id") int id){ 37 | Chapter chapter = chapterService.get(id); 38 | return chapter; 39 | } 40 | 41 | @PostMapping("/chapters") 42 | public Chapter get(@RequestBody Chapter chapter){ 43 | chapter.setCreateTime(new Date()); 44 | chapter.setUpdateTime(new Date()); 45 | chapterService.add(chapter); 46 | return chapter; 47 | } 48 | 49 | @DeleteMapping("/chapters/{id}") 50 | public String delete(@PathVariable("id") int id){ 51 | chapterService.delete(id); 52 | return null; 53 | } 54 | 55 | @PutMapping("/chapters") 56 | public Object update(@RequestBody Chapter chapter){ 57 | chapterService.update(chapter); 58 | return chapter; 59 | } 60 | 61 | } 62 | -------------------------------------------------------------------------------- /src/main/webapp/page/news/newsList.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 文章列表--小说后台管理 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 |
      17 |
      18 | 19 |
      20 |
      21 | 22 |
      23 | 搜索 24 |
      25 |
      26 | 添加文章 27 |
      28 |
      29 | 批量删除 30 |
      31 | 32 |
      33 |
      34 | 35 | 44 | 45 | 46 | 51 | 52 | 53 | 54 | 55 | -------------------------------------------------------------------------------- /src/main/webapp/page/user/userGrade.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 会员等级--layui后台管理模板 2.0 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 |
      17 |
      18 | 新增等级 其实这里应该有些说明性的东西,但是因为语文没有学好,没办法,还是需要的人自己写点描述吧 19 |
      20 |
      21 | 38 | 41 |
      42 | 43 | 44 | 45 | -------------------------------------------------------------------------------- /src/main/webapp/page/systemSetting/linksAdd.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 文章列表--layui后台管理模板 2.0 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 |
      17 |
      18 | 21 |
      22 |
      23 | 24 |
      25 | 26 |
      27 |
      28 |
      29 | 30 |
      31 | 32 |
      33 |
      34 |
      35 | 36 |
      37 | 38 |
      39 |
      40 |
      41 | 42 |
      43 | 44 |
      45 |
      46 |
      47 | 48 |
      49 |
      50 | 51 | 52 | 53 | -------------------------------------------------------------------------------- /src/main/java/com/zhujinghui/novel/service/NovelService.java: -------------------------------------------------------------------------------- 1 | package com.zhujinghui.novel.service; 2 | 3 | import com.zhujinghui.novel.dao.GenreDAO; 4 | import com.zhujinghui.novel.dao.NovelDAO; 5 | import com.zhujinghui.novel.pojo.Genre; 6 | import com.zhujinghui.novel.pojo.Novel; 7 | import com.zhujinghui.novel.util.Page4Navigator; 8 | import org.springframework.beans.factory.annotation.Autowired; 9 | import org.springframework.data.domain.Page; 10 | import org.springframework.data.domain.PageRequest; 11 | import org.springframework.data.domain.Pageable; 12 | import org.springframework.data.domain.Sort; 13 | import org.springframework.stereotype.Service; 14 | 15 | /** 16 | * @Author: JinghuiZhu 17 | * @Description: 小说Service 18 | * @Date: Created in 17:30 2019/2/22 19 | * @Modified By: 20 | */ 21 | 22 | @Service 23 | public class NovelService { 24 | 25 | @Autowired 26 | NovelDAO novelDAO; 27 | 28 | @Autowired 29 | GenreDAO genreDAO; 30 | 31 | /** 32 | * 分页查询小说 33 | * 34 | * @param genreId 类别id 35 | * @param start 页码 36 | * @param size 每页记录数 37 | * @param navigatePages 显示的分页超链 38 | * @return 小说分页封装类 39 | */ 40 | public Page4Navigator list(int genreId, int start, int size, int navigatePages){ 41 | Genre genre = genreDAO.getOne(genreId); 42 | Sort sort = new Sort(Sort.Direction.DESC, "id"); 43 | Pageable pageable = PageRequest.of(start, size, sort); 44 | Page page = novelDAO.findByGenre(genre, pageable); 45 | return new Page4Navigator<>(page,navigatePages); 46 | } 47 | 48 | /** 49 | * 添加小说 50 | * 51 | * @param novel 小说 52 | */ 53 | public void add(Novel novel){ 54 | novelDAO.save(novel); 55 | } 56 | 57 | /** 58 | * 根据id 删除小说 59 | * 60 | * @param id 小说主键id 61 | */ 62 | public void delete(int id){ 63 | novelDAO.deleteById(id); 64 | } 65 | 66 | /** 67 | * 根据id 查询小说 68 | * 69 | * @param id 小说主键id 70 | * @return novel 小说 71 | */ 72 | public Novel get(int id){ 73 | Novel novel = novelDAO.findById(id).get(); 74 | return novel; 75 | } 76 | 77 | /** 78 | * 更新小说 79 | * 80 | * @param novel 小说 81 | */ 82 | public void update(Novel novel){ 83 | novelDAO.save(novel); 84 | } 85 | 86 | } 87 | -------------------------------------------------------------------------------- /src/main/webapp/page/login/login.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 登录--小说后台管理 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 |
      18 | 19 |
      20 | 21 | 22 |
      23 |
      24 | 25 | 26 |
      27 |
      28 | 29 | 30 | 31 |
      32 |
      33 | 34 |
      35 |
      36 | 37 | 38 | 39 |
      40 |
      41 | 42 | 43 | 44 | 45 | -------------------------------------------------------------------------------- /src/main/webapp/json/navs.json: -------------------------------------------------------------------------------- 1 | { 2 | "contentManagement": [ 3 | { 4 | "title": "小说类别", 5 | "icon": "icon-text", 6 | "href": "page/news/genreList.html", 7 | "spread": false 8 | }, 9 | { 10 | "title": "小说列表", 11 | "icon": "icon-text", 12 | "href": "page/news/newsList.html", 13 | "spread": false 14 | }, 15 | { 16 | "title": "图片管理", 17 | "icon": "", 18 | "href": "page/img/images.html", 19 | "spread": false 20 | }, 21 | { 22 | "title": "其他页面", 23 | "icon": "", 24 | "href": "", 25 | "spread": false, 26 | "children": [ 27 | { 28 | "title": "404页面", 29 | "icon": "", 30 | "href": "page/404.html", 31 | "spread": false 32 | }, 33 | { 34 | "title": "登录", 35 | "icon": "", 36 | "href": "page/login/login.html", 37 | "spread": false, 38 | "target": "_blank" 39 | } 40 | ] 41 | } 42 | ], 43 | "memberCenter": [ 44 | { 45 | "title": "用户中心", 46 | "icon": "", 47 | "href": "page/user/userList.html", 48 | "spread": false 49 | }, 50 | { 51 | "title": "会员等级", 52 | "icon": "icon-vip", 53 | "href": "page/user/userGrade.html", 54 | "spread": false 55 | } 56 | ], 57 | "systemeSttings": [ 58 | { 59 | "title": "系统基本参数", 60 | "icon": "", 61 | "href": "page/systemSetting/basicParameter.html", 62 | "spread": false 63 | },{ 64 | "title": "系统日志", 65 | "icon": "icon-log", 66 | "href": "page/systemSetting/logs.html", 67 | "spread": false 68 | },{ 69 | "title": "友情链接", 70 | "icon": "", 71 | "href": "page/systemSetting/linkList.html", 72 | "spread": false 73 | },{ 74 | "title": "图标管理", 75 | "icon": "", 76 | "href": "page/systemSetting/icons.html", 77 | "spread": false 78 | } 79 | ], 80 | "seraphApi": [ 81 | { 82 | "title": "三级联动模块", 83 | "icon": "icon-mokuai", 84 | "href": "page/doc/addressDoc.html", 85 | "spread": false 86 | },{ 87 | "title": "bodyTab模块", 88 | "icon": "icon-mokuai", 89 | "href": "page/doc/bodyTabDoc.html", 90 | "spread": false 91 | },{ 92 | "title": "三级菜单", 93 | "icon": "icon-mokuai", 94 | "href": "page/doc/navDoc.html", 95 | "spread": false 96 | } 97 | ] 98 | } 99 | 100 | 101 | -------------------------------------------------------------------------------- /src/main/java/com/zhujinghui/novel/service/ChapterService.java: -------------------------------------------------------------------------------- 1 | package com.zhujinghui.novel.service; 2 | 3 | import com.zhujinghui.novel.dao.ChapterDAO; 4 | import com.zhujinghui.novel.dao.NovelDAO; 5 | import com.zhujinghui.novel.pojo.Chapter; 6 | import com.zhujinghui.novel.pojo.Novel; 7 | import com.zhujinghui.novel.util.Page4Navigator; 8 | import org.springframework.beans.factory.annotation.Autowired; 9 | import org.springframework.data.domain.Page; 10 | import org.springframework.data.domain.PageRequest; 11 | import org.springframework.data.domain.Pageable; 12 | import org.springframework.data.domain.Sort; 13 | import org.springframework.stereotype.Service; 14 | 15 | /** 16 | * @Author: JinghuiZhu 17 | * @Description: 小说章节Service 18 | * @Date: Created in 16:44 2019/2/25 19 | * @Modified By: 20 | */ 21 | 22 | @Service 23 | public class ChapterService { 24 | 25 | @Autowired 26 | ChapterDAO chapterDAO; 27 | 28 | @Autowired 29 | NovelDAO novelDAO; 30 | 31 | /** 32 | * 分页查询章节 33 | * 34 | * @param novelId 小说id 35 | * @param start 页码 36 | * @param size 每页记录数 37 | * @param navigatePages 显示的分页链接 38 | * @return 章节分页封装类 39 | */ 40 | public Page4Navigator list(int novelId, int start, int size, int navigatePages){ 41 | Novel novel = novelDAO.getOne(novelId); 42 | Sort sort = new Sort(Sort.Direction.DESC, "id"); 43 | Pageable pageable = PageRequest.of(start, size, sort); 44 | Page page = chapterDAO.findByNovel(novel, pageable); 45 | return new Page4Navigator<>(page,navigatePages); 46 | } 47 | 48 | /** 49 | * 添加章节 50 | * 51 | * @param chapter 章节 52 | */ 53 | public void add(Chapter chapter){ 54 | chapterDAO.save(chapter); 55 | } 56 | 57 | /** 58 | * 根据id 删除章节 59 | * @param id 章节id 60 | */ 61 | public void delete(int id){ 62 | chapterDAO.deleteById(id); 63 | } 64 | 65 | /** 66 | * 根据id 查询章节 67 | * @param id 章节id 68 | * @return 69 | */ 70 | public Chapter get(int id){ 71 | Chapter chapter = chapterDAO.findById(id).get(); 72 | return chapter; 73 | } 74 | 75 | /** 76 | * 更新章节 77 | * 78 | * @param chapter 章节 79 | */ 80 | public void update(Chapter chapter){ 81 | chapterDAO.save(chapter); 82 | } 83 | 84 | } 85 | -------------------------------------------------------------------------------- /src/main/java/com/zhujinghui/novel/pojo/Genre.java: -------------------------------------------------------------------------------- 1 | package com.zhujinghui.novel.pojo; 2 | 3 | import com.fasterxml.jackson.annotation.JsonIgnoreProperties; 4 | 5 | import javax.persistence.*; 6 | import java.util.Date; 7 | 8 | /** 9 | * @Author: JinghuiZhu 10 | * @Description: 小说类别POJO 11 | * @Date: Created in 15:34 2019/2/21 12 | * @Modified By: 13 | */ 14 | 15 | @Entity 16 | @Table(name = "t_genre") 17 | @JsonIgnoreProperties(value={"hibernateLazyInitializer","handler","fieldHandler"}) 18 | public class Genre { 19 | /** 20 | * 主键ID 21 | */ 22 | @Id 23 | @GeneratedValue(strategy = GenerationType.IDENTITY) 24 | @Column(name = "id") 25 | private int id; 26 | 27 | /** 28 | * 小说类别名 29 | */ 30 | @Column(name = "name") 31 | private String name; 32 | 33 | /** 34 | * 创建人id 35 | */ 36 | @Column(name = "create_uid") 37 | private int createUid; 38 | 39 | /** 40 | * 创建时间 41 | */ 42 | @Column(name = "create_time") 43 | private Date createTime; 44 | 45 | /** 46 | * 修改人id 47 | */ 48 | @Column(name = "update_uid") 49 | private Integer updateUid; 50 | 51 | /** 52 | * 修改时间 53 | */ 54 | @Column(name = "update_time") 55 | private Date updateTime; 56 | 57 | public int getId() { 58 | return id; 59 | } 60 | 61 | public void setId(int id) { 62 | this.id = id; 63 | } 64 | 65 | public String getName() { 66 | return name; 67 | } 68 | 69 | public void setName(String name) { 70 | this.name = name; 71 | } 72 | 73 | public int getCreateUid() { 74 | return createUid; 75 | } 76 | 77 | public void setCreateUid(int createUid) { 78 | this.createUid = createUid; 79 | } 80 | 81 | public Date getCreateTime() { 82 | return createTime; 83 | } 84 | 85 | public void setCreateTime(Date createTime) { 86 | this.createTime = createTime; 87 | } 88 | 89 | public void setUpdateTime(Date updateTime) { 90 | this.updateTime = updateTime; 91 | } 92 | 93 | public Integer getUpdateUid() { 94 | return updateUid; 95 | } 96 | 97 | public void setUpdateUid(Integer updateUid) { 98 | this.updateUid = updateUid; 99 | } 100 | 101 | } 102 | -------------------------------------------------------------------------------- /src/main/webapp/layui/lay/modules/util.js: -------------------------------------------------------------------------------- 1 | /** layui-v2.2.5 MIT License By https://www.layui.com */ 2 | ;layui.define("jquery",function(e){"use strict";var t=layui.$,i={fixbar:function(e){var i,o,a="layui-fixbar",r="layui-fixbar-top",n=t(document),l=t("body");e=t.extend({showHeight:200},e),e.bar1=e.bar1===!0?"":e.bar1,e.bar2=e.bar2===!0?"":e.bar2,e.bgcolor=e.bgcolor?"background-color:"+e.bgcolor:"";var c=[e.bar1,e.bar2,""],g=t(['
        ',e.bar1?'
      • '+c[0]+"
      • ":"",e.bar2?'
      • '+c[1]+"
      • ":"",'
      • '+c[2]+"
      • ","
      "].join("")),s=g.find("."+r),u=function(){var t=n.scrollTop();t>=e.showHeight?i||(s.show(),i=1):i&&(s.hide(),i=0)};t("."+a)[0]||("object"==typeof e.css&&g.css(e.css),l.append(g),u(),g.find("li").on("click",function(){var i=t(this),o=i.attr("lay-type");"top"===o&&t("html,body").animate({scrollTop:0},200),e.click&&e.click.call(this,o)}),n.on("scroll",function(){clearTimeout(o),o=setTimeout(function(){u()},100)}))},countdown:function(e,t,i){var o=this,a="function"==typeof t,r=new Date(e).getTime(),n=new Date(!t||a?(new Date).getTime():t).getTime(),l=r-n,c=[Math.floor(l/864e5),Math.floor(l/36e5)%24,Math.floor(l/6e4)%60,Math.floor(l/1e3)%60];a&&(i=t);var g=setTimeout(function(){o.countdown(e,n+1e3,i)},1e3);return i&&i(l>0?c:[0,0,0,0],t,g),l<=0&&clearTimeout(g),g},timeAgo:function(e,t){var i=this,o=[[],[]],a=(new Date).getTime()-new Date(e).getTime();return a>6912e5?(a=new Date(e),o[0][0]=i.digit(a.getFullYear(),4),o[0][1]=i.digit(a.getMonth()+1),o[0][2]=i.digit(a.getDate()),t||(o[1][0]=i.digit(a.getHours()),o[1][1]=i.digit(a.getMinutes()),o[1][2]=i.digit(a.getSeconds())),o[0].join("-")+" "+o[1].join(":")):a>=864e5?(a/1e3/60/60/24|0)+"天前":a>=36e5?(a/1e3/60/60|0)+"小时前":a>=12e4?(a/1e3/60|0)+"分钟前":a<0?"未来":"刚刚"},digit:function(e,t){var i="";e=String(e),t=t||2;for(var o=e.length;o 2 | 3 | 4 | 5 | 修改密码--layui后台管理模板 2.0 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 |
      17 |
      18 |
      旧密码请输入“123456”,新密码必须两次输入一致才能提交
      19 |
      20 | 21 |
      22 | 23 |
      24 |
      25 |
      26 | 27 |
      28 | 29 |
      30 |
      31 |
      32 | 33 |
      34 | 35 |
      36 |
      37 |
      38 | 39 |
      40 | 41 |
      42 |
      43 |
      44 |
      45 | 46 | 47 |
      48 |
      49 |
      50 |
      51 | 52 | 53 | 54 | -------------------------------------------------------------------------------- /src/main/webapp/js/address.js: -------------------------------------------------------------------------------- 1 | layui.define(["form","jquery"],function(exports){ 2 | var form = layui.form, 3 | $ = layui.jquery, 4 | Address = { 5 | provinces : function() { 6 | //加载省数据 7 | var proHtml = '',that = this; 8 | $.get("../../json/address.json", function (data) { 9 | for (var i = 0; i < data.length; i++) { 10 | proHtml += ''; 11 | } 12 | //初始化省数据 13 | $("select[name=province]").append(proHtml); 14 | form.render(); 15 | form.on('select(province)', function (proData) { 16 | $("select[name=area]").html(''); 17 | var value = proData.value; 18 | if (value > 0) { 19 | that.citys(data[$(this).index() - 1].childs); 20 | } else { 21 | $("select[name=city]").attr("disabled", "disabled"); 22 | } 23 | }); 24 | }) 25 | }, 26 | //加载市数据 27 | citys : function(citys) { 28 | var cityHtml = '',that = this; 29 | for (var i = 0; i < citys.length; i++) { 30 | cityHtml += ''; 31 | } 32 | $("select[name=city]").html(cityHtml).removeAttr("disabled"); 33 | form.render(); 34 | form.on('select(city)', function (cityData) { 35 | var value = cityData.value; 36 | if (value > 0) { 37 | that.areas(citys[$(this).index() - 1].childs); 38 | } else { 39 | $("select[name=area]").attr("disabled", "disabled"); 40 | } 41 | }); 42 | }, 43 | //加载县/区数据 44 | areas : function(areas) { 45 | var areaHtml = ''; 46 | for (var i = 0; i < areas.length; i++) { 47 | areaHtml += ''; 48 | } 49 | $("select[name=area]").html(areaHtml).removeAttr("disabled"); 50 | form.render(); 51 | } 52 | }; 53 | exports("address",Address); 54 | }) -------------------------------------------------------------------------------- /src/main/webapp/page/news/genreList.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 文章列表--小说后台管理 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 |
      17 |
      18 | 19 |
      20 |
      21 | 22 |
      23 | 搜索 24 |
      25 |
      26 | 添加类别 27 |
      28 |
      29 | 批量删除 30 |
      31 | 32 |
      33 |
      34 | 35 | 44 | 45 | 46 | 51 | 52 | 53 | 54 | 55 | -------------------------------------------------------------------------------- /src/main/java/com/zhujinghui/novel/service/GenreService.java: -------------------------------------------------------------------------------- 1 | package com.zhujinghui.novel.service; 2 | 3 | import com.zhujinghui.novel.dao.GenreDAO; 4 | import com.zhujinghui.novel.pojo.Genre; 5 | import com.zhujinghui.novel.util.Page4Navigator; 6 | import org.springframework.beans.factory.annotation.Autowired; 7 | import org.springframework.data.domain.Page; 8 | import org.springframework.data.domain.PageRequest; 9 | import org.springframework.data.domain.Pageable; 10 | import org.springframework.data.domain.Sort; 11 | import org.springframework.stereotype.Service; 12 | 13 | import java.util.List; 14 | 15 | /** 16 | * @Author: JinghuiZhu 17 | * @Description: 小说类别Service 18 | * @Date: Created in 15:43 2019/2/21 19 | * @Modified By: 20 | */ 21 | 22 | @Service 23 | public class GenreService { 24 | 25 | @Autowired 26 | GenreDAO genreDAO; 27 | 28 | /** 29 | * 分页查询小说 30 | * 31 | * @param start 页码 32 | * @param size 每页记录数 33 | * @param navigatePages 显示的分页超链 34 | * @return Page4Navigator 类别分页封装类 35 | */ 36 | public Page4Navigator list(int start, int size, int navigatePages){ 37 | Sort sort = new Sort(Sort.Direction.DESC,"id"); 38 | Pageable pageable = PageRequest.of(start,size,sort); 39 | Page page = genreDAO.findAll(pageable); 40 | return new Page4Navigator(page,navigatePages); 41 | } 42 | 43 | /** 44 | * 查询所有小说类别 45 | * 46 | * @param 47 | * @return List 48 | */ 49 | public List list(){ 50 | Sort sort = new Sort(Sort.Direction.DESC,"id"); 51 | return genreDAO.findAll(sort); 52 | } 53 | 54 | /** 55 | * 添加小说类别 56 | * 57 | * @param genre 小说类别 58 | * @return void 59 | */ 60 | public void add(Genre genre){ 61 | genreDAO.save(genre); 62 | } 63 | 64 | /** 65 | * 删除小说类别 66 | * 67 | * @param id 小说类别主键 68 | * @return void 69 | */ 70 | public void delete(int id){ 71 | genreDAO.deleteById(id); 72 | } 73 | 74 | /** 75 | * 根据id 查询小说类别 76 | * @param id 小说类别主键 77 | * @return genre 查询的小说类别 78 | */ 79 | public Genre get(int id){ 80 | Genre genre = genreDAO.findById(id).get(); 81 | return genre; 82 | } 83 | 84 | /** 85 | * 更新小说类别 86 | * @param genre 小说类别 87 | */ 88 | public void update(Genre genre){ 89 | genreDAO.save(genre); 90 | } 91 | } 92 | -------------------------------------------------------------------------------- /src/main/java/com/zhujinghui/novel/service/ReaderService.java: -------------------------------------------------------------------------------- 1 | package com.zhujinghui.novel.service; 2 | 3 | import com.zhujinghui.novel.dao.ReaderDAO; 4 | import com.zhujinghui.novel.pojo.Reader; 5 | import com.zhujinghui.novel.util.Page4Navigator; 6 | import org.springframework.beans.factory.annotation.Autowired; 7 | import org.springframework.data.domain.Page; 8 | import org.springframework.data.domain.PageRequest; 9 | import org.springframework.data.domain.Pageable; 10 | import org.springframework.data.domain.Sort; 11 | import org.springframework.stereotype.Service; 12 | 13 | import java.util.List; 14 | 15 | /** 16 | * @Author: JinghuiZhu 17 | * @Description: 读者Service 18 | * @Date: Created in 14:09 2019/2/26 19 | * @Modified By: 20 | */ 21 | 22 | @Service 23 | public class ReaderService { 24 | 25 | @Autowired 26 | ReaderDAO readerDAO; 27 | 28 | /** 29 | * 分页查询读者信息 30 | * 31 | * @param start 页码 32 | * @param size 每页记录数 33 | * @param navigatePages 显示的分页超链 34 | * @return Page4Navigator 读者分页封装类 35 | */ 36 | public Page4Navigator list(int start, int size, int navigatePages){ 37 | Sort sort = new Sort(Sort.Direction.DESC,"id"); 38 | Pageable pageable = PageRequest.of(start,size,sort); 39 | Page page = readerDAO.findAll(pageable); 40 | return new Page4Navigator<>(page,navigatePages); 41 | } 42 | 43 | /** 44 | * 查询所有读者信息 45 | * 46 | * @param 47 | * @return List 48 | */ 49 | public List list(){ 50 | Sort sort = new Sort(Sort.Direction.DESC,"id"); 51 | return readerDAO.findAll(sort); 52 | } 53 | 54 | /** 55 | * 读者注册 56 | * 57 | * @param reader 读者 58 | * @return void 59 | */ 60 | public void add(Reader reader){ 61 | readerDAO.save(reader); 62 | } 63 | 64 | /** 65 | * 读者注销账号 66 | * 67 | * @param id 读者主键 68 | * @return void 69 | */ 70 | public void delete(int id){ 71 | readerDAO.deleteById(id); 72 | } 73 | 74 | /** 75 | * 根据id 查询读者 76 | * @param id 读者主键 77 | * @return genre 查询读者信息 78 | */ 79 | public Reader get(int id){ 80 | Reader reader = readerDAO.findById(id).get(); 81 | return reader; 82 | } 83 | 84 | /** 85 | * 更新读者信息 86 | * @param reader 读者 87 | */ 88 | public void update(Reader reader){ 89 | readerDAO.save(reader); 90 | } 91 | } 92 | -------------------------------------------------------------------------------- /src/main/java/com/zhujinghui/novel/service/AdminService.java: -------------------------------------------------------------------------------- 1 | package com.zhujinghui.novel.service; 2 | 3 | import com.zhujinghui.novel.dao.AdminDAO; 4 | import com.zhujinghui.novel.pojo.Admin; 5 | import com.zhujinghui.novel.util.Page4Navigator; 6 | import org.springframework.beans.factory.annotation.Autowired; 7 | import org.springframework.data.domain.Page; 8 | import org.springframework.data.domain.PageRequest; 9 | import org.springframework.data.domain.Pageable; 10 | import org.springframework.data.domain.Sort; 11 | import org.springframework.stereotype.Service; 12 | 13 | import java.util.List; 14 | 15 | /** 16 | * @Description: 管理员Service 17 | * @Author: jinghui.zhu 18 | * @CreateDate: 2019/2/27 22:42 19 | * @Version: 1.0 20 | */ 21 | 22 | @Service 23 | public class AdminService { 24 | 25 | @Autowired 26 | AdminDAO adminDAO; 27 | 28 | /** 29 | * 分页查询管理员信息 30 | * 31 | * @param start 页码 32 | * @param size 每页记录数 33 | * @param navigatePages 显示的分页超链 34 | * @return Page4Navigator 管理员分页封装类 35 | */ 36 | public Page4Navigator list(int start, int size, int navigatePages){ 37 | Sort sort = new Sort(Sort.Direction.DESC,"id"); 38 | Pageable pageable = PageRequest.of(start,size,sort); 39 | Page page = adminDAO.findAll(pageable); 40 | return new Page4Navigator<>(page,navigatePages); 41 | } 42 | 43 | /** 44 | * 查询所有管理员信息 45 | * 46 | * @param 47 | * @return List 48 | */ 49 | public List list(){ 50 | Sort sort = new Sort(Sort.Direction.DESC,"id"); 51 | return adminDAO.findAll(sort); 52 | } 53 | 54 | /** 55 | * 添加管理员 56 | * 57 | * @param admin 管理员 58 | * @return void 59 | */ 60 | public void add(Admin admin){ 61 | adminDAO.save(admin); 62 | } 63 | 64 | /** 65 | * 删除管理员 66 | * 67 | * @param id 管理员主键 68 | * @return void 69 | */ 70 | public void delete(int id){ 71 | adminDAO.deleteById(id); 72 | } 73 | 74 | /** 75 | * 根据id 查询管理员 76 | * 77 | * @param id 管理员主键 78 | * @return admin 管理员信息 79 | */ 80 | public Admin get(int id){ 81 | Admin admin = adminDAO.findById(id).get(); 82 | return admin; 83 | } 84 | 85 | /** 86 | * 更新管理员信息 87 | * 88 | * @param admin 管理员 89 | */ 90 | public void update(Admin admin){ 91 | adminDAO.save(admin); 92 | } 93 | } 94 | -------------------------------------------------------------------------------- /src/main/java/com/zhujinghui/novel/service/AuthorService.java: -------------------------------------------------------------------------------- 1 | package com.zhujinghui.novel.service; 2 | 3 | import com.zhujinghui.novel.dao.AuthorDAO; 4 | import com.zhujinghui.novel.pojo.Author; 5 | import com.zhujinghui.novel.util.Page4Navigator; 6 | import org.springframework.beans.factory.annotation.Autowired; 7 | import org.springframework.data.domain.Page; 8 | import org.springframework.data.domain.PageRequest; 9 | import org.springframework.data.domain.Pageable; 10 | import org.springframework.data.domain.Sort; 11 | import org.springframework.stereotype.Service; 12 | 13 | import java.util.List; 14 | 15 | /** 16 | * @Description: 作者Service 17 | * @Author: jinghui.zhu 18 | * @CreateDate: 2019/2/27 22:43 19 | * @Version: 1.0 20 | */ 21 | @Service 22 | public class AuthorService { 23 | 24 | @Autowired 25 | AuthorDAO authorDAO; 26 | 27 | /** 28 | * 分页查询读者信息 29 | * 30 | * @param start 页码 31 | * @param size 每页记录数 32 | * @param navigatePages 显示的分页超链 33 | * @return Page4Navigator 作者分页封装类 34 | */ 35 | public Page4Navigator list(int start, int size, int navigatePages){ 36 | Sort sort = new Sort(Sort.Direction.DESC,"id"); 37 | Pageable pageable = PageRequest.of(start,size,sort); 38 | Page page = authorDAO.findAll(pageable); 39 | return new Page4Navigator<>(page,navigatePages); 40 | } 41 | 42 | /** 43 | * 查询所有作者信息 44 | * 45 | * @param 46 | * @return List 47 | */ 48 | public List list(){ 49 | Sort sort = new Sort(Sort.Direction.DESC,"id"); 50 | return authorDAO.findAll(sort); 51 | } 52 | 53 | /** 54 | * 作者注册 55 | * 56 | * @param author 作者 57 | * @return void 58 | */ 59 | public void add(Author author){ 60 | authorDAO.save(author); 61 | } 62 | 63 | /** 64 | * 作者注销账号 65 | * 66 | * @param id 作者主键 67 | * @return void 68 | */ 69 | public void delete(int id){ 70 | authorDAO.deleteById(id); 71 | } 72 | 73 | /** 74 | * 根据id 查询作者 75 | * 76 | * @param id 作者主键 77 | * @return genre 作者信息 78 | */ 79 | public Author get(int id){ 80 | Author author = authorDAO.findById(id).get(); 81 | return author; 82 | } 83 | 84 | /** 85 | * 更新作者信息 86 | * 87 | * @param author 作者 88 | */ 89 | public void update(Author author){ 90 | authorDAO.save(author); 91 | } 92 | } 93 | -------------------------------------------------------------------------------- /src/main/java/com/zhujinghui/novel/util/ImageUtil.java: -------------------------------------------------------------------------------- 1 | package com.zhujinghui.novel.util; 2 | 3 | import javax.imageio.ImageIO; 4 | import java.awt.*; 5 | import java.awt.image.*; 6 | import java.io.File; 7 | import java.io.IOException; 8 | 9 | /** 10 | * @Author: JinghuiZhu 11 | * @Description: 上传图片工具类 12 | * @Date: Created in 10:59 2019/2/22 13 | * @Modified By: 14 | */ 15 | 16 | public class ImageUtil { 17 | public static BufferedImage change2jpg(File f) { 18 | try { 19 | Image i = Toolkit.getDefaultToolkit().createImage(f.getAbsolutePath()); 20 | PixelGrabber pg = new PixelGrabber(i, 0, 0, -1, -1, true); 21 | pg.grabPixels(); 22 | int width = pg.getWidth(), height = pg.getHeight(); 23 | final int[] RGB_MASKS = { 0xFF0000, 0xFF00, 0xFF }; 24 | final ColorModel RGB_OPAQUE = new DirectColorModel(32, RGB_MASKS[0], RGB_MASKS[1], RGB_MASKS[2]); 25 | DataBuffer buffer = new DataBufferInt((int[]) pg.getPixels(), pg.getWidth() * pg.getHeight()); 26 | WritableRaster raster = Raster.createPackedRaster(buffer, width, height, width, RGB_MASKS, null); 27 | BufferedImage img = new BufferedImage(RGB_OPAQUE, raster, false, null); 28 | return img; 29 | } catch (InterruptedException e) { 30 | // TODO Auto-generated catch block 31 | e.printStackTrace(); 32 | return null; 33 | } 34 | } 35 | 36 | public static void resizeImage(File srcFile, int width,int height, File destFile) { 37 | try { 38 | if(!destFile.getParentFile().exists()) 39 | destFile.getParentFile().mkdirs(); 40 | Image i = ImageIO.read(srcFile); 41 | i = resizeImage(i, width, height); 42 | ImageIO.write((RenderedImage) i, "jpg", destFile); 43 | } catch (IOException e) { 44 | // TODO Auto-generated catch block 45 | e.printStackTrace(); 46 | } 47 | } 48 | 49 | public static Image resizeImage(Image srcImage, int width, int height) { 50 | try { 51 | 52 | BufferedImage buffImg = null; 53 | buffImg = new BufferedImage(width, height, BufferedImage.TYPE_INT_RGB); 54 | buffImg.getGraphics().drawImage(srcImage.getScaledInstance(width, height, Image.SCALE_SMOOTH), 0, 0, null); 55 | 56 | return buffImg; 57 | } catch (Exception e) { 58 | // TODO Auto-generated catch block 59 | e.printStackTrace(); 60 | } 61 | return null; 62 | } 63 | } 64 | -------------------------------------------------------------------------------- /src/main/webapp/page/systemSetting/basicParameter.js: -------------------------------------------------------------------------------- 1 | layui.use(['form','layer','jquery'],function(){ 2 | var form = layui.form, 3 | layer = parent.layer === undefined ? layui.layer : top.layer, 4 | laypage = layui.laypage, 5 | $ = layui.jquery; 6 | 7 | var systemParameter; 8 | form.on("submit(systemParameter)",function(data){ 9 | systemParameter = '{"cmsName":"'+$(".cmsName").val()+'",'; //模版名称 10 | systemParameter += '"version":"'+$(".version").val()+'",'; //当前版本 11 | systemParameter += '"author":"'+$(".author").val()+'",'; //开发作者 12 | systemParameter += '"homePage":"'+$(".homePage").val()+'",'; //网站首页 13 | systemParameter += '"server":"'+$(".server").val()+'",'; //服务器环境 14 | systemParameter += '"dataBase":"'+$(".dataBase").val()+'",'; //数据库版本 15 | systemParameter += '"maxUpload":"'+$(".maxUpload").val()+'",'; //最大上传限制 16 | systemParameter += '"userRights":"'+$(".userRights").val()+'",'; //用户权限 17 | systemParameter += '"description":"'+$(".description").val()+'",'; //站点描述 18 | systemParameter += '"powerby":"'+$(".powerby").val()+'",'; //版权信息 19 | systemParameter += '"record":"'+$(".record").val()+'",'; //网站备案号 20 | systemParameter += '"keywords":"'+$(".keywords").val()+'"}'; //默认关键字 21 | window.sessionStorage.setItem("systemParameter",systemParameter); 22 | //弹出loading 23 | var index = top.layer.msg('数据提交中,请稍候',{icon: 16,time:false,shade:0.8}); 24 | setTimeout(function(){ 25 | layer.close(index); 26 | layer.msg("系统基本参数修改成功!"); 27 | },500); 28 | return false; 29 | }) 30 | 31 | 32 | //加载默认数据 33 | if(window.sessionStorage.getItem("systemParameter")){ 34 | var data = JSON.parse(window.sessionStorage.getItem("systemParameter")); 35 | fillData(data); 36 | }else{ 37 | $.ajax({ 38 | url : "../../json/systemParameter.json", 39 | type : "get", 40 | dataType : "json", 41 | success : function(data){ 42 | fillData(data); 43 | } 44 | }) 45 | } 46 | 47 | //填充数据方法 48 | function fillData(data){ 49 | $(".version").val(data.version); //当前版本 50 | $(".author").val(data.author); //开发作者 51 | $(".homePage").val(data.homePage); //网站首页 52 | $(".server").val(data.server); //服务器环境 53 | $(".dataBase").val(data.dataBase); //数据库版本 54 | $(".maxUpload").val(data.maxUpload); //最大上传限制 55 | $(".userRights").val(data.userRights);//当前用户权限 56 | $(".cmsName").val(data.cmsName); //模版名称 57 | $(".description").val(data.description);//站点描述 58 | $(".powerby").val(data.powerby); //版权信息 59 | $(".record").val(data.record); //网站备案号 60 | $(".keywords").val(data.keywords); //默认关键字 61 | } 62 | 63 | }) 64 | -------------------------------------------------------------------------------- /src/main/java/com/zhujinghui/novel/controller/NovelController.java: -------------------------------------------------------------------------------- 1 | package com.zhujinghui.novel.controller; 2 | 3 | import com.zhujinghui.novel.pojo.Novel; 4 | import com.zhujinghui.novel.service.GenreService; 5 | import com.zhujinghui.novel.service.NovelService; 6 | import com.zhujinghui.novel.util.Page4Navigator; 7 | import org.springframework.beans.factory.annotation.Autowired; 8 | import org.springframework.web.bind.annotation.*; 9 | 10 | import java.util.Date; 11 | 12 | /** 13 | * @Author: JinghuiZhu 14 | * @Description: 小说控制器 15 | * @Date: Created in 17:44 2019/2/22 16 | * @Modified By: 17 | */ 18 | 19 | @RestController 20 | public class NovelController { 21 | 22 | @Autowired 23 | NovelService novelService; 24 | 25 | @Autowired 26 | GenreService genreService; 27 | 28 | /** 29 | * 查询分页小说数据 30 | * 31 | * @param genreId 小说类别id 32 | * @param start 页码 33 | * @param size 每页记录数 34 | * @return 分页小说数据 35 | */ 36 | @GetMapping("/genres/{genreId}/novels") 37 | public Page4Navigator list(@PathVariable("genreId") int genreId, @RequestParam(value = "start", defaultValue = "0") int start, 38 | @RequestParam(value = "size", defaultValue = "5") int size){ 39 | start = start<0?0:start; 40 | Page4Navigator page4Navigator = novelService.list(genreId, start, size, 5); 41 | return page4Navigator; 42 | } 43 | 44 | /** 45 | * 根据id 查询小说 46 | * 47 | * @param id 小说主键id 48 | * @return novel 49 | */ 50 | @GetMapping("/novels/{id}") 51 | public Novel get(@PathVariable("id") int id){ 52 | Novel novel = novelService.get(id); 53 | return novel; 54 | } 55 | 56 | /** 57 | * 添加小说 58 | * 59 | * @param novel 小说 60 | * @return novel 添加属性后的小说 61 | */ 62 | @PostMapping("/novels") 63 | public Object add(@RequestBody Novel novel){ 64 | novel.setCreateTime(new Date()); 65 | novel.setUpdateTime(new Date()); 66 | novelService.add(novel); 67 | return novel; 68 | } 69 | 70 | /** 71 | * 删除小说 72 | * 73 | * @param id 小说主键id 74 | * @return null 75 | */ 76 | @DeleteMapping("/novels/{id}") 77 | public String delete(@PathVariable("id") int id){ 78 | novelService.delete(id); 79 | return null; 80 | } 81 | 82 | /** 83 | * 更新小说信息 84 | * 85 | * @param novel 86 | * @return novel 87 | */ 88 | @PutMapping("/novels") 89 | public Object update(@RequestBody Novel novel){ 90 | novelService.update(novel); 91 | return novel; 92 | } 93 | 94 | 95 | } 96 | -------------------------------------------------------------------------------- /src/main/webapp/js/cacheUserInfo.js: -------------------------------------------------------------------------------- 1 | layui.config({ 2 | base : "../../js/" 3 | }).use(['form','jquery',"address"],function() { 4 | var form = layui.form, 5 | $ = layui.jquery, 6 | address = layui.address; 7 | 8 | //判断是否设置过头像,如果设置过则修改顶部、左侧和个人资料中的头像,否则使用默认头像 9 | if(window.sessionStorage.getItem('userFace')){ 10 | $("#userFace").attr("src",window.sessionStorage.getItem('userFace')); 11 | $(".userAvatar").attr("src",$(".userAvatar").attr("src").split("images/")[0] + "images/" + window.sessionStorage.getItem('userFace').split("images/")[1]); 12 | }else{ 13 | $("#userFace").attr("src","../../images/face.jpg"); 14 | } 15 | 16 | //判断是否修改过用户信息,如果修改过则填充修改后的信息 17 | var menuText = $("#top_tabs",parent.document).text(); //判断打开的窗口是否存在“个人资料”页面 18 | var citys,areas; 19 | if(window.sessionStorage.getItem('userInfo')){ 20 | //获取省信息 21 | address.provinces(); 22 | var userInfo = JSON.parse(window.sessionStorage.getItem('userInfo')); 23 | var citys; 24 | $(".realName").val(userInfo.realName); //用户名 25 | $(".userSex input[value="+userInfo.sex+"]").attr("checked","checked"); //性别 26 | $(".userPhone").val(userInfo.userPhone); //手机号 27 | $(".userBirthday").val(userInfo.userBirthday); //出生年月 28 | //填充省份信息,同时调取市级信息列表 29 | $.get("../../json/address.json", function (addressData) { 30 | $(".userAddress select[name='province']").val(userInfo.province); //省 31 | var value = userInfo.province; 32 | if (value > 0) { 33 | address.citys(addressData[$(".userAddress select[name='province'] option[value='"+userInfo.province+"']").index()-1].childs); 34 | citys = addressData[$(".userAddress select[name='province'] option[value='"+userInfo.province+"']").index()-1].childs; 35 | } else { 36 | $('.userAddress select[name=city]').attr("disabled","disabled"); 37 | } 38 | $(".userAddress select[name='city']").val(userInfo.city); //市 39 | //填充市级信息,同时调取区县信息列表 40 | var value = userInfo.city; 41 | if (value > 0) { 42 | address.areas(citys[$(".userAddress select[name=city] option[value='"+userInfo.city+"']").index()-1].childs); 43 | } else { 44 | $('.userAddress select[name=area]').attr("disabled","disabled"); 45 | } 46 | $(".userAddress select[name='area']").val(userInfo.area); //区 47 | form.render(); 48 | }) 49 | for(key in userInfo){ 50 | if(key.indexOf("like") != -1){ 51 | $(".userHobby input[name='"+key+"']").attr("checked","checked"); 52 | } 53 | } 54 | $(".userEmail").val(userInfo.userEmail); //用户邮箱 55 | $(".myself").val(userInfo.myself); //自我评价 56 | form.render(); 57 | } 58 | }) -------------------------------------------------------------------------------- /src/main/java/com/zhujinghui/novel/controller/AdminPageController.java: -------------------------------------------------------------------------------- 1 | package com.zhujinghui.novel.controller; 2 | 3 | import org.springframework.stereotype.Controller; 4 | import org.springframework.web.bind.annotation.GetMapping; 5 | 6 | /** 7 | * @Author: JinghuiZhu 8 | * @Description: 后台页面跳转控制器 9 | * @Date: Created in 15:47 2019/2/21 10 | * @Modified By: 11 | */ 12 | 13 | @Controller 14 | public class AdminPageController { 15 | 16 | /** 17 | * 后台首页 18 | */ 19 | @GetMapping("/index") 20 | public String index(){ 21 | return "admin/index"; 22 | } 23 | 24 | /** 25 | * 后台首页 26 | */ 27 | @GetMapping("/layui") 28 | public String layui(){ 29 | return "index"; 30 | } 31 | 32 | /** 33 | * 重定向到 admin_genre_list 34 | */ 35 | @GetMapping(value = "/admin") 36 | public String admin(){ 37 | return "redirect:admin_genre_list"; 38 | } 39 | 40 | /** 41 | * 跳转到小说类别页面 42 | */ 43 | @GetMapping(value = "/admin_genre_list") 44 | public String listGenre(){ 45 | return "admin/genreList"; 46 | } 47 | 48 | /** 49 | * 跳转到小说类别编辑页面 50 | */ 51 | @GetMapping(value = "/admin_genre_edit") 52 | public String editGenre(){ 53 | return "admin/genreEdit"; 54 | } 55 | 56 | /** 57 | * 跳转到小说页面 58 | */ 59 | @GetMapping(value = "/admin_novel_list") 60 | public String listNovel(){ 61 | return "admin/novelList"; 62 | } 63 | 64 | /** 65 | * 跳转到小说编辑页面 66 | */ 67 | @GetMapping(value = "admin_novel_edit") 68 | public String editNovel(){ 69 | return "admin/novelEdit"; 70 | } 71 | 72 | /** 73 | * 跳转到章节页面 74 | */ 75 | @GetMapping(value = "admin_chapter_list") 76 | public String listChapter(){ 77 | return "admin/chapterList"; 78 | } 79 | 80 | /** 81 | * 跳转到章节编辑页面 82 | */ 83 | @GetMapping(value = "admin_chapter_edit") 84 | public String editChapter(){ 85 | return "admin/chapterEdit"; 86 | } 87 | 88 | /** 89 | * 跳转到读者管理页面 90 | */ 91 | @GetMapping(value = "admin_reader_list") 92 | public String listReader(){ 93 | return "admin/readerList"; 94 | } 95 | 96 | /** 97 | * 跳转到读者编辑界面 98 | */ 99 | @GetMapping(value = "admin_reader_edit") 100 | public String editReader(){ 101 | return "admin/readerEdit"; 102 | } 103 | 104 | /** 105 | * 跳转到管理员信息页面 106 | */ 107 | @GetMapping(value = "admin_admin_list") 108 | public String listAdmin(){ 109 | return "admin/adminList"; 110 | } 111 | 112 | /** 113 | * 跳转到管理员编辑界面 114 | */ 115 | @GetMapping(value = "admin_admin_edit") 116 | public String editAdmin(){ 117 | return "admin/adminEdit"; 118 | } 119 | 120 | } 121 | -------------------------------------------------------------------------------- /src/main/webapp/page/doc/navDoc.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 三级菜单使用文档--layui后台管理模板 2.0 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 |
      17 | 其实本模版中的三级菜单的展示方式和实际开发中的做法是不一样的,下面将说一下本模版中的做法 18 |
      19 |
      20 | 实际开发 21 |
      22 |

      在实际的开发中,无论是顶部菜单还是左侧菜单都应该是通过接口获取的。首先获取顶部菜单,然后点击顶级菜单通过传参再次访问接口来获取二级、三级菜单。

      23 |
      24 | 本模版的做法 25 |
      26 |

      由于顶部菜单是大分类,不会有太多,所以在本模版中是直接写死的,代码如下【具体请看index.html第25-36行】:

      27 |
      28 | 		<dd data-menu="seraphApi"><a href="javascript:;"><i class="layui-icon" data-icon="&#xe705;">&#xe705;</i><cite>使用文档</cite></a></dd>
      29 | 		请注意这里面的“data-menu”属性,此属性值需要和json中的字段名对应以便能够进行通过此属性查找对应的子菜单
      30 | 	
      31 |

      然后通过index.js中的代码进行循环渲染,就成了当前大家看到的这个样子了,js代码如下【具体请看index.js中的第18-38行】:

      32 |
      33 | 		function getData(json){
      34 | 		    $.get("接口路径",function(data){
      35 | 		        if(json == "contentManagement"){   //此处即实际开发中传递的参数
      36 | 		            dataStr = data.contentManagement;   //获取到当前顶级菜单下的子菜单渲染到左侧
      37 | 		            tab.render();
      38 | 		        }
      39 | 		    })
      40 | 		}
      41 | 	
      42 |
      43 |

      如果不动大框架的前提下,请严格按照菜单数据格式返回数据,菜单数据格式请参考:bodyTab模块去看看菜单数据格式

      44 |
      45 | 46 | 47 | 65 | 66 | -------------------------------------------------------------------------------- /src/main/webapp/layui/lay/modules/tree.js: -------------------------------------------------------------------------------- 1 | /** layui-v2.2.5 MIT License By https://www.layui.com */ 2 | ;layui.define("jquery",function(e){"use strict";var o=layui.$,a=layui.hint(),i="layui-tree-enter",r=function(e){this.options=e},t={arrow:["",""],checkbox:["",""],radio:["",""],branch:["",""],leaf:""};r.prototype.init=function(e){var o=this;e.addClass("layui-box layui-tree"),o.options.skin&&e.addClass("layui-tree-skin-"+o.options.skin),o.tree(e),o.on(e)},r.prototype.tree=function(e,a){var i=this,r=i.options,n=a||r.nodes;layui.each(n,function(a,n){var l=n.children&&n.children.length>0,c=o('
        '),s=o(["
      • ",function(){return l?''+(n.spread?t.arrow[1]:t.arrow[0])+"":""}(),function(){return r.check?''+("checkbox"===r.check?t.checkbox[0]:"radio"===r.check?t.radio[0]:"")+"":""}(),function(){return'"+(''+(l?n.spread?t.branch[1]:t.branch[0]:t.leaf)+"")+(""+(n.name||"未命名")+"")}(),"
      • "].join(""));l&&(s.append(c),i.tree(c,n.children)),e.append(s),"function"==typeof r.click&&i.click(s,n),i.spread(s,n),r.drag&&i.drag(s,n)})},r.prototype.click=function(e,o){var a=this,i=a.options;e.children("a").on("click",function(e){layui.stope(e),i.click(o)})},r.prototype.spread=function(e,o){var a=this,i=(a.options,e.children(".layui-tree-spread")),r=e.children("ul"),n=e.children("a"),l=function(){e.data("spread")?(e.data("spread",null),r.removeClass("layui-show"),i.html(t.arrow[0]),n.find(".layui-icon").html(t.branch[0])):(e.data("spread",!0),r.addClass("layui-show"),i.html(t.arrow[1]),n.find(".layui-icon").html(t.branch[1]))};r[0]&&(i.on("click",l),n.on("dblclick",l))},r.prototype.on=function(e){var a=this,r=a.options,t="layui-tree-drag";e.find("i").on("selectstart",function(e){return!1}),r.drag&&o(document).on("mousemove",function(e){var i=a.move;if(i.from){var r=(i.to,o('
        '));e.preventDefault(),o("."+t)[0]||o("body").append(r);var n=o("."+t)[0]?o("."+t):r;n.addClass("layui-show").html(i.from.elem.children("a").html()),n.css({left:e.pageX+10,top:e.pageY+10})}}).on("mouseup",function(){var e=a.move;e.from&&(e.from.elem.children("a").removeClass(i),e.to&&e.to.elem.children("a").removeClass(i),a.move={},o("."+t).remove())})},r.prototype.move={},r.prototype.drag=function(e,a){var r=this,t=(r.options,e.children("a")),n=function(){var t=o(this),n=r.move;n.from&&(n.to={item:a,elem:e},t.addClass(i))};t.on("mousedown",function(){var o=r.move;o.from={item:a,elem:e}}),t.on("mouseenter",n).on("mousemove",n).on("mouseleave",function(){var e=o(this),a=r.move;a.from&&(delete a.to,e.removeClass(i))})},e("tree",function(e){var i=new r(e=e||{}),t=o(e.elem);return t[0]?void i.init(t):a.error("layui.tree 没有找到"+e.elem+"元素")})}); -------------------------------------------------------------------------------- /src/main/webapp/README.md: -------------------------------------------------------------------------------- 1 | ``` 2 | 本模版已进行作品版权证明,不管以何种形式获取的源码,请勿进行出售或者上传到任何素材网站【同时也请各站长自觉遵守】,否则将追究相应的责任 3 | ``` 4 | ### 为我点赞 5 | http://fly.layui.com/case/u/3198216 6 | ### 在线预览 7 | http://www.layuicms.com/v2/index.html 8 | ``` 9 | 技术交流企鹅群:576881857 10 | ``` 11 | ### 模版效果预览 12 | 首页 13 | ![首页](https://gitee.com/uploads/images/2018/0131/110933_38bfb6cc_1404064.jpeg "QQ截图20180131110811.jpg") 14 | 个人资料 15 | ![个人资料](https://gitee.com/uploads/images/2018/0131/110954_76645863_1404064.jpeg "QQ截图20180131110823.jpg") 16 | 文章发布 17 | ![文章发布](https://gitee.com/uploads/images/2018/0131/111048_388796de_1404064.jpeg "QQ截图20180131110844.jpg") 18 | 使用文档 19 | ![使用文档](https://gitee.com/uploads/images/2018/0131/111113_a073dc5d_1404064.jpeg "QQ截图20180131110908.jpg") 20 | ### 更新日志 21 | - 顶部高度修改为了50px,如果有朋友感觉还是原来的高度更好,请将index.css文件中最底部的4行样式去掉即可,有注释 22 | - 郑重提示:由于后期会对此框架进行多次开发,基本上修改的是大框架,所以强烈不建议对index.js/bodyTab.js进行修改,以便后期的更新能够直接覆盖升级。【以后主要侧重组件开发和功能优化,由于能力有限,请大家多多担待】 23 | - 框架采用最新的layui2.x进行对1.0版本的重写,完全不同于1.0版本的模版,不能覆盖升级 24 | - 由于本人对设计和色差之类的不太感冒,所以一些布局和颜色搭配不是太完美,在此跟大家说声抱歉,大家可以根据自己的喜好进行一些调整 25 | - 新增“系统日志”、“会员等级”、“图标管理”、“使用文档”等页面,新增“功能设置”、“清除缓存”、“编辑文章”等功能 26 | - 由于后期将会整合layIM,所以将原有的“消息”页面删除了,虽然会整合layIM,但是不会提供layIM的下载,如果有需求的朋友可以去进行layIM的授权 27 | - 删除天气组件【感觉没什么作用,如果需要的可以自行去“心知天气”或另外的第三方组件中设置添加】 28 | - 由于项目是响应式,但是table不支持响应式,所以拖动浏览器改变分辨率的情况table可能展示不太友好,之前用window.resize()方法实现了托动改变大小,但是发现每拖动1px就会请求一次接口,所以舍弃了这个方法 29 | - 对搜索模块的位置进行了调整【后面小版本中会提供搜索跳转/打开新窗口功能】 30 | - 由于数据表格的分页、搜索、添加、删除等一系列数据操作需要接口的配合,同时大家都了解这是一套纯前端模版,没有后台,所以这些操作都没有了。有人提议用js动态截取json去实现动态效果,这样当然可以,但是身为一个有严重洁癖的码农,如何能忍受这样的情况?所以这些就需要大家在实际使用中根据接口传参实现了。 31 | - 重构页面图标【由于layui2.0新增了许多图标,所以对原有的图标进行了重构,避免图标冗余。实际使用中建议自己去阿里图标库挑选符合网站风格的进行替换】 32 | - 优化刷新当前页面,关闭其他,关闭全部等按钮造成的bug 33 | - 增加顶部一级菜单用以实现三级菜单,并实现响应式。可以通过更改浏览器的分辨率并且点击顶部菜单来查看效果,这个功能做了一天多啊【后面的小版本会对此功能进行优化,即增加反向定位功能】 34 | - 对90%以上的页面进行了样式优化和微调,使其更加完美【对于有强迫症的我来说,有一点瑕疵都是不能容忍的】 35 | - 由于模版中的动态操作基本都是通过缓存完成的,所以为了避免缓存过多造成卡顿现象,增加“清除缓存”按钮 36 | - 添加自定义是否开启Tab缓存【即刷新页面后是否重新打开刷新前的窗口】、是否切换窗口刷新页面、单一登录等功能。【在功能设定弹窗中设置,在移动端已隐藏此功能】功能其实早就有朋友提出来过,一直没有想到好的方式添加,直到larry的模版出来,感觉方式不错,借鉴了一下他的这种模式,在此对larry表示感谢 37 | - 优化更换皮肤在升级为2.x版本后无效的问题【后期会针对此功能进行深入优化,在移动端已隐藏此功能】 38 | - 优化“点赞、码云、github”链接。【之前虽然也有模版下载链接按钮,不知道是不明显还是什么,总有人私聊我要源码,这次我把按钮改大点,如果你们再看不到,那就不是不明显了。。。】 39 | - 优化“个人资料”页面,修改布局和响应式展示样式,重写地区三级联动效果【已封装成模块】,代码更简洁。【由于静态数据不能通过post方式提交,否则会报405、500错误,所以为了演示,将请求方式修改成了get,在实际使用中请将userInfo.js中的第13行删除,有注释】 40 | - 重做404页面、登录页面,增加动画效果。闪瞎你的钛合金眼 41 | - 新增“图标管理”页面,用于展示引入的第三方图标文件。可点击复制class到想要的地方 42 | - 新增“使用文档”页面,详细描述了模版中封装模块的各个功能,让使用者更加了解封装的模块的功能 43 | - 通过减少列来使table在移动端保持正常显示。需要列足够少,控制在2-3列最好。只需要给在移动端不显示的td添加pc属性即可,如此单元格在移动端不显示。如果还是理解不了请查看“系统基本参数”页面或者“使用文档”页面 44 | - 全面优化缓存机制,例如只要在“个人资料”页面修改过头像,那其他有头像的地方都会展示修改后的头像;修改“系统基本参数”后刷新页面底部版权修改等【当然这个功能在实际开发中就是个鸡肋,没有什么实际用处,在此处我只是想做个功能展示,毕竟这套模版是不包含后台的】 45 | - “文章列表”页面新增文章编辑功能和预览,另外优化了搜索功能【编辑和优化功能都需要接口配合,预览功能需要前后台配合】 46 | - 重做“添加文章”页面,使其更加适合实际开发中使用【当然这是我以为的,在实际使用中肯定还差很多功能,后面会慢慢完善】编辑器由于本身的问题,点击列表中的编辑按钮有时会赋不上值,请暂时无视,等到layedit重写后重做 47 | - “图片管理”页面新增“上传新图片”和“图片展示【即layer.photo】”功能。【由于弹层的展示获取的是接口中的数据,所以弹层不会展示新上传的图片,当然实际开发中不会有这个问题】 48 | ### 开源协议 49 | MIT License 50 | -------------------------------------------------------------------------------- /src/main/resources/templates/admin/adminEdit.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 51 | 52 |
        53 | 54 | 58 | 59 |
        60 |
        编辑类别
        61 |
        62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 72 | 73 | 74 | 78 | 79 |
        类别名称
        类别图片 70 | 71 |
        75 | 76 | 提 交 77 |
        80 |
        81 |
        82 |
        83 | 84 |
        85 | 86 | 87 | 88 | -------------------------------------------------------------------------------- /src/main/resources/templates/admin/genreEdit.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 51 | 52 |
        53 | 54 | 58 | 59 |
        60 |
        编辑类别
        61 |
        62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 72 | 73 | 74 | 78 | 79 |
        类别名称
        类别图片 70 | 71 |
        75 | 76 | 提 交 77 |
        80 |
        81 |
        82 |
        83 | 84 |
        85 | 86 | 87 | 88 | -------------------------------------------------------------------------------- /src/main/resources/templates/admin/readerEdit.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 51 | 52 |
        53 | 54 | 58 | 59 |
        60 |
        编辑类别
        61 |
        62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 72 | 73 | 74 | 78 | 79 |
        类别名称
        类别图片 70 | 71 |
        75 | 76 | 提 交 77 |
        80 |
        81 |
        82 |
        83 | 84 |
        85 | 86 | 87 | 88 | -------------------------------------------------------------------------------- /src/main/webapp/page/user/userInfo.js: -------------------------------------------------------------------------------- 1 | var form, $,areaData; 2 | layui.config({ 3 | base : "../../js/" 4 | }).extend({ 5 | "address" : "address" 6 | }) 7 | layui.use(['form','layer','upload','laydate',"address"],function(){ 8 | form = layui.form; 9 | $ = layui.jquery; 10 | var layer = parent.layer === undefined ? layui.layer : top.layer, 11 | upload = layui.upload, 12 | laydate = layui.laydate, 13 | address = layui.address; 14 | 15 | //上传头像 16 | upload.render({ 17 | elem: '.userFaceBtn', 18 | url: '../../json/userface.json', 19 | method : "get", //此处是为了演示之用,实际使用中请将此删除,默认用post方式提交 20 | done: function(res, index, upload){ 21 | var num = parseInt(4*Math.random()); //生成0-4的随机数,随机显示一个头像信息 22 | $('#userFace').attr('src',res.data[num].src); 23 | window.sessionStorage.setItem('userFace',res.data[num].src); 24 | } 25 | }); 26 | 27 | //添加验证规则 28 | form.verify({ 29 | userBirthday : function(value){ 30 | if(!/^(\d{4})[\u4e00-\u9fa5]|[-\/](\d{1}|0\d{1}|1[0-2])([\u4e00-\u9fa5]|[-\/](\d{1}|0\d{1}|[1-2][0-9]|3[0-1]))*$/.test(value)){ 31 | return "出生日期格式不正确!"; 32 | } 33 | } 34 | }) 35 | //选择出生日期 36 | laydate.render({ 37 | elem: '.userBirthday', 38 | format: 'yyyy年MM月dd日', 39 | trigger: 'click', 40 | max : 0, 41 | mark : {"0-12-15":"生日"}, 42 | done: function(value, date){ 43 | if(date.month === 12 && date.date === 15){ //点击每年12月15日,弹出提示语 44 | layer.msg('今天是马哥的生日,也是layuicms2.0的发布日,快来送上祝福吧!'); 45 | } 46 | } 47 | }); 48 | 49 | //获取省信息 50 | address.provinces(); 51 | 52 | //提交个人资料 53 | form.on("submit(changeUser)",function(data){ 54 | var index = layer.msg('提交中,请稍候',{icon: 16,time:false,shade:0.8}); 55 | //将填写的用户信息存到session以便下次调取 56 | var key,userInfoHtml = ''; 57 | userInfoHtml = { 58 | 'realName' : $(".realName").val(), 59 | 'sex' : data.field.sex, 60 | 'userPhone' : $(".userPhone").val(), 61 | 'userBirthday' : $(".userBirthday").val(), 62 | 'province' : data.field.province, 63 | 'city' : data.field.city, 64 | 'area' : data.field.area, 65 | 'userEmail' : $(".userEmail").val(), 66 | 'myself' : $(".myself").val() 67 | }; 68 | for(key in data.field){ 69 | if(key.indexOf("like") != -1){ 70 | userInfoHtml[key] = "on"; 71 | } 72 | } 73 | window.sessionStorage.setItem("userInfo",JSON.stringify(userInfoHtml)); 74 | setTimeout(function(){ 75 | layer.close(index); 76 | layer.msg("提交成功!"); 77 | },2000); 78 | return false; //阻止表单跳转。如果需要表单跳转,去掉这段即可。 79 | }) 80 | 81 | //修改密码 82 | form.on("submit(changePwd)",function(data){ 83 | var index = layer.msg('提交中,请稍候',{icon: 16,time:false,shade:0.8}); 84 | setTimeout(function(){ 85 | layer.close(index); 86 | layer.msg("密码修改成功!"); 87 | $(".pwd").val(''); 88 | },2000); 89 | return false; //阻止表单跳转。如果需要表单跳转,去掉这段即可。 90 | }) 91 | }) -------------------------------------------------------------------------------- /src/main/webapp/page/user/userAdd.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 文章列表--layui后台管理模板 2.0 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 |
        17 |
        18 | 19 |
        20 | 21 |
        22 |
        23 |
        24 | 25 |
        26 | 27 |
        28 |
        29 |
        30 |
        31 | 32 |
        33 | 34 | 35 | 36 |
        37 |
        38 |
        39 | 40 |
        41 | 48 |
        49 |
        50 |
        51 | 52 |
        53 | 57 |
        58 |
        59 |
        60 |
        61 | 62 |
        63 | 64 |
        65 |
        66 |
        67 |
        68 | 69 | 70 |
        71 |
        72 |
        73 | 74 | 75 | 76 | -------------------------------------------------------------------------------- /src/main/resources/templates/include/admin/adminHeader.html: -------------------------------------------------------------------------------- 1 | 107 | -------------------------------------------------------------------------------- /src/main/java/com/zhujinghui/novel/pojo/Chapter.java: -------------------------------------------------------------------------------- 1 | package com.zhujinghui.novel.pojo; 2 | 3 | import com.fasterxml.jackson.annotation.JsonIgnoreProperties; 4 | 5 | import javax.persistence.*; 6 | import java.util.Date; 7 | 8 | /** 9 | * @Author: JinghuiZhu 10 | * @Description: 章节POJO 11 | * @Date: Created in 15:47 2019/2/25 12 | * @Modified By: 13 | */ 14 | 15 | @Entity 16 | @Table(name = "t_chapter") 17 | @JsonIgnoreProperties(value={"hibernateLazyInitializer","handler","fieldHandler"}) 18 | public class Chapter { 19 | @Id 20 | @GeneratedValue(strategy = GenerationType.IDENTITY) 21 | @Column(name = "id") 22 | private int id; 23 | 24 | @Column(name = "title") 25 | private String title; 26 | 27 | @ManyToOne 28 | @JoinColumn(name = "novel_id") 29 | private Novel novel; 30 | 31 | @Column(name = "contents") 32 | private String contents; 33 | 34 | @Column(name = "word_count") 35 | private int wordCount; 36 | 37 | @Column(name = "create_uid") 38 | private int createUid; 39 | 40 | @Column(name = "create_time") 41 | private Date createTime; 42 | 43 | @Column(name = "update_uid") 44 | private int updateUid; 45 | 46 | @Column(name = "update_time") 47 | private Date updateTime; 48 | 49 | public int getId() { 50 | return id; 51 | } 52 | 53 | public void setId(int id) { 54 | this.id = id; 55 | } 56 | 57 | public String getTitle() { 58 | return title; 59 | } 60 | 61 | public void setTitle(String title) { 62 | this.title = title; 63 | } 64 | 65 | public Novel getNovel() { 66 | return novel; 67 | } 68 | 69 | public void setNovel(Novel novel) { 70 | this.novel = novel; 71 | } 72 | 73 | public String getContents() { 74 | return contents; 75 | } 76 | 77 | public void setContents(String contents) { 78 | this.contents = contents; 79 | } 80 | 81 | public int getWordCount() { 82 | return wordCount; 83 | } 84 | 85 | public void setWordCount(int wordCount) { 86 | this.wordCount = wordCount; 87 | } 88 | 89 | public int getCreateUid() { 90 | return createUid; 91 | } 92 | 93 | public void setCreateUid(int createUid) { 94 | this.createUid = createUid; 95 | } 96 | 97 | public Date getCreateTime() { 98 | return createTime; 99 | } 100 | 101 | public void setCreateTime(Date createTime) { 102 | this.createTime = createTime; 103 | } 104 | 105 | public int getUpdateUid() { 106 | return updateUid; 107 | } 108 | 109 | public void setUpdateUid(int updateUid) { 110 | this.updateUid = updateUid; 111 | } 112 | 113 | public Date getUpdateTime() { 114 | return updateTime; 115 | } 116 | 117 | public void setUpdateTime(Date updateTime) { 118 | this.updateTime = updateTime; 119 | } 120 | 121 | @Override 122 | public String toString() { 123 | return "Chapter{" + 124 | "id=" + id + 125 | ", title='" + title + '\'' + 126 | ", novel=" + novel + 127 | ", contents='" + contents + '\'' + 128 | ", wordCount=" + wordCount + 129 | ", createUid=" + createUid + 130 | ", createTime=" + createTime + 131 | ", updateUid=" + updateUid + 132 | ", updateTime=" + updateTime + 133 | '}'; 134 | } 135 | } 136 | -------------------------------------------------------------------------------- /src/main/webapp/page/doc/addressDoc.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 三级联动使用文档--layui后台管理模板 2.0 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 |
        17 | address模块是封装的一个省市区三级联动的功能,可以和form、layer等模块一样通过模块化引入进行使用。唯一的不同就是模块的存放路径和使用时的配置。下面将对此区别进行详细的描述。 18 |
        19 |
        20 | 模块加载名称:address 21 |
        22 |
        23 | 核心方法 24 |
        25 |

        语法:layui.address()

        26 |
        27 | 		layui.use('address', function(){
        28 | 		  var layui.address();
        29 | 		});
        30 | 	
        31 |

        上面说过,模块相对页面的存放路径不同,使用时也需要进行不同的配置。如果页面和此模块属于同级关系,则不用进行任何配置,直接引入即可使用。如果它们不属于同级关系,则需要通过查找address.js文件相对xx.js文件的相对路径进行配置,如:address.js文件与a文件夹属于同级,而a文件夹中包含b文件夹,b文件夹中包含xx.js,通过xx.js引入address模块则进行下面的配置

        32 |
        33 | 		layui.config({
        34 | 		  base : "../../js/"  //如果a文件夹中直接就是xx.js文件,则为“../js/”
        35 | 		}).extend({
        36 | 		  "address" : "address"
        37 | 		})
        38 | 	
        39 |
        40 | HTML数据格式 41 |
        42 |

        下面是HTML数据格式,其中select的name值和lay-filter值是固定不可改变的,因为模块中是通过查找对应name的select进行的赋值,通过form.on("select(filter)")执行选择的方法,所以这两个值是不可以随意更改的。如果需要改变请将模块源码中对应的值一同修改。另外需要注意的是“市”、“区/县”的select需要添加一个disabled属性,主要是为了避免在没有选择省份的情况下先选择市、区造成错误。

        43 |
        44 | 		//省份select
        45 | 		<select name="province" lay-filter="province">
        46 | 		  <option value="">请选择省</option>
        47 | 		</select>
        48 | 		//市select
        49 | 		<select name="city" lay-filter="city" disabled>
        50 | 		  <option value="">请选择市</option>
        51 | 		</select>
        52 | 		//区/县select
        53 | 		<select name="area" lay-filter="area" disabled>
        54 | 		  <option value="">请选择县/区</option>
        55 | 		</select>
        56 | 	
        57 |
        58 | JSON数据格式 59 |
        60 |

        其中code为地区id,用于给option赋值;name为地区名称,用于设置option的text;childs为当前区域的下级地区。

        61 |
        62 | 		[{
        63 | 		  "code": "11",
        64 | 		  "name": "北京市",
        65 | 		  "childs": [{
        66 | 		      "code": "1101",
        67 | 		      "name": "市辖区",
        68 | 		      "childs": [{
        69 | 		          "code": "110101",
        70 | 		          "name": "东城区"
        71 | 		      }]
        72 | 		  }]
        73 | 		}]
        74 | 	
        75 | 76 | 83 | 84 | -------------------------------------------------------------------------------- /src/main/resources/templates/admin/novelEdit.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 44 | 45 |
        46 | 47 | 52 | 53 |
        54 |
        编辑小说
        55 |
        56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 86 | 87 |
        小说名称
        描述
        字数
        作者id
        更新人id
        状态
        83 | 84 | 提 交 85 |
        88 |
        89 |
        90 |
        91 | 92 |
        93 | 94 | 95 | -------------------------------------------------------------------------------- /src/main/webapp/layui/lay/modules/carousel.js: -------------------------------------------------------------------------------- 1 | /** layui-v2.2.5 MIT License By https://www.layui.com */ 2 | ;layui.define("jquery",function(e){"use strict";var i=layui.$,n=(layui.hint(),layui.device(),{config:{},set:function(e){var n=this;return n.config=i.extend({},n.config,e),n},on:function(e,i){return layui.onevent.call(this,t,e,i)}}),t="carousel",a="layui-this",l=">*[carousel-item]>*",o="layui-carousel-left",r="layui-carousel-right",d="layui-carousel-prev",s="layui-carousel-next",u="layui-carousel-arrow",c="layui-carousel-ind",m=function(e){var t=this;t.config=i.extend({},t.config,n.config,e),t.render()};m.prototype.config={width:"600px",height:"280px",full:!1,arrow:"hover",indicator:"inside",autoplay:!0,interval:3e3,anim:"",trigger:"click",index:0},m.prototype.render=function(){var e=this,n=e.config;n.elem=i(n.elem),n.elem[0]&&(e.elemItem=n.elem.find(l),n.index<0&&(n.index=0),n.index>=e.elemItem.length&&(n.index=e.elemItem.length-1),n.interval<800&&(n.interval=800),n.full?n.elem.css({position:"fixed",width:"100%",height:"100%",zIndex:9999}):n.elem.css({width:n.width,height:n.height}),n.elem.attr("lay-anim",n.anim),e.elemItem.eq(n.index).addClass(a),e.elemItem.length<=1||(e.indicator(),e.arrow(),e.autoplay(),e.events()))},m.prototype.reload=function(e){var n=this;clearInterval(n.timer),n.config=i.extend({},n.config,e),n.render()},m.prototype.prevIndex=function(){var e=this,i=e.config,n=i.index-1;return n<0&&(n=e.elemItem.length-1),n},m.prototype.nextIndex=function(){var e=this,i=e.config,n=i.index+1;return n>=e.elemItem.length&&(n=0),n},m.prototype.addIndex=function(e){var i=this,n=i.config;e=e||1,n.index=n.index+e,n.index>=i.elemItem.length&&(n.index=0)},m.prototype.subIndex=function(e){var i=this,n=i.config;e=e||1,n.index=n.index-e,n.index<0&&(n.index=i.elemItem.length-1)},m.prototype.autoplay=function(){var e=this,i=e.config;i.autoplay&&(e.timer=setInterval(function(){e.slide()},i.interval))},m.prototype.arrow=function(){var e=this,n=e.config,t=i(['",'"].join(""));n.elem.attr("lay-arrow",n.arrow),n.elem.find("."+u)[0]&&n.elem.find("."+u).remove(),n.elem.append(t),t.on("click",function(){var n=i(this),t=n.attr("lay-type");e.slide(t)})},m.prototype.indicator=function(){var e=this,n=e.config,t=e.elemInd=i(['
          ',function(){var i=[];return layui.each(e.elemItem,function(e){i.push("")}),i.join("")}(),"
        "].join(""));n.elem.attr("lay-indicator",n.indicator),n.elem.find("."+c)[0]&&n.elem.find("."+c).remove(),n.elem.append(t),"updown"===n.anim&&t.css("margin-top",-(t.height()/2)),t.find("li").on("hover"===n.trigger?"mouseover":n.trigger,function(){var t=i(this),a=t.index();a>n.index?e.slide("add",a-n.index):a= 12) ? (hour >= 18) ? "晚上" : "下午" : "上午" ); //当前时间属于上午、晚上还是下午 21 | newDate = dateFilter(year)+"年"+dateFilter(month)+"月"+dateFilter(date)+"日 "+" "+dateFilter(hour)+":"+dateFilter(minute)+":"+dateFilter(second); 22 | document.getElementById("nowTime").innerHTML = "亲爱的朱景辉,"+timeValue+"好! 欢迎来到小说后台 。当前时间为: "+newDate+" "+week; 23 | setTimeout("getLangDate()",1000); 24 | } 25 | 26 | layui.use(['form','element','layer','jquery'],function(){ 27 | var form = layui.form, 28 | layer = parent.layer === undefined ? layui.layer : top.layer, 29 | element = layui.element; 30 | $ = layui.jquery; 31 | //上次登录时间【此处应该从接口获取,实际使用中请自行更换】 32 | $(".loginTime").html(newDate.split("日")[0]+"日
        "+newDate.split("日")[1]); 33 | //icon动画 34 | $(".panel a").hover(function(){ 35 | $(this).find(".layui-anim").addClass("layui-anim-scaleSpring"); 36 | },function(){ 37 | $(this).find(".layui-anim").removeClass("layui-anim-scaleSpring"); 38 | }) 39 | $(".panel a").click(function(){ 40 | parent.addTab($(this)); 41 | }) 42 | //系统基本参数 43 | if(window.sessionStorage.getItem("systemParameter")){ 44 | var systemParameter = JSON.parse(window.sessionStorage.getItem("systemParameter")); 45 | fillParameter(systemParameter); 46 | }else{ 47 | $.ajax({ 48 | url : "../json/systemParameter.json", 49 | type : "get", 50 | dataType : "json", 51 | success : function(data){ 52 | fillParameter(data); 53 | } 54 | }) 55 | } 56 | //填充数据方法 57 | function fillParameter(data){ 58 | //判断字段数据是否存在 59 | function nullData(data){ 60 | if(data == '' || data == "undefined"){ 61 | return "未定义"; 62 | }else{ 63 | return data; 64 | } 65 | } 66 | $(".version").text(nullData(data.version)); //当前版本 67 | $(".author").text(nullData(data.author)); //开发作者 68 | $(".homePage").text(nullData(data.homePage)); //网站首页 69 | $(".server").text(nullData(data.server)); //服务器环境 70 | $(".dataBase").text(nullData(data.dataBase)); //数据库版本 71 | $(".maxUpload").text(nullData(data.maxUpload)); //最大上传限制 72 | $(".userRights").text(nullData(data.userRights));//当前用户权限 73 | } 74 | 75 | //最新文章列表 76 | $.get("../json/newsList.json",function(data){ 77 | var hotNewsHtml = ''; 78 | for(var i=0;i<5;i++){ 79 | hotNewsHtml += '' 80 | +' '+data.data[i].newsName+'' 81 | +''+data.data[i].newsTime.substring(0,10)+'' 82 | +''; 83 | } 84 | $(".hot_news").html(hotNewsHtml); 85 | $(".userAll span").text(data.length); 86 | }) 87 | 88 | //用户数量 89 | $.get("../json/userList.json",function(data){ 90 | $(".userAll span").text(data.count); 91 | }) 92 | 93 | //外部图标 94 | $.get(iconUrl,function(data){ 95 | $(".outIcons span").text(data.split(".icon-").length-1); 96 | }) 97 | 98 | }) 99 | -------------------------------------------------------------------------------- /src/main/resources/templates/admin/adminList.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 59 |
        60 |

        管理员

        61 |
        62 |
        63 |
        64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 95 | 96 | 97 |
        ID名字性别登录角色账号状态邮箱手机号备注创建时间修改时间禁用
        {{bean.id}}{{bean.userName}}{{bean.sex}}{{bean.role}}{{bean.status}}{{bean.email}}{{bean.phone}}{{bean.remark}}{{bean.createTime}}{{bean.updateTime}} 93 | 94 |
        98 |
        99 |
        100 |
        101 |
        102 | 103 | 104 | -------------------------------------------------------------------------------- /src/main/resources/templates/admin/readerList.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 59 |
        60 |

        读者管理

        61 |
        62 |
        63 |
        64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 95 | 96 | 97 |
        ID读者名性别登录角色账号状态邮箱手机号备注创建时间修改时间禁用
        {{bean.id}}{{bean.userName}}{{bean.sex}}{{bean.role}}{{bean.status}}{{bean.email}}{{bean.phone}}{{bean.remark}}{{bean.createTime}}{{bean.updateTime}} 93 | 94 |
        98 |
        99 |
        100 |
        101 |
        102 | 103 | 104 | -------------------------------------------------------------------------------- /src/main/webapp/page/systemSetting/basicParameter.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 系统基本参数--layui后台管理模板 2.0 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 |
        17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 |
        参数说明参数值变量名
        网站名称cmsName
        当前版本version
        开发作者author
        网站首页homePage
        服务器环境server
        数据库版本dataBase
        最大上传限制maxUpload
        用户权限userRights
        默认关键字keywords
        版权信息powerby
        网站描述description
        网站备案号record
        93 |
        94 |
        95 | 96 | 97 |
        98 |
        99 |
        100 | 101 | 102 | 103 | 104 | -------------------------------------------------------------------------------- /src/main/webapp/page/news/genreAdd.js: -------------------------------------------------------------------------------- 1 | layui.use(['form','layer','layedit','laydate','upload'],function(){ 2 | var form = layui.form 3 | layer = parent.layer === undefined ? layui.layer : top.layer, 4 | laypage = layui.laypage, 5 | upload = layui.upload, 6 | layedit = layui.layedit, 7 | laydate = layui.laydate, 8 | $ = layui.jquery; 9 | 10 | //用于同步编辑器内容到textarea 11 | layedit.sync(editIndex); 12 | 13 | //上传缩略图 14 | upload.render({ 15 | elem: '.thumbBox', 16 | url: '../../json/userface.json', 17 | method : "get", //此处是为了演示之用,实际使用中请将此删除,默认用post方式提交 18 | done: function(res, index, upload){ 19 | var num = parseInt(4*Math.random()); //生成0-4的随机数,随机显示一个头像信息 20 | $('.thumbImg').attr('src',res.data[num].src); 21 | $('.thumbBox').css("background","#fff"); 22 | } 23 | }); 24 | 25 | //格式化时间 26 | function filterTime(val){ 27 | if(val < 10){ 28 | return "0" + val; 29 | }else{ 30 | return val; 31 | } 32 | } 33 | //定时发布 34 | var time = new Date(); 35 | var submitTime = time.getFullYear()+'-'+filterTime(time.getMonth()+1)+'-'+filterTime(time.getDate())+' '+filterTime(time.getHours())+':'+filterTime(time.getMinutes())+':'+filterTime(time.getSeconds()); 36 | laydate.render({ 37 | elem: '#release', 38 | type: 'datetime', 39 | trigger : "click", 40 | done : function(value, date, endDate){ 41 | submitTime = value; 42 | } 43 | }); 44 | form.on("radio(release)",function(data){ 45 | if(data.elem.title == "定时发布"){ 46 | $(".releaseDate").removeClass("layui-hide"); 47 | $(".releaseDate #release").attr("lay-verify","required"); 48 | }else{ 49 | $(".releaseDate").addClass("layui-hide"); 50 | $(".releaseDate #release").removeAttr("lay-verify"); 51 | submitTime = time.getFullYear()+'-'+(time.getMonth()+1)+'-'+time.getDate()+' '+time.getHours()+':'+time.getMinutes()+':'+time.getSeconds(); 52 | } 53 | }); 54 | 55 | form.verify({ 56 | newsName : function(val){ 57 | if(val == ''){ 58 | return "文章标题不能为空"; 59 | } 60 | }, 61 | content : function(val){ 62 | if(val == ''){ 63 | return "文章内容不能为空"; 64 | } 65 | } 66 | }) 67 | form.on("submit(addNews)",function(data){ 68 | //截取文章内容中的一部分文字放入文章摘要 69 | var abstract = layedit.getText(editIndex).substring(0,50); 70 | //弹出loading 71 | var index = top.layer.msg('数据提交中,请稍候',{icon: 16,time:false,shade:0.8}); 72 | // 实际使用时的提交信息 73 | // $.post("上传路径",{ 74 | // newsName : $(".newsName").val(), //文章标题 75 | // abstract : $(".abstract").val(), //文章摘要 76 | // content : layedit.getContent(editIndex).split('')[0], //文章内容 77 | // newsImg : $(".thumbImg").attr("src"), //缩略图 78 | // classify : '1', //文章分类 79 | // newsStatus : $('.newsStatus select').val(), //发布状态 80 | // newsTime : submitTime, //发布时间 81 | // newsTop : data.filed.newsTop == "on" ? "checked" : "", //是否置顶 82 | // },function(res){ 83 | // 84 | // }) 85 | setTimeout(function(){ 86 | top.layer.close(index); 87 | top.layer.msg("文章添加成功!"); 88 | layer.closeAll("iframe"); 89 | //刷新父页面 90 | parent.location.reload(); 91 | },500); 92 | return false; 93 | }) 94 | 95 | //预览 96 | form.on("submit(look)",function(){ 97 | layer.alert("此功能需要前台展示,实际开发中传入对应的必要参数进行文章内容页面访问"); 98 | return false; 99 | }) 100 | 101 | //创建一个编辑器 102 | var editIndex = layedit.build('news_content',{ 103 | height : 535, 104 | uploadImage : { 105 | url : "../../json/newsImg.json" 106 | } 107 | }); 108 | 109 | }) -------------------------------------------------------------------------------- /src/main/webapp/page/news/newsAdd.js: -------------------------------------------------------------------------------- 1 | layui.use(['form','layer','layedit','laydate','upload'],function(){ 2 | var form = layui.form 3 | layer = parent.layer === undefined ? layui.layer : top.layer, 4 | laypage = layui.laypage, 5 | upload = layui.upload, 6 | layedit = layui.layedit, 7 | laydate = layui.laydate, 8 | $ = layui.jquery; 9 | 10 | //用于同步编辑器内容到textarea 11 | layedit.sync(editIndex); 12 | 13 | //上传缩略图 14 | upload.render({ 15 | elem: '.thumbBox', 16 | url: '../../json/userface.json', 17 | method : "get", //此处是为了演示之用,实际使用中请将此删除,默认用post方式提交 18 | done: function(res, index, upload){ 19 | var num = parseInt(4*Math.random()); //生成0-4的随机数,随机显示一个头像信息 20 | $('.thumbImg').attr('src',res.data[num].src); 21 | $('.thumbBox').css("background","#fff"); 22 | } 23 | }); 24 | 25 | //格式化时间 26 | function filterTime(val){ 27 | if(val < 10){ 28 | return "0" + val; 29 | }else{ 30 | return val; 31 | } 32 | } 33 | //定时发布 34 | var time = new Date(); 35 | var submitTime = time.getFullYear()+'-'+filterTime(time.getMonth()+1)+'-'+filterTime(time.getDate())+' '+filterTime(time.getHours())+':'+filterTime(time.getMinutes())+':'+filterTime(time.getSeconds()); 36 | laydate.render({ 37 | elem: '#release', 38 | type: 'datetime', 39 | trigger : "click", 40 | done : function(value, date, endDate){ 41 | submitTime = value; 42 | } 43 | }); 44 | form.on("radio(release)",function(data){ 45 | if(data.elem.title == "定时发布"){ 46 | $(".releaseDate").removeClass("layui-hide"); 47 | $(".releaseDate #release").attr("lay-verify","required"); 48 | }else{ 49 | $(".releaseDate").addClass("layui-hide"); 50 | $(".releaseDate #release").removeAttr("lay-verify"); 51 | submitTime = time.getFullYear()+'-'+(time.getMonth()+1)+'-'+time.getDate()+' '+time.getHours()+':'+time.getMinutes()+':'+time.getSeconds(); 52 | } 53 | }); 54 | 55 | form.verify({ 56 | newsName : function(val){ 57 | if(val == ''){ 58 | return "文章标题不能为空"; 59 | } 60 | }, 61 | content : function(val){ 62 | if(val == ''){ 63 | return "文章内容不能为空"; 64 | } 65 | } 66 | }) 67 | form.on("submit(addNews)",function(data){ 68 | //截取文章内容中的一部分文字放入文章摘要 69 | var abstract = layedit.getText(editIndex).substring(0,50); 70 | //弹出loading 71 | var index = top.layer.msg('数据提交中,请稍候',{icon: 16,time:false,shade:0.8}); 72 | // 实际使用时的提交信息 73 | // $.post("上传路径",{ 74 | // newsName : $(".newsName").val(), //文章标题 75 | // abstract : $(".abstract").val(), //文章摘要 76 | // content : layedit.getContent(editIndex).split('')[0], //文章内容 77 | // newsImg : $(".thumbImg").attr("src"), //缩略图 78 | // classify : '1', //文章分类 79 | // newsStatus : $('.newsStatus select').val(), //发布状态 80 | // newsTime : submitTime, //发布时间 81 | // newsTop : data.filed.newsTop == "on" ? "checked" : "", //是否置顶 82 | // },function(res){ 83 | // 84 | // }) 85 | setTimeout(function(){ 86 | top.layer.close(index); 87 | top.layer.msg("文章添加成功!"); 88 | layer.closeAll("iframe"); 89 | //刷新父页面 90 | parent.location.reload(); 91 | },500); 92 | return false; 93 | }) 94 | 95 | //预览 96 | form.on("submit(look)",function(){ 97 | layer.alert("此功能需要前台展示,实际开发中传入对应的必要参数进行文章内容页面访问"); 98 | return false; 99 | }) 100 | 101 | //创建一个编辑器 102 | var editIndex = layedit.build('news_content',{ 103 | height : 535, 104 | uploadImage : { 105 | url : "../../json/newsImg.json" 106 | } 107 | }); 108 | 109 | }) -------------------------------------------------------------------------------- /src/main/webapp/layui/lay/modules/laypage.js: -------------------------------------------------------------------------------- 1 | /** layui-v2.2.5 MIT License By https://www.layui.com */ 2 | ;layui.define(function(e){"use strict";var a=document,t="getElementById",n="getElementsByTagName",i="laypage",r="layui-disabled",u=function(e){var a=this;a.config=e||{},a.config.index=++s.index,a.render(!0)};u.prototype.type=function(){var e=this.config;if("object"==typeof e.elem)return void 0===e.elem.length?2:3},u.prototype.view=function(){var e=this,a=e.config,t=a.groups="groups"in a?0|a.groups:5;a.layout="object"==typeof a.layout?a.layout:["prev","page","next"],a.count=0|a.count,a.curr=0|a.curr||1,a.limits="object"==typeof a.limits?a.limits:[10,20,30,40,50],a.limit=0|a.limit||10,a.pages=Math.ceil(a.count/a.limit)||1,a.curr>a.pages&&(a.curr=a.pages),t<0?t=1:t>a.pages&&(t=a.pages),a.prev="prev"in a?a.prev:"上一页",a.next="next"in a?a.next:"下一页";var n=a.pages>t?Math.ceil((a.curr+(t>1?1:0))/(t>0?t:1)):1,i={prev:function(){return a.prev?''+a.prev+"":""}(),page:function(){var e=[];if(a.count<1)return"";n>1&&a.first!==!1&&0!==t&&e.push(''+(a.first||1)+"");var i=Math.floor((t-1)/2),r=n>1?a.curr-i:1,u=n>1?function(){var e=a.curr+(t-i-1);return e>a.pages?a.pages:e}():t;for(u-r2&&e.push('');r<=u;r++)r===a.curr?e.push('"+r+""):e.push(''+r+"");return a.pages>t&&a.pages>u&&a.last!==!1&&(u+1…'),0!==t&&e.push(''+(a.last||a.pages)+"")),e.join("")}(),next:function(){return a.next?''+a.next+"":""}(),count:'共 '+a.count+" 条",limit:function(){var e=['"}(),skip:function(){return['到第','','页',""].join("")}()};return['
        ',function(){var e=[];return layui.each(a.layout,function(a,t){i[t]&&e.push(i[t])}),e.join("")}(),"
        "].join("")},u.prototype.jump=function(e,a){if(e){var t=this,i=t.config,r=e.children,u=e[n]("button")[0],l=e[n]("input")[0],p=e[n]("select")[0],c=function(){var e=0|l.value.replace(/\s|\D/g,"");e&&(i.curr=e,t.render())};if(a)return c();for(var o=0,y=r.length;oi.pages||(i.curr=e,t.render())});p&&s.on(p,"change",function(){var e=this.value;i.curr*e>i.count&&(i.curr=Math.ceil(i.count/e)),i.limit=e,t.render()}),u&&s.on(u,"click",function(){c()})}},u.prototype.skip=function(e){if(e){var a=this,t=e[n]("input")[0];t&&s.on(t,"keyup",function(t){var n=this.value,i=t.keyCode;/^(37|38|39|40)$/.test(i)||(/\D/.test(n)&&(this.value=n.replace(/\D/,"")),13===i&&a.jump(e,!0))})}},u.prototype.render=function(e){var n=this,i=n.config,r=n.type(),u=n.view();2===r?i.elem&&(i.elem.innerHTML=u):3===r?i.elem.html(u):a[t](i.elem)&&(a[t](i.elem).innerHTML=u),i.jump&&i.jump(i,e);var s=a[t]("layui-laypage-"+i.index);n.jump(s),i.hash&&!e&&(location.hash="!"+i.hash+"="+i.curr),n.skip(s)};var s={render:function(e){var a=new u(e);return a.index},index:layui.laypage?layui.laypage.index+1e4:0,on:function(e,a,t){return e.attachEvent?e.attachEvent("on"+a,function(a){a.target=a.srcElement,t.call(e,a)}):e.addEventListener(a,t,!1),this}};e(i,s)}); -------------------------------------------------------------------------------- /src/main/java/com/zhujinghui/novel/controller/GenreController.java: -------------------------------------------------------------------------------- 1 | package com.zhujinghui.novel.controller; 2 | 3 | 4 | import com.zhujinghui.novel.pojo.Genre; 5 | import com.zhujinghui.novel.service.GenreService; 6 | import com.zhujinghui.novel.util.ImageUtil; 7 | import com.zhujinghui.novel.util.Page4Navigator; 8 | import org.springframework.beans.factory.annotation.Autowired; 9 | import org.springframework.web.bind.annotation.*; 10 | import org.springframework.web.multipart.MultipartFile; 11 | 12 | import javax.imageio.ImageIO; 13 | import javax.servlet.http.HttpServletRequest; 14 | import java.awt.image.BufferedImage; 15 | import java.io.File; 16 | import java.io.IOException; 17 | import java.util.List; 18 | 19 | /** 20 | * @Author: JinghuiZhu 21 | * @Description: 小说类别控制器 22 | * @Date: Created in 15:49 2019/2/21 23 | * @Modified By: 24 | */ 25 | 26 | @RestController 27 | public class GenreController { 28 | 29 | @Autowired 30 | GenreService genreService; 31 | 32 | /** 33 | * 返回小说类别分页数据 34 | * 35 | * @param start 页码 36 | * @param size 每页记录数 37 | * @return 小说分页数据 38 | */ 39 | @GetMapping("/genres") 40 | public Page4Navigator list(@RequestParam(value = "start", defaultValue = "0") int start, 41 | @RequestParam(value = "size", defaultValue = "3") int size){ 42 | start = start<0?0:start; 43 | Page4Navigator page4Navigator = genreService.list(start,size,5); 44 | return page4Navigator; 45 | } 46 | 47 | /** 48 | * 添加小说类别 49 | * 50 | * @param genre 单个小说类别 51 | * @param image 类别图片 52 | * @param request 请求 53 | * @return genre 小说类别 54 | * @throws IOException 写入文件异常 55 | */ 56 | @PostMapping("/genres") 57 | public Object add(Genre genre, MultipartFile image, HttpServletRequest request) throws IOException { 58 | genreService.add(genre); 59 | saveOrUpdateImageFile(genre,image,request); 60 | return genre; 61 | } 62 | 63 | /** 64 | * 根据id 删除小说类别 65 | * 66 | * @param id 小说类别id 67 | * @param request 请求 68 | * @return null 69 | */ 70 | @DeleteMapping("/genres/{id}") 71 | public String delete(@PathVariable("id") int id, HttpServletRequest request){ 72 | genreService.delete(id); 73 | File imageFolder = new File(request.getServletContext().getRealPath("images/genre")); 74 | File file = new File(imageFolder,id+".jpg"); 75 | file.delete(); 76 | return null; 77 | } 78 | 79 | /** 80 | * 根据id 查询小说类别 81 | * 82 | * @param id 类别主键 83 | * @return genre 84 | */ 85 | @GetMapping("/genres/{id}") 86 | public Genre get(@PathVariable("id") int id){ 87 | Genre genre = genreService.get(id); 88 | return genre; 89 | } 90 | 91 | @PutMapping("/genres/{id}") 92 | public Object update(Genre genre, MultipartFile image, HttpServletRequest request) throws IOException { 93 | String name = request.getParameter("name"); 94 | genre.setName(name); 95 | genreService.update(genre); 96 | if (image != null){ 97 | saveOrUpdateImageFile(genre, image, request); 98 | } 99 | return genre; 100 | } 101 | 102 | /** 103 | * 保存或更新图片 104 | * 105 | * @param genre 小说类别 106 | * @param image 图片 107 | * @param request 请求 108 | * @throws IOException 写入文件异常 109 | */ 110 | public void saveOrUpdateImageFile(Genre genre, MultipartFile image, HttpServletRequest request) throws IOException { 111 | File imageFolder = new File(request.getServletContext().getRealPath("images/genre")); 112 | File file = new File(imageFolder,genre.getId()+".jpg"); 113 | if (!file.getParentFile().exists()){ 114 | file.getParentFile().mkdirs(); 115 | } 116 | image.transferTo(file); 117 | BufferedImage images = ImageUtil.change2jpg(file); 118 | ImageIO.write(images,"jpg",file); 119 | } 120 | 121 | /** 122 | * 查询所有小说 123 | * 124 | * @return List 所有小说 125 | */ 126 | public List list(){ 127 | return genreService.list(); 128 | } 129 | 130 | } 131 | -------------------------------------------------------------------------------- /src/main/webapp/page/main.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 首页--小说后台管理 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 |
        17 |
        18 |
        19 | 82 | 83 |
        84 |
        85 |
        系统基本参数
        86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | 110 | 111 | 112 | 113 | 114 | 115 | 116 | 117 |
        当前版本
        网站首页
        服务器环境
        数据库版本
        最大上传限制
        当前用户权限
        118 |
        119 |
        120 | 121 | 122 | 123 | 124 | -------------------------------------------------------------------------------- /src/main/webapp/json/logs.json: -------------------------------------------------------------------------------- 1 | { 2 | "code": 0, 3 | "msg": "", 4 | "count": 15, 5 | "data": [ 6 | { 7 | "logId": "1", 8 | "url": "https://gitee.com/layuicms/layuicms2.0", 9 | "method" : "GET", 10 | "ip": "192.169.39.11", 11 | "timeConsuming":"125", 12 | "isAbnormal": "正常", 13 | "operator": "驊驊龔頾", 14 | "operatingTime": "2017-04-14 00:00:00" 15 | }, 16 | { 17 | "logId": "2", 18 | "url": "https://gitee.com/layuicms/layuicms2.0", 19 | "method" : "POST", 20 | "ip": "192.169.39.11", 21 | "timeConsuming":"89", 22 | "isAbnormal": "异常", 23 | "operator": "驊驊龔頾", 24 | "operatingTime": "2017-04-14 00:00:00" 25 | }, 26 | { 27 | "logId": "3", 28 | "url": "https://gitee.com/layuicms/layuicms2.0", 29 | "method" : "GET", 30 | "ip": "192.169.39.11", 31 | "timeConsuming":"125", 32 | "isAbnormal": "正常", 33 | "operator": "admin", 34 | "operatingTime": "2017-04-14 00:00:00" 35 | }, 36 | { 37 | "logId": "4", 38 | "url": "https://gitee.com/layuicms/layuicms2.0", 39 | "method" : "GET", 40 | "ip": "192.169.39.11", 41 | "timeConsuming":"125", 42 | "isAbnormal": "异常", 43 | "operator": "admin", 44 | "operatingTime": "2017-04-14 00:00:00" 45 | }, 46 | { 47 | "logId": "5", 48 | "url": "https://gitee.com/layuicms/layuicms2.0", 49 | "method" : "POST", 50 | "ip": "192.169.39.11", 51 | "timeConsuming":"55", 52 | "newsLook": "开放浏览", 53 | "isAbnormal": "正常", 54 | "operator": "驊驊龔頾", 55 | "operatingTime": "2017-04-14 00:00:00" 56 | }, 57 | { 58 | "logId": "6", 59 | "url": "https://gitee.com/layuicms/layuicms2.0", 60 | "method": "POST", 61 | "ip": "192.169.39.11", 62 | "timeConsuming":"125", 63 | "isAbnormal": "正常", 64 | "operator": "admin", 65 | "operatingTime": "2017-04-14 00:00:00" 66 | }, 67 | { 68 | "logId": "7", 69 | "url": "https://gitee.com/layuicms/layuicms2.0", 70 | "method" : "GET", 71 | "ip": "192.169.39.11", 72 | "timeConsuming":"125", 73 | "isAbnormal": "异常", 74 | "operator": "驊驊龔頾", 75 | "operatingTime": "2017-04-14 00:00:00" 76 | }, 77 | { 78 | "logId": "8", 79 | "url": "https://gitee.com/layuicms/layuicms2.0", 80 | "method" : "POST", 81 | "ip": "192.169.39.11", 82 | "timeConsuming":"15", 83 | "isAbnormal": "正常", 84 | "operator": "驊驊龔頾", 85 | "operatingTime": "2017-04-14 00:00:00" 86 | }, 87 | { 88 | "logId": "9", 89 | "url": "https://gitee.com/layuicms/layuicms2.0", 90 | "method" : "GET", 91 | "ip": "192.169.39.11", 92 | "timeConsuming":"125", 93 | "isAbnormal": "正常", 94 | "operator": "admin", 95 | "operatingTime": "2017-04-14 00:00:00" 96 | }, 97 | { 98 | "logId": "10", 99 | "url": "https://gitee.com/layuicms/layuicms2.0", 100 | "method" : "GET", 101 | "ip": "192.169.39.11", 102 | "timeConsuming":"25", 103 | "isAbnormal": "异常", 104 | "operator": "admin", 105 | "operatingTime": "2017-04-14 00:00:00" 106 | }, 107 | { 108 | "logId": "11", 109 | "url": "https://gitee.com/layuicms/layuicms2.0", 110 | "method" : "POST", 111 | "ip": "192.169.39.11", 112 | "timeConsuming":"125", 113 | "isAbnormal": "正常", 114 | "operator": "驊驊龔頾", 115 | "operatingTime": "2017-04-14 00:00:00" 116 | }, 117 | { 118 | "logId": "12", 119 | "url": "https://gitee.com/layuicms/layuicms2.0", 120 | "method" : "GET", 121 | "ip": "192.169.39.11", 122 | "timeConsuming":"125", 123 | "isAbnormal": "正常", 124 | "operator": "驊驊龔頾", 125 | "operatingTime": "2017-04-14 00:00:00" 126 | }, 127 | { 128 | "logId": "13", 129 | "url": "https://gitee.com/layuicms/layuicms2.0", 130 | "method" : "GET", 131 | "ip": "192.169.39.11", 132 | "timeConsuming":"12", 133 | "isAbnormal": "正常", 134 | "operator": "admin", 135 | "operatingTime": "2017-04-14 00:00:00" 136 | }, 137 | { 138 | "logId": "14", 139 | "url": "https://gitee.com/layuicms/layuicms2.0", 140 | "method" : "POST", 141 | "ip": "192.169.39.11", 142 | "timeConsuming":"125", 143 | "isAbnormal": "异常", 144 | "operator": "驊驊龔頾", 145 | "operatingTime": "2017-04-14 00:00:00" 146 | }, 147 | { 148 | "logId": "15", 149 | "url": "https://gitee.com/layuicms/layuicms2.0", 150 | "method" : "GET", 151 | "ip": "192.169.39.11", 152 | "timeConsuming":"125", 153 | "isAbnormal": "正常", 154 | "operator": "驊驊龔頾", 155 | "operatingTime": "2017-04-14 00:00:00" 156 | } 157 | ] 158 | } --------------------------------------------------------------------------------