(免费资源)基于微信小程序的小说阅读系统设计与实现

article/2025/9/22 23:25:56

活动地址:毕业季·进击的技术er

博主介绍:✌在职Java研发工程师、专注于程序设计、源码分享、技术交流、专注于Java技术领域和毕业设计

项目名称

(免费资源)基于微信小程序的小说阅读系统设计与实现

视频效果

(免费资源)基于微信小程序的小说阅读系统设计与实现

系统说明

微书是一款基于微信小城序的小说阅读系统,书城数据库使用mongodb存储,书城数据使用nodejs爬虫从网络上爬取,并使用loopback作为后端接口框架。功能上,微信实现以下5个模块,分别是我的书架、书城、个人心中、H5阅读器、登录注册。这些模块中又存在许多子模块,互相连接和配合,为用户提供便捷和舒适的阅读体验,让用户能更简单并且不付费的读到自己想读的书籍。除此之外微书还支持书评以及查看书籍排行榜,帮助用户从浩瀚的书海中找到自己喜欢的书。本论文将介绍所设计的微书,并对本系统进行数据分析和设计。

环境需要

1.运行环境:最好是java jdk 1.8,我们在这个平台上运行的。其他版本理论上也可以。
2.IDE环境:IDEA,Eclipse,Myeclipse都可以。推荐IDEA;
3.tomcat环境:Tomcat 7.x,8.x,9.x版本均可
4.硬件环境:windows 7/8/10 1G内存以上;或者 Mac OS; 
5.数据库:MySql 5.7版本;
6.是否Maven项目:否;

技术栈

1. 后端:Spring+SpringMVC+Mybatis
2. 前端:JSP+CSS+JavaScript+jQuery

使用说明

1. 使用Navicat或者其它工具,在mysql中创建对应名称的数据库,并导入项目的sql文件;
2. 使用IDEA/Eclipse/MyEclipse导入项目,Eclipse/MyEclipse导入时,若为maven项目请选择maven;
若为maven项目,导入成功后请执行maven clean;maven install命令,然后运行;
3. 将项目中springmvc-servlet.xml配置文件中的数据库配置改为自己的配置;
4. 运行项目,在浏览器中输入http://localhost:8080/ 登录

运行截图

 用户管理控制层:

package com.houserss.controller;import javax.servlet.http.HttpSession;import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;import com.houserss.common.Const;
import com.houserss.common.Const.Role;
import com.houserss.common.ServerResponse;
import com.houserss.pojo.User;
import com.houserss.service.IUserService;
import com.houserss.service.impl.UserServiceImpl;
import com.houserss.util.MD5Util;
import com.houserss.util.TimeUtils;
import com.houserss.vo.DeleteHouseVo;
import com.houserss.vo.PageInfoVo;/*** Created by admin*/
@Controller
@RequestMapping("/user/")
public class UserController {@Autowiredprivate IUserService iUserService;/*** 用户登录* @param username* @param password* @param session* @return*/@RequestMapping(value = "login.do",method = RequestMethod.POST)@ResponseBodypublic ServerResponse<User> login(User user,String uvcode, HttpSession session){String code = (String)session.getAttribute("validationCode");if(StringUtils.isNotBlank(code)) {if(!code.equalsIgnoreCase(uvcode)) {return ServerResponse.createByErrorMessage("验证码不正确");}}ServerResponse<User> response = iUserService.login(user.getUsername(),user.getPassword());if(response.isSuccess()){session.setAttribute(Const.CURRENT_USER,response.getData());}return response;}}

管理员管理控制层:


