├── .gitignore ├── LICENSE ├── README.md ├── src ├── com │ └── house │ │ ├── controller │ │ ├── admin │ │ │ ├── AdminController.java │ │ │ └── AdminViewController.java │ │ ├── house │ │ │ ├── AddHouseController.java │ │ │ ├── HomeController.java │ │ │ ├── HouseController.java │ │ │ ├── HouseDetailController.java │ │ │ └── OrderController.java │ │ └── user │ │ │ ├── LoginController.java │ │ │ └── UserController.java │ │ ├── dao │ │ ├── AdminMapper.java │ │ ├── HouseMapper.java │ │ ├── OrderMapper.java │ │ └── UserMapper.java │ │ ├── dto │ │ ├── UserData.java │ │ ├── UserHouseData.java │ │ └── UserOrderData.java │ │ ├── entity │ │ ├── Admin.java │ │ ├── House.java │ │ ├── Order.java │ │ ├── Page.java │ │ ├── User.java │ │ └── UserOrder.java │ │ ├── interceptor │ │ └── UserInterceptor.java │ │ ├── mapper │ │ ├── AdminMapper.xml │ │ ├── HouseMapper.xml │ │ ├── OrderMapper.xml │ │ └── UserMapper.xml │ │ └── service │ │ ├── IAdminService.java │ │ ├── IHouseService.java │ │ ├── IOrderService.java │ │ ├── IUserService.java │ │ └── impl │ │ ├── AdminServiceImpl.java │ │ ├── HouseServiceImpl.java │ │ ├── OrderServiceImpl.java │ │ └── UserServiceImpl.java ├── config │ ├── beans.xml │ └── springmvc.xml └── log4j.properties └── web ├── WEB-INF ├── lib │ ├── aspectjweaver-1.9.1.jar │ ├── commons-dbcp2-2.2.0.jar │ ├── commons-fileupload-1.3.3.jar │ ├── commons-io-2.6.jar │ ├── commons-logging-1.2.jar │ ├── commons-pool2-2.5.0.jar │ ├── jackson-annotations-2.9.6.jar │ ├── jackson-core-2.9.6.jar │ ├── jackson-databind-2.9.6.jar │ ├── jsqlparser-1.0.jar │ ├── jstl-1.2.jar │ ├── log4j-1.2.12.jar │ ├── lombok-1.18.12.jar │ ├── mybatis-3.4.6.jar │ ├── mybatis-spring-1.3.2.jar │ ├── mysql-connector-java-5.1.46.jar │ ├── pagehelper-5.1.4.jar │ ├── spring-aop-5.0.5.RELEASE.jar │ ├── spring-beans-5.0.5.RELEASE.jar │ ├── spring-context-5.0.5.RELEASE.jar │ ├── spring-core-5.0.5.RELEASE.jar │ ├── spring-expression-5.0.5.RELEASE.jar │ ├── spring-jcl-5.0.5.RELEASE.jar │ ├── spring-jdbc-5.0.5.RELEASE.jar │ ├── spring-tx-5.0.5.RELEASE.jar │ ├── spring-web-5.0.5.RELEASE.jar │ └── spring-webmvc-5.0.5.RELEASE.jar ├── pages │ ├── 404.jsp │ ├── addHouse.jsp │ ├── admin │ │ ├── allUser.jsp │ │ ├── changePassword.jsp │ │ ├── editUser.jsp │ │ ├── home.jsp │ │ ├── houseList.jsp │ │ ├── login.jsp │ │ └── updateHouse.jsp │ ├── index │ │ └── index.jsp │ ├── user │ │ ├── home.jsp │ │ ├── houseDetails.jsp │ │ ├── myOrder.jsp │ │ ├── myRental.jsp │ │ └── updatePassword.jsp │ └── welcome.jsp └── web.xml ├── css ├── 404.css ├── admin.css ├── bootstrap.min.css ├── details.css └── global.css ├── img ├── assets │ ├── guide-detail.png │ └── guide-home.png ├── banner-1.jpg ├── banner-2.jpg ├── banner-3.jpg ├── banner-4.jpg └── logo.png ├── index.jsp ├── js └── 404.js └── layui ├── css ├── layui.css ├── layui.mobile.css └── modules │ ├── code.css │ ├── laydate │ └── default │ │ └── laydate.css │ └── layer │ └── default │ ├── icon-ext.png │ ├── icon.png │ ├── layer.css │ ├── loading-0.gif │ ├── loading-1.gif │ └── loading-2.gif ├── font ├── iconfont.eot ├── iconfont.svg ├── iconfont.ttf └── iconfont.woff ├── images └── face │ ├── 0.gif │ ├── 1.gif │ ├── 10.gif │ ├── 11.gif │ ├── 12.gif │ ├── 13.gif │ ├── 14.gif │ ├── 15.gif │ ├── 16.gif │ ├── 17.gif │ ├── 18.gif │ ├── 19.gif │ ├── 2.gif │ ├── 20.gif │ ├── 21.gif │ ├── 22.gif │ ├── 23.gif │ ├── 24.gif │ ├── 25.gif │ ├── 26.gif │ ├── 27.gif │ ├── 28.gif │ ├── 29.gif │ ├── 3.gif │ ├── 30.gif │ ├── 31.gif │ ├── 32.gif │ ├── 33.gif │ ├── 34.gif │ ├── 35.gif │ ├── 36.gif │ ├── 37.gif │ ├── 38.gif │ ├── 39.gif │ ├── 4.gif │ ├── 40.gif │ ├── 41.gif │ ├── 42.gif │ ├── 43.gif │ ├── 44.gif │ ├── 45.gif │ ├── 46.gif │ ├── 47.gif │ ├── 48.gif │ ├── 49.gif │ ├── 5.gif │ ├── 50.gif │ ├── 51.gif │ ├── 52.gif │ ├── 53.gif │ ├── 54.gif │ ├── 55.gif │ ├── 56.gif │ ├── 57.gif │ ├── 58.gif │ ├── 59.gif │ ├── 6.gif │ ├── 60.gif │ ├── 61.gif │ ├── 62.gif │ ├── 63.gif │ ├── 64.gif │ ├── 65.gif │ ├── 66.gif │ ├── 67.gif │ ├── 68.gif │ ├── 69.gif │ ├── 7.gif │ ├── 70.gif │ ├── 71.gif │ ├── 8.gif │ └── 9.gif ├── lay └── modules │ ├── carousel.js │ ├── code.js │ ├── colorpicker.js │ ├── element.js │ ├── flow.js │ ├── form.js │ ├── jquery.js │ ├── laydate.js │ ├── layedit.js │ ├── layer.js │ ├── laypage.js │ ├── laytpl.js │ ├── mobile.js │ ├── rate.js │ ├── slider.js │ ├── table.js │ ├── tree.js │ ├── upload.js │ └── util.js ├── layui.all.js └── layui.js /.gitignore: -------------------------------------------------------------------------------- 1 | HELP.md 2 | target/ 3 | !.mvn/wrapper/maven-wrapper.jar 4 | !**/src/main/** 5 | !**/src/test/** 6 | 7 | ### STS ### 8 | .apt_generated 9 | .classpath 10 | .factorypath 11 | .project 12 | .settings 13 | .springBeans 14 | .sts4-cache 15 | 16 | ### IntelliJ IDEA ### 17 | .idea 18 | *.iws 19 | *.iml 20 | *.ipr 21 | .mvn 22 | 23 | ### NetBeans ### 24 | /nbproject/private/ 25 | /nbbuild/ 26 | /dist/ 27 | /nbdist/ 28 | /.nb-gradle/ 29 | build/ 30 | 31 | ### VS Code ### 32 | .vscode/ 33 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2020 chriy 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, 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, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 |

2 |

房屋租赁系统

3 |

4 | 5 |

6 | 7 | 8 | 9 | 10 |

11 | 12 | ## 简介 13 | 14 | > 房屋租赁系统,基于 Spring5.x 的实战项目。 15 | 16 | 17 | 18 | ## 特征 19 | 20 | - 基本:实现不同用户之间的收藏房源,与房东沟通 21 | - 多用户:普通用户与管理员各自都能发布房源信息 22 | - 开发环境:前端 `Layui`,后端 `Spring` `SpringMVC` `MyBatis` 23 | 24 | - · · · 25 | 26 | 27 | 28 | ## 环境 29 | 30 | - IntelliJ IDEA 31 | 32 | - Mysql 5.7 33 | 34 | - Tomcat 9.x 35 | 36 | - JDK 1.8 37 | 38 | 39 | 40 | ## 缩略图 41 | 42 | ![](web/img/assets/guide-home.png) 43 | 44 | ![](web/img/assets/guide-detail.png) 45 | 46 | 47 | 48 | ## License 49 | 50 | [MIT](http://opensource.org/licenses/MIT) 51 | 52 | -------------------------------------------------------------------------------- /src/com/house/controller/admin/AdminController.java: -------------------------------------------------------------------------------- 1 | package com.house.controller.admin; 2 | 3 | import com.house.dto.UserData; 4 | import com.house.dto.UserHouseData; 5 | import com.house.entity.Admin; 6 | import com.house.entity.House; 7 | import com.house.entity.Page; 8 | import com.house.entity.User; 9 | import com.house.service.IAdminService; 10 | import org.springframework.beans.factory.annotation.Autowired; 11 | import org.springframework.web.bind.annotation.*; 12 | 13 | import javax.servlet.http.HttpServletRequest; 14 | import java.util.List; 15 | 16 | /** 17 | * 管理员控制器 18 | * 19 | * @author chriy 20 | */ 21 | @RestController 22 | @RequestMapping("/admin") 23 | public class AdminController { 24 | 25 | @Autowired 26 | private IAdminService service; 27 | 28 | /** 29 | * 登录请求 30 | * 31 | * @param userName 用户名 32 | * @param userPassword 密码 33 | * @param req req 34 | * @return res 35 | */ 36 | @PostMapping("/adminAccess") 37 | public String adminAccess(String userName, String userPassword, HttpServletRequest req) { 38 | Admin admin = new Admin(0, userName, userPassword); 39 | Admin adminAccess = service.adminAccess(admin); 40 | req.getSession().setAttribute("Admin", adminAccess); 41 | if (adminAccess != null) { 42 | return "OK"; 43 | } 44 | return "FAIL"; 45 | } 46 | 47 | /** 48 | * 查询所有用户 49 | * 50 | * @return res 51 | */ 52 | @GetMapping("/allUser") 53 | public UserData findAllUser() { 54 | List findAllUser = service.findAllUser(); 55 | UserData userData = new UserData(); 56 | userData.setCode(0); 57 | userData.setCount(findAllUser.size()); 58 | userData.setData(findAllUser); 59 | userData.setMsg("OK"); 60 | return userData; 61 | } 62 | 63 | /** 64 | * 更新用户信息 65 | * 66 | * @param user user 67 | * @return res 68 | */ 69 | @PostMapping("/editUser") 70 | public String editUser(User user) { 71 | int n = service.updateUser(user); 72 | if (n > 0) { 73 | return "OK"; 74 | } 75 | return "FAIL"; 76 | } 77 | 78 | /** 79 | * 查询所有房源 80 | * 81 | * @param page page 82 | * @param limit limit 83 | * @return res 84 | */ 85 | @RequestMapping("/houseList") 86 | public UserHouseData findAllHouse(int page, int limit) { 87 | Page p = new Page(); 88 | p.setLimit(limit); 89 | p.setPage((page - 1) * limit); 90 | List findAllHouse = service.findAllHouse(p); 91 | UserHouseData data = new UserHouseData(); 92 | data.setCode(0); 93 | data.setCount(findAllHouse.size()); 94 | data.setData(findAllHouse); 95 | data.setMsg("OK"); 96 | return data; 97 | } 98 | 99 | /** 100 | * 删除房源 101 | * 102 | * @param houseId 房源id 103 | * @return res 104 | */ 105 | @RequestMapping("/deleteHouse") 106 | public String deleteHouse(int houseId) { 107 | int deleteHouse = service.deleteHouse(houseId); 108 | if (deleteHouse > 0) { 109 | return "OK"; 110 | } 111 | return "FAIL"; 112 | } 113 | 114 | /** 115 | * 管理员删除用户 116 | */ 117 | @PostMapping("/deleteUser") 118 | public String deleteUser(Integer userId) { 119 | int n = service.deleteUser(userId); 120 | if (n > 0) { 121 | return "OK"; 122 | } 123 | return "FAIL"; 124 | } 125 | 126 | /** 127 | * 修改管理员登录密码 128 | * 129 | * @param request req 130 | * @param oldPwd 旧密码 131 | * @param newPwd 新密码 132 | * @param confirmPwd 确认密码 133 | * @return res 134 | */ 135 | @PostMapping("/changePassword") 136 | public String changePassword(HttpServletRequest request, String oldPwd, String newPwd, String confirmPwd) { 137 | Admin checkAdmin = new Admin(); 138 | Admin adminSession = (Admin) request.getSession().getAttribute("Admin"); 139 | checkAdmin.setId(adminSession.getId()); 140 | checkAdmin.setUserPassword(oldPwd); 141 | // 拿到当前登录的账户密码 142 | Admin checkAdminPwd = service.checkAdminPwd(checkAdmin); 143 | if (checkAdminPwd == null) { 144 | return "ERROR"; 145 | } 146 | if (!newPwd.equals(confirmPwd)) { 147 | return "FAIL"; 148 | } 149 | Admin admin = new Admin(); 150 | admin.setId(adminSession.getId()); 151 | admin.setUserPassword(newPwd); 152 | int n = service.changePassword(admin); 153 | if (n > 0) { 154 | return "OK"; 155 | } 156 | return "FAIL"; 157 | } 158 | } 159 | -------------------------------------------------------------------------------- /src/com/house/controller/admin/AdminViewController.java: -------------------------------------------------------------------------------- 1 | package com.house.controller.admin; 2 | 3 | import com.house.entity.House; 4 | import com.house.entity.User; 5 | import com.house.service.IAdminService; 6 | import com.house.service.IHouseService; 7 | import org.springframework.beans.factory.annotation.Autowired; 8 | import org.springframework.stereotype.Controller; 9 | import org.springframework.web.bind.annotation.GetMapping; 10 | import org.springframework.web.bind.annotation.RequestMapping; 11 | 12 | import javax.servlet.http.HttpServletRequest; 13 | 14 | /** 15 | * 管理员界面视图跳转 16 | * 17 | * @author chriy 18 | */ 19 | @Controller 20 | @RequestMapping("/admin") 21 | public class AdminViewController { 22 | 23 | @Autowired 24 | private IAdminService service; 25 | 26 | @Autowired 27 | private IHouseService dao; 28 | 29 | /** 30 | * 登录页 31 | * 32 | * @return view 33 | */ 34 | @GetMapping({"/", "/index.html"}) 35 | public String toAdminLogin() { 36 | return "/admin/login.jsp"; 37 | } 38 | 39 | /** 40 | * 注销登录 41 | * 42 | * @param request req 43 | * @return view 44 | */ 45 | @GetMapping("/logout") 46 | public String logout(HttpServletRequest request) { 47 | request.getSession().invalidate(); 48 | return "redirect:/index.html"; 49 | } 50 | 51 | /** 52 | * 管理员首页 53 | * 54 | * @return view 55 | */ 56 | @GetMapping("/home.html") 57 | public String toAdminHomePage() { 58 | return "/admin/home.jsp"; 59 | } 60 | 61 | /** 62 | * 修改密码页 63 | * 64 | * @return view 65 | */ 66 | @GetMapping("/changePassword.html") 67 | public String changePasswordPage() { 68 | return "/admin/changePassword.jsp"; 69 | } 70 | 71 | /** 72 | * 查询所有用户页 73 | * 74 | * @return view 75 | */ 76 | @GetMapping("/allUser.html") 77 | public String toAllUserPage() { 78 | return "/admin/allUser.jsp"; 79 | } 80 | 81 | /** 82 | * 所有房源数据页 83 | * 84 | * @return view 85 | */ 86 | @GetMapping("/houseList.html") 87 | public String toAllHousePage() { 88 | return "/admin/houseList.jsp"; 89 | } 90 | 91 | /** 92 | * 传入id,跳转到修改用户界面 93 | * 94 | * @return view 95 | */ 96 | @GetMapping("/editUser.html") 97 | public String toEditUserPage(int userId, HttpServletRequest req) { 98 | User findUserById = service.findUserById(userId); 99 | req.getSession().setAttribute("User", findUserById); 100 | return "/admin/editUser.jsp"; 101 | } 102 | 103 | /** 104 | * 跳转到管理员更新房源界面 105 | * 106 | * @param houseId 房源ID 107 | * @param request req 108 | * @return view 109 | */ 110 | @RequestMapping("/updateHouse.html") 111 | public String toUpdatePage(int houseId, HttpServletRequest request) { 112 | House house = dao.findHouseDetailsById(houseId); 113 | request.getSession().setAttribute("House", house); 114 | return "/admin/updateHouse.jsp"; 115 | } 116 | } 117 | -------------------------------------------------------------------------------- /src/com/house/controller/house/AddHouseController.java: -------------------------------------------------------------------------------- 1 | package com.house.controller.house; 2 | 3 | import com.house.entity.House; 4 | import com.house.service.IHouseService; 5 | import org.springframework.beans.factory.annotation.Autowired; 6 | import org.springframework.stereotype.Controller; 7 | import org.springframework.web.bind.annotation.*; 8 | import org.springframework.web.multipart.MultipartFile; 9 | 10 | import javax.servlet.http.HttpServletRequest; 11 | import java.io.File; 12 | import java.util.*; 13 | 14 | /** 15 | * 添加房源信息控制类 16 | * 17 | * @author chriy 18 | */ 19 | @Controller 20 | @RequestMapping("/house") 21 | public class AddHouseController { 22 | 23 | /** 24 | * 映射本地路径 25 | * 注意:别漏了最后一个 / 26 | */ 27 | private String dirPath = "D:/upload/hrs/"; 28 | /** 29 | * 简介图片地址 30 | * 注意:虚拟路径映射的关键位置 31 | */ 32 | private String simplePath = "/hrs/"; 33 | /** 34 | * 详细图片地址 35 | */ 36 | private StringBuilder detailsPath = new StringBuilder(); 37 | 38 | @Autowired 39 | private IHouseService service; 40 | 41 | /** 42 | * 添加房源界面 43 | * 44 | * @return view 45 | */ 46 | @GetMapping("/addHouse.html") 47 | public String addHouse() { 48 | return "addHouse.jsp"; 49 | } 50 | 51 | /** 52 | * 简介图片上传 53 | * 54 | * @param briefFile file 55 | * @return res 56 | */ 57 | @RequestMapping("/briefImage") 58 | @ResponseBody 59 | public Map briefImage(@RequestParam("brief") MultipartFile briefFile) { 60 | 61 | Map map = new HashMap<>(16); 62 | try { 63 | String suffixName = Objects.requireNonNull(briefFile.getOriginalFilename()) 64 | .substring(briefFile.getOriginalFilename().lastIndexOf(".")); 65 | String filename = UUID.randomUUID().toString().replace("-", "") + suffixName; 66 | File filePath = new File(dirPath); 67 | if (!filePath.exists()) { 68 | boolean mkdirs = filePath.mkdirs(); 69 | } 70 | //创建虚拟路径存储 71 | simplePath += filename; 72 | map.put("image", simplePath); 73 | briefFile.transferTo(new File(dirPath + filename)); 74 | map.put("code", 0); 75 | map.put("msg", "上传成功"); 76 | } catch (Exception e) { 77 | map.put("code", 1); 78 | map.put("msg", "上传失败"); 79 | e.printStackTrace(); 80 | } 81 | return map; 82 | } 83 | 84 | /** 85 | * 详情图片上传 86 | * 87 | * @param file file 88 | * @param req req 89 | * @return res 90 | */ 91 | @RequestMapping("/detailsImage") 92 | @ResponseBody 93 | public Map detailsImage(@RequestParam("detailsImage") List file, HttpServletRequest req) { 94 | 95 | Map map = new HashMap<>(16); 96 | if (!file.isEmpty()) { 97 | for (MultipartFile f : file) { 98 | try { 99 | // 文件名 100 | String filename = UUID.randomUUID() 101 | + Objects.requireNonNull(f.getOriginalFilename()) 102 | .substring(f.getOriginalFilename().lastIndexOf(".")); 103 | 104 | // 存储虚拟路径 105 | String localPath = simplePath + "details/" + filename; 106 | detailsPath.append(localPath + ":-:"); 107 | 108 | File filePath = new File(dirPath); 109 | if (!filePath.exists()) { 110 | boolean mkdirs = filePath.mkdirs(); 111 | } 112 | //上传 113 | f.transferTo(new File(dirPath + filename)); 114 | 115 | } catch (Exception e) { 116 | map.put("code", 1); 117 | map.put("msg", "上传失败"); 118 | e.printStackTrace(); 119 | } 120 | } 121 | map.put("code", 0); 122 | map.put("msg", "上传成功"); 123 | } 124 | return map; 125 | } 126 | 127 | /** 128 | * 添加新房源信息 129 | * 130 | * @param house 房源数据 131 | * @return res 132 | */ 133 | @PostMapping("/addHouseRecord") 134 | @ResponseBody 135 | public String addHouse(House house) { 136 | if (house.getPublisher() == null || "".equals(house.getPublisher())) { 137 | house.setPublisher("管理员"); 138 | } 139 | house.setHouseImage(simplePath); 140 | house.setHouseDetailsImg(detailsPath.toString()); 141 | int n = service.addNewHouse(house); 142 | if (n > 0) { 143 | // 置空上一次的添加记录 144 | simplePath = "hrs/"; 145 | detailsPath.delete(0, detailsPath.length()); 146 | return "OK"; 147 | } 148 | return "FAIL"; 149 | } 150 | } 151 | -------------------------------------------------------------------------------- /src/com/house/controller/house/HomeController.java: -------------------------------------------------------------------------------- 1 | package com.house.controller.house; 2 | 3 | import com.house.entity.House; 4 | import com.house.service.IHouseService; 5 | import org.springframework.beans.factory.annotation.Autowired; 6 | import org.springframework.stereotype.Controller; 7 | import org.springframework.web.bind.annotation.GetMapping; 8 | import org.springframework.web.bind.annotation.PostMapping; 9 | 10 | import javax.servlet.http.HttpServletRequest; 11 | import java.util.List; 12 | 13 | /** 14 | * 首页控制类 15 | * 16 | * @author chriy 17 | */ 18 | @Controller 19 | public class HomeController { 20 | 21 | @Autowired 22 | private IHouseService service; 23 | 24 | /** 25 | * 首页 26 | * 27 | * @param request request 28 | * @return view 29 | */ 30 | @GetMapping({"/index.html", "/"}) 31 | public String index(HttpServletRequest request) { 32 | List findHomeInfo = service.findHomeInfo(); 33 | request.getSession().setAttribute("House", findHomeInfo); 34 | return "index/index.jsp"; 35 | } 36 | 37 | /** 38 | * 模糊查询 39 | * 40 | * @param request request 41 | * @param keywords keywords 42 | * @return res 43 | */ 44 | @PostMapping("/fuzzy") 45 | public String findHouseByLike(HttpServletRequest request, String keywords) { 46 | List findHomeInfo = service.findHouseByLike(keywords); 47 | request.getSession().removeAttribute("House"); 48 | request.getSession().setAttribute("House", findHomeInfo); 49 | return "index/index.jsp"; 50 | } 51 | 52 | /** 53 | * 价格升序查询 54 | * 55 | * @param request request 56 | * @return res 57 | */ 58 | @GetMapping("/priceAsc") 59 | public String findPriceAsc(HttpServletRequest request) { 60 | List findHomeInfo = service.findHouseOrderByAsc(); 61 | request.getSession().removeAttribute("House"); 62 | request.getSession().setAttribute("House", findHomeInfo); 63 | return "index/index.jsp"; 64 | } 65 | 66 | /** 67 | * 价格降序查询 68 | * 69 | * @param request request 70 | * @return res 71 | */ 72 | @GetMapping("/priceDesc") 73 | public String findPriceDesc(HttpServletRequest request) { 74 | List findHomeInfo = service.findHouseOrderByDesc(); 75 | request.getSession().removeAttribute("House"); 76 | request.getSession().setAttribute("House", findHomeInfo); 77 | return "index/index.jsp"; 78 | } 79 | } 80 | -------------------------------------------------------------------------------- /src/com/house/controller/house/HouseController.java: -------------------------------------------------------------------------------- 1 | package com.house.controller.house; 2 | 3 | import com.house.dto.UserHouseData; 4 | import com.house.entity.House; 5 | import com.house.entity.Page; 6 | import com.house.entity.User; 7 | import com.house.service.IHouseService; 8 | import org.springframework.beans.factory.annotation.Autowired; 9 | import org.springframework.stereotype.Controller; 10 | import org.springframework.web.bind.annotation.PostMapping; 11 | import org.springframework.web.bind.annotation.RequestMapping; 12 | import org.springframework.web.bind.annotation.ResponseBody; 13 | 14 | import javax.servlet.http.HttpServletRequest; 15 | import java.util.List; 16 | 17 | /** 18 | * @author chriy 19 | */ 20 | @Controller 21 | @RequestMapping("/house") 22 | public class HouseController { 23 | 24 | @Autowired 25 | private IHouseService service; 26 | 27 | @RequestMapping("/findUserHouse") 28 | @ResponseBody 29 | public UserHouseData houseByUser(HttpServletRequest request, int page, int limit) { 30 | Page p = new Page(); 31 | User u = (User) request.getSession().getAttribute("loginUser"); 32 | String publisher = u.getUserNickName(); 33 | p.setPublisher(publisher); 34 | p.setLimit(limit); 35 | p.setPage((page - 1) * limit); 36 | List list = service.findHouseByUser(p); 37 | System.out.println(list); 38 | return new UserHouseData(0, "200", list.size(), list); 39 | } 40 | 41 | /** 42 | * 删除用户发布的房源信息 43 | * 44 | * @param houseId 房源 ID 45 | * @return res 46 | */ 47 | @PostMapping("/deleteUserHouse") 48 | @ResponseBody 49 | public String deleteUserHouse(String houseId) { 50 | int n = service.deleteUserHouse(Integer.parseInt(houseId)); 51 | if (n > 0) { 52 | return "OK"; 53 | } 54 | return "FAIL"; 55 | } 56 | 57 | /** 58 | * 更新房源信息 59 | * 60 | * @param house 房源数据 61 | * @return res 62 | */ 63 | @PostMapping("/updateHouse") 64 | @ResponseBody 65 | public String updateHouse(House house) { 66 | int n = service.updateHouse(house); 67 | if (n > 0) { 68 | return "OK"; 69 | } 70 | return "FAIL"; 71 | } 72 | } 73 | -------------------------------------------------------------------------------- /src/com/house/controller/house/HouseDetailController.java: -------------------------------------------------------------------------------- 1 | package com.house.controller.house; 2 | 3 | import com.house.entity.House; 4 | import com.house.service.IHouseService; 5 | import org.springframework.beans.factory.annotation.Autowired; 6 | import org.springframework.stereotype.Controller; 7 | import org.springframework.web.bind.annotation.GetMapping; 8 | 9 | import javax.servlet.http.HttpServletRequest; 10 | import java.util.ArrayList; 11 | import java.util.List; 12 | 13 | /** 14 | * 房屋详情控制类 15 | * 16 | * @author chriy 17 | */ 18 | @Controller 19 | public class HouseDetailController { 20 | 21 | @Autowired 22 | private IHouseService service; 23 | 24 | /** 25 | * 房源详情 26 | * 27 | * @param id id 28 | * @param request req 29 | * @return view 30 | */ 31 | @GetMapping("/detail.html") 32 | public String detail(int id, HttpServletRequest request) { 33 | House details = service.findHouseDetailsById(id); 34 | List list = new ArrayList(); 35 | String[] split = details.getHouseDetailsImg().split(":-:"); 36 | for (int i = 0; i < split.length; i++) { 37 | list.add(split[i]); 38 | } 39 | request.getSession().setAttribute("Details", details); 40 | request.getSession().setAttribute("DetailsImg", list); 41 | return "/user/houseDetails.jsp"; 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /src/com/house/controller/house/OrderController.java: -------------------------------------------------------------------------------- 1 | package com.house.controller.house; 2 | 3 | import com.house.dto.UserOrderData; 4 | import com.house.entity.Order; 5 | import com.house.entity.Page; 6 | import com.house.entity.User; 7 | import com.house.entity.UserOrder; 8 | import com.house.service.IOrderService; 9 | import org.springframework.beans.factory.annotation.Autowired; 10 | import org.springframework.stereotype.Controller; 11 | import org.springframework.web.bind.annotation.GetMapping; 12 | import org.springframework.web.bind.annotation.PostMapping; 13 | import org.springframework.web.bind.annotation.RequestMapping; 14 | import org.springframework.web.bind.annotation.ResponseBody; 15 | 16 | import javax.servlet.http.HttpServletRequest; 17 | import java.util.List; 18 | 19 | /** 20 | * 收藏控制类 21 | * 22 | * @author chriy 23 | */ 24 | @Controller 25 | @RequestMapping("/order") 26 | public class OrderController { 27 | 28 | @Autowired 29 | private IOrderService service; 30 | 31 | /** 32 | * 用户的收藏房源界面 33 | * 34 | * @return view 35 | */ 36 | @GetMapping("/myOrder.html") 37 | public String toOrderPage() { 38 | return "/user/myOrder.jsp"; 39 | } 40 | 41 | /** 42 | * 添加订单 43 | * 44 | * @param id 房源id 45 | * @param request req 46 | * @return res 47 | */ 48 | @PostMapping("/addOrder") 49 | @ResponseBody 50 | public String addOrder(String id, HttpServletRequest request) { 51 | User user = (User) request.getSession().getAttribute("loginUser"); 52 | try { 53 | Order order = new Order(); 54 | order.setHouseId(Integer.parseInt(id)); 55 | order.setOrderUser(user.getUserNickName()); 56 | order.setUserId(user.getUserId()); 57 | int n = service.addOrder(order); 58 | if (n > 0) { 59 | return "OK"; 60 | } 61 | } catch (NumberFormatException e) { 62 | e.printStackTrace(); 63 | } 64 | return "FAIL"; 65 | } 66 | 67 | /** 68 | * 查询我的所有收藏房源信息 69 | * 70 | * @param page page 71 | * @param limit limit 72 | * @param request req 73 | * @return res 74 | */ 75 | @PostMapping("/myOrderInfo") 76 | @ResponseBody 77 | public UserOrderData findAllOrder(int page, int limit, HttpServletRequest request) { 78 | Page pageObj = new Page(); 79 | pageObj.setPage((page - 1) * limit); 80 | pageObj.setLimit(limit); 81 | User user = (User) request.getSession().getAttribute("loginUser"); 82 | pageObj.setUserId(user.getUserId()); 83 | UserOrderData uod = new UserOrderData(); 84 | List order = service.findAllOrder(pageObj); 85 | uod.setCode(0); 86 | uod.setCount(service.getOrderCount(user.getUserId())); 87 | uod.setData(order); 88 | uod.setMsg("200"); 89 | return uod; 90 | } 91 | 92 | /** 93 | * 删除收藏的房源信息 94 | * 95 | * @param orderId 单号 96 | * @return res 97 | */ 98 | @PostMapping("/deleteOrder") 99 | @ResponseBody 100 | public String deleteOrder(int orderId) { 101 | int n = service.deleteOrder(orderId); 102 | if (n > 0) { 103 | return "OK"; 104 | } 105 | return "FAIL"; 106 | } 107 | } 108 | -------------------------------------------------------------------------------- /src/com/house/controller/user/LoginController.java: -------------------------------------------------------------------------------- 1 | package com.house.controller.user; 2 | 3 | import com.house.entity.User; 4 | import com.house.service.IUserService; 5 | import org.springframework.beans.factory.annotation.Autowired; 6 | import org.springframework.stereotype.Controller; 7 | import org.springframework.web.bind.annotation.GetMapping; 8 | import org.springframework.web.bind.annotation.PostMapping; 9 | import org.springframework.web.bind.annotation.RequestMapping; 10 | import org.springframework.web.bind.annotation.ResponseBody; 11 | 12 | import javax.servlet.http.HttpServletRequest; 13 | import javax.servlet.http.HttpSession; 14 | 15 | /** 16 | * 普通用户登录 17 | * 18 | * @author chriy 19 | */ 20 | @Controller 21 | @RequestMapping("/user") 22 | public class LoginController { 23 | 24 | @Autowired 25 | private IUserService mapper; 26 | 27 | /** 28 | * 登录 29 | * 30 | * @param userName 用户名 31 | * @param userPassword 密码 32 | * @param req req 33 | * @return res 34 | */ 35 | @PostMapping("/login") 36 | @ResponseBody 37 | public String toCustomerPage(String userName, String userPassword, HttpServletRequest req) { 38 | User user = new User(); 39 | user.setUserName(userName); 40 | user.setUserPassword(userPassword); 41 | User loginUser = mapper.login(user); 42 | if (loginUser != null) { 43 | req.getSession().setAttribute("loginUser", loginUser); 44 | return "OK"; 45 | } 46 | return "FAIL"; 47 | } 48 | 49 | /** 50 | * 退出登录 51 | * 52 | * @param session session 53 | * @return view 54 | */ 55 | @GetMapping("/logout") 56 | public String logout(HttpSession session) { 57 | session.invalidate(); 58 | return "redirect:/index.html"; 59 | } 60 | 61 | @PostMapping("/register") 62 | @ResponseBody 63 | public String register(User user) { 64 | int register; 65 | try { 66 | register = mapper.register(user); 67 | if (register > 0) { 68 | return "OK"; 69 | } 70 | } catch (Exception e) { 71 | return "FAIL"; 72 | } 73 | return "FAIL"; 74 | } 75 | 76 | } 77 | -------------------------------------------------------------------------------- /src/com/house/controller/user/UserController.java: -------------------------------------------------------------------------------- 1 | package com.house.controller.user; 2 | 3 | import com.house.entity.House; 4 | import com.house.entity.User; 5 | import com.house.service.IHouseService; 6 | import com.house.service.IUserService; 7 | import org.springframework.beans.factory.annotation.Autowired; 8 | import org.springframework.stereotype.Controller; 9 | import org.springframework.web.bind.annotation.GetMapping; 10 | import org.springframework.web.bind.annotation.PostMapping; 11 | import org.springframework.web.bind.annotation.RequestMapping; 12 | import org.springframework.web.bind.annotation.ResponseBody; 13 | 14 | import javax.servlet.http.HttpServletRequest; 15 | 16 | /** 17 | * 用户控制类 18 | * 19 | * @author chriy 20 | */ 21 | @Controller 22 | @RequestMapping("/user") 23 | public class UserController { 24 | 25 | @Autowired 26 | private IUserService service; 27 | @Autowired 28 | private IHouseService dao; 29 | 30 | /** 31 | * 用户管理页 32 | * 33 | * @return view 34 | */ 35 | @GetMapping("/home.html") 36 | public String toUserSystemPage() { 37 | return "/user/home.jsp"; 38 | } 39 | 40 | /** 41 | * 用户修改密码界面 42 | * 43 | * @return view 44 | */ 45 | @GetMapping("/updatePassword.html") 46 | public String updatePassword() { 47 | return "/user/updatePassword.jsp"; 48 | } 49 | 50 | /** 51 | * 后台第一个欢迎界面 52 | * 53 | * @return view 54 | */ 55 | @GetMapping("/welcome.html") 56 | public String toWelcomePage() { 57 | return "welcome.jsp"; 58 | } 59 | 60 | /** 61 | * 用户发布的租房信息 62 | * @return view 63 | */ 64 | @GetMapping("/userRental.html") 65 | public String toUserRentalPage() { 66 | return "/user/myRental.jsp"; 67 | } 68 | 69 | /** 70 | * 用户更新房源信息 71 | * 使用的也是管理员的界面 72 | * 73 | * @param houseId 房源ID 74 | * @param request req 75 | * @return view 76 | */ 77 | @GetMapping("/updateHouse.html") 78 | public String toUpdatePage(int houseId, HttpServletRequest request) { 79 | House house = dao.findHouseDetailsById(houseId); 80 | request.getSession().setAttribute("House", house); 81 | return "/admin/updateHouse.jsp"; 82 | } 83 | 84 | /** 85 | * 更新用户密码 86 | * 87 | * @param id id 88 | * @param newPwd new password 89 | * @param oldPwd old password 90 | * @return res 91 | */ 92 | @PostMapping("/updateUserPwd") 93 | @ResponseBody 94 | public String updateUserPwd(String id, String newPwd, String oldPwd) { 95 | User oldUser = new User(); 96 | oldUser.setUserId(Integer.parseInt(id)); 97 | oldUser.setUserPassword(oldPwd); 98 | User checkUser = service.checkOldPwd(oldUser); 99 | if (checkUser != null) { 100 | User newUser = new User(); 101 | newUser.setUserId(Integer.parseInt(id)); 102 | newUser.setUserPassword(newPwd); 103 | int n = service.updateUserPwd(newUser); 104 | if (n > 0) { 105 | return "OK"; 106 | } 107 | } 108 | return "FAIL"; 109 | } 110 | } 111 | -------------------------------------------------------------------------------- /src/com/house/dao/AdminMapper.java: -------------------------------------------------------------------------------- 1 | package com.house.dao; 2 | 3 | import com.house.entity.Admin; 4 | import com.house.entity.House; 5 | import com.house.entity.Page; 6 | import com.house.entity.User; 7 | 8 | import java.util.List; 9 | 10 | /** 11 | * @author chriy 12 | */ 13 | public interface AdminMapper { 14 | /** 15 | * 管理员登录 16 | * 17 | * @param admin 管理员对象 18 | * @return admin 19 | */ 20 | Admin adminAccess(Admin admin); 21 | 22 | /** 23 | * 查询所有用户 24 | * 25 | * @return user list 26 | */ 27 | List findAllUser(); 28 | 29 | /** 30 | * 查询所有房源信息 31 | * 32 | * @param page 分页 33 | * @return List 34 | */ 35 | List findAllHouse(Page page); 36 | 37 | /** 38 | * 管理员删除房源信息 39 | * 40 | * @param houseId id 41 | * @return int 42 | */ 43 | int deleteHouse(int houseId); 44 | 45 | /** 46 | * 通过id查询用户 47 | * 48 | * @param userId id 49 | * @return user 50 | */ 51 | User findUserById(int userId); 52 | 53 | /** 54 | * 管理员更新普通用户信息 55 | * 56 | * @param user user 57 | * @return int 58 | */ 59 | int updateUser(User user); 60 | 61 | /** 62 | * 管理员删除用户 63 | * 64 | * @param userId id 65 | * @return int 66 | */ 67 | int deleteUser(int userId); 68 | 69 | /** 70 | * 检查修改密码原密码 71 | * 72 | * @param admin admin 73 | * @return admin 74 | */ 75 | Admin checkAdminPwd(Admin admin); 76 | 77 | /** 78 | * 修改管理员密码 79 | * 80 | * @param admin admin 81 | * @return int 82 | */ 83 | int updateAdminPwd(Admin admin); 84 | } 85 | -------------------------------------------------------------------------------- /src/com/house/dao/HouseMapper.java: -------------------------------------------------------------------------------- 1 | package com.house.dao; 2 | 3 | import com.house.entity.House; 4 | import com.house.entity.Page; 5 | 6 | import java.util.List; 7 | 8 | /** 9 | * @author chriy 10 | */ 11 | public interface HouseMapper { 12 | /** 13 | * 首页信息展示 14 | * 15 | * @return List 16 | */ 17 | List findHomeInfo(); 18 | 19 | /** 20 | * 通过id查询房屋详情 21 | * 22 | * @param id id 23 | * @return House 24 | */ 25 | House findHouseDetailsById(int id); 26 | 27 | /** 28 | * 添加房源信息 29 | * 30 | * @param house house 31 | * @return int 32 | */ 33 | int addNewHouse(House house); 34 | 35 | /** 36 | * 查询用户发布的房源信息 37 | * 38 | * @param page page分页 39 | * @return List 40 | */ 41 | List findHouseByUser(Page page); 42 | 43 | /** 44 | * 删除用户发布的房源信息 45 | * 46 | * @param houseId id 47 | * @return int 48 | */ 49 | int deleteUserHouse(int houseId); 50 | 51 | /** 52 | * 修改用户发布的房源信息 53 | * 54 | * @param house house对象 55 | * @return int 56 | */ 57 | int updateHouse(House house); 58 | 59 | /** 60 | * 条件查询 61 | * 62 | * @param keywords 关键字 63 | * @return list 64 | */ 65 | List findHouseByLike(String keywords); 66 | 67 | /** 68 | * 降序查询 69 | * 70 | * @return list 71 | */ 72 | List findHouseOrderByDesc(); 73 | 74 | /** 75 | * 升序序查询 76 | * 77 | * @return list 78 | */ 79 | List findHouseOrderByAsc(); 80 | } 81 | -------------------------------------------------------------------------------- /src/com/house/dao/OrderMapper.java: -------------------------------------------------------------------------------- 1 | package com.house.dao; 2 | 3 | import com.house.entity.Order; 4 | import com.house.entity.Page; 5 | import com.house.entity.UserOrder; 6 | 7 | import java.util.List; 8 | 9 | /** 10 | * @author chriy 11 | */ 12 | public interface OrderMapper { 13 | /** 14 | * 添加房屋收藏订单 15 | * 16 | * @param order order 17 | * @return int 18 | */ 19 | int addOrder(Order order); 20 | 21 | /** 22 | * 查询所有收藏信息 23 | * 24 | * @param page 分页 25 | * @return List 26 | */ 27 | List findAllOrder(Page page); 28 | 29 | /** 30 | * 查询所有订单数 31 | * 32 | * @param userId id 33 | * @return int 34 | */ 35 | int getOrderCount(int userId); 36 | 37 | /** 38 | * 删除用户订单 39 | * 40 | * @param orderId orderId 41 | * @return int 42 | */ 43 | int deleteOrder(int orderId); 44 | 45 | } 46 | -------------------------------------------------------------------------------- /src/com/house/dao/UserMapper.java: -------------------------------------------------------------------------------- 1 | package com.house.dao; 2 | 3 | import com.house.entity.User; 4 | 5 | /** 6 | * @author chriy 7 | */ 8 | public interface UserMapper { 9 | /** 10 | * 用户登录 11 | * 12 | * @param user user 13 | * @return user 14 | */ 15 | User login(User user); 16 | 17 | /** 18 | * 用户注册 19 | * 20 | * @param user user 21 | * @return int 22 | */ 23 | int register(User user); 24 | 25 | /** 26 | * 修改密码 27 | * 28 | * @param user user 29 | * @return int 30 | */ 31 | int updateUserPwd(User user); 32 | 33 | /** 34 | * 检查旧密码 35 | * 36 | * @param user user 37 | * @return user 38 | */ 39 | User checkOldPwd(User user); 40 | } 41 | -------------------------------------------------------------------------------- /src/com/house/dto/UserData.java: -------------------------------------------------------------------------------- 1 | package com.house.dto; 2 | 3 | import com.house.entity.User; 4 | import lombok.AllArgsConstructor; 5 | import lombok.Data; 6 | import lombok.NoArgsConstructor; 7 | 8 | import java.util.List; 9 | 10 | /** 11 | * 用户数据传输对象 12 | * @author chriy 13 | */ 14 | @NoArgsConstructor 15 | @AllArgsConstructor 16 | @Data 17 | public class UserData { 18 | private int code; 19 | 20 | private String msg; 21 | 22 | private int count; 23 | 24 | private List data; 25 | 26 | } 27 | -------------------------------------------------------------------------------- /src/com/house/dto/UserHouseData.java: -------------------------------------------------------------------------------- 1 | package com.house.dto; 2 | 3 | import com.house.entity.House; 4 | import lombok.AllArgsConstructor; 5 | import lombok.Data; 6 | import lombok.NoArgsConstructor; 7 | 8 | import java.util.List; 9 | 10 | /** 11 | * 房源数据传输对象 12 | * 13 | * @author chriy 14 | */ 15 | @AllArgsConstructor 16 | @NoArgsConstructor 17 | @Data 18 | public class UserHouseData { 19 | private int code; 20 | private String msg; 21 | private int count; 22 | private List data; 23 | } 24 | -------------------------------------------------------------------------------- /src/com/house/dto/UserOrderData.java: -------------------------------------------------------------------------------- 1 | package com.house.dto; 2 | 3 | import com.house.entity.UserOrder; 4 | import lombok.AllArgsConstructor; 5 | import lombok.Data; 6 | import lombok.NoArgsConstructor; 7 | 8 | import java.util.List; 9 | 10 | /** 11 | * 用户收藏数据传输对象 12 | * 13 | * @author chriy 14 | */ 15 | @AllArgsConstructor 16 | @NoArgsConstructor 17 | @Data 18 | public class UserOrderData { 19 | private int code; 20 | private String msg; 21 | private int count; 22 | private List data; 23 | } 24 | -------------------------------------------------------------------------------- /src/com/house/entity/Admin.java: -------------------------------------------------------------------------------- 1 | package com.house.entity; 2 | 3 | import lombok.AllArgsConstructor; 4 | import lombok.Data; 5 | import lombok.NoArgsConstructor; 6 | 7 | /** 8 | * 管理员账号 9 | * 10 | * @author chriy 11 | */ 12 | @Data 13 | @AllArgsConstructor 14 | @NoArgsConstructor 15 | public class Admin { 16 | private int id; 17 | private String userName; 18 | private String userPassword; 19 | } 20 | -------------------------------------------------------------------------------- /src/com/house/entity/House.java: -------------------------------------------------------------------------------- 1 | package com.house.entity; 2 | 3 | import lombok.*; 4 | 5 | import java.util.Date; 6 | 7 | /** 8 | * 房屋实体类 9 | * 10 | * @author chriy 11 | */ 12 | @Data 13 | @AllArgsConstructor 14 | @NoArgsConstructor 15 | public class House { 16 | /** 17 | * 房屋ID 18 | */ 19 | private int houseId; 20 | /** 21 | * 房屋标题描述西信息 22 | */ 23 | private String houseDesc; 24 | /** 25 | * 几室几厅 26 | */ 27 | private String houseModel; 28 | /** 29 | * 面积 30 | */ 31 | private String houseArea; 32 | /** 33 | * 楼层 34 | */ 35 | private String houseFloor; 36 | /** 37 | * 类型 38 | */ 39 | private String houseType; 40 | /** 41 | * 价格 42 | */ 43 | private int housePrice; 44 | /** 45 | * 地址 46 | */ 47 | private String houseAddress; 48 | /** 49 | * 简介图片 50 | */ 51 | private String houseImage; 52 | /** 53 | * 小区名 54 | */ 55 | private String communityName; 56 | /** 57 | * 联系人 58 | */ 59 | private String houseLinkMan; 60 | /** 61 | * 房屋朝向 62 | */ 63 | private String houseOriented; 64 | /** 65 | * 详细图片 66 | */ 67 | private String houseDetailsImg; 68 | /** 69 | * 发布人员 70 | */ 71 | private String publisher; 72 | /** 73 | * 发布时间 74 | */ 75 | private Date publishTime; 76 | } 77 | -------------------------------------------------------------------------------- /src/com/house/entity/Order.java: -------------------------------------------------------------------------------- 1 | package com.house.entity; 2 | 3 | import lombok.AllArgsConstructor; 4 | import lombok.Data; 5 | import lombok.NoArgsConstructor; 6 | import org.springframework.format.annotation.DateTimeFormat; 7 | 8 | import java.util.Date; 9 | 10 | /** 11 | * @author chriy 12 | */ 13 | @AllArgsConstructor 14 | @Data 15 | @NoArgsConstructor 16 | public class Order { 17 | private int orderId; 18 | private int houseId; 19 | private int userId; 20 | @DateTimeFormat(pattern = "yyyy-MM-dd") 21 | private Date orderTime; 22 | private String orderUser; 23 | } 24 | -------------------------------------------------------------------------------- /src/com/house/entity/Page.java: -------------------------------------------------------------------------------- 1 | package com.house.entity; 2 | 3 | import lombok.AllArgsConstructor; 4 | import lombok.Data; 5 | import lombok.NoArgsConstructor; 6 | 7 | /** 8 | * @author chriy 9 | */ 10 | @AllArgsConstructor 11 | @NoArgsConstructor 12 | @Data 13 | public class Page { 14 | 15 | private int page; 16 | 17 | private int limit; 18 | 19 | private int userId; 20 | 21 | private String publisher; 22 | } 23 | -------------------------------------------------------------------------------- /src/com/house/entity/User.java: -------------------------------------------------------------------------------- 1 | package com.house.entity; 2 | 3 | import lombok.AllArgsConstructor; 4 | import lombok.Data; 5 | import lombok.NoArgsConstructor; 6 | 7 | /** 8 | * 租房用户 9 | * @author chriy 10 | */ 11 | @AllArgsConstructor 12 | @NoArgsConstructor 13 | @Data 14 | public class User { 15 | private int userId; 16 | private String userName; 17 | private String userPassword; 18 | private String userPhoneNumber; 19 | private String userNickName; 20 | } 21 | -------------------------------------------------------------------------------- /src/com/house/entity/UserOrder.java: -------------------------------------------------------------------------------- 1 | package com.house.entity; 2 | 3 | import lombok.AllArgsConstructor; 4 | import lombok.Data; 5 | import lombok.NoArgsConstructor; 6 | 7 | import java.util.Date; 8 | 9 | /** 10 | * @author chriy 11 | */ 12 | @AllArgsConstructor 13 | @NoArgsConstructor 14 | @Data 15 | public class UserOrder { 16 | private int orderId; 17 | private int houseId; 18 | private Date orderTime; 19 | private String orderUser; 20 | private String houseDesc; 21 | private String houseModel; 22 | private String houseArea; 23 | private String houseFloor; 24 | private String houseType; 25 | private int housePrice; 26 | private String houseAddress; 27 | private String houseImage; 28 | private String communityName; 29 | private String houseLinkMan; 30 | private String houseOriented; 31 | } 32 | -------------------------------------------------------------------------------- /src/com/house/interceptor/UserInterceptor.java: -------------------------------------------------------------------------------- 1 | package com.house.interceptor; 2 | 3 | import com.house.entity.Admin; 4 | import com.house.entity.User; 5 | import org.springframework.web.servlet.HandlerInterceptor; 6 | 7 | import javax.servlet.http.HttpServletRequest; 8 | import javax.servlet.http.HttpServletResponse; 9 | import javax.servlet.http.HttpSession; 10 | import java.util.Arrays; 11 | import java.util.List; 12 | 13 | /** 14 | * @author chriy 15 | */ 16 | public class UserInterceptor implements HandlerInterceptor { 17 | 18 | @Override 19 | public boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object handler) 20 | throws Exception { 21 | 22 | response.setCharacterEncoding("utf-8"); 23 | String requestUrl = request.getRequestURL().toString(); 24 | 25 | // 检查 session 26 | HttpSession session = request.getSession(); 27 | User user = (User) session.getAttribute("loginUser"); 28 | Admin admin = (Admin) session.getAttribute("Admin"); 29 | if (user != null || admin != null) { 30 | return true; 31 | } 32 | 33 | List filterUserList = Arrays.asList("/index.html", "/user/login", "/user/register", "/detail.html", 34 | "/fuzzy", "/priceAsc", "/priceDesc", "/admin/", "/admin/index.html", "/admin/adminAccess"); 35 | for (String url : filterUserList) { 36 | if (requestUrl.contains(url)) { 37 | return true; 38 | } 39 | } 40 | 41 | response.sendRedirect("/"); 42 | return false; 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /src/com/house/mapper/AdminMapper.xml: -------------------------------------------------------------------------------- 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 | 43 | 44 | 45 | 49 | 50 | 55 | 56 | 57 | delete 58 | from t_house 59 | where h_id = #{houseId} 60 | 61 | 62 | 67 | 68 | 69 | update t_users 70 | set u_name = #{userName}, 71 | u_password = #{userPassword}, 72 | u_phone_number=#{userPhoneNumber}, 73 | u_nickname = #{userNickName} 74 | where u_id = #{userId} 75 | 76 | 77 | 78 | delete 79 | from t_users 80 | where u_id = #{userId} 81 | 82 | 83 | 89 | 90 | 91 | update t_admin 92 | set user_password=#{userPassword} 93 | where id = #{id} 94 | 95 | -------------------------------------------------------------------------------- /src/com/house/mapper/HouseMapper.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 35 | 36 | 37 | 54 | 55 | 56 | insert into t_house 57 | values (0, 58 | #{houseDesc}, 59 | #{houseModel}, 60 | #{houseArea}, 61 | #{houseFloor}, 62 | #{houseType}, 63 | #{housePrice}, 64 | #{houseAddress}, 65 | #{houseImage}, 66 | #{communityName}, 67 | #{houseLinkMan}, 68 | #{houseOriented}, 69 | #{houseDetailsImg}, 70 | #{publisher}, 71 | NOW()) 72 | 73 | 74 | 75 | 81 | 82 | 83 | 84 | delete 85 | from t_house 86 | where h_id = #{hID} 87 | 88 | 89 | 90 | UPDATE t_house 91 | SET house_desc = #{houseDesc}, 92 | house_model = #{houseModel}, 93 | house_area = #{houseArea}, 94 | house_floor = #{houseFloor}, 95 | house_type = #{houseType}, 96 | house_price = #{housePrice}, 97 | house_address = #{houseAddress}, 98 | house_oriented = #{houseOriented}, 99 | house_linkman = #{houseLinkMan}, 100 | community_name = #{communityName} 101 | WHERE h_id = #{houseId} 102 | 103 | 104 | 105 | 114 | 115 | 120 | 121 | 126 | -------------------------------------------------------------------------------- /src/com/house/mapper/OrderMapper.xml: -------------------------------------------------------------------------------- 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 | insert into t_order 31 | values (0, #{houseId}, #{userId}, NOW(), #{orderUser}) 32 | 33 | 34 | 42 | 43 | 48 | 49 | 50 | delete 51 | from t_order 52 | where o_id = #{orderId} 53 | 54 | 55 | -------------------------------------------------------------------------------- /src/com/house/mapper/UserMapper.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 16 | 17 | 18 | insert into t_users values(0,#{userName},#{userPassword},#{userPhoneNumber},#{userNickName}) 19 | 20 | 21 | 22 | 25 | 26 | 27 | UPDATE t_users 28 | SET u_password = #{userPassword} 29 | WHERE 30 | u_id = #{userId} 31 | 32 | 33 | -------------------------------------------------------------------------------- /src/com/house/service/IAdminService.java: -------------------------------------------------------------------------------- 1 | package com.house.service; 2 | 3 | import java.util.List; 4 | 5 | import com.house.entity.Admin; 6 | import com.house.entity.House; 7 | import com.house.entity.Page; 8 | import com.house.entity.User; 9 | 10 | /** 11 | * @author chriy 12 | */ 13 | public interface IAdminService { 14 | 15 | /** 16 | * 管理员登录 17 | * 18 | * @param admin admin 19 | * @return admin 20 | */ 21 | Admin adminAccess(Admin admin); 22 | 23 | /** 24 | * 查询所有用户 25 | * 26 | * @return user list 27 | */ 28 | List findAllUser(); 29 | 30 | /** 31 | * 查询所有房源信息 32 | * 33 | * @param page 分页 34 | * @return house list 35 | */ 36 | List findAllHouse(Page page); 37 | 38 | /** 39 | * 管理员删除房源信息 40 | * 41 | * @param houseId houseId 42 | * @return int 43 | */ 44 | int deleteHouse(int houseId); 45 | 46 | /** 47 | * 通过id查询用户 48 | * 49 | * @param userId userId 50 | * @return user 51 | */ 52 | 53 | User findUserById(int userId); 54 | 55 | /** 56 | * 管理员更新普通用户信息 57 | * 58 | * @param user user 59 | * @return int 60 | */ 61 | int updateUser(User user); 62 | 63 | /** 64 | * 管理员删除用户 65 | * 66 | * @param userId userId 67 | * @return int 68 | */ 69 | int deleteUser(int userId); 70 | 71 | /** 72 | * 检查修改密码原密码 73 | * 74 | * @param admin admin 75 | * @return admin 76 | */ 77 | Admin checkAdminPwd(Admin admin); 78 | 79 | /** 80 | * 修改管理员密码 81 | * 82 | * @param admin admin 83 | * @return int 84 | */ 85 | int changePassword(Admin admin); 86 | } 87 | -------------------------------------------------------------------------------- /src/com/house/service/IHouseService.java: -------------------------------------------------------------------------------- 1 | package com.house.service; 2 | 3 | import java.util.List; 4 | 5 | import com.house.entity.House; 6 | import com.house.entity.Page; 7 | 8 | /** 9 | * @author chriy 10 | */ 11 | public interface IHouseService { 12 | /** 13 | * 首页信息展示 14 | * 15 | * @return house list 16 | */ 17 | List findHomeInfo(); 18 | 19 | /** 20 | * 通过id查询房屋详情 21 | * 22 | * @param houseId houseId 23 | * @return house 24 | */ 25 | House findHouseDetailsById(int houseId); 26 | 27 | /** 28 | * 添加房源信息 29 | * 30 | * @param house house 31 | * @return int 32 | */ 33 | int addNewHouse(House house); 34 | 35 | /** 36 | * 查询用户发布的房源信息 37 | * 38 | * @param page 分页 39 | * @return house list 40 | */ 41 | List findHouseByUser(Page page); 42 | 43 | /** 44 | * 删除用户发布的房源信息 45 | * 46 | * @param houseId houseId 47 | * @return ibt 48 | */ 49 | int deleteUserHouse(int houseId); 50 | 51 | /** 52 | * 修改用户发布的房源信息 53 | * 54 | * @param house house 55 | * @return int 56 | */ 57 | int updateHouse(House house); 58 | 59 | /** 60 | * 条件查询 61 | * 62 | * @param keywords 关键字 63 | * @return house list 64 | */ 65 | List findHouseByLike(String keywords); 66 | 67 | /** 68 | * 降序查询 69 | * 70 | * @return house list 71 | */ 72 | List findHouseOrderByDesc(); 73 | 74 | /** 75 | * 升序序查询 76 | * 77 | * @return house list 78 | */ 79 | List findHouseOrderByAsc(); 80 | } 81 | -------------------------------------------------------------------------------- /src/com/house/service/IOrderService.java: -------------------------------------------------------------------------------- 1 | package com.house.service; 2 | 3 | import java.util.List; 4 | 5 | import com.house.entity.Order; 6 | import com.house.entity.Page; 7 | import com.house.entity.UserOrder; 8 | 9 | /** 10 | * @author chriy 11 | */ 12 | public interface IOrderService { 13 | /** 14 | * 添加订单信息 15 | * 16 | * @param order 房源收藏对象 17 | * @return int 18 | */ 19 | int addOrder(Order order); 20 | 21 | /** 22 | * 查询所有订单信息 23 | * 24 | * @param page 分页 25 | * @return userOrder list 26 | */ 27 | List findAllOrder(Page page); 28 | 29 | /** 30 | * 查询单个用户所有订单 31 | * 32 | * @param userId userId 33 | * @return int 34 | */ 35 | int getOrderCount(int userId); 36 | 37 | /** 38 | * 删除用户订单 39 | * 40 | * @param orderId orderId 41 | * @return int 42 | */ 43 | int deleteOrder(int orderId); 44 | } 45 | -------------------------------------------------------------------------------- /src/com/house/service/IUserService.java: -------------------------------------------------------------------------------- 1 | package com.house.service; 2 | 3 | import com.house.entity.User; 4 | 5 | /** 6 | * @author chriy 7 | */ 8 | public interface IUserService { 9 | /** 10 | * 用户登录 11 | * 12 | * @param user user 13 | * @return user 14 | */ 15 | User login(User user); 16 | 17 | /** 18 | * 用户注册 19 | * 20 | * @param user user 21 | * @return user 22 | */ 23 | int register(User user); 24 | 25 | /** 26 | * 修改密码 27 | * 28 | * @param user user 29 | * @return user 30 | */ 31 | int updateUserPwd(User user); 32 | 33 | /** 34 | * 检查旧密码 35 | * 36 | * @param user user 37 | * @return user 38 | */ 39 | User checkOldPwd(User user); 40 | } 41 | -------------------------------------------------------------------------------- /src/com/house/service/impl/AdminServiceImpl.java: -------------------------------------------------------------------------------- 1 | package com.house.service.impl; 2 | 3 | import java.util.List; 4 | 5 | import com.house.entity.User; 6 | import org.springframework.beans.factory.annotation.Autowired; 7 | import org.springframework.stereotype.Service; 8 | 9 | import com.house.dao.AdminMapper; 10 | import com.house.entity.Admin; 11 | import com.house.entity.House; 12 | import com.house.entity.Page; 13 | import com.house.service.IAdminService; 14 | 15 | /** 16 | * @author chriy 17 | */ 18 | @Service 19 | public class AdminServiceImpl implements IAdminService { 20 | 21 | @Autowired 22 | private AdminMapper service; 23 | 24 | @Override 25 | public Admin adminAccess(Admin admin) { 26 | return service.adminAccess(admin); 27 | } 28 | 29 | @Override 30 | public List findAllUser() { 31 | return service.findAllUser(); 32 | } 33 | 34 | @Override 35 | public List findAllHouse(Page page) { 36 | return service.findAllHouse(page); 37 | } 38 | 39 | @Override 40 | public int deleteHouse(int houseId) { 41 | return service.deleteHouse(houseId); 42 | } 43 | 44 | @Override 45 | public User findUserById(int userId) { 46 | return service.findUserById(userId); 47 | } 48 | 49 | @Override 50 | public int updateUser(User user) { 51 | return service.updateUser(user); 52 | } 53 | 54 | @Override 55 | public int deleteUser(int userId) { 56 | return service.deleteUser(userId); 57 | } 58 | 59 | @Override 60 | public Admin checkAdminPwd(Admin admin) { 61 | return service.checkAdminPwd(admin); 62 | } 63 | 64 | @Override 65 | public int changePassword(Admin admin) { 66 | return service.updateAdminPwd(admin); 67 | } 68 | } 69 | -------------------------------------------------------------------------------- /src/com/house/service/impl/HouseServiceImpl.java: -------------------------------------------------------------------------------- 1 | package com.house.service.impl; 2 | 3 | import java.util.List; 4 | 5 | import com.house.service.IHouseService; 6 | import org.springframework.beans.factory.annotation.Autowired; 7 | import org.springframework.stereotype.Service; 8 | 9 | import com.house.dao.HouseMapper; 10 | import com.house.entity.House; 11 | import com.house.entity.Page; 12 | 13 | /** 14 | * @author chriy 15 | */ 16 | @Service 17 | public class HouseServiceImpl implements IHouseService { 18 | 19 | @Autowired 20 | private HouseMapper dao; 21 | 22 | @Override 23 | public List findHomeInfo() { 24 | return dao.findHomeInfo(); 25 | } 26 | 27 | @Override 28 | public House findHouseDetailsById(int id) { 29 | return dao.findHouseDetailsById(id); 30 | } 31 | 32 | @Override 33 | public int addNewHouse(House house) { 34 | return dao.addNewHouse(house); 35 | } 36 | 37 | @Override 38 | public List findHouseByUser(Page page) { 39 | return dao.findHouseByUser(page); 40 | } 41 | 42 | @Override 43 | public int deleteUserHouse(int houseId) { 44 | return dao.deleteUserHouse(houseId); 45 | } 46 | 47 | @Override 48 | public int updateHouse(House house) { 49 | return dao.updateHouse(house); 50 | } 51 | 52 | @Override 53 | public List findHouseByLike(String keywords) { 54 | return dao.findHouseByLike(keywords); 55 | } 56 | 57 | @Override 58 | public List findHouseOrderByAsc() { 59 | return dao.findHouseOrderByAsc(); 60 | } 61 | 62 | @Override 63 | public List findHouseOrderByDesc() { 64 | return dao.findHouseOrderByDesc(); 65 | } 66 | } 67 | -------------------------------------------------------------------------------- /src/com/house/service/impl/OrderServiceImpl.java: -------------------------------------------------------------------------------- 1 | package com.house.service.impl; 2 | 3 | import java.util.List; 4 | 5 | import org.springframework.beans.factory.annotation.Autowired; 6 | import org.springframework.stereotype.Service; 7 | 8 | import com.house.dao.OrderMapper; 9 | import com.house.entity.Order; 10 | import com.house.entity.Page; 11 | import com.house.entity.UserOrder; 12 | import com.house.service.IOrderService; 13 | 14 | /** 15 | * @author chriy 16 | */ 17 | @Service 18 | public class OrderServiceImpl implements IOrderService{ 19 | 20 | @Autowired 21 | private OrderMapper mapper; 22 | 23 | @Override 24 | public int addOrder(Order order) { 25 | return mapper.addOrder(order); 26 | } 27 | 28 | @Override 29 | public List findAllOrder(Page page) { 30 | return mapper.findAllOrder(page); 31 | } 32 | 33 | @Override 34 | public int getOrderCount(int userId) { 35 | return mapper.getOrderCount(userId); 36 | } 37 | 38 | @Override 39 | public int deleteOrder(int orderId) { 40 | return mapper.deleteOrder(orderId); 41 | } 42 | 43 | } 44 | -------------------------------------------------------------------------------- /src/com/house/service/impl/UserServiceImpl.java: -------------------------------------------------------------------------------- 1 | package com.house.service.impl; 2 | 3 | import com.house.entity.User; 4 | import org.springframework.beans.factory.annotation.Autowired; 5 | import org.springframework.stereotype.Service; 6 | 7 | import com.house.dao.UserMapper; 8 | import com.house.service.IUserService; 9 | 10 | /** 11 | * @author chriy 12 | */ 13 | @Service 14 | public class UserServiceImpl implements IUserService { 15 | 16 | @Autowired 17 | private UserMapper mapper; 18 | 19 | @Override 20 | public User login(User user) { 21 | return mapper.login(user); 22 | } 23 | 24 | @Override 25 | public int register(User user) { 26 | return mapper.register(user); 27 | } 28 | 29 | @Override 30 | public int updateUserPwd(User user) { 31 | return mapper.updateUserPwd(user); 32 | } 33 | 34 | @Override 35 | public User checkOldPwd(User user) { 36 | return mapper.checkOldPwd(user); 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /src/config/beans.xml: -------------------------------------------------------------------------------- 1 | 2 | 12 | 13 | 14 | 20 | 21 | 22 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 46 | 47 | 50 | 51 | 52 | 53 | 54 | -------------------------------------------------------------------------------- /src/config/springmvc.xml: -------------------------------------------------------------------------------- 1 | 2 | 10 | 11 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 37 | 38 | 41 | 42 | -------------------------------------------------------------------------------- /src/log4j.properties: -------------------------------------------------------------------------------- 1 | log4j.rootLogger=debug , stdout 2 | log4j.appender.stdout=org.apache.log4j.ConsoleAppender 3 | log4j.appender.stdout.Target=System.out 4 | log4j.appender.stdout.layout=org.apache.log4j.PatternLayout 5 | log4j.appender.stdout.layout.ConversionPattern=%d{ABSOLUTE} %5p %c{1}:%L - %m%n -------------------------------------------------------------------------------- /web/WEB-INF/lib/aspectjweaver-1.9.1.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chriy/HouseRentalSystem/fef2de06b9644939c95f81c680f6890628aef1ac/web/WEB-INF/lib/aspectjweaver-1.9.1.jar -------------------------------------------------------------------------------- /web/WEB-INF/lib/commons-dbcp2-2.2.0.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chriy/HouseRentalSystem/fef2de06b9644939c95f81c680f6890628aef1ac/web/WEB-INF/lib/commons-dbcp2-2.2.0.jar -------------------------------------------------------------------------------- /web/WEB-INF/lib/commons-fileupload-1.3.3.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chriy/HouseRentalSystem/fef2de06b9644939c95f81c680f6890628aef1ac/web/WEB-INF/lib/commons-fileupload-1.3.3.jar -------------------------------------------------------------------------------- /web/WEB-INF/lib/commons-io-2.6.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chriy/HouseRentalSystem/fef2de06b9644939c95f81c680f6890628aef1ac/web/WEB-INF/lib/commons-io-2.6.jar -------------------------------------------------------------------------------- /web/WEB-INF/lib/commons-logging-1.2.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chriy/HouseRentalSystem/fef2de06b9644939c95f81c680f6890628aef1ac/web/WEB-INF/lib/commons-logging-1.2.jar -------------------------------------------------------------------------------- /web/WEB-INF/lib/commons-pool2-2.5.0.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chriy/HouseRentalSystem/fef2de06b9644939c95f81c680f6890628aef1ac/web/WEB-INF/lib/commons-pool2-2.5.0.jar -------------------------------------------------------------------------------- /web/WEB-INF/lib/jackson-annotations-2.9.6.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chriy/HouseRentalSystem/fef2de06b9644939c95f81c680f6890628aef1ac/web/WEB-INF/lib/jackson-annotations-2.9.6.jar -------------------------------------------------------------------------------- /web/WEB-INF/lib/jackson-core-2.9.6.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chriy/HouseRentalSystem/fef2de06b9644939c95f81c680f6890628aef1ac/web/WEB-INF/lib/jackson-core-2.9.6.jar -------------------------------------------------------------------------------- /web/WEB-INF/lib/jackson-databind-2.9.6.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chriy/HouseRentalSystem/fef2de06b9644939c95f81c680f6890628aef1ac/web/WEB-INF/lib/jackson-databind-2.9.6.jar -------------------------------------------------------------------------------- /web/WEB-INF/lib/jsqlparser-1.0.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chriy/HouseRentalSystem/fef2de06b9644939c95f81c680f6890628aef1ac/web/WEB-INF/lib/jsqlparser-1.0.jar -------------------------------------------------------------------------------- /web/WEB-INF/lib/jstl-1.2.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chriy/HouseRentalSystem/fef2de06b9644939c95f81c680f6890628aef1ac/web/WEB-INF/lib/jstl-1.2.jar -------------------------------------------------------------------------------- /web/WEB-INF/lib/log4j-1.2.12.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chriy/HouseRentalSystem/fef2de06b9644939c95f81c680f6890628aef1ac/web/WEB-INF/lib/log4j-1.2.12.jar -------------------------------------------------------------------------------- /web/WEB-INF/lib/lombok-1.18.12.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chriy/HouseRentalSystem/fef2de06b9644939c95f81c680f6890628aef1ac/web/WEB-INF/lib/lombok-1.18.12.jar -------------------------------------------------------------------------------- /web/WEB-INF/lib/mybatis-3.4.6.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chriy/HouseRentalSystem/fef2de06b9644939c95f81c680f6890628aef1ac/web/WEB-INF/lib/mybatis-3.4.6.jar -------------------------------------------------------------------------------- /web/WEB-INF/lib/mybatis-spring-1.3.2.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chriy/HouseRentalSystem/fef2de06b9644939c95f81c680f6890628aef1ac/web/WEB-INF/lib/mybatis-spring-1.3.2.jar -------------------------------------------------------------------------------- /web/WEB-INF/lib/mysql-connector-java-5.1.46.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chriy/HouseRentalSystem/fef2de06b9644939c95f81c680f6890628aef1ac/web/WEB-INF/lib/mysql-connector-java-5.1.46.jar -------------------------------------------------------------------------------- /web/WEB-INF/lib/pagehelper-5.1.4.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chriy/HouseRentalSystem/fef2de06b9644939c95f81c680f6890628aef1ac/web/WEB-INF/lib/pagehelper-5.1.4.jar -------------------------------------------------------------------------------- /web/WEB-INF/lib/spring-aop-5.0.5.RELEASE.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chriy/HouseRentalSystem/fef2de06b9644939c95f81c680f6890628aef1ac/web/WEB-INF/lib/spring-aop-5.0.5.RELEASE.jar -------------------------------------------------------------------------------- /web/WEB-INF/lib/spring-beans-5.0.5.RELEASE.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chriy/HouseRentalSystem/fef2de06b9644939c95f81c680f6890628aef1ac/web/WEB-INF/lib/spring-beans-5.0.5.RELEASE.jar -------------------------------------------------------------------------------- /web/WEB-INF/lib/spring-context-5.0.5.RELEASE.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chriy/HouseRentalSystem/fef2de06b9644939c95f81c680f6890628aef1ac/web/WEB-INF/lib/spring-context-5.0.5.RELEASE.jar -------------------------------------------------------------------------------- /web/WEB-INF/lib/spring-core-5.0.5.RELEASE.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chriy/HouseRentalSystem/fef2de06b9644939c95f81c680f6890628aef1ac/web/WEB-INF/lib/spring-core-5.0.5.RELEASE.jar -------------------------------------------------------------------------------- /web/WEB-INF/lib/spring-expression-5.0.5.RELEASE.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chriy/HouseRentalSystem/fef2de06b9644939c95f81c680f6890628aef1ac/web/WEB-INF/lib/spring-expression-5.0.5.RELEASE.jar -------------------------------------------------------------------------------- /web/WEB-INF/lib/spring-jcl-5.0.5.RELEASE.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chriy/HouseRentalSystem/fef2de06b9644939c95f81c680f6890628aef1ac/web/WEB-INF/lib/spring-jcl-5.0.5.RELEASE.jar -------------------------------------------------------------------------------- /web/WEB-INF/lib/spring-jdbc-5.0.5.RELEASE.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chriy/HouseRentalSystem/fef2de06b9644939c95f81c680f6890628aef1ac/web/WEB-INF/lib/spring-jdbc-5.0.5.RELEASE.jar -------------------------------------------------------------------------------- /web/WEB-INF/lib/spring-tx-5.0.5.RELEASE.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chriy/HouseRentalSystem/fef2de06b9644939c95f81c680f6890628aef1ac/web/WEB-INF/lib/spring-tx-5.0.5.RELEASE.jar -------------------------------------------------------------------------------- /web/WEB-INF/lib/spring-web-5.0.5.RELEASE.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chriy/HouseRentalSystem/fef2de06b9644939c95f81c680f6890628aef1ac/web/WEB-INF/lib/spring-web-5.0.5.RELEASE.jar -------------------------------------------------------------------------------- /web/WEB-INF/lib/spring-webmvc-5.0.5.RELEASE.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chriy/HouseRentalSystem/fef2de06b9644939c95f81c680f6890628aef1ac/web/WEB-INF/lib/spring-webmvc-5.0.5.RELEASE.jar -------------------------------------------------------------------------------- /web/WEB-INF/pages/404.jsp: -------------------------------------------------------------------------------- 1 | <%@ page language="java" contentType="text/html; charset=utf-8" 2 | pageEncoding="utf-8"%> 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 404 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 |
OH! 38 | 39 |
40 |
41 |

很抱歉,你访问的页面去火星旅游了

42 |
43 |
44 |
45 | 46 | -------------------------------------------------------------------------------- /web/WEB-INF/pages/admin/allUser.jsp: -------------------------------------------------------------------------------- 1 | <%@ page language="java" contentType="text/html; charset=utf-8" 2 | pageEncoding="utf-8" %> 3 | 4 | 5 | 6 | 7 | 查看所有用户 8 | 9 | 10 | 11 |
12 |
13 | 所有注册用户 14 |
15 |
16 |
17 | 18 | 65 | 69 | 70 | -------------------------------------------------------------------------------- /web/WEB-INF/pages/admin/changePassword.jsp: -------------------------------------------------------------------------------- 1 | <%@ page language="java" contentType="text/html; charset=utf-8" 2 | pageEncoding="utf-8" %> 3 | 4 | 5 | 6 | 7 | 修改密码 8 | 9 | 10 | 11 |
12 |
13 | 修改管理员密码 14 |
15 |
16 |
17 | 18 |
19 | 21 |
22 |
23 |
24 |
25 | 26 |
27 | 30 |
31 |
长度为6-12位字母加数字
32 |
33 |
34 | 35 |
36 | 39 |
40 |
长度为6-12位字母加数字
41 |
42 |
43 |
44 | 45 | 46 |
47 |
48 |
49 |
50 | 51 | 52 | 87 | 88 | -------------------------------------------------------------------------------- /web/WEB-INF/pages/admin/editUser.jsp: -------------------------------------------------------------------------------- 1 | <%@ page language="java" contentType="text/html; charset=utf-8" 2 | pageEncoding="utf-8" %> 3 | 4 | 5 | 6 | 7 | 修改用户信息 8 | 9 | 10 | 11 |
12 |
13 | 修改用户信息 14 |
15 |
16 |
17 | 18 |
19 | 20 | 23 |
24 |
25 |
26 |
27 | 28 |
29 | 32 |
33 |
34 |
35 | 36 |
37 | 41 |
42 |
43 |
44 | 45 |
46 | 50 |
51 |
52 |
53 |
54 | 55 | 56 |
57 |
58 |
59 |
60 | 61 | 84 | 85 | -------------------------------------------------------------------------------- /web/WEB-INF/pages/admin/home.jsp: -------------------------------------------------------------------------------- 1 | <%@ page language="java" contentType="text/html; charset=utf-8" 2 | pageEncoding="utf-8" %> 3 | 4 | 5 | 6 | 7 | 后台管理系统 8 | 9 | 10 | 11 | 12 |
13 |
14 | 15 | 18 | 19 | 35 |
36 |
37 | 47 | 56 |
57 |
58 | 60 |
61 |
62 |

2018-2020 © 房屋租赁网 懂您的需求 服务于心

63 |
64 |
65 | 66 | 71 | 72 | 73 | -------------------------------------------------------------------------------- /web/WEB-INF/pages/admin/houseList.jsp: -------------------------------------------------------------------------------- 1 | <%@ page language="java" contentType="text/html; charset=utf-8" 2 | pageEncoding="utf-8" %> 3 | 4 | 5 | 6 | 7 | 所有房源信息 8 | 9 | 10 | 11 |
12 |
13 | 所有房源信息 14 |
15 |
16 |
17 | 18 | 71 | 75 | 76 | -------------------------------------------------------------------------------- /web/WEB-INF/pages/admin/login.jsp: -------------------------------------------------------------------------------- 1 | <%@ page language="java" contentType="text/html; charset=utf-8" 2 | pageEncoding="utf-8" %> 3 | 4 | 5 | 6 | 7 | 管理员登录 8 | 9 | 10 | 11 | 12 | 44 | 45 | 72 | 73 | -------------------------------------------------------------------------------- /web/WEB-INF/pages/admin/updateHouse.jsp: -------------------------------------------------------------------------------- 1 | <%@ page language="java" contentType="text/html; charset=utf-8" 2 | pageEncoding="utf-8" %> 3 | <%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> 4 | 5 | 6 | 7 | 8 | 修改房源信息 9 | 10 | 11 | 12 |
13 |
14 | 修改我发布的房源信息 15 |
16 |
17 |
18 | 19 |
20 | 21 | 23 |
24 |
25 |
26 | 27 |
28 | 30 |
31 |
32 |
33 | 34 |
35 | 37 |
38 |
39 |
40 | 41 |
42 | 44 |
45 |
46 |
47 | 48 |
49 | 54 |
55 |
56 |
57 | 58 |
59 | 61 |
62 |
63 |
64 | 65 |
66 | 68 |
69 |
70 |
71 | 72 |
73 | 75 |
76 |
77 |
78 | 79 |
80 | 82 |
83 |
84 |
85 | 86 |
87 | 92 |
93 |
94 | 95 |
96 |
97 | 98 | 99 |
100 |
101 |
102 |
103 | 104 | 127 | 128 | 129 | -------------------------------------------------------------------------------- /web/WEB-INF/pages/user/home.jsp: -------------------------------------------------------------------------------- 1 | <%@ page language="java" contentType="text/html; charset=utf-8" 2 | pageEncoding="utf-8" %> 3 | <%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> 4 | 5 | 6 | 7 | 8 | 用户个人中心 9 | 10 | 11 | 12 | 13 |
14 |
15 | 16 | 19 | 20 | 36 |
37 |
38 | 48 | 57 |
58 |
59 | 62 |
63 | 66 |
67 | 68 | 74 | 75 | 76 | -------------------------------------------------------------------------------- /web/WEB-INF/pages/user/myOrder.jsp: -------------------------------------------------------------------------------- 1 | <%@ page language="java" contentType="text/html; charset=utf-8" 2 | pageEncoding="utf-8" %> 3 | 4 | 5 | 6 | 7 | 我的收藏 8 | 9 | 10 | 11 |
12 |
13 | 我的租房信息 14 |
15 |
16 |
17 | 18 | 77 | 80 | 81 | -------------------------------------------------------------------------------- /web/WEB-INF/pages/user/myRental.jsp: -------------------------------------------------------------------------------- 1 | <%@ page language="java" contentType="text/html; charset=utf-8" 2 | pageEncoding="utf-8" %> 3 | 4 | 5 | 6 | 7 | 我发布的租房信息 8 | 9 | 10 | 11 |
12 |
13 | 我发布的租房信息 14 |
15 |
16 |
17 | 18 | 79 | 84 | 85 | 86 | -------------------------------------------------------------------------------- /web/WEB-INF/pages/user/updatePassword.jsp: -------------------------------------------------------------------------------- 1 | <%@ page language="java" contentType="text/html; charset=utf-8" 2 | pageEncoding="utf-8" %> 3 | 4 | 5 | 6 | 7 | 修改密码 8 | 9 | 10 | 11 |
12 |
13 | 修改密码 14 |
15 |
16 |
17 | 18 |
19 | 20 | 22 |
23 |
24 |
25 |
26 | 27 |
28 | 31 |
32 |
长度为5-12位字母加数字
33 |
34 |
35 | 36 |
37 | 40 |
41 |
长度为5-12位字母加数字
42 |
43 |
44 |
45 | 46 | 47 |
48 |
49 |
50 |
51 | 52 | 53 | 86 | 87 | 88 | -------------------------------------------------------------------------------- /web/WEB-INF/pages/welcome.jsp: -------------------------------------------------------------------------------- 1 | <%@ page language="java" contentType="text/html; charset=utf-8" 2 | pageEncoding="utf-8"%> 3 | 4 | 5 | 6 | 7 | 欢迎回来 8 | 9 | 33 | 34 | 35 |
36 |

37 |

欢迎访问后台管理系统!

38 |
39 | 40 | -------------------------------------------------------------------------------- /web/WEB-INF/web.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | HouseRentalSystem 9 | 10 | index.html 11 | index.htm 12 | index.jsp 13 | default.html 14 | default.htm 15 | default.jsp 16 | 17 | 18 | 19 | contextConfigLocation 20 | classpath:config/beans.xml 21 | 22 | 23 | org.springframework.web.context.ContextLoaderListener 24 | 25 | 26 | springDispatcherServlet 27 | org.springframework.web.servlet.DispatcherServlet 28 | 29 | contextConfigLocation 30 | classpath:config/springmvc.xml 31 | 32 | 1 33 | 34 | 35 | springDispatcherServlet 36 | / 37 | 38 | 39 | 40 | encodingFilter 41 | org.springframework.web.filter.CharacterEncodingFilter 42 | 43 | encoding 44 | UTF-8 45 | 46 | 47 | forceEncoding 48 | true 49 | 50 | 51 | 52 | encodingFilter 53 | /* 54 | 55 | 56 | 57 | encodingFilter 58 | *.jsp 59 | 60 | 61 | 62 | 404 63 | /WEB-INF/pages/404.jsp 64 | 65 | 66 | 67 | 68 | -------------------------------------------------------------------------------- /web/css/404.css: -------------------------------------------------------------------------------- 1 | .error .clip .shadow { 2 | height: 180px; 3 | } 4 | 5 | .error .clip:nth-of-type(2) .shadow { 6 | width: 130px; 7 | } 8 | 9 | .error .clip:nth-of-type(1) .shadow, 10 | .error .clip:nth-of-type(3) .shadow { 11 | width: 250px; 12 | } 13 | 14 | .error .digit { 15 | width: 150px; 16 | height: 150px; 17 | line-height: 150px; 18 | font-size: 120px; 19 | font-weight: bold; 20 | } 21 | 22 | .error h2 { 23 | font-size: 32px; 24 | } 25 | 26 | .error .msg { 27 | top: -190px; 28 | left: 30%; 29 | width: 80px; 30 | height: 80px; 31 | line-height: 80px; 32 | font-size: 32px; 33 | } 34 | 35 | .error span.triangle { 36 | top: 70%; 37 | right: 0%; 38 | border-left: 20px solid #535353; 39 | border-top: 15px solid transparent; 40 | border-bottom: 15px solid transparent; 41 | } 42 | 43 | .error .container-error-404 { 44 | margin-top: 10%; 45 | position: relative; 46 | height: 250px; 47 | padding-top: 40px; 48 | } 49 | 50 | .error .container-error-404 .clip { 51 | display: inline-block; 52 | transform: skew(-45deg); 53 | } 54 | 55 | .error .clip .shadow { 56 | overflow: hidden; 57 | } 58 | 59 | .error .clip:nth-of-type(2) .shadow { 60 | overflow: hidden; 61 | position: relative; 62 | box-shadow: inset 20px 0px 20px -15px rgba(150, 150, 150, 0.8), 20px 0px 20px -15px rgba(150, 150, 150, 0.8); 63 | } 64 | 65 | .error .clip:nth-of-type(3) .shadow:after, 66 | .error .clip:nth-of-type(1) .shadow:after { 67 | content: ""; 68 | position: absolute; 69 | right: -8px; 70 | bottom: 0px; 71 | z-index: 9999; 72 | height: 100%; 73 | width: 10px; 74 | background: linear-gradient(90deg, transparent, rgba(173, 173, 173, 0.8), transparent); 75 | border-radius: 50%; 76 | } 77 | 78 | .error .clip:nth-of-type(3) .shadow:after { 79 | left: -8px; 80 | } 81 | 82 | .error .digit { 83 | position: relative; 84 | top: 8%; 85 | color: white; 86 | background: #07B3F9; 87 | border-radius: 50%; 88 | display: inline-block; 89 | transform: skew(45deg); 90 | } 91 | 92 | .error .clip:nth-of-type(2) .digit { 93 | left: -10%; 94 | } 95 | 96 | .error .clip:nth-of-type(1) .digit { 97 | right: -20%; 98 | } 99 | 100 | .error .clip:nth-of-type(3) .digit { 101 | left: -20%; 102 | } 103 | 104 | .error h2 { 105 | font-size: 24px; 106 | color: #A2A2A2; 107 | font-weight: bold; 108 | padding-bottom: 20px; 109 | } 110 | 111 | .error .tohome { 112 | font-size: 16px; 113 | color: #07B3F9; 114 | } 115 | 116 | .error .msg { 117 | position: relative; 118 | z-index: 9999; 119 | display: block; 120 | background: #535353; 121 | color: #A2A2A2; 122 | border-radius: 50%; 123 | font-style: italic; 124 | } 125 | 126 | .error .triangle { 127 | position: absolute; 128 | z-index: 999; 129 | transform: rotate(45deg); 130 | content: ""; 131 | width: 0; 132 | height: 0; 133 | } 134 | 135 | @media(max-width: 767px) { 136 | .error .clip .shadow { 137 | height: 100px; 138 | } 139 | .error .clip:nth-of-type(2) .shadow { 140 | width: 80px; 141 | } 142 | .error .clip:nth-of-type(1) .shadow, 143 | .error .clip:nth-of-type(3) .shadow { 144 | width: 100px; 145 | } 146 | .error .digit { 147 | width: 80px; 148 | height: 80px; 149 | line-height: 80px; 150 | font-size: 52px; 151 | } 152 | .error h2 { 153 | font-size: 18px; 154 | } 155 | .error .msg { 156 | top: -110px; 157 | left: 15%; 158 | width: 40px; 159 | height: 40px; 160 | line-height: 40px; 161 | font-size: 18px; 162 | } 163 | .error span.triangle { 164 | top: 70%; 165 | right: -3%; 166 | border-left: 10px solid #535353; 167 | border-top: 8px solid transparent; 168 | border-bottom: 8px solid transparent; 169 | } 170 | .error .container-error-404 { 171 | height: 150px; 172 | } 173 | } -------------------------------------------------------------------------------- /web/css/admin.css: -------------------------------------------------------------------------------- 1 | @charset "utf-8"; 2 | #bg-item{ 3 | position: relative; 4 | } 5 | .login-panel{ 6 | position: absolute; 7 | top: 0; 8 | left: 0; 9 | bottom: 0; 10 | right: 0; 11 | margin: auto; 12 | width: 370px; 13 | height: 390px; 14 | background-color: #fff; 15 | z-index: 1000000000; 16 | text-align: center; 17 | padding: 30px 20px; 18 | box-sizing: border-box; 19 | border-radius: 10px; 20 | } 21 | .login-panel h3{ 22 | text-align: center; 23 | font-size: 28px; 24 | color: #ffc601; 25 | margin-bottom: 35px; 26 | } 27 | .login{ 28 | width: 100%; 29 | padding: 20px; 30 | box-sizing: border-box; 31 | } 32 | .login .layui-form-item{ 33 | margin-bottom: 30px; 34 | } 35 | 36 | /*登录页结束*/ 37 | 38 | /*后台主页*/ 39 | .layui-side { 40 | background-color: #2b2b33; 41 | } 42 | .layui-body{ 43 | overflow: hidden; 44 | } -------------------------------------------------------------------------------- /web/css/details.css: -------------------------------------------------------------------------------- 1 | @charset "utf-8"; 2 | .details-head{ 3 | padding-top: 40px; 4 | padding-bottom: 35px; 5 | background-color: #fafafa; 6 | } 7 | .title-wrapper{ 8 | width: 1140px; 9 | margin: 0 auto; 10 | } 11 | .text-middle { 12 | height: 60px; 13 | text-align: center; 14 | line-height: 60px; 15 | font-size: 18px; 16 | } 17 | .text-center { 18 | text-align: center; 19 | } 20 | 21 | .layui-pull-left { 22 | float: left; 23 | } 24 | .layui-pull-right { 25 | float: right; 26 | } 27 | .operation,.personalCenter{ 28 | width: 120px; 29 | height: 50px; 30 | line-height: 50px; 31 | color: #fff; 32 | font-size: 14px; 33 | cursor: pointer; 34 | } 35 | .title{ 36 | width: 100% !important; 37 | height: 50px; 38 | background-color:rgba(0,0,0,.8) ; 39 | } 40 | .clearfix{ 41 | clear: both; 42 | } 43 | .details-head .left-con .house-title { 44 | max-width: 88%; 45 | font-weight: normal; 46 | color: #1b1b1b; 47 | font-size: 30px; 48 | } 49 | .details-head .left-con .tags { 50 | font-size: 14px; 51 | color: #aeaeae; 52 | overflow: hidden; 53 | clear: both; 54 | } 55 | .details-head .left-con .tags span { 56 | float: left; 57 | display: block; 58 | max-width: 570px; 59 | overflow: hidden; 60 | white-space: nowrap; 61 | -o-text-overflow: ellipsis; 62 | text-overflow: ellipsis; 63 | } 64 | .layui-tab-brief ul{ 65 | width: 100%; 66 | margin:0px; 67 | padding: 0px; 68 | } 69 | .layui-tab-brief ul li{ 70 | width: 175px; 71 | margin: 0px; 72 | padding: 0px; 73 | text-align: center; 74 | } 75 | .wrapper{ 76 | height: auto; 77 | overflow: hidden; 78 | } 79 | .wrapper .breadcrumb{ 80 | margin: 20px 0px; 81 | } 82 | .carousel-image{ 83 | width: 660px; 84 | } 85 | .details-info{ 86 | /*width: 480px;*/ 87 | padding: 10px 50px; 88 | box-sizing: border-box; 89 | } 90 | .details-info .show-price{ 91 | color: #ffc601; 92 | text-align: left; 93 | } 94 | .details-info .show-price { 95 | font-size: 40px; 96 | font-weight: bold; 97 | font-family: 'dinot-bold'; 98 | } 99 | .show-price .sale-unit { 100 | margin-left: 1px; 101 | font-size: 14px; 102 | } 103 | .area { 104 | color: #c9c9c9; 105 | font-size: 14px; 106 | padding-right: 10px; 107 | } 108 | .show-house-name{ 109 | width: 100%; 110 | height: 120px; 111 | } 112 | .show-house-name .field{ 113 | color: #aeaeae; 114 | display: block; 115 | width: 95px; 116 | float: left; 117 | } 118 | .show-house-name .name{ 119 | display: inline-block; 120 | } 121 | .show-house-name span{ 122 | line-height: 30px; 123 | } 124 | .house-model{ 125 | width: 100%; 126 | height: 100px; 127 | background-color: #fff; 128 | } 129 | .house-model ul li{ 130 | width: 33.3%; 131 | height: 100px; 132 | text-align: center; 133 | padding-top: 20px; 134 | box-sizing: border-box; 135 | float: left; 136 | } 137 | .house-model ul li span{ 138 | text-align: center; 139 | font-size: 14px; 140 | color: #999; 141 | } 142 | .house-model ul li p { 143 | font-size: 20px; 144 | font-weight: bold; 145 | color: #333; 146 | padding-bottom: 7px; 147 | } 148 | .order-btn-container{ 149 | width: 100%; 150 | height: 100px; 151 | } 152 | .order-btn-container .order-btn{ 153 | display: inline-block; 154 | width: 200px; 155 | height: 50px; 156 | background-color: #ffc601; 157 | border: none; 158 | outline: none; 159 | color: #fff; 160 | margin-left:90px ; 161 | font-size: 18px; 162 | border-radius: 10px; 163 | cursor: pointer; 164 | } 165 | .anchor-title{ 166 | width: 740px; 167 | height: 100px; 168 | clear: both; 169 | margin-top: 40px; 170 | line-height: 120px; 171 | font-size: 20px; 172 | color: #6e6e6e; 173 | border-bottom: 1px solid #e2e2e2; 174 | } 175 | .household-appliances{ 176 | width: 740px; 177 | height: 240px; 178 | border-bottom: 1px solid #e2e2e2; 179 | } 180 | .household-appliances ul li { 181 | display: block; 182 | width: 88px; 183 | margin-left: 15px; 184 | padding-top: 10px; 185 | float: left; 186 | text-align: center; 187 | } 188 | .household-appliances ul li span { 189 | display: block; 190 | color: #d9d9d9; 191 | font-size: 14px; 192 | padding-top: 15px; 193 | padding-bottom: 34px; 194 | } 195 | .household-appliances ul li i { 196 | width: 49px; 197 | height: 40px; 198 | line-height: 40px; 199 | font-size: 43px; 200 | color: #757575; 201 | display: block; 202 | margin: 0 auto; 203 | } 204 | footer{ 205 | width: 100%; 206 | height: 60px; 207 | margin-top: 60px; 208 | text-align: center; 209 | font-size: 16px; 210 | line-height: 60px; 211 | } -------------------------------------------------------------------------------- /web/css/global.css: -------------------------------------------------------------------------------- 1 | @charset "utf-8"; 2 | .text-middle { 3 | height: 60px; 4 | text-align: center; 5 | line-height: 60px; 6 | font-size: 18px; 7 | } 8 | 9 | .text-center { 10 | text-align: center; 11 | } 12 | 13 | .layui-pull-left { 14 | float: left; 15 | } 16 | 17 | .layui-pull-right { 18 | float: right; 19 | } 20 | 21 | .layui-pull-center { 22 | margin: 0 auto; 23 | } 24 | 25 | #bg-item { 26 | position: relative; 27 | } 28 | 29 | .title { 30 | position: absolute; 31 | top: 0; 32 | left: 0; 33 | width: 100% !important; 34 | height: 50px; 35 | } 36 | 37 | .operation, .personalCenter { 38 | width: 120px; 39 | height: 50px; 40 | line-height: 50px; 41 | color: #fff; 42 | font-size: 14px; 43 | cursor: pointer; 44 | } 45 | 46 | .layui-tab-brief ul { 47 | width: 100%; 48 | margin: 0; 49 | padding: 0; 50 | } 51 | 52 | .layui-tab-brief ul li { 53 | width: 175px; 54 | margin: 0; 55 | padding: 0; 56 | text-align: center; 57 | } 58 | 59 | /*搜索*/ 60 | .search-input { 61 | position: absolute; 62 | top: 360px; 63 | left: 0; 64 | width: 100%; 65 | height: 50px; 66 | z-index: 10000; 67 | padding: 0 25px; 68 | overflow: hidden; 69 | } 70 | 71 | .search-input .input { 72 | width: 85%; 73 | height: 50px; 74 | } 75 | 76 | .search-input .input input { 77 | width: 100%; 78 | height: 50px; 79 | border: none; 80 | padding: 0 20px; 81 | border-radius: 50px 0 0 50px; 82 | background: rgba(255, 255, 255, .8); 83 | } 84 | 85 | .search-input .button { 86 | width: 120px; 87 | height: 50px; 88 | } 89 | 90 | .search-input .btn { 91 | width: 100%; 92 | height: 100%; 93 | background: #ffc601; 94 | border: none; 95 | color: #fff; 96 | border-radius: 0 50px 50px 0; 97 | cursor: pointer; 98 | } 99 | 100 | /*内容区*/ 101 | .list_control_bar { 102 | height: 50px; 103 | border-bottom: 2px solid #ffc601; 104 | margin: 40px auto; 105 | padding-left: 0; 106 | } 107 | 108 | .list_title { 109 | width: 115px; 110 | height: 50px; 111 | background-color: #ffc601; 112 | border-bottom: 1px solid #fff; 113 | color: #fff; 114 | text-align: center; 115 | line-height: 50px; 116 | font-size: 16px; 117 | } 118 | 119 | .list_more ul li { 120 | float: left; 121 | width: 100px; 122 | height: 50px; 123 | font-size: 16px; 124 | line-height: 50px; 125 | font-family: '微软雅黑'; 126 | } 127 | 128 | .click-this a { 129 | color: #ffc601; 130 | } 131 | 132 | /*房屋详细信息*/ 133 | .house-detail { 134 | width: 1140px; 135 | height: auto; 136 | } 137 | 138 | .house-detail ul li { 139 | width: 100%; 140 | height: 180px; 141 | position: relative; 142 | margin-top: 40px; 143 | padding-bottom: 40px; 144 | border-bottom: 1px solid #eee; 145 | } 146 | 147 | .show-image { 148 | position: relative; 149 | float: left; 150 | } 151 | 152 | .show-details { 153 | width: 628px !important; 154 | float: left; 155 | margin-left: 31px; 156 | margin-top: -5px; 157 | } 158 | 159 | .house-title { 160 | position: relative; 161 | margin-top: -2px; 162 | width: auto; 163 | overflow: hidden; 164 | white-space: nowrap; 165 | -o-text-overflow: ellipsis; 166 | text-overflow: ellipsis; 167 | } 168 | 169 | .house-title a { 170 | float: left; 171 | max-width: 512px; 172 | white-space: nowrap; 173 | overflow: hidden; 174 | -o-text-overflow: ellipsis; 175 | text-overflow: ellipsis; 176 | font-size: 24px; 177 | font-weight: 700; 178 | } 179 | 180 | .house-about, .house-address { 181 | font-size: 14px; 182 | color: #1b1b1b !important; 183 | margin-top: 28px; 184 | } 185 | 186 | .flag-line { 187 | margin: 0 10px; 188 | } 189 | 190 | .show-price { 191 | position: absolute; 192 | top: 42px; 193 | right: 0; 194 | float: right; 195 | color: #ffc601; 196 | text-align: right; 197 | } 198 | 199 | .show-price .sale-price { 200 | position: relative; 201 | top: 2px; 202 | font-size: 40px; 203 | font-weight: bold; 204 | font-family: 'dinot-bold'; 205 | } 206 | 207 | .show-price .sale-unit { 208 | margin-left: 1px; 209 | font-size: 14px; 210 | } 211 | 212 | footer { 213 | width: 100%; 214 | height: 60px; 215 | margin-top: 20px; 216 | text-align: center; 217 | font-size: 16px; 218 | line-height: 60px; 219 | } -------------------------------------------------------------------------------- /web/img/assets/guide-detail.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chriy/HouseRentalSystem/fef2de06b9644939c95f81c680f6890628aef1ac/web/img/assets/guide-detail.png -------------------------------------------------------------------------------- /web/img/assets/guide-home.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chriy/HouseRentalSystem/fef2de06b9644939c95f81c680f6890628aef1ac/web/img/assets/guide-home.png -------------------------------------------------------------------------------- /web/img/banner-1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chriy/HouseRentalSystem/fef2de06b9644939c95f81c680f6890628aef1ac/web/img/banner-1.jpg -------------------------------------------------------------------------------- /web/img/banner-2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chriy/HouseRentalSystem/fef2de06b9644939c95f81c680f6890628aef1ac/web/img/banner-2.jpg -------------------------------------------------------------------------------- /web/img/banner-3.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chriy/HouseRentalSystem/fef2de06b9644939c95f81c680f6890628aef1ac/web/img/banner-3.jpg -------------------------------------------------------------------------------- /web/img/banner-4.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chriy/HouseRentalSystem/fef2de06b9644939c95f81c680f6890628aef1ac/web/img/banner-4.jpg -------------------------------------------------------------------------------- /web/img/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chriy/HouseRentalSystem/fef2de06b9644939c95f81c680f6890628aef1ac/web/img/logo.png -------------------------------------------------------------------------------- /web/index.jsp: -------------------------------------------------------------------------------- 1 | <%@ page contentType="text/html;charset=UTF-8" language="java" %> 2 | 3 | 4 | 5 | 欢迎来到房屋租赁网 6 | 7 | 8 |

欢迎来到房屋租赁网

9 | 10 | -------------------------------------------------------------------------------- /web/js/404.js: -------------------------------------------------------------------------------- 1 | function randomNum() { 2 | return Math.floor(Math.random() * 9) + 1; 3 | } 4 | var loop1, loop2, loop3, 5 | time = 30, i = 0, number; 6 | loop3 = setInterval(function () { 7 | if (i > 40) { 8 | clearInterval(loop3); 9 | document.querySelector('.thirdDigit').textContent = 4; 10 | } else { 11 | document.querySelector('.thirdDigit').textContent = randomNum(); 12 | i++; 13 | } 14 | }, time); 15 | loop2 = setInterval(function () { 16 | if (i > 80) { 17 | clearInterval(loop2); 18 | document.querySelector('.secondDigit').textContent = 0; 19 | } else { 20 | document.querySelector('.secondDigit').textContent = randomNum(); 21 | i++; 22 | } 23 | }, time); 24 | loop1 = setInterval(function () { 25 | if (i > 100) { 26 | clearInterval(loop1); 27 | document.querySelector('.firstDigit').textContent = 4; 28 | } else { 29 | document.querySelector('.firstDigit').textContent = randomNum(); 30 | i++; 31 | } 32 | }, time); -------------------------------------------------------------------------------- /web/layui/css/modules/code.css: -------------------------------------------------------------------------------- 1 | /** layui-v2.4.3 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} -------------------------------------------------------------------------------- /web/layui/css/modules/laydate/default/laydate.css: -------------------------------------------------------------------------------- 1 | /** layui-v2.4.3 MIT License By https://www.layui.com */ 2 | .laydate-set-ym,.layui-laydate,.layui-laydate *,.layui-laydate-list{box-sizing:border-box}html #layuicss-laydate{display:none;position:absolute;width:1989px}.layui-laydate *{margin:0;padding:0}.layui-laydate{position:absolute;z-index:66666666;margin:5px 0;border-radius:2px;font-size:14px;-webkit-animation-duration:.3s;animation-duration:.3s;-webkit-animation-fill-mode:both;animation-fill-mode:both;-webkit-animation-name:laydate-upbit;animation-name:laydate-upbit}.layui-laydate-main{width:272px}.layui-laydate-content td,.layui-laydate-header *,.layui-laydate-list li{transition-duration:.3s;-webkit-transition-duration:.3s}@-webkit-keyframes laydate-upbit{from{-webkit-transform:translate3d(0,20px,0);opacity:.3}to{-webkit-transform:translate3d(0,0,0);opacity:1}}@keyframes laydate-upbit{from{transform:translate3d(0,20px,0);opacity:.3}to{transform:translate3d(0,0,0);opacity:1}}.layui-laydate-static{position:relative;z-index:0;display:inline-block;margin:0;-webkit-animation:none;animation:none}.laydate-ym-show .laydate-next-m,.laydate-ym-show .laydate-prev-m{display:none!important}.laydate-ym-show .laydate-next-y,.laydate-ym-show .laydate-prev-y{display:inline-block!important}.laydate-time-show .laydate-set-ym span[lay-type=month],.laydate-time-show .laydate-set-ym span[lay-type=year],.laydate-time-show .layui-laydate-header .layui-icon,.laydate-ym-show .laydate-set-ym span[lay-type=month]{display:none!important}.layui-laydate-header{position:relative;line-height:30px;padding:10px 70px 5px}.laydate-set-ym span,.layui-laydate-header i{padding:0 5px;cursor:pointer}.layui-laydate-header *{display:inline-block;vertical-align:bottom}.layui-laydate-header i{position:absolute;top:10px;color:#999;font-size:18px}.layui-laydate-header i.laydate-prev-y{left:15px}.layui-laydate-header i.laydate-prev-m{left:45px}.layui-laydate-header i.laydate-next-y{right:15px}.layui-laydate-header i.laydate-next-m{right:45px}.laydate-set-ym{width:100%;text-align:center;text-overflow:ellipsis;overflow:hidden;white-space:nowrap}.laydate-time-text{cursor:default!important}.layui-laydate-content{position:relative;padding:10px;-moz-user-select:none;-webkit-user-select:none;-ms-user-select:none}.layui-laydate-content table{border-collapse:collapse;border-spacing:0}.layui-laydate-content td,.layui-laydate-content th{width:36px;height:30px;padding:5px;text-align:center}.layui-laydate-content td{position:relative;cursor:pointer}.laydate-day-mark{position:absolute;left:0;top:0;width:100%;height:100%;line-height:30px;font-size:12px;overflow:hidden}.laydate-day-mark::after{position:absolute;content:'';right:2px;top:2px;width:5px;height:5px;border-radius:50%}.layui-laydate-footer{position:relative;height:46px;line-height:26px;padding:10px 20px}.layui-laydate-footer span{margin-right:15px;display:inline-block;cursor:pointer;font-size:12px}.layui-laydate-footer span:hover{color:#5FB878}.laydate-footer-btns{position:absolute;right:10px;top:10px}.laydate-footer-btns span{height:26px;line-height:26px;margin:0 0 0 -1px;padding:0 10px;border:1px solid #C9C9C9;background-color:#fff;white-space:nowrap;vertical-align:top;border-radius:2px}.layui-laydate-list>li,.layui-laydate-range .layui-laydate-main{display:inline-block;vertical-align:middle}.layui-laydate-list{position:absolute;left:0;top:0;width:100%;height:100%;padding:10px;background-color:#fff}.layui-laydate-list>li{position:relative;width:33.3%;height:36px;line-height:36px;margin:3px 0;text-align:center;cursor:pointer}.laydate-month-list>li{width:25%;margin:17px 0}.laydate-time-list>li{height:100%;margin:0;line-height:normal;cursor:default}.laydate-time-list p{position:relative;top:-4px;line-height:29px}.laydate-time-list ol{height:181px;overflow:hidden}.laydate-time-list>li:hover ol{overflow-y:auto}.laydate-time-list ol li{width:130%;padding-left:33px;line-height:30px;text-align:left;cursor:pointer}.layui-laydate-hint{position:absolute;top:115px;left:50%;width:250px;margin-left:-125px;line-height:20px;padding:15px;text-align:center;font-size:12px}.layui-laydate-range{width:546px}.layui-laydate-range .laydate-main-list-0 .laydate-next-m,.layui-laydate-range .laydate-main-list-0 .laydate-next-y,.layui-laydate-range .laydate-main-list-1 .laydate-prev-m,.layui-laydate-range .laydate-main-list-1 .laydate-prev-y{display:none}.layui-laydate-range .laydate-main-list-1 .layui-laydate-content{border-left:1px solid #e2e2e2}.layui-laydate,.layui-laydate-hint{border:1px solid #d2d2d2;box-shadow:0 2px 4px rgba(0,0,0,.12);background-color:#fff;color:#666}.layui-laydate-header{border-bottom:1px solid #e2e2e2}.layui-laydate-header i:hover,.layui-laydate-header span:hover{color:#5FB878}.layui-laydate-content{border-top:none 0;border-bottom:none 0}.layui-laydate-content th{font-weight:400;color:#333}.layui-laydate-content td{color:#666}.layui-laydate-content td.laydate-selected{background-color:#00F7DE}.laydate-selected:hover{background-color:#00F7DE!important}.layui-laydate-content td:hover,.layui-laydate-list li:hover{background-color:#eaeaea;color:#333}.laydate-time-list li ol{margin:0;padding:0;border:1px solid #e2e2e2;border-left-width:0}.laydate-time-list li:first-child ol{border-left-width:1px}.laydate-time-list>li:hover{background:0 0}.layui-laydate-content .laydate-day-next,.layui-laydate-content .laydate-day-prev{color:#d2d2d2}.laydate-selected.laydate-day-next,.laydate-selected.laydate-day-prev{background-color:#f8f8f8!important}.layui-laydate-footer{border-top:1px solid #e2e2e2}.layui-laydate-hint{color:#FF5722}.laydate-day-mark::after{background-color:#5FB878}.layui-laydate-content td.layui-this .laydate-day-mark::after{display:none}.layui-laydate-footer span[lay-type=date]{color:#5FB878}.layui-laydate .layui-this{background-color:#009688!important;color:#fff!important}.layui-laydate .laydate-disabled,.layui-laydate .laydate-disabled:hover{background:0 0!important;color:#d2d2d2!important;cursor:not-allowed!important;-moz-user-select:none;-webkit-user-select:none;-ms-user-select:none}.laydate-theme-molv{border:none}.laydate-theme-molv.layui-laydate-range{width:548px}.laydate-theme-molv .layui-laydate-main{width:274px}.laydate-theme-molv .layui-laydate-header{border:none;background-color:#009688}.laydate-theme-molv .layui-laydate-header i,.laydate-theme-molv .layui-laydate-header span{color:#f6f6f6}.laydate-theme-molv .layui-laydate-header i:hover,.laydate-theme-molv .layui-laydate-header span:hover{color:#fff}.laydate-theme-molv .layui-laydate-content{border:1px solid #e2e2e2;border-top:none;border-bottom:none}.laydate-theme-molv .laydate-main-list-1 .layui-laydate-content{border-left:none}.laydate-theme-grid .laydate-month-list>li,.laydate-theme-grid .laydate-year-list>li,.laydate-theme-grid .layui-laydate-content td,.laydate-theme-grid .layui-laydate-content thead,.laydate-theme-molv .layui-laydate-footer{border:1px solid #e2e2e2}.laydate-theme-grid .laydate-selected,.laydate-theme-grid .laydate-selected:hover{background-color:#f2f2f2!important;color:#009688!important}.laydate-theme-grid .laydate-selected.laydate-day-next,.laydate-theme-grid .laydate-selected.laydate-day-prev{color:#d2d2d2!important}.laydate-theme-grid .laydate-month-list,.laydate-theme-grid .laydate-year-list{margin:1px 0 0 1px}.laydate-theme-grid .laydate-month-list>li,.laydate-theme-grid .laydate-year-list>li{margin:0 -1px -1px 0}.laydate-theme-grid .laydate-year-list>li{height:43px;line-height:43px}.laydate-theme-grid .laydate-month-list>li{height:71px;line-height:71px} -------------------------------------------------------------------------------- /web/layui/css/modules/layer/default/icon-ext.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chriy/HouseRentalSystem/fef2de06b9644939c95f81c680f6890628aef1ac/web/layui/css/modules/layer/default/icon-ext.png -------------------------------------------------------------------------------- /web/layui/css/modules/layer/default/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chriy/HouseRentalSystem/fef2de06b9644939c95f81c680f6890628aef1ac/web/layui/css/modules/layer/default/icon.png -------------------------------------------------------------------------------- /web/layui/css/modules/layer/default/loading-0.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chriy/HouseRentalSystem/fef2de06b9644939c95f81c680f6890628aef1ac/web/layui/css/modules/layer/default/loading-0.gif -------------------------------------------------------------------------------- /web/layui/css/modules/layer/default/loading-1.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chriy/HouseRentalSystem/fef2de06b9644939c95f81c680f6890628aef1ac/web/layui/css/modules/layer/default/loading-1.gif -------------------------------------------------------------------------------- /web/layui/css/modules/layer/default/loading-2.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chriy/HouseRentalSystem/fef2de06b9644939c95f81c680f6890628aef1ac/web/layui/css/modules/layer/default/loading-2.gif -------------------------------------------------------------------------------- /web/layui/font/iconfont.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chriy/HouseRentalSystem/fef2de06b9644939c95f81c680f6890628aef1ac/web/layui/font/iconfont.eot -------------------------------------------------------------------------------- /web/layui/font/iconfont.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chriy/HouseRentalSystem/fef2de06b9644939c95f81c680f6890628aef1ac/web/layui/font/iconfont.ttf -------------------------------------------------------------------------------- /web/layui/font/iconfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chriy/HouseRentalSystem/fef2de06b9644939c95f81c680f6890628aef1ac/web/layui/font/iconfont.woff -------------------------------------------------------------------------------- /web/layui/images/face/0.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chriy/HouseRentalSystem/fef2de06b9644939c95f81c680f6890628aef1ac/web/layui/images/face/0.gif -------------------------------------------------------------------------------- /web/layui/images/face/1.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chriy/HouseRentalSystem/fef2de06b9644939c95f81c680f6890628aef1ac/web/layui/images/face/1.gif -------------------------------------------------------------------------------- /web/layui/images/face/10.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chriy/HouseRentalSystem/fef2de06b9644939c95f81c680f6890628aef1ac/web/layui/images/face/10.gif -------------------------------------------------------------------------------- /web/layui/images/face/11.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chriy/HouseRentalSystem/fef2de06b9644939c95f81c680f6890628aef1ac/web/layui/images/face/11.gif -------------------------------------------------------------------------------- /web/layui/images/face/12.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chriy/HouseRentalSystem/fef2de06b9644939c95f81c680f6890628aef1ac/web/layui/images/face/12.gif -------------------------------------------------------------------------------- /web/layui/images/face/13.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chriy/HouseRentalSystem/fef2de06b9644939c95f81c680f6890628aef1ac/web/layui/images/face/13.gif -------------------------------------------------------------------------------- /web/layui/images/face/14.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chriy/HouseRentalSystem/fef2de06b9644939c95f81c680f6890628aef1ac/web/layui/images/face/14.gif -------------------------------------------------------------------------------- /web/layui/images/face/15.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chriy/HouseRentalSystem/fef2de06b9644939c95f81c680f6890628aef1ac/web/layui/images/face/15.gif -------------------------------------------------------------------------------- /web/layui/images/face/16.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chriy/HouseRentalSystem/fef2de06b9644939c95f81c680f6890628aef1ac/web/layui/images/face/16.gif -------------------------------------------------------------------------------- /web/layui/images/face/17.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chriy/HouseRentalSystem/fef2de06b9644939c95f81c680f6890628aef1ac/web/layui/images/face/17.gif -------------------------------------------------------------------------------- /web/layui/images/face/18.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chriy/HouseRentalSystem/fef2de06b9644939c95f81c680f6890628aef1ac/web/layui/images/face/18.gif -------------------------------------------------------------------------------- /web/layui/images/face/19.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chriy/HouseRentalSystem/fef2de06b9644939c95f81c680f6890628aef1ac/web/layui/images/face/19.gif -------------------------------------------------------------------------------- /web/layui/images/face/2.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chriy/HouseRentalSystem/fef2de06b9644939c95f81c680f6890628aef1ac/web/layui/images/face/2.gif -------------------------------------------------------------------------------- /web/layui/images/face/20.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chriy/HouseRentalSystem/fef2de06b9644939c95f81c680f6890628aef1ac/web/layui/images/face/20.gif -------------------------------------------------------------------------------- /web/layui/images/face/21.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chriy/HouseRentalSystem/fef2de06b9644939c95f81c680f6890628aef1ac/web/layui/images/face/21.gif -------------------------------------------------------------------------------- /web/layui/images/face/22.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chriy/HouseRentalSystem/fef2de06b9644939c95f81c680f6890628aef1ac/web/layui/images/face/22.gif -------------------------------------------------------------------------------- /web/layui/images/face/23.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chriy/HouseRentalSystem/fef2de06b9644939c95f81c680f6890628aef1ac/web/layui/images/face/23.gif -------------------------------------------------------------------------------- /web/layui/images/face/24.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chriy/HouseRentalSystem/fef2de06b9644939c95f81c680f6890628aef1ac/web/layui/images/face/24.gif -------------------------------------------------------------------------------- /web/layui/images/face/25.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chriy/HouseRentalSystem/fef2de06b9644939c95f81c680f6890628aef1ac/web/layui/images/face/25.gif -------------------------------------------------------------------------------- /web/layui/images/face/26.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chriy/HouseRentalSystem/fef2de06b9644939c95f81c680f6890628aef1ac/web/layui/images/face/26.gif -------------------------------------------------------------------------------- /web/layui/images/face/27.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chriy/HouseRentalSystem/fef2de06b9644939c95f81c680f6890628aef1ac/web/layui/images/face/27.gif -------------------------------------------------------------------------------- /web/layui/images/face/28.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chriy/HouseRentalSystem/fef2de06b9644939c95f81c680f6890628aef1ac/web/layui/images/face/28.gif -------------------------------------------------------------------------------- /web/layui/images/face/29.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chriy/HouseRentalSystem/fef2de06b9644939c95f81c680f6890628aef1ac/web/layui/images/face/29.gif -------------------------------------------------------------------------------- /web/layui/images/face/3.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chriy/HouseRentalSystem/fef2de06b9644939c95f81c680f6890628aef1ac/web/layui/images/face/3.gif -------------------------------------------------------------------------------- /web/layui/images/face/30.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chriy/HouseRentalSystem/fef2de06b9644939c95f81c680f6890628aef1ac/web/layui/images/face/30.gif -------------------------------------------------------------------------------- /web/layui/images/face/31.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chriy/HouseRentalSystem/fef2de06b9644939c95f81c680f6890628aef1ac/web/layui/images/face/31.gif -------------------------------------------------------------------------------- /web/layui/images/face/32.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chriy/HouseRentalSystem/fef2de06b9644939c95f81c680f6890628aef1ac/web/layui/images/face/32.gif -------------------------------------------------------------------------------- /web/layui/images/face/33.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chriy/HouseRentalSystem/fef2de06b9644939c95f81c680f6890628aef1ac/web/layui/images/face/33.gif -------------------------------------------------------------------------------- /web/layui/images/face/34.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chriy/HouseRentalSystem/fef2de06b9644939c95f81c680f6890628aef1ac/web/layui/images/face/34.gif -------------------------------------------------------------------------------- /web/layui/images/face/35.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chriy/HouseRentalSystem/fef2de06b9644939c95f81c680f6890628aef1ac/web/layui/images/face/35.gif -------------------------------------------------------------------------------- /web/layui/images/face/36.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chriy/HouseRentalSystem/fef2de06b9644939c95f81c680f6890628aef1ac/web/layui/images/face/36.gif -------------------------------------------------------------------------------- /web/layui/images/face/37.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chriy/HouseRentalSystem/fef2de06b9644939c95f81c680f6890628aef1ac/web/layui/images/face/37.gif -------------------------------------------------------------------------------- /web/layui/images/face/38.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chriy/HouseRentalSystem/fef2de06b9644939c95f81c680f6890628aef1ac/web/layui/images/face/38.gif -------------------------------------------------------------------------------- /web/layui/images/face/39.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chriy/HouseRentalSystem/fef2de06b9644939c95f81c680f6890628aef1ac/web/layui/images/face/39.gif -------------------------------------------------------------------------------- /web/layui/images/face/4.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chriy/HouseRentalSystem/fef2de06b9644939c95f81c680f6890628aef1ac/web/layui/images/face/4.gif -------------------------------------------------------------------------------- /web/layui/images/face/40.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chriy/HouseRentalSystem/fef2de06b9644939c95f81c680f6890628aef1ac/web/layui/images/face/40.gif -------------------------------------------------------------------------------- /web/layui/images/face/41.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chriy/HouseRentalSystem/fef2de06b9644939c95f81c680f6890628aef1ac/web/layui/images/face/41.gif -------------------------------------------------------------------------------- /web/layui/images/face/42.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chriy/HouseRentalSystem/fef2de06b9644939c95f81c680f6890628aef1ac/web/layui/images/face/42.gif -------------------------------------------------------------------------------- /web/layui/images/face/43.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chriy/HouseRentalSystem/fef2de06b9644939c95f81c680f6890628aef1ac/web/layui/images/face/43.gif -------------------------------------------------------------------------------- /web/layui/images/face/44.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chriy/HouseRentalSystem/fef2de06b9644939c95f81c680f6890628aef1ac/web/layui/images/face/44.gif -------------------------------------------------------------------------------- /web/layui/images/face/45.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chriy/HouseRentalSystem/fef2de06b9644939c95f81c680f6890628aef1ac/web/layui/images/face/45.gif -------------------------------------------------------------------------------- /web/layui/images/face/46.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chriy/HouseRentalSystem/fef2de06b9644939c95f81c680f6890628aef1ac/web/layui/images/face/46.gif -------------------------------------------------------------------------------- /web/layui/images/face/47.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chriy/HouseRentalSystem/fef2de06b9644939c95f81c680f6890628aef1ac/web/layui/images/face/47.gif -------------------------------------------------------------------------------- /web/layui/images/face/48.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chriy/HouseRentalSystem/fef2de06b9644939c95f81c680f6890628aef1ac/web/layui/images/face/48.gif -------------------------------------------------------------------------------- /web/layui/images/face/49.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chriy/HouseRentalSystem/fef2de06b9644939c95f81c680f6890628aef1ac/web/layui/images/face/49.gif -------------------------------------------------------------------------------- /web/layui/images/face/5.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chriy/HouseRentalSystem/fef2de06b9644939c95f81c680f6890628aef1ac/web/layui/images/face/5.gif -------------------------------------------------------------------------------- /web/layui/images/face/50.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chriy/HouseRentalSystem/fef2de06b9644939c95f81c680f6890628aef1ac/web/layui/images/face/50.gif -------------------------------------------------------------------------------- /web/layui/images/face/51.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chriy/HouseRentalSystem/fef2de06b9644939c95f81c680f6890628aef1ac/web/layui/images/face/51.gif -------------------------------------------------------------------------------- /web/layui/images/face/52.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chriy/HouseRentalSystem/fef2de06b9644939c95f81c680f6890628aef1ac/web/layui/images/face/52.gif -------------------------------------------------------------------------------- /web/layui/images/face/53.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chriy/HouseRentalSystem/fef2de06b9644939c95f81c680f6890628aef1ac/web/layui/images/face/53.gif -------------------------------------------------------------------------------- /web/layui/images/face/54.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chriy/HouseRentalSystem/fef2de06b9644939c95f81c680f6890628aef1ac/web/layui/images/face/54.gif -------------------------------------------------------------------------------- /web/layui/images/face/55.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chriy/HouseRentalSystem/fef2de06b9644939c95f81c680f6890628aef1ac/web/layui/images/face/55.gif -------------------------------------------------------------------------------- /web/layui/images/face/56.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chriy/HouseRentalSystem/fef2de06b9644939c95f81c680f6890628aef1ac/web/layui/images/face/56.gif -------------------------------------------------------------------------------- /web/layui/images/face/57.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chriy/HouseRentalSystem/fef2de06b9644939c95f81c680f6890628aef1ac/web/layui/images/face/57.gif -------------------------------------------------------------------------------- /web/layui/images/face/58.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chriy/HouseRentalSystem/fef2de06b9644939c95f81c680f6890628aef1ac/web/layui/images/face/58.gif -------------------------------------------------------------------------------- /web/layui/images/face/59.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chriy/HouseRentalSystem/fef2de06b9644939c95f81c680f6890628aef1ac/web/layui/images/face/59.gif -------------------------------------------------------------------------------- /web/layui/images/face/6.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chriy/HouseRentalSystem/fef2de06b9644939c95f81c680f6890628aef1ac/web/layui/images/face/6.gif -------------------------------------------------------------------------------- /web/layui/images/face/60.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chriy/HouseRentalSystem/fef2de06b9644939c95f81c680f6890628aef1ac/web/layui/images/face/60.gif -------------------------------------------------------------------------------- /web/layui/images/face/61.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chriy/HouseRentalSystem/fef2de06b9644939c95f81c680f6890628aef1ac/web/layui/images/face/61.gif -------------------------------------------------------------------------------- /web/layui/images/face/62.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chriy/HouseRentalSystem/fef2de06b9644939c95f81c680f6890628aef1ac/web/layui/images/face/62.gif -------------------------------------------------------------------------------- /web/layui/images/face/63.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chriy/HouseRentalSystem/fef2de06b9644939c95f81c680f6890628aef1ac/web/layui/images/face/63.gif -------------------------------------------------------------------------------- /web/layui/images/face/64.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chriy/HouseRentalSystem/fef2de06b9644939c95f81c680f6890628aef1ac/web/layui/images/face/64.gif -------------------------------------------------------------------------------- /web/layui/images/face/65.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chriy/HouseRentalSystem/fef2de06b9644939c95f81c680f6890628aef1ac/web/layui/images/face/65.gif -------------------------------------------------------------------------------- /web/layui/images/face/66.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chriy/HouseRentalSystem/fef2de06b9644939c95f81c680f6890628aef1ac/web/layui/images/face/66.gif -------------------------------------------------------------------------------- /web/layui/images/face/67.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chriy/HouseRentalSystem/fef2de06b9644939c95f81c680f6890628aef1ac/web/layui/images/face/67.gif -------------------------------------------------------------------------------- /web/layui/images/face/68.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chriy/HouseRentalSystem/fef2de06b9644939c95f81c680f6890628aef1ac/web/layui/images/face/68.gif -------------------------------------------------------------------------------- /web/layui/images/face/69.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chriy/HouseRentalSystem/fef2de06b9644939c95f81c680f6890628aef1ac/web/layui/images/face/69.gif -------------------------------------------------------------------------------- /web/layui/images/face/7.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chriy/HouseRentalSystem/fef2de06b9644939c95f81c680f6890628aef1ac/web/layui/images/face/7.gif -------------------------------------------------------------------------------- /web/layui/images/face/70.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chriy/HouseRentalSystem/fef2de06b9644939c95f81c680f6890628aef1ac/web/layui/images/face/70.gif -------------------------------------------------------------------------------- /web/layui/images/face/71.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chriy/HouseRentalSystem/fef2de06b9644939c95f81c680f6890628aef1ac/web/layui/images/face/71.gif -------------------------------------------------------------------------------- /web/layui/images/face/8.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chriy/HouseRentalSystem/fef2de06b9644939c95f81c680f6890628aef1ac/web/layui/images/face/8.gif -------------------------------------------------------------------------------- /web/layui/images/face/9.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chriy/HouseRentalSystem/fef2de06b9644939c95f81c680f6890628aef1ac/web/layui/images/face/9.gif -------------------------------------------------------------------------------- /web/layui/lay/modules/carousel.js: -------------------------------------------------------------------------------- 1 | /** layui-v2.4.3 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/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"); -------------------------------------------------------------------------------- /web/layui/lay/modules/element.js: -------------------------------------------------------------------------------- 1 | /** layui-v2.4.3 MIT License By https://www.layui.com */ 2 | ;layui.define("jquery",function(t){"use strict";var a=layui.$,i=(layui.hint(),layui.device()),e="element",l="layui-this",n="layui-show",s=function(){this.config={}};s.prototype.set=function(t){var i=this;return a.extend(!0,i.config,t),i},s.prototype.on=function(t,a){return layui.onevent.call(this,e,t,a)},s.prototype.tabAdd=function(t,i){var e=".layui-tab-title",l=a(".layui-tab[lay-filter="+t+"]"),n=l.children(e),s=n.children(".layui-tab-bar"),o=l.children(".layui-tab-content"),r='
  • "+(i.title||"unnaming")+"
  • ";return s[0]?s.before(r):n.append(r),o.append('
    '+(i.content||"")+"
    "),f.hideTabMore(!0),f.tabAuto(),this},s.prototype.tabDelete=function(t,i){var e=".layui-tab-title",l=a(".layui-tab[lay-filter="+t+"]"),n=l.children(e),s=n.find('>li[lay-id="'+i+'"]');return f.tabDelete(null,s),this},s.prototype.tabChange=function(t,i){var e=".layui-tab-title",l=a(".layui-tab[lay-filter="+t+"]"),n=l.children(e),s=n.find('>li[lay-id="'+i+'"]');return f.tabClick.call(s[0],null,null,s),this},s.prototype.tab=function(t){t=t||{},b.on("click",t.headerElem,function(i){var e=a(this).index();f.tabClick.call(this,i,e,null,t)})},s.prototype.progress=function(t,i){var e="layui-progress",l=a("."+e+"[lay-filter="+t+"]"),n=l.find("."+e+"-bar"),s=n.find("."+e+"-text");return n.css("width",i),s.text(i),this};var o=".layui-nav",r="layui-nav-item",c="layui-nav-bar",u="layui-nav-tree",d="layui-nav-child",y="layui-nav-more",h="layui-anim layui-anim-upbit",f={tabClick:function(t,i,s,o){o=o||{};var r=s||a(this),i=i||r.parent().children("li").index(r),c=o.headerElem?r.parent():r.parents(".layui-tab").eq(0),u=o.bodyElem?a(o.bodyElem):c.children(".layui-tab-content").children(".layui-tab-item"),d=r.find("a"),y=c.attr("lay-filter");"javascript:;"!==d.attr("href")&&"_blank"===d.attr("target")||(r.addClass(l).siblings().removeClass(l),u.eq(i).addClass(n).siblings().removeClass(n)),layui.event.call(this,e,"tab("+y+")",{elem:c,index:i})},tabDelete:function(t,i){var n=i||a(this).parent(),s=n.index(),o=n.parents(".layui-tab").eq(0),r=o.children(".layui-tab-content").children(".layui-tab-item"),c=o.attr("lay-filter");n.hasClass(l)&&(n.next()[0]?f.tabClick.call(n.next()[0],null,s+1):n.prev()[0]&&f.tabClick.call(n.prev()[0],null,s-1)),n.remove(),r.eq(s).remove(),setTimeout(function(){f.tabAuto()},50),layui.event.call(this,e,"tabDelete("+c+")",{elem:o,index:s})},tabAuto:function(){var t="layui-tab-more",e="layui-tab-bar",l="layui-tab-close",n=this;a(".layui-tab").each(function(){var s=a(this),o=s.children(".layui-tab-title"),r=(s.children(".layui-tab-content").children(".layui-tab-item"),'lay-stope="tabmore"'),c=a('');if(n===window&&8!=i.ie&&f.hideTabMore(!0),s.attr("lay-allowClose")&&o.find("li").each(function(){var t=a(this);if(!t.find("."+l)[0]){var i=a('');i.on("click",f.tabDelete),t.append(i)}}),"string"!=typeof s.attr("lay-unauto"))if(o.prop("scrollWidth")>o.outerWidth()+1){if(o.find("."+e)[0])return;o.append(c),s.attr("overflow",""),c.on("click",function(a){o[this.title?"removeClass":"addClass"](t),this.title=this.title?"":"收缩"})}else o.find("."+e).remove(),s.removeAttr("overflow")})},hideTabMore:function(t){var i=a(".layui-tab-title");t!==!0&&"tabmore"===a(t.target).attr("lay-stope")||(i.removeClass("layui-tab-more"),i.find(".layui-tab-bar").attr("title",""))},clickThis:function(){var t=a(this),i=t.parents(o),n=i.attr("lay-filter"),s=t.parent(),c=t.siblings("."+d),y="string"==typeof s.attr("lay-unselect");"javascript:;"!==t.attr("href")&&"_blank"===t.attr("target")||y||c[0]||(i.find("."+l).removeClass(l),s.addClass(l)),i.hasClass(u)&&(c.removeClass(h),c[0]&&(s["none"===c.css("display")?"addClass":"removeClass"](r+"ed"),"all"===i.attr("lay-shrink")&&s.siblings().removeClass(r+"ed"))),layui.event.call(this,e,"nav("+n+")",t)},collapse:function(){var t=a(this),i=t.find(".layui-colla-icon"),l=t.siblings(".layui-colla-content"),s=t.parents(".layui-collapse").eq(0),o=s.attr("lay-filter"),r="none"===l.css("display");if("string"==typeof s.attr("lay-accordion")){var c=s.children(".layui-colla-item").children("."+n);c.siblings(".layui-colla-title").children(".layui-colla-icon").html(""),c.removeClass(n)}l[r?"addClass":"removeClass"](n),i.html(r?"":""),layui.event.call(this,e,"collapse("+o+")",{title:t,content:l,show:r})}};s.prototype.init=function(t,e){var l=function(){return e?'[lay-filter="'+e+'"]':""}(),s={tab:function(){f.tabAuto.call({})},nav:function(){var t=200,e={},s={},p={},b=function(l,o,r){var c=a(this),f=c.find("."+d);o.hasClass(u)?l.css({top:c.position().top,height:c.children("a").outerHeight(),opacity:1}):(f.addClass(h),l.css({left:c.position().left+parseFloat(c.css("marginLeft")),top:c.position().top+c.height()-l.height()}),e[r]=setTimeout(function(){l.css({width:c.width(),opacity:1})},i.ie&&i.ie<10?0:t),clearTimeout(p[r]),"block"===f.css("display")&&clearTimeout(s[r]),s[r]=setTimeout(function(){f.addClass(n),c.find("."+y).addClass(y+"d")},300))};a(o+l).each(function(i){var l=a(this),o=a(''),h=l.find("."+r);l.find("."+c)[0]||(l.append(o),h.on("mouseenter",function(){b.call(this,o,l,i)}).on("mouseleave",function(){l.hasClass(u)||(clearTimeout(s[i]),s[i]=setTimeout(function(){l.find("."+d).removeClass(n),l.find("."+y).removeClass(y+"d")},300))}),l.on("mouseleave",function(){clearTimeout(e[i]),p[i]=setTimeout(function(){l.hasClass(u)?o.css({height:0,top:o.position().top+o.height()/2,opacity:0}):o.css({width:0,left:o.position().left+o.width()/2,opacity:0})},t)})),h.find("a").each(function(){var t=a(this),i=(t.parent(),t.siblings("."+d));i[0]&&!t.children("."+y)[0]&&t.append(''),t.off("click",f.clickThis).on("click",f.clickThis)})})},breadcrumb:function(){var t=".layui-breadcrumb";a(t+l).each(function(){var t=a(this),i="lay-separator",e=t.attr(i)||"/",l=t.find("a");l.next("span["+i+"]")[0]||(l.each(function(t){t!==l.length-1&&a(this).after(""+e+"")}),t.css("visibility","visible"))})},progress:function(){var t="layui-progress";a("."+t+l).each(function(){var i=a(this),e=i.find(".layui-progress-bar"),l=e.attr("lay-percent");e.css("width",function(){return/^.+\/.+$/.test(l)?100*new Function("return "+l)()+"%":l}()),i.attr("lay-showPercent")&&setTimeout(function(){e.html(''+l+"")},350)})},collapse:function(){var t="layui-collapse";a("."+t+l).each(function(){var t=a(this).find(".layui-colla-item");t.each(function(){var t=a(this),i=t.find(".layui-colla-title"),e=t.find(".layui-colla-content"),l="none"===e.css("display");i.find(".layui-colla-icon").remove(),i.append(''+(l?"":"")+""),i.off("click",f.collapse).on("click",f.collapse)})})}};return s[t]?s[t]():layui.each(s,function(t,a){a()})},s.prototype.render=s.prototype.init;var p=new s,b=a(document);p.render();var v=".layui-tab-title li";b.on("click",v,f.tabClick),b.on("click",f.hideTabMore),a(window).on("resize",f.tabAuto),t(e,p)}); -------------------------------------------------------------------------------- /web/layui/lay/modules/flow.js: -------------------------------------------------------------------------------- 1 | /** layui-v2.4.3 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)}); -------------------------------------------------------------------------------- /web/layui/lay/modules/laypage.js: -------------------------------------------------------------------------------- 1 | /** layui-v2.4.3 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=['"}(),refresh:['','',""].join(""),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)}); -------------------------------------------------------------------------------- /web/layui/lay/modules/laytpl.js: -------------------------------------------------------------------------------- 1 | /** layui-v2.4.3 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)}); -------------------------------------------------------------------------------- /web/layui/lay/modules/rate.js: -------------------------------------------------------------------------------- 1 | /** layui-v2.4.3 MIT License By https://www.layui.com */ 2 | ;layui.define("jquery",function(e){"use strict";var a=layui.jquery,i={config:{},index:layui.rate?layui.rate.index+1e4:0,set:function(e){var i=this;return i.config=a.extend({},i.config,e),i},on:function(e,a){return layui.onevent.call(this,n,e,a)}},l=function(){var e=this,a=e.config;return{setvalue:function(a){e.setvalue.call(e,a)},config:a}},n="rate",t="layui-rate",o="layui-icon-rate",s="layui-icon-rate-solid",u="layui-icon-rate-half",r="layui-icon-rate-solid layui-icon-rate-half",c="layui-icon-rate-solid layui-icon-rate",f="layui-icon-rate layui-icon-rate-half",v=function(e){var l=this;l.index=++i.index,l.config=a.extend({},l.config,i.config,e),l.render()};v.prototype.config={length:5,text:!1,readonly:!1,half:!1,value:0,theme:""},v.prototype.render=function(){var e=this,i=e.config,l=i.theme?'style="color: '+i.theme+';"':"";i.elem=a(i.elem),parseInt(i.value)!==i.value&&(i.half||(i.value=Math.ceil(i.value)-i.value<.5?Math.ceil(i.value):Math.floor(i.value)));for(var n='
      ",u=1;u<=i.length;u++){var r='
    • ";i.half&&parseInt(i.value)!==i.value&&u==Math.ceil(i.value)?n=n+'
    • ":n+=r}n+="
    "+(i.text?''+i.value+"星":"")+"";var c=i.elem,f=c.next("."+t);f[0]&&f.remove(),e.elemTemp=a(n),i.span=e.elemTemp.next("span"),i.setText&&i.setText(i.value),c.html(e.elemTemp),c.addClass("layui-inline"),i.readonly||e.action()},v.prototype.setvalue=function(e){var a=this,i=a.config;i.value=e,a.render()},v.prototype.action=function(){var e=this,i=e.config,l=e.elemTemp,n=l.find("i").width();l.children("li").each(function(e){var t=e+1,v=a(this);v.on("click",function(e){if(i.value=t,i.half){var o=e.pageX-a(this).offset().left;o<=n/2&&(i.value=i.value-.5)}i.text&&l.next("span").text(i.value+"星"),i.choose&&i.choose(i.value),i.setText&&i.setText(i.value)}),v.on("mousemove",function(e){if(l.find("i").each(function(){a(this).addClass(o).removeClass(r)}),l.find("i:lt("+t+")").each(function(){a(this).addClass(s).removeClass(f)}),i.half){var c=e.pageX-a(this).offset().left;c<=n/2&&v.children("i").addClass(u).removeClass(s)}}),v.on("mouseleave",function(){l.find("i").each(function(){a(this).addClass(o).removeClass(r)}),l.find("i:lt("+Math.floor(i.value)+")").each(function(){a(this).addClass(s).removeClass(f)}),i.half&&parseInt(i.value)!==i.value&&l.children("li:eq("+Math.floor(i.value)+")").children("i").addClass(u).removeClass(c)})})},v.prototype.events=function(){var e=this;e.config},i.render=function(e){var a=new v(e);return l.call(a)},e(n,i)}); -------------------------------------------------------------------------------- /web/layui/lay/modules/slider.js: -------------------------------------------------------------------------------- 1 | /** layui-v2.4.3 MIT License By https://www.layui.com */ 2 | ;layui.define("jquery",function(e){"use strict";var i=layui.jquery,t={config:{},index:layui.slider?layui.slider.index+1e4:0,set:function(e){var t=this;return t.config=i.extend({},t.config,e),t},on:function(e,i){return layui.onevent.call(this,n,e,i)}},a=function(){var e=this,i=e.config;return{setValue:function(i,t){return e.slide("set",i,t||0)},config:i}},n="slider",l="layui-disabled",s="layui-slider",r="layui-slider-bar",o="layui-slider-wrap",u="layui-slider-wrap-btn",d="layui-slider-tips",v="layui-slider-input",c="layui-slider-input-txt",f="layui-slider-input-btn",m="layui-slider-hover",p=function(e){var a=this;a.index=++t.index,a.config=i.extend({},a.config,t.config,e),a.render()};p.prototype.config={type:"default",min:0,max:100,value:0,step:1,showstep:!1,tips:!0,input:!1,range:!1,height:200,disabled:!1,theme:"#009688"},p.prototype.render=function(){var e=this,t=e.config;if(t.min=t.min<0?0:t.min,t.range){t.value="object"==typeof t.value?t.value:[t.min,t.value];var a=Math.min(t.value[0],t.value[1]),n=Math.max(t.value[0],t.value[1]);t.value[0]=a>t.min?a:t.min,t.value[1]=n>t.min?n:t.min,t.value[0]=t.value[0]>t.max?t.max:t.value[0],t.value[1]=t.value[1]>t.max?t.max:t.value[1];var r=Math.floor((t.value[0]-t.min)/(t.max-t.min)*100),v=Math.floor((t.value[1]-t.min)/(t.max-t.min)*100),f=v-r+"%";r+="%",v+="%"}else{t.value="object"==typeof t.value?Math.min(t.value[0],t.value[1]):t.value,t.value=t.value>t.min?t.value:t.min;var f=Math.floor((t.value-t.min)/(t.max-t.min)*100)+"%"}var m=t.disabled?"#c2c2c2":t.theme,p='
    '+(t.tips?'
    ':"")+'
    '+(t.range?'
    ':"")+"
    ",h=i(t.elem),y=h.next("."+s);if(y[0]&&y.remove(),e.elemTemp=i(p),t.range?(e.elemTemp.find("."+o).eq(0).data("value",t.value[0]),e.elemTemp.find("."+o).eq(1).data("value",t.value[1])):e.elemTemp.find("."+o).data("value",t.value),h.html(e.elemTemp),"vertical"===t.type&&e.elemTemp.height(t.height+"px"),t.showstep){for(var g=(t.max-t.min)/t.step,b="",x=1;x')}e.elemTemp.append(b)}if(t.input&&!t.range){var w=i('
    ');h.css("position","relative"),h.append(w),h.find("."+c).children("input").val(t.value),"vertical"===t.type?w.css({left:0,top:-48}):e.elemTemp.css("margin-right",w.outerWidth()+15)}t.disabled?(e.elemTemp.addClass(l),e.elemTemp.find("."+u).addClass(l)):e.slide(),e.elemTemp.find("."+u).on("mouseover",function(){var a="vertical"===t.type?t.height:e.elemTemp[0].offsetWidth,n=e.elemTemp.find("."+o),l="vertical"===t.type?a-i(this).parent()[0].offsetTop-n.height():i(this).parent()[0].offsetLeft,s=l/a*100,r=i(this).parent().data("value"),u=t.setTips?t.setTips(r):r;e.elemTemp.find("."+d).html(u),"vertical"===t.type?e.elemTemp.find("."+d).css({bottom:s+"%","margin-bottom":"20px",display:"inline-block"}):e.elemTemp.find("."+d).css({left:s+"%",display:"inline-block"})}).on("mouseout",function(){e.elemTemp.find("."+d).css("display","none")})},p.prototype.slide=function(e,t,a){var n=this,l=n.config,s=n.elemTemp,p=function(){return"vertical"===l.type?l.height:s[0].offsetWidth},h=s.find("."+o),y=s.next("."+v),g=y.children("."+c).children("input").val(),b=100/((l.max-l.min)/Math.ceil(l.step)),x=function(e,i){e=Math.ceil(e)*b>100?Math.ceil(e)*b:Math.round(e)*b,e=e>100?100:e,h.eq(i).css("vertical"===l.type?"bottom":"left",e+"%");var t=T(h[0].offsetLeft),a=l.range?T(h[1].offsetLeft):0;"vertical"===l.type?(s.find("."+d).css({bottom:e+"%","margin-bottom":"20px"}),t=T(p()-h[0].offsetTop-h.height()),a=l.range?T(p()-h[1].offsetTop-h.height()):0):s.find("."+d).css("left",e+"%"),t=t>100?100:t,a=a>100?100:a;var n=Math.min(t,a),o=Math.abs(t-a);"vertical"===l.type?s.find("."+r).css({height:o+"%",bottom:n+"%"}):s.find("."+r).css({width:o+"%",left:n+"%"});var u=l.min+Math.round((l.max-l.min)*e/100);if(g=u,y.children("."+c).children("input").val(g),h.eq(i).data("value",u),u=l.setTips?l.setTips(u):u,s.find("."+d).html(u),l.range){var v=[h.eq(0).data("value"),h.eq(1).data("value")];v[0]>v[1]&&v.reverse()}l.change&&l.change(l.range?v:u)},T=function(e){var i=e/p()*100/b,t=Math.round(i)*b;return e==p()&&(t=Math.ceil(i)*b),t},w=i(['
    p()&&(r=p());var o=r/p()*100/b;x(o,e),t.addClass(m),s.find("."+d).show(),i.preventDefault()},o=function(){t.removeClass(m),s.find("."+d).hide()};M(r,o)})}),s.on("click",function(e){var t=i("."+u);if(!t.is(event.target)&&0===t.has(event.target).length&&t.length){var a,n="vertical"===l.type?p()-e.clientY+i(this).offset().top:e.clientX-i(this).offset().left;n<0&&(n=0),n>p()&&(n=p());var s=n/p()*100/b;a=l.range?"vertical"===l.type?Math.abs(n-parseInt(i(h[0]).css("bottom")))>Math.abs(n-parseInt(i(h[1]).css("bottom")))?1:0:Math.abs(n-h[0].offsetLeft)>Math.abs(n-h[1].offsetLeft)?1:0:0,x(s,a),e.preventDefault()}}),y.hover(function(){var e=i(this);e.children("."+f).fadeIn("fast")},function(){var e=i(this);e.children("."+f).fadeOut("fast")}),y.children("."+f).children("i").each(function(e){i(this).on("click",function(){g=1==e?g-bl.max?l.max:Number(g)+b;var i=(g-l.min)/(l.max-l.min)*100/b;x(i,0)})});var q=function(){var e=this.value;e=isNaN(e)?0:e,e=el.max?l.max:e,this.value=e;var i=(e-l.min)/(l.max-l.min)*100/b;x(i,0)};y.children("."+c).children("input").on("keydown",function(e){13===e.keyCode&&(e.preventDefault(),q.call(this))}).on("change",q)},p.prototype.events=function(){var e=this;e.config},t.render=function(e){var i=new p(e);return a.call(i)},e(n,t)}); -------------------------------------------------------------------------------- /web/layui/lay/modules/tree.js: -------------------------------------------------------------------------------- 1 | /** layui-v2.4.3 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+"元素")})}); -------------------------------------------------------------------------------- /web/layui/lay/modules/upload.js: -------------------------------------------------------------------------------- 1 | /** layui-v2.4.3 MIT License By https://www.layui.com */ 2 | ;layui.define("layer",function(e){"use strict";var i=layui.$,t=layui.layer,n=layui.hint(),a=layui.device(),o={config:{},set:function(e){var t=this;return t.config=i.extend({},t.config,e),t},on:function(e,i){return layui.onevent.call(this,r,e,i)}},l=function(){var e=this;return{upload:function(i){e.upload.call(e,i)},config:e.config}},r="upload",u="layui-upload-file",c="layui-upload-form",f="layui-upload-iframe",s="layui-upload-choose",p=function(e){var t=this;t.config=i.extend({},t.config,o.config,e),t.render()};p.prototype.config={accept:"images",exts:"",auto:!0,bindAction:"",url:"",field:"file",method:"post",data:{},drag:!0,size:0,number:0,multiple:!1},p.prototype.render=function(e){var t=this,e=t.config;e.elem=i(e.elem),e.bindAction=i(e.bindAction),t.file(),t.events()},p.prototype.file=function(){var e=this,t=e.config,n=e.elemFile=i(['"].join("")),o=t.elem.next();(o.hasClass(u)||o.hasClass(c))&&o.remove(),a.ie&&a.ie<10&&t.elem.wrap('
      '),e.isFile()?(e.elemFile=t.elem,t.field=t.elem[0].name):t.elem.after(n),a.ie&&a.ie<10&&e.initIE()},p.prototype.initIE=function(){var e=this,t=e.config,n=i(''),a=i(['
      ',"
      "].join(""));i("#"+f)[0]||i("body").append(n),t.elem.next().hasClass(c)||(e.elemFile.wrap(a),t.elem.next("."+c).append(function(){var e=[];return layui.each(t.data,function(i,t){t="function"==typeof t?t():t,e.push('')}),e.join("")}()))},p.prototype.msg=function(e){return t.msg(e,{icon:2,shift:6})},p.prototype.isFile=function(){var e=this.config.elem[0];if(e)return"input"===e.tagName.toLocaleLowerCase()&&"file"===e.type},p.prototype.preview=function(e){var i=this;window.FileReader&&layui.each(i.chooseFiles,function(i,t){var n=new FileReader;n.readAsDataURL(t),n.onload=function(){e&&e(i,t,this.result)}})},p.prototype.upload=function(e,t){var n,o=this,l=o.config,r=o.elemFile[0],u=function(){var t=0,n=0,a=e||o.files||o.chooseFiles||r.files,u=function(){l.multiple&&t+n===o.fileLength&&"function"==typeof l.allDone&&l.allDone({total:o.fileLength,successful:t,aborted:n})};layui.each(a,function(e,a){var r=new FormData;r.append(l.field,a),layui.each(l.data,function(e,i){i="function"==typeof i?i():i,r.append(e,i)}),i.ajax({url:l.url,type:"post",data:r,contentType:!1,processData:!1,dataType:"json",headers:l.headers||{},success:function(i){t++,d(e,i),u()},error:function(){n++,o.msg("请求上传接口出现异常"),m(e),u()}})})},c=function(){var e=i("#"+f);o.elemFile.parent().submit(),clearInterval(p.timer),p.timer=setInterval(function(){var i,t=e.contents().find("body");try{i=t.text()}catch(n){o.msg("获取上传后的响应信息出现异常"),clearInterval(p.timer),m()}i&&(clearInterval(p.timer),t.html(""),d(0,i))},30)},d=function(e,i){if(o.elemFile.next("."+s).remove(),r.value="","object"!=typeof i)try{i=JSON.parse(i)}catch(t){return i={},o.msg("请对上传接口返回有效JSON")}"function"==typeof l.done&&l.done(i,e||0,function(e){o.upload(e)})},m=function(e){l.auto&&(r.value=""),"function"==typeof l.error&&l.error(e||0,function(e){o.upload(e)})},h=l.exts,v=function(){var i=[];return layui.each(e||o.chooseFiles,function(e,t){i.push(t.name)}),i}(),g={preview:function(e){o.preview(e)},upload:function(e,i){var t={};t[e]=i,o.upload(t)},pushFile:function(){return o.files=o.files||{},layui.each(o.chooseFiles,function(e,i){o.files[e]=i}),o.files},resetFile:function(e,i,t){var n=new File([i],t);o.files=o.files||{},o.files[e]=n}},y=function(){if("choose"!==t&&!l.auto||(l.choose&&l.choose(g),"choose"!==t))return l.before&&l.before(g),a.ie?a.ie>9?u():c():void u()};if(v=0===v.length?r.value.match(/[^\/\\]+\..+/g)||[]||"":v,0!==v.length){switch(l.accept){case"file":if(h&&!RegExp("\\w\\.("+h+")$","i").test(escape(v)))return o.msg("选择的文件中包含不支持的格式"),r.value="";break;case"video":if(!RegExp("\\w\\.("+(h||"avi|mp4|wma|rmvb|rm|flash|3gp|flv")+")$","i").test(escape(v)))return o.msg("选择的视频中包含不支持的格式"),r.value="";break;case"audio":if(!RegExp("\\w\\.("+(h||"mp3|wav|mid")+")$","i").test(escape(v)))return o.msg("选择的音频中包含不支持的格式"),r.value="";break;default:if(layui.each(v,function(e,i){RegExp("\\w\\.("+(h||"jpg|png|gif|bmp|jpeg$")+")","i").test(escape(i))||(n=!0)}),n)return o.msg("选择的图片中包含不支持的格式"),r.value=""}if(o.fileLength=function(){var i=0,t=e||o.files||o.chooseFiles||r.files;return layui.each(t,function(){i++}),i}(),l.number&&o.fileLength>l.number)return o.msg("同时最多只能上传的数量为:"+l.number);if(l.size>0&&!(a.ie&&a.ie<10)){var F;if(layui.each(o.chooseFiles,function(e,i){if(i.size>1024*l.size){var t=l.size/1024;t=t>=1?t.toFixed(2)+"MB":l.size+"KB",r.value="",F=t}}),F)return o.msg("文件不能超过"+F)}y()}},p.prototype.events=function(){var e=this,t=e.config,o=function(i){e.chooseFiles={},layui.each(i,function(i,t){var n=(new Date).getTime();e.chooseFiles[n+"-"+i]=t})},l=function(i,n){var a=e.elemFile,o=i.length>1?i.length+"个文件":(i[0]||{}).name||a[0].value.match(/[^\/\\]+\..+/g)||[]||"";a.next().hasClass(s)&&a.next().remove(),e.upload(null,"choose"),e.isFile()||t.choose||a.after(''+o+"")};t.elem.off("upload.start").on("upload.start",function(){var a=i(this),o=a.attr("lay-data");if(o)try{o=new Function("return "+o)(),e.config=i.extend({},t,o)}catch(l){n.error("Upload element property lay-data configuration item has a syntax error: "+o)}e.config.item=a,e.elemFile[0].click()}),a.ie&&a.ie<10||t.elem.off("upload.over").on("upload.over",function(){var e=i(this);e.attr("lay-over","")}).off("upload.leave").on("upload.leave",function(){var e=i(this);e.removeAttr("lay-over")}).off("upload.drop").on("upload.drop",function(n,a){var r=i(this),u=a.originalEvent.dataTransfer.files||[];r.removeAttr("lay-over"),o(u),t.auto?e.upload(u):l(u)}),e.elemFile.off("upload.change").on("upload.change",function(){var i=this.files||[];o(i),t.auto?e.upload():l(i)}),t.bindAction.off("upload.action").on("upload.action",function(){e.upload()}),t.elem.data("haveEvents")||(e.elemFile.on("change",function(){i(this).trigger("upload.change")}),t.elem.on("click",function(){e.isFile()||i(this).trigger("upload.start")}),t.drag&&t.elem.on("dragover",function(e){e.preventDefault(),i(this).trigger("upload.over")}).on("dragleave",function(e){i(this).trigger("upload.leave")}).on("drop",function(e){e.preventDefault(),i(this).trigger("upload.drop",e)}),t.bindAction.on("click",function(){i(this).trigger("upload.action")}),t.elem.data("haveEvents",!0))},o.render=function(e){var i=new p(e);return l.call(i)},e(r,o)}); -------------------------------------------------------------------------------- /web/layui/lay/modules/util.js: -------------------------------------------------------------------------------- 1 | /** layui-v2.4.3 MIT License By https://www.layui.com */ 2 | ;layui.define("jquery",function(t){"use strict";var e=layui.$,i={fixbar:function(t){var i,a,n="layui-fixbar",r="layui-fixbar-top",o=e(document),l=e("body");t=e.extend({showHeight:200},t),t.bar1=t.bar1===!0?"":t.bar1,t.bar2=t.bar2===!0?"":t.bar2,t.bgcolor=t.bgcolor?"background-color:"+t.bgcolor:"";var c=[t.bar1,t.bar2,""],g=e(['
        ',t.bar1?'
      • '+c[0]+"
      • ":"",t.bar2?'
      • '+c[1]+"
      • ":"",'
      • '+c[2]+"
      • ","
      "].join("")),s=g.find("."+r),u=function(){var e=o.scrollTop();e>=t.showHeight?i||(s.show(),i=1):i&&(s.hide(),i=0)};e("."+n)[0]||("object"==typeof t.css&&g.css(t.css),l.append(g),u(),g.find("li").on("click",function(){var i=e(this),a=i.attr("lay-type");"top"===a&&e("html,body").animate({scrollTop:0},200),t.click&&t.click.call(this,a)}),o.on("scroll",function(){clearTimeout(a),a=setTimeout(function(){u()},100)}))},countdown:function(t,e,i){var a=this,n="function"==typeof e,r=new Date(t).getTime(),o=new Date(!e||n?(new Date).getTime():e).getTime(),l=r-o,c=[Math.floor(l/864e5),Math.floor(l/36e5)%24,Math.floor(l/6e4)%60,Math.floor(l/1e3)%60];n&&(i=e);var g=setTimeout(function(){a.countdown(t,o+1e3,i)},1e3);return i&&i(l>0?c:[0,0,0,0],e,g),l<=0&&clearTimeout(g),g},timeAgo:function(t,e){var i=this,a=[[],[]],n=(new Date).getTime()-new Date(t).getTime();return n>6912e5?(n=new Date(t),a[0][0]=i.digit(n.getFullYear(),4),a[0][1]=i.digit(n.getMonth()+1),a[0][2]=i.digit(n.getDate()),e||(a[1][0]=i.digit(n.getHours()),a[1][1]=i.digit(n.getMinutes()),a[1][2]=i.digit(n.getSeconds())),a[0].join("-")+" "+a[1].join(":")):n>=864e5?(n/1e3/60/60/24|0)+"天前":n>=36e5?(n/1e3/60/60|0)+"小时前":n>=12e4?(n/1e3/60|0)+"分钟前":n<0?"未来":"刚刚"},digit:function(t,e){var i="";t=String(t),e=e||2;for(var a=t.length;a/g,">").replace(/'/g,"'").replace(/"/g,""")}};!function(t,e,i){"$:nomunge";function a(){n=e[l](function(){r.each(function(){var e=t(this),i=e.width(),a=e.height(),n=t.data(this,g);(i!==n.w||a!==n.h)&&e.trigger(c,[n.w=i,n.h=a])}),a()},o[s])}var n,r=t([]),o=t.resize=t.extend(t.resize,{}),l="setTimeout",c="resize",g=c+"-special-event",s="delay",u="throttleWindow";o[s]=250,o[u]=!0,t.event.special[c]={setup:function(){if(!o[u]&&this[l])return!1;var e=t(this);r=r.add(e),t.data(this,g,{w:e.width(),h:e.height()}),1===r.length&&a()},teardown:function(){if(!o[u]&&this[l])return!1;var e=t(this);r=r.not(e),e.removeData(g),r.length||clearTimeout(n)},add:function(e){function a(e,a,r){var o=t(this),l=t.data(this,g)||{};l.w=a!==i?a:o.width(),l.h=r!==i?r:o.height(),n.apply(this,arguments)}if(!o[u]&&this[l])return!1;var n;return t.isFunction(e)?(n=e,a):(n=e.handler,void(e.handler=a))}}}(e,window),t("util",i)}); -------------------------------------------------------------------------------- /web/layui/layui.js: -------------------------------------------------------------------------------- 1 | /** layui-v2.4.3 MIT License By https://www.layui.com */ 2 | ;!function(e){"use strict";var t=document,o={modules:{},status:{},timeout:10,event:{}},n=function(){this.v="2.4.3"},r=function(){var e=t.currentScript?t.currentScript.src:function(){for(var e,o=t.scripts,n=o.length-1,r=n;r>0;r--)if("interactive"===o[r].readyState){e=o[r].src;break}return e||o[n].src}();return e.substring(0,e.lastIndexOf("/")+1)}(),i=function(t){e.console&&console.error&&console.error("Layui hint: "+t)},a="undefined"!=typeof opera&&"[object Opera]"===opera.toString(),u={layer:"modules/layer",laydate:"modules/laydate",laypage:"modules/laypage",laytpl:"modules/laytpl",layim:"modules/layim",layedit:"modules/layedit",form:"modules/form",upload:"modules/upload",tree:"modules/tree",table:"modules/table",element:"modules/element",rate:"modules/rate",colorpicker:"modules/colorpicker",slider:"modules/slider",carousel:"modules/carousel",flow:"modules/flow",util:"modules/util",code:"modules/code",jquery:"modules/jquery",mobile:"modules/mobile","layui.all":"../layui.all"};n.prototype.cache=o,n.prototype.define=function(e,t){var n=this,r="function"==typeof e,i=function(){var e=function(e,t){layui[e]=t,o.status[e]=!0};return"function"==typeof t&&t(function(n,r){e(n,r),o.callback[n]=function(){t(e)}}),this};return r&&(t=e,e=[]),layui["layui.all"]||!layui["layui.all"]&&layui["layui.mobile"]?i.call(n):(n.use(e,i),n)},n.prototype.use=function(e,n,l){function s(e,t){var n="PLaySTATION 3"===navigator.platform?/^complete$/:/^(complete|loaded)$/;("load"===e.type||n.test((e.currentTarget||e.srcElement).readyState))&&(o.modules[f]=t,d.removeChild(v),function r(){return++m>1e3*o.timeout/4?i(f+" is not a valid module"):void(o.status[f]?c():setTimeout(r,4))}())}function c(){l.push(layui[f]),e.length>1?y.use(e.slice(1),n,l):"function"==typeof n&&n.apply(layui,l)}var y=this,p=o.dir=o.dir?o.dir:r,d=t.getElementsByTagName("head")[0];e="string"==typeof e?[e]:e,window.jQuery&&jQuery.fn.on&&(y.each(e,function(t,o){"jquery"===o&&e.splice(t,1)}),layui.jquery=layui.$=jQuery);var f=e[0],m=0;if(l=l||[],o.host=o.host||(p.match(/\/\/([\s\S]+?)\//)||["//"+location.host+"/"])[0],0===e.length||layui["layui.all"]&&u[f]||!layui["layui.all"]&&layui["layui.mobile"]&&u[f])return c(),y;if(o.modules[f])!function g(){return++m>1e3*o.timeout/4?i(f+" is not a valid module"):void("string"==typeof o.modules[f]&&o.status[f]?c():setTimeout(g,4))}();else{var v=t.createElement("script"),h=(u[f]?p+"lay/":/^\{\/\}/.test(y.modules[f])?"":o.base||"")+(y.modules[f]||f)+".js";h=h.replace(/^\{\/\}/,""),v.async=!0,v.charset="utf-8",v.src=h+function(){var e=o.version===!0?o.v||(new Date).getTime():o.version||"";return e?"?v="+e:""}(),d.appendChild(v),!v.attachEvent||v.attachEvent.toString&&v.attachEvent.toString().indexOf("[native code")<0||a?v.addEventListener("load",function(e){s(e,h)},!1):v.attachEvent("onreadystatechange",function(e){s(e,h)}),o.modules[f]=h}return y},n.prototype.getStyle=function(t,o){var n=t.currentStyle?t.currentStyle:e.getComputedStyle(t,null);return n[n.getPropertyValue?"getPropertyValue":"getAttribute"](o)},n.prototype.link=function(e,n,r){var a=this,u=t.createElement("link"),l=t.getElementsByTagName("head")[0];"string"==typeof n&&(r=n);var s=(r||e).replace(/\.|\//g,""),c=u.id="layuicss-"+s,y=0;return u.rel="stylesheet",u.href=e+(o.debug?"?v="+(new Date).getTime():""),u.media="all",t.getElementById(c)||l.appendChild(u),"function"!=typeof n?a:(function p(){return++y>1e3*o.timeout/100?i(e+" timeout"):void(1989===parseInt(a.getStyle(t.getElementById(c),"width"))?function(){n()}():setTimeout(p,100))}(),a)},o.callback={},n.prototype.factory=function(e){if(layui[e])return"function"==typeof o.callback[e]?o.callback[e]:null},n.prototype.addcss=function(e,t,n){return layui.link(o.dir+"css/"+e,t,n)},n.prototype.img=function(e,t,o){var n=new Image;return n.src=e,n.complete?t(n):(n.onload=function(){n.onload=null,"function"==typeof t&&t(n)},void(n.onerror=function(e){n.onerror=null,"function"==typeof o&&o(e)}))},n.prototype.config=function(e){e=e||{};for(var t in e)o[t]=e[t];return this},n.prototype.modules=function(){var e={};for(var t in u)e[t]=u[t];return e}(),n.prototype.extend=function(e){var t=this;e=e||{};for(var o in e)t[o]||t.modules[o]?i("模块名 "+o+" 已被占用"):t.modules[o]=e[o];return t},n.prototype.router=function(e){var t=this,e=e||location.hash,o={path:[],search:{},hash:(e.match(/[^#](#.*$)/)||[])[1]||""};return/^#\//.test(e)?(e=e.replace(/^#\//,""),o.href="/"+e,e=e.replace(/([^#])(#.*$)/,"$1").split("/")||[],t.each(e,function(e,t){/^\w+=/.test(t)?function(){t=t.split("="),o.search[t[0]]=t[1]}():o.path.push(t)}),o):o},n.prototype.data=function(t,o,n){if(t=t||"layui",n=n||localStorage,e.JSON&&e.JSON.parse){if(null===o)return delete n[t];o="object"==typeof o?o:{key:o};try{var r=JSON.parse(n[t])}catch(i){var r={}}return"value"in o&&(r[o.key]=o.value),o.remove&&delete r[o.key],n[t]=JSON.stringify(r),o.key?r[o.key]:r}},n.prototype.sessionData=function(e,t){return this.data(e,t,sessionStorage)},n.prototype.device=function(t){var o=navigator.userAgent.toLowerCase(),n=function(e){var t=new RegExp(e+"/([^\\s\\_\\-]+)");return e=(o.match(t)||[])[1],e||!1},r={os:function(){return/windows/.test(o)?"windows":/linux/.test(o)?"linux":/iphone|ipod|ipad|ios/.test(o)?"ios":/mac/.test(o)?"mac":void 0}(),ie:function(){return!!(e.ActiveXObject||"ActiveXObject"in e)&&((o.match(/msie\s(\d+)/)||[])[1]||"11")}(),weixin:n("micromessenger")};return t&&!r[t]&&(r[t]=n(t)),r.android=/android/.test(o),r.ios="ios"===r.os,r},n.prototype.hint=function(){return{error:i}},n.prototype.each=function(e,t){var o,n=this;if("function"!=typeof t)return n;if(e=e||[],e.constructor===Object){for(o in e)if(t.call(e[o],o,e[o]))break}else for(o=0;oi?1:r