package com.sxl.controller.admin;import java.util.List;
import java.util.Map;import javax.servlet.http.HttpServletRequest;import org.springframework.http.ResponseEntity;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;import com.sxl.controller.MyController;@Controller("adminController")
@RequestMapping(value = "/admin")
public class AdminController extends MyController {@RequestMapping(value = "/index")public String frame(Model model, HttpServletRequest request)throws Exception {return "/admin/index";}@RequestMapping(value = "/main")public String main(Model model, HttpServletRequest request)throws Exception {return "/admin/main";}@RequestMapping(value = "/tj1")public String tj1(Model model, HttpServletRequest request)throws Exception {String sql="select DATE_FORMAT(insertDate,'%Y-%m-%d') dates,sum(allPrice) price from t_order order by DATE_FORMAT(insertDate,'%Y-%m-%d')  desc";List<Map> list = db.queryForList(sql);model.addAttribute("list", list);System.out.println(list);return "/admin/tj/tj1";}@RequestMapping(value = "/password")public String password(Model model, HttpServletRequest request)throws Exception {return "/admin/password";}@RequestMapping(value = "/changePassword")public ResponseEntity<String> loginSave(Model model,HttpServletRequest request,String oldPassword,String newPassword) throws Exception {Map admin = getAdmin(request);if(oldPassword.equals(admin.get("password").toString())){String sql="update t_admin set password=? where id=?";db.update(sql, new Object[]{newPassword,admin.get("id")});return renderData(true,"1",null);}else{return renderData(false,"1",null);}}
}

修改密码业务逻辑:


package com.sxl.controller.admin;import java.util.Map;import javax.servlet.http.HttpServletRequest;import org.springframework.http.ResponseEntity;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;import com.sxl.controller.MyController;@Controller("userController")
@RequestMapping(value = "/user")
public class UserController extends MyController {@RequestMapping(value = "/index")public String frame(Model model, HttpServletRequest request)throws Exception {return "/user/index";}@RequestMapping(value = "/main")public String main(Model model, HttpServletRequest request)throws Exception {return "/user/main";}@RequestMapping(value = "/password")public String password(Model model, HttpServletRequest request)throws Exception {return "/user/password";}@RequestMapping(value = "/changePassword")public ResponseEntity<String> loginSave(Model model,HttpServletRequest request,String oldPassword,String newPassword) throws Exception {Map user = getUser(request);if(oldPassword.equals(user.get("password").toString())){String sql="update t_user set password=? where id=?";db.update(sql, new Object[]{newPassword,user.get("id")});return renderData(true,"1",null);}else{return renderData(false,"1",null);}}@RequestMapping(value = "/mine")public String mine(Model model, HttpServletRequest request)throws Exception {
Map user =getUser(request);Map map = db.queryForMap("select * from t_user where id=?",new Object[]{user.get("id")});model.addAttribute("map", map);		return "/user/mine";}@RequestMapping(value = "/mineSave")public ResponseEntity<String> mineSave(Model model,HttpServletRequest request,Long id,String username,String password,String name,String gh,String mobile) throws Exception{int result = 0;String sql="update t_user set name=?,gh=?,mobile=? where id=?";result = db.update(sql, new Object[]{name,gh,mobile,id});if(result==1){return renderData(true,"操作成功",null);}else{return renderData(false,"操作失败",null);}}}

通用管理模块:

package com.sxl.controller;import java.nio.charset.Charset;
import java.util.Locale;
import java.util.ResourceBundle;import javax.servlet.http.HttpServletRequest;import org.apache.commons.lang.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.HttpHeaders;
import org.springframework.http.HttpStatus;
import org.springframework.http.MediaType;
import org.springframework.http.ResponseEntity;import com.sxl.util.JacksonJsonUtil;
import com.sxl.util.StringUtil;
import com.sxl.util.SystemProperties;public class BaseController {public static final Long EXPIRES_IN = 1000 * 3600 * 24 * 1L;// 1天@Autowiredprivate SystemProperties systemProperties;/*** 获得配置文件内容*/public String getConfig(String key) {return systemProperties.getProperties(key);}/*** 返回服务器地址 like http://192.168.1.1:8441/UUBean/*/public String getHostUrl(HttpServletRequest request) {String hostName = request.getServerName();Integer hostPort = request.getServerPort();String path = request.getContextPath();if (hostPort == 80) {return "http://" + hostName + path + "/";} else {return "http://" + hostName + ":" + hostPort + path + "/";}}/**** 获取当前的website路径 String*/public static String getWebSite(HttpServletRequest request) {String returnUrl = request.getScheme() + "://"+ request.getServerName();if (request.getServerPort() != 80) {returnUrl += ":" + request.getServerPort();}returnUrl += request.getContextPath();return returnUrl;}/*** 初始化HTTP头.* * @return HttpHeaders*/public HttpHeaders initHttpHeaders() {HttpHeaders headers = new HttpHeaders();MediaType mediaType = new MediaType("text", "html",Charset.forName("utf-8"));headers.setContentType(mediaType);return headers;}/*** 返回 信息数据* * @param status* @param msg* @return*/public ResponseEntity<String> renderMsg(Boolean status, String msg) {if (StringUtils.isEmpty(msg)) {msg = "";}String str = "{\"status\":\"" + status + "\",\"msg\":\"" + msg + "\"}";ResponseEntity<String> responseEntity = new ResponseEntity<String>(str,initHttpHeaders(), HttpStatus.OK);return responseEntity;}/*** 返回obj数据* * @param status* @param msg* @param obj* @return*/public ResponseEntity<String> renderData(Boolean status, String msg,Object obj) {if (StringUtils.isEmpty(msg)) {msg = "";}StringBuffer sb = new StringBuffer();sb.append("{");sb.append("\"status\":\"" + status + "\",\"msg\":\"" + msg + "\",");sb.append("\"data\":" + JacksonJsonUtil.toJson(obj) + "");sb.append("}");ResponseEntity<String> responseEntity = new ResponseEntity<String>(sb.toString(), initHttpHeaders(), HttpStatus.OK);return responseEntity;}/**** 获取IP(如果是多级代理,则得到的是一串IP值)*/public static String getIpAddr(HttpServletRequest request) {String ip = request.getHeader("x-forwarded-for");if (ip == null || ip.length() == 0 || "unknown".equalsIgnoreCase(ip)) {ip = request.getHeader("Proxy-Client-IP");}if (ip == null || ip.length() == 0 || "unknown".equalsIgnoreCase(ip)) {ip = request.getHeader("WL-Proxy-Client-IP");}if (ip == null || ip.length() == 0 || "unknown".equalsIgnoreCase(ip)) {ip = request.getRemoteAddr();}if (ip != null && ip.length() > 0) {String[] ips = ip.split(",");for (int i = 0; i < ips.length; i++) {if (!"unknown".equalsIgnoreCase(ips[i])) {ip = ips[i];break;}}}return ip;}/*** 国际化获得语言内容* * @param key*            语言key* @param args* @param argsSplit* @param defaultMessage* @param locale* @return*/public static String getLanguage(String key, String args, String argsSplit,String defaultMessage, String locale) {String language = "zh";String contry = "cn";String returnValue = defaultMessage;if (!StringUtil.isEmpty(locale)) {try {String[] localeArray = locale.split("_");language = localeArray[0];contry = localeArray[1];} catch (Exception e) {}}try {ResourceBundle resource = ResourceBundle.getBundle("lang.resource",new Locale(language, contry));returnValue = resource.getString(key);if (!StringUtil.isEmpty(args)) {String[] argsArray = args.split(argsSplit);for (int i = 0; i < argsArray.length; i++) {returnValue = returnValue.replace("{" + i + "}",argsArray[i]);}}} catch (Exception e) {}return returnValue;}
}

源码获取:
大家点赞、收藏、关注、评论啦 、查看👇🏻👇🏻👇🏻QQ号获取联系方式👇🏻👇🏻👇🏻

打卡 文章 更新 254/365天

精彩专栏推荐订阅:下方专栏👇🏻👇🏻👇🏻👇🏻

💪时至今日,站长仍为程序员,从14年大学开始代做毕设/课设,希望能帮助更多的同学💪

活动地址:毕业季·进击的技术er


http://chatgpt.dhexx.cn/article/ENToHIq8.shtml

相关文章

微信小说电子书阅读系统设计与实现

项目背景和意义 目的&#xff1a;本课题主要目标是设计并能够实现一个基于web网页的电子书阅读系统&#xff0c;整个网站项目使用了B/S架构&#xff0c;基于java的springboot框架下开发&#xff1b;管理员通过后台录入信息、管理信息&#xff0c;设置网站信息&#xff0c;管理会…

关于微信阅读协议的分析

闲来无事 群里有人问 我就浅浅分析了一波协议 微信文章在客户端阅读需要授权 授权的接口称之为A8key 很多人不知道a8key是什么 a8key就是一个接口名字 类似url的path a8授权链接后就会返回一个针对单个微信授权的链接 &#xff08;会包含pass_ticket &#xff09; 然后访…

微信小程序入门与实战之构建阅读详情页面

构建文章详情页面 由于通常我们的后端人员可能没办法先给我们提供数据&#xff0c;所以我们要采用先静后动的开发方式。 我们所要实现的效果&#xff0c;如图所示&#xff1a; 基础代码&#xff1a; <view class"container"><image ></image>&l…

向阅读致敬!微信读书产品设计策略推导

全文11250字&#xff0c;拆解页面80个&#xff0c;3大理论设计模型&#xff0c;100多个产品设计细节&#xff0c;通过对【微信读书】的设计策略推导&#xff0c;为你提供一份读书类APP产品解题宝典&#xff01; 一、序言 1.1 适合人群 UI/交互设计师 跳出执行层的思维&#xff…

微信小程序-书籍阅读 【阅读、小说阅读、图书、世界读书日、爱读书爱分享】

前言&#xff1a; 微信小程序分为 小程序端【原生微信小程序】 和 后端【node】 两套代码。主要有四大模块&#xff1a;查找书籍、分享图书、书架、管理员发布书籍。阅读给人以力量&#xff0c;作为毕业设计的话是一个令人眼前一亮的作品&#xff0c;立意很稳也很积极向上&…

在线电子书阅读小程序,微信小程序电子书阅读,微信小程序小说阅读器毕业设计作品

项目背景和意义 目的&#xff1a;本课题主要目标是设计并能够实现一个基于微信小程序在线电子书阅读系统&#xff0c;前台用户使用小程序&#xff0c;后台管理使用基JavaMySql技术&#xff1b;通过后台录入电子书信息、书目录信息&#xff0c;用户通过小程序登录&#xff0c;查…

微信小程序阅读器功能

微信小程序 小说阅读器效果 基础功能&#xff1a; 上一章&#xff0c;下一章 目录显示全部章节&#xff0c;点击章节页面对应该章节&#xff0c;正序倒序功能 基本样式设置&#xff0c;背景板切换&#xff0c;字号切换&#xff0c;亮度调节 自定义返回按钮j 静态仿照数据&…

基于微信小程序的小说阅读系统(小程序+Nodejs)

目录 摘要 1 1 前言 3 1.1 项目介绍 3 1.2 项目背景 3 2 微书书城系统分析 3 2.1 需求分析 3 2.2 功能分析 3 2.3 系统用例图设计 3 2.4 系统流程图设计 3 2.5 系统开发环境 3 3 数据库分析与设计 4 3.1 数据库分析 4 3.2 数据库概念设计 4 3.3 数据逻辑结构设计 4 3.4 各表之间…

微信读书产品分析报告(附:信息结构图、功能结构图、产品结构图)

一、产品信息 产品名称&#xff1a;微信读书 产品类型&#xff1a;社交阅读 标语&#xff1a;让阅读不再孤单 产品版本&#xff1a;4.6.5 产品定位&#xff1a;在提供极致阅读体验的同时&#xff0c;为用户推荐合适的书籍&#xff0c;并可查看微信好友的读书动态、与好友讨论正…

【产品分析】从用户体验五要素分析——微信读书

本文从用户体验五要素&#xff1a;表现层面、框架层 、战略层、范围层、结构层&#xff0c;对微信读书进行了分析。 前言 互联网发展的速度也加速了知识更新的速度&#xff0c;也许今天你还手握焦点技能&#xff0c;明天就可能被遗忘在角落。一应俱全的网课、铺天盖地的资讯加…

tensorflow: greater()

tf.greater(x, y, nameNone) 返回&#xff1a;&#xff08;x > y&#xff09;的bool类型的张量 x: 一个张量。且必须是下列类型&#xff1a; types: float32, float64, int32, int64, uint8, int16, int8,uint16. y: 一个张量。且必须是与x类型一样。 name: 节点的操作…

G Greater and Greater

G Greater and Greater Description Given a sequence A of size n{n}n and a sequence B of size m, determine the number of subintervals(called S) of size m in A satisfying ∀i∈{1,2,⋯,m},Si≥Bi​. Input The first line contains two integers n,m (1≤n≤150000,1…

C++ greater/less 和建堆

文章目录 STL中的greater<>()和less<>()Heap定义堆排序构建堆堆排序 C的STL中堆的实现 STL中的greater<>()和less<>() 两个函数的头文件为 排序的时候&#xff0c;默认是从小到大&#xff1b;从大到小排序要使第三个参数为greater()。 建堆的时候&…

Greater and Greater

题目 传送门 题目大意 给定大小为n的序列A和大小为m的序列B&#xff0c;计算A中所有大小为m的子区间S&#xff0c;满足 分析 本题使用了一个special的STL&#xff1a;bitset 考虑bitset&#xff0c;对每个A求一个长为m的bitset Si&#xff0c;其中Si[j]1当且仅当Ai≥Bj。…

Error: Microsoft Visual C++ 14.0 or greater is required 解决方法

在Windows上安装某些Python依赖包时经常会遇到如下错误&#xff0c;其原因是&#xff1a;安装包&#xff08;此处是box2d-py&#xff09;没有找到Microsoft Visual C 14.0或更高版本的运行环境&#xff0c;所以无法正常启动。 error: subprocess-exited-with-error....Running…

什么是MVP模式?

MVP&#xff08;Model-View-Presenter&#xff09;是MVC模式的改良&#xff0c;由IBM的子公司Taligent提出。 和MVC的相同之处在于&#xff1a;Controller/Presenter负责业务逻辑&#xff0c;Model管理数据&#xff0c;View负责显示。 1.各部分之间的通信,都是双向的. View &l…

理解MVP设计模式

版权声明&#xff1a;转载请注明本文出自远古大钟的博客&#xff08;http://blog.csdn.net/duo2005duo&#xff09;&#xff0c;谢谢支持&#xff01; 目录(?)[] 转载请注明本文出自远古大钟的博客&#xff08;http://blog.csdn.net/duo2005duo&#xff09;&#xff0c;谢谢支…

iOS-MVP模式

前言 最近一段时间&#xff0c;公司刚做完一个MVP项目&#xff0c;我有一个习惯&#xff1a;在项目结项之后总结一下项目中新接触的问题。Google一下关键字“iOS MVP”&#xff0c;发现一些文章&#xff0c;最后是 这篇文章 带给我对MVP 的一些认识。MVP似乎有好多的变种&#…

Android:安卓学习笔记之MVP模式的简单理解和使用

Android MVP模式的简单理解和使用 MVP模式1、 为什么使用MVP模式&#xff1f;1.1、实例说明 2、一步步让你理解MVP2.1、MVP实现第一步&#xff0c; 将页面拆分为M/V/P三个模块2.2、 MVP实现第2步&#xff0c; 使用接口通信&#xff0c;进一步解耦2.2.1、MVP遵从的面向对象原则 …

MVP开发模式解析

前言 由于项目里同事用到MVP开发模式&#xff0c;我看了几篇关于 MVP 的文章&#xff0c;对其有了基本的了解之后&#xff0c;便照猫画虎进行了开发&#xff0c;之后便再也没接触过 MVP。 最近空闲读了些MVP的文章&#xff0c;受益匪浅&#xff0c;于是打算写一篇关于MVP开发…