├── .gitattributes ├── .gitignore ├── README.md ├── code ├── .gitignore ├── NEWS_CMS.sql ├── pom.xml └── src │ ├── main │ ├── java │ │ └── com │ │ │ └── smtboy │ │ │ └── news │ │ │ ├── NewsApplication.java │ │ │ ├── common │ │ │ ├── Const.java │ │ │ ├── ResponseCode.java │ │ │ └── ServerResponse.java │ │ │ ├── config │ │ │ ├── CorsConfig.java │ │ │ └── WebConfigurer.java │ │ │ ├── controller │ │ │ └── backend │ │ │ │ ├── NewsController.java │ │ │ │ ├── NewsProgramController.java │ │ │ │ └── UserController.java │ │ │ ├── dao │ │ │ ├── NewsMapper.java │ │ │ ├── NewsProgramMapper.java │ │ │ └── UserMapper.java │ │ │ ├── interceptor │ │ │ └── LoginInterceptor.java │ │ │ ├── pojo │ │ │ ├── News.java │ │ │ ├── NewsProgram.java │ │ │ └── User.java │ │ │ ├── request │ │ │ ├── PostNewsMessageVo.java │ │ │ └── PutUserMessageVo.java │ │ │ ├── service │ │ │ ├── INewsProgramService.java │ │ │ ├── INewsService.java │ │ │ ├── IUserService.java │ │ │ └── impl │ │ │ │ ├── NewsProgramServiceImpl.java │ │ │ │ ├── NewsServiceImpl.java │ │ │ │ └── UserServiceImpl.java │ │ │ ├── util │ │ │ └── Sha256.java │ │ │ └── vo │ │ │ ├── UserLoginVo.java │ │ │ └── UserMessageVo.java │ └── resources │ │ ├── application.yml │ │ └── mappers │ │ ├── NewsMapper.xml │ │ ├── NewsProgramMapper.xml │ │ └── UserMapper.xml │ └── test │ └── java │ └── com │ └── smtboy │ └── news │ ├── MyTest.java │ └── NewsApplicationTests.java └── page ├── .gitignore ├── 151688086754999.png ├── README.md ├── favicon.ico ├── index.html ├── json └── menu.json ├── lib └── 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 │ └── iconfont.woff2 │ ├── 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 │ │ ├── transfer.js │ │ ├── tree.js │ │ ├── upload.js │ │ └── util.js │ └── treeGird.js │ ├── layui.all.js │ └── layui.js ├── login.html ├── pages ├── 404.html ├── admin │ ├── add.html │ ├── cate.html │ ├── edit.html │ ├── list.html │ ├── role-add.html │ ├── role.html │ └── rule.html ├── article │ ├── add.html │ ├── category-add.html │ ├── category-add.html.bak │ ├── category-edit.html │ ├── category-edit.html.bak │ ├── category-edit.js │ ├── category.html │ ├── category.html.bak │ ├── category.js │ ├── edit.html │ ├── list.html │ ├── list.js │ └── 复制 list.html ├── echarts │ ├── echarts1.html │ ├── echarts2.html │ ├── echarts3.html │ ├── echarts4.html │ ├── echarts5.html │ ├── echarts6.html │ ├── echarts7.html │ ├── echarts8.html │ └── echarts9.html ├── member │ ├── add.html │ ├── add2.html │ ├── addInput.html │ ├── del.html │ ├── edit.html │ ├── index.js │ ├── list.html │ ├── list2.html │ └── password.html ├── order │ ├── add.html │ └── list.html └── welcome.html ├── static ├── css │ ├── font.css │ ├── weadmin.css │ └── weadmin.less ├── fonts │ ├── iconfont.eot │ ├── iconfont.svg │ ├── iconfont.ttf │ └── iconfont.woff ├── images │ ├── aiwrap.png │ ├── bg.png │ ├── mapico1.png │ ├── mapico2.png │ ├── mapico3.png │ └── mapico4.png └── js │ ├── admin.js │ ├── eleDel.js │ ├── extends │ └── tabmenu.js │ ├── menu.1.js │ ├── menu.js │ └── weadmin.js └── user.json /.gitattributes: -------------------------------------------------------------------------------- 1 | *.js linguist-language=java 2 | *.html linguist-language=java 3 | -------------------------------------------------------------------------------- /.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 | 22 | ### NetBeans ### 23 | /nbproject/private/ 24 | /nbbuild/ 25 | /dist/ 26 | /nbdist/ 27 | /.nb-gradle/ 28 | build/ 29 | 30 | ### VS Code ### 31 | .vscode/ 32 | 33 | 34 | *.class 35 | 36 | #package file 37 | *.war 38 | *.ear 39 | 40 | #kdiff3 ignore 41 | *.orig 42 | 43 | 44 | 45 | #eclipse ignore 46 | .settings/ 47 | .project 48 | .classpatch 49 | 50 | #idea 51 | .idea/ 52 | /idea/ 53 | *.ipr 54 | *.iml 55 | *.iws 56 | 57 | #temp file 58 | *.log 59 | *.cache 60 | *.diff 61 | *.patch 62 | *.tmp 63 | 64 | #system ignore 65 | .DS_Store 66 | Thumbs.db 67 | 68 | generatorConfig.xml 69 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # NewsCMS 2 | 基于SpringBoot的新闻管理发布系统,新闻后台管理系统。 3 | 4 | ## 项目介绍 5 | 本项目采用前后端分离,接口开发模式进行开发。前台使用[WeAdmin](https://github.com/WangEn/WeAdmin)来进行对接。 6 | 7 | 项目规模较小,主要用于划水期末jsp作业,如果能帮助到你,不妨给一个star支持一下。 8 | 9 | ## 部分效果图 10 | 11 | 登陆页 12 | 13 | ![image-20200524181206706](https://tva1.sinaimg.cn/large/007S8ZIlgy1gf3pdex436j31d00u01ky.jpg) 14 | 15 | 用户管理 16 | 17 | ![image-20200524182501773](https://tva1.sinaimg.cn/large/007S8ZIlgy1gf3pqsspwwj31d00u0wod.jpg) 18 | 19 | 文章管理 20 | 21 | ![image-20200524181515531](https://tva1.sinaimg.cn/large/007S8ZIlgy1gf3pgmtf7ij31d00u0tin.jpg) 22 | 23 | 分类管理 24 | 25 | ![image-20200524181526047](https://tva1.sinaimg.cn/large/007S8ZIlgy1gf3pgt9gc1j31d00u011k.jpg) -------------------------------------------------------------------------------- /code/.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 | 22 | ### NetBeans ### 23 | /nbproject/private/ 24 | /nbbuild/ 25 | /dist/ 26 | /nbdist/ 27 | /.nb-gradle/ 28 | build/ 29 | 30 | ### VS Code ### 31 | .vscode/ 32 | 33 | 34 | *.class 35 | 36 | #package file 37 | *.war 38 | *.ear 39 | 40 | #kdiff3 ignore 41 | *.orig 42 | 43 | 44 | 45 | #eclipse ignore 46 | .settings/ 47 | .project 48 | .classpatch 49 | 50 | #idea 51 | .idea/ 52 | /idea/ 53 | *.ipr 54 | *.iml 55 | *.iws 56 | 57 | #temp file 58 | *.log 59 | *.cache 60 | *.diff 61 | *.patch 62 | *.tmp 63 | 64 | #system ignore 65 | .DS_Store 66 | Thumbs.db 67 | 68 | generatorConfig.xml -------------------------------------------------------------------------------- /code/NEWS_CMS.sql: -------------------------------------------------------------------------------- 1 | /* 2 | Navicat Premium Data Transfer 3 | 4 | Source Server : DoyledeMacBook-Pro 5 | Source Server Type : MySQL 6 | Source Server Version : 80017 7 | Source Host : localhost:3306 8 | Source Schema : NEWS_CMS 9 | 10 | Target Server Type : MySQL 11 | Target Server Version : 80017 12 | File Encoding : 65001 13 | 14 | Date: 24/05/2020 17:40:13 15 | */ 16 | 17 | SET NAMES utf8mb4; 18 | SET FOREIGN_KEY_CHECKS = 0; 19 | 20 | -- ---------------------------- 21 | -- Table structure for ddcms_news 22 | -- ---------------------------- 23 | DROP TABLE IF EXISTS `ddcms_news`; 24 | CREATE TABLE `ddcms_news` ( 25 | `id` int(11) NOT NULL AUTO_INCREMENT COMMENT '新闻表id', 26 | `p_id` int(11) NOT NULL COMMENT '新闻栏目ID', 27 | `user_id` int(11) NOT NULL COMMENT '新闻发布用户ID', 28 | `title` varchar(250) NOT NULL COMMENT '标题', 29 | `content` varchar(250) NOT NULL COMMENT '内容', 30 | `read_count` int(11) NOT NULL COMMENT '阅读数量', 31 | `type` varchar(250) NOT NULL COMMENT '新闻状态,0正常,1审核,2删除', 32 | `create_time` datetime NOT NULL COMMENT '创建时间', 33 | `update_time` datetime NOT NULL COMMENT '最后一次更新时间', 34 | PRIMARY KEY (`id`), 35 | KEY `user_id_index` (`user_id`) USING BTREE 36 | ) ENGINE=InnoDB AUTO_INCREMENT=10008 DEFAULT CHARSET=utf8; 37 | 38 | -- ---------------------------- 39 | -- Table structure for ddcms_news_program 40 | -- ---------------------------- 41 | DROP TABLE IF EXISTS `ddcms_news_program`; 42 | CREATE TABLE `ddcms_news_program` ( 43 | `id` int(11) NOT NULL AUTO_INCREMENT COMMENT '新闻栏目表id', 44 | `name` varchar(50) NOT NULL COMMENT '栏目名称', 45 | `create_time` datetime NOT NULL COMMENT '创建时间', 46 | `update_time` datetime NOT NULL COMMENT '最后一次更新时间', 47 | PRIMARY KEY (`id`) 48 | ) ENGINE=InnoDB AUTO_INCREMENT=10004 DEFAULT CHARSET=utf8; 49 | 50 | -- ---------------------------- 51 | -- Table structure for ddcms_user 52 | -- ---------------------------- 53 | DROP TABLE IF EXISTS `ddcms_user`; 54 | CREATE TABLE `ddcms_user` ( 55 | `id` int(11) NOT NULL AUTO_INCREMENT COMMENT '用户表id', 56 | `name` varchar(100) NOT NULL COMMENT '用户名', 57 | `password` varchar(250) NOT NULL COMMENT '密码', 58 | `mobile` varchar(50) NOT NULL COMMENT '手机号', 59 | `mail` varchar(250) NOT NULL COMMENT '邮箱', 60 | `type` varchar(250) NOT NULL COMMENT '用户状态,0正常', 61 | `create_time` datetime NOT NULL COMMENT '创建时间', 62 | `update_time` datetime NOT NULL COMMENT '最后一次更新时间', 63 | PRIMARY KEY (`id`) 64 | ) ENGINE=InnoDB AUTO_INCREMENT=10012 DEFAULT CHARSET=utf8; 65 | 66 | SET FOREIGN_KEY_CHECKS = 1; 67 | -------------------------------------------------------------------------------- /code/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 4.0.0 6 | 7 | org.springframework.boot 8 | spring-boot-starter-parent 9 | 2.3.0.RELEASE 10 | 11 | 12 | com.smtboy 13 | news 14 | 0.0.1-SNAPSHOT 15 | news 16 | Demo project for Spring Boot 17 | 18 | 19 | 1.8 20 | 21 | 22 | 23 | 24 | 25 | 26 | com.github.pagehelper 27 | pagehelper-spring-boot-starter 28 | 1.2.10 29 | 30 | 31 | 32 | com.alibaba 33 | druid 34 | 1.1.21 35 | 36 | 37 | 38 | 39 | 40 | 41 | org.codehaus.jackson 42 | jackson-mapper-asl 43 | 1.9.13 44 | 45 | 46 | 47 | org.springframework.boot 48 | spring-boot-starter-jdbc 49 | 50 | 51 | org.springframework.boot 52 | spring-boot-starter-web 53 | 54 | 55 | org.mybatis.spring.boot 56 | mybatis-spring-boot-starter 57 | 2.1.2 58 | 59 | 60 | 61 | mysql 62 | mysql-connector-java 63 | runtime 64 | 65 | 66 | org.projectlombok 67 | lombok 68 | true 69 | 70 | 71 | org.springframework.boot 72 | spring-boot-starter-test 73 | test 74 | 75 | 76 | org.junit.vintage 77 | junit-vintage-engine 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | org.springframework.boot 87 | spring-boot-maven-plugin 88 | 89 | 90 | 91 | org.mybatis.generator 92 | mybatis-generator-maven-plugin 93 | 1.3.7 94 | 95 | 96 | src/main/resources/generatorConfig.xml 97 | true 98 | true 99 | 100 | 101 | 102 | 103 | 104 | 105 | -------------------------------------------------------------------------------- /code/src/main/java/com/smtboy/news/NewsApplication.java: -------------------------------------------------------------------------------- 1 | package com.smtboy.news; 2 | 3 | import org.mybatis.spring.annotation.MapperScan; 4 | import org.springframework.boot.SpringApplication; 5 | import org.springframework.boot.autoconfigure.SpringBootApplication; 6 | 7 | 8 | @MapperScan("com.smtboy.news.dao") 9 | @SpringBootApplication 10 | public class NewsApplication { 11 | 12 | public static void main(String[] args) { 13 | SpringApplication.run(NewsApplication.class, args); 14 | } 15 | 16 | } 17 | -------------------------------------------------------------------------------- /code/src/main/java/com/smtboy/news/common/Const.java: -------------------------------------------------------------------------------- 1 | package com.smtboy.news.common; 2 | 3 | 4 | import java.util.Set; 5 | 6 | public class Const { 7 | 8 | public static final String REQUEST_PREFIX = "/api"; 9 | 10 | public static final String CURRENT_USER = "currentUser"; 11 | 12 | 13 | } 14 | -------------------------------------------------------------------------------- /code/src/main/java/com/smtboy/news/common/ResponseCode.java: -------------------------------------------------------------------------------- 1 | package com.smtboy.news.common; 2 | 3 | public enum ResponseCode { 4 | 5 | SUCCESS(0,"SUCCESS"), 6 | ERROR(1,"ERROR"), 7 | NEED_LOGIN(10,"NEED_LOGIN"), 8 | ILLEGAL_AUGUMENT(2,"ILLEGAL_AUGUMENT"); 9 | 10 | private final int code; 11 | private final String desc;//描述 12 | 13 | ResponseCode(int code, String desc){ 14 | this.code = code; 15 | this.desc = desc; 16 | } 17 | public int getCode(){ 18 | return code; 19 | } 20 | public String getDesc() { 21 | return desc; 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /code/src/main/java/com/smtboy/news/common/ServerResponse.java: -------------------------------------------------------------------------------- 1 | package com.smtboy.news.common; 2 | 3 | import org.codehaus.jackson.annotate.JsonIgnore; 4 | import org.codehaus.jackson.map.annotate.JsonSerialize; 5 | 6 | import java.io.Serializable; 7 | 8 | @JsonSerialize(include = JsonSerialize.Inclusion.NON_NULL) 9 | //保证序列化json的时候,如果是null对象,key也会消失 10 | public class ServerResponse implements Serializable { 11 | 12 | private int status; 13 | private String msg; 14 | private T data; 15 | 16 | private ServerResponse(int status){ 17 | this.status = status; 18 | } 19 | private ServerResponse(int status, T data){ 20 | this.status = status; 21 | this.data = data; 22 | } 23 | private ServerResponse(int status, String msg, T data){ 24 | this.status = status; 25 | this.msg = msg; 26 | this.data = data; 27 | } 28 | private ServerResponse(int status, String msg){ 29 | this.status = status; 30 | this.msg = msg; 31 | } 32 | @JsonIgnore 33 | //使之不在json序列化结果当中 34 | public boolean isSuccess(){ 35 | return this.status == ResponseCode.SUCCESS.getCode(); 36 | } 37 | 38 | public int getStatus() { 39 | return status; 40 | } 41 | 42 | public T getData() { 43 | return data; 44 | } 45 | 46 | public String getMsg() { 47 | return msg; 48 | } 49 | public static ServerResponse createBySuccess(){ 50 | return new ServerResponse(ResponseCode.SUCCESS.getCode()); 51 | } 52 | public static ServerResponse createBySuccessMessage(String msg){ 53 | return new ServerResponse(ResponseCode.SUCCESS.getCode(),msg); 54 | } 55 | public static ServerResponse createBySuccess(T data){ 56 | return new ServerResponse(ResponseCode.SUCCESS.getCode(),data); 57 | } 58 | public static ServerResponse createBySuccess(String msg,T data){ 59 | return new ServerResponse(ResponseCode.SUCCESS.getCode(),msg,data); 60 | } 61 | 62 | public static ServerResponse createByError(){ 63 | return new ServerResponse(ResponseCode.ERROR.getCode(),ResponseCode.ERROR.getDesc()); 64 | } 65 | public static ServerResponse createByErrorMessage(String errorMessage){ 66 | return new ServerResponse(ResponseCode.ERROR.getCode(), errorMessage); 67 | } 68 | public static ServerResponse createByErrorCodeMessage(int errorCode,String errorMessage){ 69 | return new ServerResponse(errorCode, errorMessage); 70 | } 71 | 72 | } 73 | -------------------------------------------------------------------------------- /code/src/main/java/com/smtboy/news/config/CorsConfig.java: -------------------------------------------------------------------------------- 1 | package com.smtboy.news.config; 2 | 3 | import org.springframework.context.annotation.Configuration; 4 | 5 | import org.springframework.web.servlet.config.annotation.CorsRegistry; 6 | 7 | import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter; 8 | 9 | 10 | 11 | @Configuration 12 | 13 | public class CorsConfig extends WebMvcConfigurerAdapter { 14 | 15 | 16 | 17 | @Override 18 | 19 | public void addCorsMappings(CorsRegistry registry) { 20 | 21 | registry.addMapping("/**") 22 | 23 | .allowedOrigins("*") 24 | 25 | .allowCredentials(true) 26 | 27 | .allowedMethods("GET", "POST", "DELETE", "PUT") 28 | 29 | .maxAge(3600); 30 | 31 | } 32 | 33 | 34 | 35 | } -------------------------------------------------------------------------------- /code/src/main/java/com/smtboy/news/config/WebConfigurer.java: -------------------------------------------------------------------------------- 1 | package com.smtboy.news.config; 2 | 3 | 4 | import com.smtboy.news.common.Const; 5 | import com.smtboy.news.interceptor.LoginInterceptor; 6 | import org.springframework.context.annotation.Bean; 7 | import org.springframework.context.annotation.Configuration; 8 | import org.springframework.web.servlet.config.annotation.InterceptorRegistry; 9 | import org.springframework.web.servlet.config.annotation.WebMvcConfigurer; 10 | 11 | @Configuration 12 | public class WebConfigurer implements WebMvcConfigurer { 13 | @Override 14 | public void addInterceptors(InterceptorRegistry registry) { 15 | registry.addInterceptor(LoginInterceptor()) 16 | .addPathPatterns("/user/**") 17 | .addPathPatterns("/newsProgram/**") 18 | .addPathPatterns("/news/**") 19 | .excludePathPatterns("/user/checkLogin") 20 | .excludePathPatterns("/user/login") 21 | .excludePathPatterns("/user/autoLogin"); 22 | } 23 | 24 | @Bean 25 | public LoginInterceptor LoginInterceptor() { 26 | return new LoginInterceptor(); 27 | } 28 | 29 | } -------------------------------------------------------------------------------- /code/src/main/java/com/smtboy/news/controller/backend/NewsController.java: -------------------------------------------------------------------------------- 1 | package com.smtboy.news.controller.backend; 2 | 3 | 4 | import com.smtboy.news.common.ServerResponse; 5 | import com.smtboy.news.request.PostNewsMessageVo; 6 | import com.smtboy.news.service.INewsService; 7 | import org.springframework.beans.factory.annotation.Autowired; 8 | import org.springframework.web.bind.annotation.*; 9 | 10 | import javax.servlet.http.HttpSession; 11 | 12 | /** 13 | * @author doyledai 14 | */ 15 | @RestController 16 | @RequestMapping("/news/") 17 | public class NewsController { 18 | 19 | @Autowired 20 | private INewsService iNewsService; 21 | 22 | @GetMapping("getAllNews") 23 | public ServerResponse getAllNews(@RequestParam(value="pageNum",defaultValue = "1",required = false) int pageNum, 24 | @RequestParam(value="pageSize",defaultValue = "10",required = false) int pageSize){ 25 | return iNewsService.getAllNews(pageNum, pageSize); 26 | } 27 | 28 | @GetMapping("getOneNews/{newsId}") 29 | public ServerResponse getOneNews(@PathVariable int newsId){ 30 | return iNewsService.getOneNews(newsId); 31 | } 32 | 33 | @PutMapping("putOneNews") 34 | public ServerResponse putOneNews( PostNewsMessageVo postNewsMessageVo){ 35 | return iNewsService.putOneNews(postNewsMessageVo); 36 | } 37 | 38 | @DeleteMapping("deleteOneNews/{newsId}") 39 | public ServerResponse deleteOneNews(@PathVariable int newsId){ 40 | return iNewsService.deleteOneNews(newsId); 41 | } 42 | 43 | @PostMapping("postOneNews") 44 | public ServerResponse postOneNews(PostNewsMessageVo postNewsMessageVo){ 45 | return iNewsService.postOneNews(postNewsMessageVo); 46 | } 47 | 48 | @PutMapping("operateOneNews/{newsId}/{type}") 49 | public ServerResponse operateOneNews(@PathVariable int newsId,@PathVariable String type){ 50 | return iNewsService.operateOneNews(newsId, type); 51 | } 52 | } 53 | -------------------------------------------------------------------------------- /code/src/main/java/com/smtboy/news/controller/backend/NewsProgramController.java: -------------------------------------------------------------------------------- 1 | package com.smtboy.news.controller.backend; 2 | 3 | 4 | import com.smtboy.news.common.Const; 5 | import com.smtboy.news.common.ServerResponse; 6 | import com.smtboy.news.service.INewsProgramService; 7 | import com.smtboy.news.vo.UserLoginVo; 8 | import org.springframework.beans.factory.annotation.Autowired; 9 | import org.springframework.web.bind.annotation.*; 10 | 11 | import javax.servlet.http.HttpSession; 12 | 13 | @RestController 14 | @RequestMapping("/newsProgram/") 15 | public class NewsProgramController { 16 | 17 | 18 | @Autowired 19 | private INewsProgramService iNewsProgramService; 20 | 21 | @GetMapping("getAllNewsProgram") 22 | public ServerResponse getAllNewsProgram( 23 | @RequestParam(value="pageNum",defaultValue = "1",required = false) int pageNum, 24 | @RequestParam(value="pageSize",defaultValue = "10",required = false) int pageSize){ 25 | 26 | return iNewsProgramService.getAllNewsProgram(pageNum, pageSize); 27 | } 28 | 29 | @PutMapping("putOneNewsProgram/{id}/{name}") 30 | public ServerResponse putOneNewsProgram(HttpSession session, @PathVariable int id,@PathVariable String name){ 31 | 32 | return iNewsProgramService.putOneNewsProgram(id, name); 33 | } 34 | 35 | @DeleteMapping("deleteOneNewsProgram/{id}") 36 | public ServerResponse deleteOneNewsProgram(HttpSession session,@PathVariable int id){ 37 | 38 | return iNewsProgramService.deleteOneNewsProgram(id); 39 | } 40 | 41 | @PostMapping("postOneNewsProgram") 42 | public ServerResponse postOneNewsProgram(HttpSession session,String name){ 43 | 44 | return iNewsProgramService.postOneNewsProgram(name); 45 | } 46 | 47 | } 48 | -------------------------------------------------------------------------------- /code/src/main/java/com/smtboy/news/controller/backend/UserController.java: -------------------------------------------------------------------------------- 1 | package com.smtboy.news.controller.backend; 2 | 3 | 4 | import com.smtboy.news.common.Const; 5 | import com.smtboy.news.common.ResponseCode; 6 | import com.smtboy.news.common.ServerResponse; 7 | import com.smtboy.news.request.PutUserMessageVo; 8 | import com.smtboy.news.service.IUserService; 9 | import org.springframework.beans.factory.annotation.Autowired; 10 | import org.springframework.web.bind.annotation.*; 11 | 12 | import javax.servlet.http.HttpSession; 13 | 14 | /** 15 | * @author doyledai 16 | */ 17 | @RestController 18 | @RequestMapping("/user/") 19 | public class UserController { 20 | 21 | @Autowired 22 | private IUserService iUserService; 23 | 24 | @PostMapping("login") 25 | public ServerResponse login(String username, String password, HttpSession session){ 26 | ServerResponse response = iUserService.login(username, password); 27 | if (response.isSuccess()){ 28 | session.setAttribute(Const.CURRENT_USER,response.getData()); 29 | } 30 | return response; 31 | } 32 | 33 | 34 | @PostMapping("autoLogin") 35 | public ServerResponse autoLogin(HttpSession session){ 36 | return iUserService.autoLogin(session); 37 | } 38 | 39 | @GetMapping("getAllUser") 40 | public ServerResponse getAllUser(HttpSession session, 41 | @RequestParam(value="pageNum",defaultValue = "1",required = false) int pageNum, 42 | @RequestParam(value="pageSize",defaultValue = "10",required = false) int pageSize){ 43 | // UserLoginVo userLoginVo = (UserLoginVo)session.getAttribute(Const.CURRENT_USER); 44 | // if (userLoginVo==null){ 45 | // return ServerResponse.createByErrorMessage("用户未登录"); 46 | // } 47 | return iUserService.getAllUser(pageNum, pageSize); 48 | } 49 | 50 | @GetMapping("getOneUser/{userId}") 51 | public ServerResponse getOneUser(HttpSession session,@PathVariable int userId){ 52 | // UserLoginVo userLoginVo = (UserLoginVo)session.getAttribute(Const.CURRENT_USER); 53 | // if (userLoginVo==null){ 54 | // return ServerResponse.createByErrorMessage("用户未登录"); 55 | // } 56 | return iUserService.getOneUser(userId); 57 | } 58 | 59 | @PutMapping("putOneUser") 60 | public ServerResponse putOneUser(HttpSession session, PutUserMessageVo putUserMessageVo){ 61 | // UserLoginVo userLoginVo = (UserLoginVo)session.getAttribute(Const.CURRENT_USER); 62 | // if (userLoginVo==null){ 63 | // return ServerResponse.createByErrorMessage("用户未登录"); 64 | // } 65 | return iUserService.putOneUser(putUserMessageVo); 66 | } 67 | 68 | @DeleteMapping("deleteOneUser/{userId}") 69 | public ServerResponse deleteOneUser(HttpSession session,@PathVariable int userId){ 70 | // UserLoginVo userLoginVo = (UserLoginVo)session.getAttribute(Const.CURRENT_USER); 71 | // if (userLoginVo==null){ 72 | // return ServerResponse.createByErrorMessage("用户未登录"); 73 | // } 74 | return iUserService.deleteOneUser(userId); 75 | } 76 | 77 | @PostMapping("postOneUser") 78 | public ServerResponse postOneUser(HttpSession session,String username,String type ,String phone,String email,String password){ 79 | // UserLoginVo userLoginVo = (UserLoginVo)session.getAttribute(Const.CURRENT_USER); 80 | // if (userLoginVo==null){ 81 | // return ServerResponse.createByErrorMessage("用户未登录"); 82 | // } 83 | return iUserService.postOneUser(username, type, phone, email, password); 84 | } 85 | 86 | @GetMapping("checkLogin") 87 | public ServerResponse checkLogin(){ 88 | return ServerResponse.createByErrorCodeMessage(ResponseCode.NEED_LOGIN.getCode(),"用户未登录!"); 89 | } 90 | 91 | 92 | } 93 | -------------------------------------------------------------------------------- /code/src/main/java/com/smtboy/news/dao/NewsMapper.java: -------------------------------------------------------------------------------- 1 | package com.smtboy.news.dao; 2 | 3 | import com.smtboy.news.pojo.News; 4 | import com.smtboy.news.pojo.User; 5 | 6 | import java.util.List; 7 | 8 | public interface NewsMapper { 9 | int deleteByPrimaryKey(Integer id); 10 | 11 | int insert(News record); 12 | 13 | int insertSelective(News record); 14 | 15 | News selectByPrimaryKey(Integer id); 16 | 17 | int updateByPrimaryKeySelective(News record); 18 | 19 | int updateByPrimaryKey(News record); 20 | 21 | List selectAllNews(); 22 | } -------------------------------------------------------------------------------- /code/src/main/java/com/smtboy/news/dao/NewsProgramMapper.java: -------------------------------------------------------------------------------- 1 | package com.smtboy.news.dao; 2 | 3 | import com.smtboy.news.pojo.NewsProgram; 4 | 5 | import java.util.List; 6 | 7 | public interface NewsProgramMapper { 8 | int deleteByPrimaryKey(Integer id); 9 | 10 | int insert(NewsProgram record); 11 | 12 | int insertSelective(NewsProgram record); 13 | 14 | NewsProgram selectByPrimaryKey(Integer id); 15 | 16 | int updateByPrimaryKeySelective(NewsProgram record); 17 | 18 | int updateByPrimaryKey(NewsProgram record); 19 | 20 | List selectAllNewsProgram(); 21 | } -------------------------------------------------------------------------------- /code/src/main/java/com/smtboy/news/dao/UserMapper.java: -------------------------------------------------------------------------------- 1 | package com.smtboy.news.dao; 2 | 3 | import com.smtboy.news.pojo.User; 4 | import org.apache.ibatis.annotations.Param; 5 | 6 | import java.util.List; 7 | 8 | public interface UserMapper { 9 | int deleteByPrimaryKey(Integer id); 10 | 11 | int insert(User record); 12 | 13 | int insertSelective(User record); 14 | 15 | User selectByPrimaryKey(Integer id); 16 | 17 | int updateByPrimaryKeySelective(User record); 18 | 19 | int updateByPrimaryKey(User record); 20 | 21 | User selectAdminUserByUsername(@Param("username") String username); 22 | 23 | List selectAllUser(); 24 | } -------------------------------------------------------------------------------- /code/src/main/java/com/smtboy/news/interceptor/LoginInterceptor.java: -------------------------------------------------------------------------------- 1 | package com.smtboy.news.interceptor; 2 | 3 | 4 | import com.smtboy.news.common.Const; 5 | import com.smtboy.news.vo.UserLoginVo; 6 | import org.springframework.stereotype.Component; 7 | import org.springframework.web.servlet.HandlerInterceptor; 8 | import org.springframework.web.servlet.ModelAndView; 9 | 10 | import javax.servlet.http.HttpServletRequest; 11 | import javax.servlet.http.HttpServletResponse; 12 | 13 | @Component 14 | public class LoginInterceptor implements HandlerInterceptor { 15 | //返回值true:请求会被继续运行 16 | //返回值false:请求将被停止 17 | //Object o 被拦截的请求的目标对象(控制器中的名称) 18 | @Override 19 | public boolean preHandle(HttpServletRequest httpServletRequest, HttpServletResponse httpServletResponse, Object o) throws Exception { 20 | 21 | UserLoginVo userLoginVo = (UserLoginVo)httpServletRequest.getSession().getAttribute(Const.CURRENT_USER); 22 | if (userLoginVo==null){ 23 | httpServletResponse.sendRedirect(Const.REQUEST_PREFIX+"/user/checkLogin"); 24 | return false; 25 | } 26 | return true; 27 | } 28 | 29 | @Override 30 | public void postHandle(HttpServletRequest httpServletRequest, HttpServletResponse httpServletResponse, Object o, ModelAndView modelAndView) throws Exception { 31 | 32 | } 33 | 34 | @Override 35 | public void afterCompletion(HttpServletRequest httpServletRequest, HttpServletResponse httpServletResponse, Object o, Exception e) throws Exception { 36 | 37 | } 38 | 39 | } 40 | -------------------------------------------------------------------------------- /code/src/main/java/com/smtboy/news/pojo/News.java: -------------------------------------------------------------------------------- 1 | package com.smtboy.news.pojo; 2 | 3 | import java.util.Date; 4 | 5 | public class News { 6 | private Integer id; 7 | 8 | private Integer pId; 9 | 10 | private Integer userId; 11 | 12 | private String title; 13 | 14 | private String content; 15 | 16 | private Integer readCount; 17 | 18 | private String type; 19 | 20 | private Date createTime; 21 | 22 | private Date updateTime; 23 | 24 | public News(Integer id, Integer pId, Integer userId, String title, String content, Integer readCount, String type, Date createTime, Date updateTime) { 25 | this.id = id; 26 | this.pId = pId; 27 | this.userId = userId; 28 | this.title = title; 29 | this.content = content; 30 | this.readCount = readCount; 31 | this.type = type; 32 | this.createTime = createTime; 33 | this.updateTime = updateTime; 34 | } 35 | 36 | public News() { 37 | super(); 38 | } 39 | 40 | public Integer getId() { 41 | return id; 42 | } 43 | 44 | public void setId(Integer id) { 45 | this.id = id; 46 | } 47 | 48 | public Integer getpId() { 49 | return pId; 50 | } 51 | 52 | public void setpId(Integer pId) { 53 | this.pId = pId; 54 | } 55 | 56 | public Integer getUserId() { 57 | return userId; 58 | } 59 | 60 | public void setUserId(Integer userId) { 61 | this.userId = userId; 62 | } 63 | 64 | public String getTitle() { 65 | return title; 66 | } 67 | 68 | public void setTitle(String title) { 69 | this.title = title == null ? null : title.trim(); 70 | } 71 | 72 | public String getContent() { 73 | return content; 74 | } 75 | 76 | public void setContent(String content) { 77 | this.content = content == null ? null : content.trim(); 78 | } 79 | 80 | public Integer getReadCount() { 81 | return readCount; 82 | } 83 | 84 | public void setReadCount(Integer readCount) { 85 | this.readCount = readCount; 86 | } 87 | 88 | public String getType() { 89 | return type; 90 | } 91 | 92 | public void setType(String type) { 93 | this.type = type == null ? null : type.trim(); 94 | } 95 | 96 | public Date getCreateTime() { 97 | return createTime; 98 | } 99 | 100 | public void setCreateTime(Date createTime) { 101 | this.createTime = createTime; 102 | } 103 | 104 | public Date getUpdateTime() { 105 | return updateTime; 106 | } 107 | 108 | public void setUpdateTime(Date updateTime) { 109 | this.updateTime = updateTime; 110 | } 111 | } -------------------------------------------------------------------------------- /code/src/main/java/com/smtboy/news/pojo/NewsProgram.java: -------------------------------------------------------------------------------- 1 | package com.smtboy.news.pojo; 2 | 3 | import java.util.Date; 4 | 5 | public class NewsProgram { 6 | private Integer id; 7 | 8 | private String name; 9 | 10 | private Date createTime; 11 | 12 | private Date updateTime; 13 | 14 | public NewsProgram(Integer id, String name, Date createTime, Date updateTime) { 15 | this.id = id; 16 | this.name = name; 17 | this.createTime = createTime; 18 | this.updateTime = updateTime; 19 | } 20 | 21 | public NewsProgram() { 22 | super(); 23 | } 24 | 25 | public Integer getId() { 26 | return id; 27 | } 28 | 29 | public void setId(Integer id) { 30 | this.id = id; 31 | } 32 | 33 | public String getName() { 34 | return name; 35 | } 36 | 37 | public void setName(String name) { 38 | this.name = name == null ? null : name.trim(); 39 | } 40 | 41 | public Date getCreateTime() { 42 | return createTime; 43 | } 44 | 45 | public void setCreateTime(Date createTime) { 46 | this.createTime = createTime; 47 | } 48 | 49 | public Date getUpdateTime() { 50 | return updateTime; 51 | } 52 | 53 | public void setUpdateTime(Date updateTime) { 54 | this.updateTime = updateTime; 55 | } 56 | } -------------------------------------------------------------------------------- /code/src/main/java/com/smtboy/news/pojo/User.java: -------------------------------------------------------------------------------- 1 | package com.smtboy.news.pojo; 2 | 3 | import lombok.ToString; 4 | 5 | import java.util.Date; 6 | 7 | @ToString 8 | public class User { 9 | private Integer id; 10 | 11 | private String name; 12 | 13 | private String password; 14 | 15 | private String mobile; 16 | 17 | private String mail; 18 | 19 | private String type; 20 | 21 | private Date createTime; 22 | 23 | private Date updateTime; 24 | 25 | public User(Integer id, String name, String password, String mobile, String mail, String type, Date createTime, Date updateTime) { 26 | this.id = id; 27 | this.name = name; 28 | this.password = password; 29 | this.mobile = mobile; 30 | this.mail = mail; 31 | this.type = type; 32 | this.createTime = createTime; 33 | this.updateTime = updateTime; 34 | } 35 | 36 | public User() { 37 | super(); 38 | } 39 | 40 | public Integer getId() { 41 | return id; 42 | } 43 | 44 | public void setId(Integer id) { 45 | this.id = id; 46 | } 47 | 48 | public String getName() { 49 | return name; 50 | } 51 | 52 | public void setName(String name) { 53 | this.name = name == null ? null : name.trim(); 54 | } 55 | 56 | public String getPassword() { 57 | return password; 58 | } 59 | 60 | public void setPassword(String password) { 61 | this.password = password == null ? null : password.trim(); 62 | } 63 | 64 | public String getMobile() { 65 | return mobile; 66 | } 67 | 68 | public void setMobile(String mobile) { 69 | this.mobile = mobile == null ? null : mobile.trim(); 70 | } 71 | 72 | public String getMail() { 73 | return mail; 74 | } 75 | 76 | public void setMail(String mail) { 77 | this.mail = mail == null ? null : mail.trim(); 78 | } 79 | 80 | public String getType() { 81 | return type; 82 | } 83 | 84 | public void setType(String type) { 85 | this.type = type == null ? null : type.trim(); 86 | } 87 | 88 | public Date getCreateTime() { 89 | return createTime; 90 | } 91 | 92 | public void setCreateTime(Date createTime) { 93 | this.createTime = createTime; 94 | } 95 | 96 | public Date getUpdateTime() { 97 | return updateTime; 98 | } 99 | 100 | public void setUpdateTime(Date updateTime) { 101 | this.updateTime = updateTime; 102 | } 103 | } -------------------------------------------------------------------------------- /code/src/main/java/com/smtboy/news/request/PostNewsMessageVo.java: -------------------------------------------------------------------------------- 1 | package com.smtboy.news.request; 2 | 3 | import lombok.AllArgsConstructor; 4 | import lombok.Data; 5 | import lombok.NoArgsConstructor; 6 | 7 | import java.util.Date; 8 | 9 | @AllArgsConstructor 10 | @NoArgsConstructor 11 | @Data 12 | public class PostNewsMessageVo { 13 | 14 | 15 | private Integer id; 16 | 17 | private Integer pId; 18 | 19 | private Integer userId; 20 | 21 | private String title; 22 | 23 | private String content; 24 | 25 | private String type; 26 | 27 | 28 | 29 | 30 | } 31 | -------------------------------------------------------------------------------- /code/src/main/java/com/smtboy/news/request/PutUserMessageVo.java: -------------------------------------------------------------------------------- 1 | package com.smtboy.news.request; 2 | 3 | import lombok.AllArgsConstructor; 4 | import lombok.Data; 5 | import lombok.NoArgsConstructor; 6 | import lombok.ToString; 7 | 8 | import java.util.Date; 9 | 10 | @Data 11 | @NoArgsConstructor 12 | @AllArgsConstructor 13 | @ToString 14 | public class PutUserMessageVo { 15 | 16 | private Integer id; 17 | 18 | private String name; 19 | 20 | private String mobile; 21 | 22 | private String mail; 23 | 24 | private String type; 25 | 26 | 27 | } -------------------------------------------------------------------------------- /code/src/main/java/com/smtboy/news/service/INewsProgramService.java: -------------------------------------------------------------------------------- 1 | package com.smtboy.news.service; 2 | 3 | import com.smtboy.news.common.ServerResponse; 4 | 5 | public interface INewsProgramService { 6 | 7 | /** 8 | * 查询新闻栏目列表 9 | * @param pageNum 10 | * @param pageSize 11 | * @return 12 | */ 13 | public ServerResponse getAllNewsProgram(int pageNum, int pageSize); 14 | 15 | /** 16 | * 修改一个新闻栏目 17 | * @param id 18 | * @param name 19 | * @return 20 | */ 21 | public ServerResponse putOneNewsProgram(int id,String name ); 22 | 23 | /** 24 | * 删除一个新闻栏目 25 | * @param id 26 | * @return 27 | */ 28 | public ServerResponse deleteOneNewsProgram(int id); 29 | 30 | /** 31 | * 创建一个新闻栏目 32 | * @param name 33 | * @return 34 | */ 35 | public ServerResponse postOneNewsProgram(String name ); 36 | 37 | 38 | } 39 | -------------------------------------------------------------------------------- /code/src/main/java/com/smtboy/news/service/INewsService.java: -------------------------------------------------------------------------------- 1 | package com.smtboy.news.service; 2 | 3 | import com.smtboy.news.common.ServerResponse; 4 | import com.smtboy.news.request.PostNewsMessageVo; 5 | 6 | /** 7 | * @author doyledai 8 | */ 9 | public interface INewsService { 10 | 11 | /** 12 | * 查询所有新闻列表 13 | * @param pageNum 14 | * @param pageSize 15 | * @return 16 | */ 17 | public ServerResponse getAllNews(int pageNum, int pageSize); 18 | 19 | /** 20 | * 查询单个新闻内容 21 | * @param newsId 22 | * @return 23 | */ 24 | public ServerResponse getOneNews(int newsId); 25 | 26 | /** 27 | * 修改单个新闻 28 | * @param postNewsMessageVo 29 | * @return 30 | */ 31 | public ServerResponse putOneNews(PostNewsMessageVo postNewsMessageVo ); 32 | 33 | /** 34 | * 删除新闻 35 | * @param newsId 36 | * @return 37 | */ 38 | public ServerResponse deleteOneNews(int newsId); 39 | 40 | /** 41 | * 创建新闻 42 | * @param postNewsMessageVo 43 | * @return 44 | */ 45 | public ServerResponse postOneNews(PostNewsMessageVo postNewsMessageVo); 46 | 47 | /** 48 | * 操作新闻状态 49 | * @param newsId 50 | * @param type 0正常,1审核,2回收 51 | * @return 52 | */ 53 | public ServerResponse operateOneNews(int newsId,String type); 54 | 55 | 56 | } 57 | -------------------------------------------------------------------------------- /code/src/main/java/com/smtboy/news/service/IUserService.java: -------------------------------------------------------------------------------- 1 | package com.smtboy.news.service; 2 | 3 | 4 | import com.smtboy.news.common.ServerResponse; 5 | import com.smtboy.news.request.PutUserMessageVo; 6 | 7 | import javax.servlet.http.HttpSession; 8 | 9 | /** 10 | * @author doyledai 11 | */ 12 | public interface IUserService { 13 | 14 | /** 15 | * 用户登录 16 | * @param username 用户名 17 | * @param password 密码 18 | * @return user 19 | */ 20 | public ServerResponse login(String username , String password); 21 | 22 | /** 23 | * 根据session判断是否登陆 24 | * @param session 25 | * @return 26 | */ 27 | public ServerResponse autoLogin(HttpSession session); 28 | 29 | /** 30 | * 查询所有用户列表 31 | * @param pageNum 32 | * @param pageSize 33 | * @return 34 | */ 35 | public ServerResponse getAllUser(int pageNum,int pageSize); 36 | 37 | /** 38 | * 获取单个用户的信息 39 | * @param userId 40 | * @return 41 | */ 42 | public ServerResponse getOneUser(int userId); 43 | 44 | /** 45 | * 修改一个user的信息 46 | * @param putUserMessageVo 47 | * @return 48 | */ 49 | public ServerResponse putOneUser(PutUserMessageVo putUserMessageVo); 50 | 51 | /** 52 | * 删除一个用户 53 | * @param userId 54 | * @return 55 | */ 56 | public ServerResponse deleteOneUser(int userId); 57 | 58 | /** 59 | * 创建用户 60 | * @param username 61 | * @param type 62 | * @param phone 63 | * @param email 64 | * @param password 65 | * @return 66 | */ 67 | public ServerResponse postOneUser(String username,String type ,String phone,String email,String password); 68 | 69 | } 70 | -------------------------------------------------------------------------------- /code/src/main/java/com/smtboy/news/service/impl/NewsProgramServiceImpl.java: -------------------------------------------------------------------------------- 1 | package com.smtboy.news.service.impl; 2 | 3 | 4 | import com.github.pagehelper.PageHelper; 5 | import com.github.pagehelper.PageInfo; 6 | import com.smtboy.news.common.ServerResponse; 7 | import com.smtboy.news.dao.NewsMapper; 8 | import com.smtboy.news.dao.NewsProgramMapper; 9 | import com.smtboy.news.pojo.News; 10 | import com.smtboy.news.pojo.NewsProgram; 11 | import com.smtboy.news.request.PostNewsMessageVo; 12 | import com.smtboy.news.service.INewsProgramService; 13 | import org.springframework.beans.factory.annotation.Autowired; 14 | import org.springframework.stereotype.Service; 15 | 16 | import java.util.List; 17 | 18 | @Service("iNewsProgramService") 19 | public class NewsProgramServiceImpl implements INewsProgramService { 20 | 21 | @Autowired 22 | private NewsProgramMapper newsProgramMapper; 23 | 24 | /** 25 | * 查询新闻栏目列表 26 | * @param pageNum 27 | * @param pageSize 28 | * @return 29 | */ 30 | @Override 31 | public ServerResponse getAllNewsProgram(int pageNum, int pageSize){ 32 | //startpage 33 | PageHelper.startPage(pageNum, pageSize); 34 | List newsPrograms = newsProgramMapper.selectAllNewsProgram(); 35 | PageInfo pageInfo = new PageInfo(newsPrograms); 36 | pageInfo.setList(newsPrograms); 37 | return ServerResponse.createBySuccess(pageInfo); 38 | } 39 | 40 | /** 41 | * 修改一个新闻栏目 42 | * @param id 43 | * @param name 44 | * @return 45 | */ 46 | @Override 47 | public ServerResponse putOneNewsProgram(int id,String name ){ 48 | NewsProgram newsProgram = new NewsProgram(); 49 | newsProgram.setId(id); 50 | newsProgram.setName(name); 51 | int resultCount = newsProgramMapper.updateByPrimaryKeySelective(newsProgram); 52 | if (resultCount > 0) { 53 | return ServerResponse.createBySuccess("操作成功"); 54 | } 55 | return ServerResponse.createByErrorMessage("操作失败"); 56 | 57 | } 58 | 59 | /** 60 | * 删除一个新闻栏目 61 | * @param id 62 | * @return 63 | */ 64 | @Override 65 | public ServerResponse deleteOneNewsProgram(int id){ 66 | int resultCount = newsProgramMapper.deleteByPrimaryKey(id); 67 | if (resultCount > 0) { 68 | return ServerResponse.createBySuccess("操作成功"); 69 | } 70 | return ServerResponse.createByErrorMessage("操作失败"); 71 | } 72 | 73 | /** 74 | * 创建一个新闻栏目 75 | * @param name 76 | * @return 77 | */ 78 | @Override 79 | public ServerResponse postOneNewsProgram(String name ){ 80 | NewsProgram newsProgram = new NewsProgram(); 81 | newsProgram.setName(name); 82 | int resultCount = newsProgramMapper.insert(newsProgram); 83 | if (resultCount > 0) { 84 | return ServerResponse.createBySuccess("操作成功"); 85 | } 86 | return ServerResponse.createByErrorMessage("操作失败"); 87 | } 88 | 89 | 90 | } 91 | -------------------------------------------------------------------------------- /code/src/main/java/com/smtboy/news/service/impl/NewsServiceImpl.java: -------------------------------------------------------------------------------- 1 | package com.smtboy.news.service.impl; 2 | 3 | import com.github.pagehelper.PageHelper; 4 | import com.github.pagehelper.PageInfo; 5 | import com.smtboy.news.common.ServerResponse; 6 | import com.smtboy.news.dao.NewsMapper; 7 | import com.smtboy.news.pojo.News; 8 | import com.smtboy.news.pojo.User; 9 | import com.smtboy.news.request.PostNewsMessageVo; 10 | import com.smtboy.news.request.PutUserMessageVo; 11 | import com.smtboy.news.service.INewsService; 12 | import com.smtboy.news.vo.UserMessageVo; 13 | import org.springframework.beans.factory.annotation.Autowired; 14 | import org.springframework.stereotype.Service; 15 | 16 | import java.util.List; 17 | 18 | @Service("iNewsService") 19 | public class NewsServiceImpl implements INewsService { 20 | 21 | @Autowired 22 | private NewsMapper newsMapper; 23 | 24 | /** 25 | * 查询所有新闻列表 26 | * @param pageNum 27 | * @param pageSize 28 | * @return 29 | */ 30 | @Override 31 | public ServerResponse getAllNews(int pageNum, int pageSize){ 32 | //startpage 33 | PageHelper.startPage(pageNum, pageSize); 34 | List news = newsMapper.selectAllNews(); 35 | PageInfo pageInfo = new PageInfo(news); 36 | pageInfo.setList(news); 37 | return ServerResponse.createBySuccess(pageInfo); 38 | } 39 | 40 | /** 41 | * 查询单个新闻内容 42 | * @param newsId 43 | * @return 44 | */ 45 | @Override 46 | public ServerResponse getOneNews(int newsId){ 47 | 48 | News news = newsMapper.selectByPrimaryKey(newsId); 49 | if (news == null) { 50 | return ServerResponse.createByErrorMessage("查询失败!"); 51 | } 52 | 53 | return ServerResponse.createBySuccess(news); 54 | } 55 | 56 | /** 57 | * 修改单个新闻 58 | * @param postNewsMessageVo 59 | * @return 60 | */ 61 | @Override 62 | public ServerResponse putOneNews(PostNewsMessageVo postNewsMessageVo ){ 63 | 64 | News news = new News(); 65 | news.setId(postNewsMessageVo.getId()); 66 | if (!postNewsMessageVo.getContent().equals("") && postNewsMessageVo.getContent() != null) { 67 | news.setContent(postNewsMessageVo.getContent()); 68 | } 69 | if (!postNewsMessageVo.getPId().equals("") && postNewsMessageVo.getPId() != null) { 70 | news.setpId(postNewsMessageVo.getPId()); 71 | } 72 | if (!postNewsMessageVo.getTitle().equals("") && postNewsMessageVo.getTitle() != null) { 73 | news.setTitle(postNewsMessageVo.getTitle()); 74 | } 75 | if (!postNewsMessageVo.getUserId().equals("") && postNewsMessageVo.getUserId() != null) { 76 | news.setUserId(postNewsMessageVo.getUserId()); 77 | } 78 | if (!postNewsMessageVo.getType().equals("") && postNewsMessageVo.getType() != null) { 79 | news.setType(postNewsMessageVo.getType()); 80 | } 81 | int resultCount = newsMapper.updateByPrimaryKeySelective(news); 82 | if (resultCount > 0) { 83 | return ServerResponse.createBySuccess("操作成功"); 84 | } 85 | return ServerResponse.createByErrorMessage("操作失败"); 86 | 87 | } 88 | 89 | /** 90 | * 删除新闻 91 | * @param newsId 92 | * @return 93 | */ 94 | @Override 95 | public ServerResponse deleteOneNews(int newsId){ 96 | int resultCount = newsMapper.deleteByPrimaryKey(newsId); 97 | if (resultCount > 0) { 98 | return ServerResponse.createBySuccess("操作成功"); 99 | } 100 | return ServerResponse.createByErrorMessage("操作失败"); 101 | } 102 | 103 | /** 104 | * 创建新闻 105 | * @param postNewsMessageVo 106 | * @return 107 | */ 108 | @Override 109 | public ServerResponse postOneNews(PostNewsMessageVo postNewsMessageVo){ 110 | News news = new News(); 111 | // news.setId(postNewsMessageVo.getId()); 112 | news.setContent(postNewsMessageVo.getContent()); 113 | news.setpId(postNewsMessageVo.getPId()); 114 | news.setReadCount(0); 115 | news.setTitle(postNewsMessageVo.getTitle()); 116 | news.setUserId(postNewsMessageVo.getUserId()); 117 | news.setType(postNewsMessageVo.getType()); 118 | int resultCount = newsMapper.insert(news); 119 | if (resultCount > 0) { 120 | return ServerResponse.createBySuccess("操作成功"); 121 | } 122 | return ServerResponse.createByErrorMessage("操作失败"); 123 | } 124 | 125 | /** 126 | * 操作新闻状态 127 | * @param newsId 128 | * @param type 0正常,1审核,2回收 129 | * @return 130 | */ 131 | @Override 132 | public ServerResponse operateOneNews(int newsId, String type){ 133 | if (!type.equals("0") && !type.equals("1") && !type.equals("3")) { 134 | return ServerResponse.createByErrorMessage("参数有误!"); 135 | } 136 | News news = new News(); 137 | news.setId(newsId); 138 | news.setType(type); 139 | int resultCount = newsMapper.updateByPrimaryKeySelective(news); 140 | if (resultCount > 0) { 141 | return ServerResponse.createBySuccess("操作成功"); 142 | } 143 | return ServerResponse.createByErrorMessage("操作失败"); 144 | 145 | } 146 | 147 | 148 | } 149 | -------------------------------------------------------------------------------- /code/src/main/java/com/smtboy/news/util/Sha256.java: -------------------------------------------------------------------------------- 1 | package com.smtboy.news.util; 2 | 3 | import java.io.UnsupportedEncodingException; 4 | import java.security.MessageDigest; 5 | import java.security.NoSuchAlgorithmException; 6 | 7 | public class Sha256 { 8 | 9 | /** 10 |     * 利用java原生的类实现SHA256加密 11 |     * @param str 加密后的报文 12 |     * @return 13 |     */ 14 | public static String getSHA256(String str){ 15 | MessageDigest messageDigest; 16 | String encodestr = ""; 17 | try { 18 | messageDigest = MessageDigest.getInstance("SHA-256"); 19 | messageDigest.update(str.getBytes("UTF-8")); 20 | encodestr = byte2Hex(messageDigest.digest()); 21 | } catch (NoSuchAlgorithmException e) { 22 | e.printStackTrace(); 23 | } catch (UnsupportedEncodingException e) { 24 | e.printStackTrace(); 25 | } 26 | return encodestr; 27 | } 28 | /** 29 |     * 将byte转为16进制 30 |     * @param bytes 31 |     * @return 32 |     */ 33 | private static String byte2Hex(byte[] bytes){ 34 | StringBuffer stringBuffer = new StringBuffer(); 35 | String temp = null; 36 | for (int i=0;i 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | id, p_id, user_id, title, content, read_count, type, create_time, update_time 19 | 20 | 26 | 27 | delete from ddcms_news 28 | where id = #{id,jdbcType=INTEGER} 29 | 30 | 31 | insert into ddcms_news (id, p_id, user_id, 32 | title, content, read_count, 33 | type, create_time, update_time 34 | ) 35 | values (#{id,jdbcType=INTEGER}, #{pId,jdbcType=INTEGER}, #{userId,jdbcType=INTEGER}, 36 | #{title,jdbcType=VARCHAR}, #{content,jdbcType=VARCHAR}, #{readCount,jdbcType=INTEGER}, 37 | #{type,jdbcType=VARCHAR}, now(), now() 38 | ) 39 | 40 | 41 | insert into ddcms_news 42 | 43 | 44 | id, 45 | 46 | 47 | p_id, 48 | 49 | 50 | user_id, 51 | 52 | 53 | title, 54 | 55 | 56 | content, 57 | 58 | 59 | read_count, 60 | 61 | 62 | type, 63 | 64 | 65 | create_time, 66 | 67 | 68 | update_time, 69 | 70 | 71 | 72 | 73 | #{id,jdbcType=INTEGER}, 74 | 75 | 76 | #{pId,jdbcType=INTEGER}, 77 | 78 | 79 | #{userId,jdbcType=INTEGER}, 80 | 81 | 82 | #{title,jdbcType=VARCHAR}, 83 | 84 | 85 | #{content,jdbcType=VARCHAR}, 86 | 87 | 88 | #{readCount,jdbcType=INTEGER}, 89 | 90 | 91 | #{type,jdbcType=VARCHAR}, 92 | 93 | 94 | now(), 95 | 96 | 97 | now(), 98 | 99 | 100 | 101 | 102 | update ddcms_news 103 | 104 | 105 | p_id = #{pId,jdbcType=INTEGER}, 106 | 107 | 108 | user_id = #{userId,jdbcType=INTEGER}, 109 | 110 | 111 | title = #{title,jdbcType=VARCHAR}, 112 | 113 | 114 | content = #{content,jdbcType=VARCHAR}, 115 | 116 | 117 | read_count = #{readCount,jdbcType=INTEGER}, 118 | 119 | 120 | type = #{type,jdbcType=VARCHAR}, 121 | 122 | 123 | create_time = #{createTime,jdbcType=TIMESTAMP}, 124 | 125 | 126 | update_time = now(), 127 | 128 | 129 | where id = #{id,jdbcType=INTEGER} 130 | 131 | 132 | update ddcms_news 133 | set p_id = #{pId,jdbcType=INTEGER}, 134 | user_id = #{userId,jdbcType=INTEGER}, 135 | title = #{title,jdbcType=VARCHAR}, 136 | content = #{content,jdbcType=VARCHAR}, 137 | read_count = #{readCount,jdbcType=INTEGER}, 138 | type = #{type,jdbcType=VARCHAR}, 139 | create_time = #{createTime,jdbcType=TIMESTAMP}, 140 | update_time = now() 141 | where id = #{id,jdbcType=INTEGER} 142 | 143 | 144 | 150 | -------------------------------------------------------------------------------- /code/src/main/resources/mappers/NewsProgramMapper.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | id, name, create_time, update_time 14 | 15 | 21 | 22 | delete from ddcms_news_program 23 | where id = #{id,jdbcType=INTEGER} 24 | 25 | 26 | insert into ddcms_news_program (id, name, create_time, 27 | update_time) 28 | values (#{id,jdbcType=INTEGER}, #{name,jdbcType=VARCHAR}, now(), 29 | now()) 30 | 31 | 32 | insert into ddcms_news_program 33 | 34 | 35 | id, 36 | 37 | 38 | name, 39 | 40 | 41 | create_time, 42 | 43 | 44 | update_time, 45 | 46 | 47 | 48 | 49 | #{id,jdbcType=INTEGER}, 50 | 51 | 52 | #{name,jdbcType=VARCHAR}, 53 | 54 | 55 | now(), 56 | 57 | 58 | now(), 59 | 60 | 61 | 62 | 63 | update ddcms_news_program 64 | 65 | 66 | name = #{name,jdbcType=VARCHAR}, 67 | 68 | 69 | create_time = #{createTime,jdbcType=TIMESTAMP}, 70 | 71 | 72 | update_time = now(), 73 | 74 | 75 | where id = #{id,jdbcType=INTEGER} 76 | 77 | 78 | update ddcms_news_program 79 | set name = #{name,jdbcType=VARCHAR}, 80 | create_time = #{createTime,jdbcType=TIMESTAMP}, 81 | update_time = now() 82 | where id = #{id,jdbcType=INTEGER} 83 | 84 | 85 | 91 | -------------------------------------------------------------------------------- /code/src/main/resources/mappers/UserMapper.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | id, name, password, mobile, mail, type, create_time, update_time 18 | 19 | 25 | 26 | delete from ddcms_user 27 | where id = #{id,jdbcType=INTEGER} 28 | 29 | 30 | insert into ddcms_user (id, name, password, 31 | mobile, mail, type, 32 | create_time, update_time) 33 | values (#{id,jdbcType=INTEGER}, #{name,jdbcType=VARCHAR}, #{password,jdbcType=VARCHAR}, 34 | #{mobile,jdbcType=VARCHAR}, #{mail,jdbcType=VARCHAR}, #{type,jdbcType=VARCHAR}, 35 | now(), now()) 36 | 37 | 38 | insert into ddcms_user 39 | 40 | 41 | id, 42 | 43 | 44 | name, 45 | 46 | 47 | password, 48 | 49 | 50 | mobile, 51 | 52 | 53 | mail, 54 | 55 | 56 | type, 57 | 58 | 59 | create_time, 60 | 61 | 62 | update_time, 63 | 64 | 65 | 66 | 67 | #{id,jdbcType=INTEGER}, 68 | 69 | 70 | #{name,jdbcType=VARCHAR}, 71 | 72 | 73 | #{password,jdbcType=VARCHAR}, 74 | 75 | 76 | #{mobile,jdbcType=VARCHAR}, 77 | 78 | 79 | #{mail,jdbcType=VARCHAR}, 80 | 81 | 82 | #{type,jdbcType=VARCHAR}, 83 | 84 | 85 | now(), 86 | 87 | 88 | now(), 89 | 90 | 91 | 92 | 93 | update ddcms_user 94 | 95 | 96 | name = #{name,jdbcType=VARCHAR}, 97 | 98 | 99 | password = #{password,jdbcType=VARCHAR}, 100 | 101 | 102 | mobile = #{mobile,jdbcType=VARCHAR}, 103 | 104 | 105 | mail = #{mail,jdbcType=VARCHAR}, 106 | 107 | 108 | type = #{type,jdbcType=VARCHAR}, 109 | 110 | 111 | create_time = #{createTime,jdbcType=TIMESTAMP}, 112 | 113 | 114 | update_time = now(), 115 | 116 | 117 | where id = #{id,jdbcType=INTEGER} 118 | 119 | 120 | update ddcms_user 121 | set name = #{name,jdbcType=VARCHAR}, 122 | password = #{password,jdbcType=VARCHAR}, 123 | mobile = #{mobile,jdbcType=VARCHAR}, 124 | mail = #{mail,jdbcType=VARCHAR}, 125 | type = #{type,jdbcType=VARCHAR}, 126 | create_time = #{createTime,jdbcType=TIMESTAMP}, 127 | update_time = now() 128 | where id = #{id,jdbcType=INTEGER} 129 | 130 | 131 | 138 | 139 | 145 | -------------------------------------------------------------------------------- /code/src/test/java/com/smtboy/news/MyTest.java: -------------------------------------------------------------------------------- 1 | package com.smtboy.news; 2 | 3 | 4 | import com.smtboy.news.util.Sha256; 5 | import org.junit.jupiter.api.Test; 6 | 7 | public class MyTest { 8 | 9 | @Test 10 | public void test1(){ 11 | System.out.println(Sha256.getSHA256("123456")); 12 | } 13 | 14 | } 15 | -------------------------------------------------------------------------------- /code/src/test/java/com/smtboy/news/NewsApplicationTests.java: -------------------------------------------------------------------------------- 1 | package com.smtboy.news; 2 | 3 | import org.junit.jupiter.api.Test; 4 | import org.springframework.boot.test.context.SpringBootTest; 5 | 6 | @SpringBootTest 7 | class NewsApplicationTests { 8 | 9 | @Test 10 | void contextLoads() { 11 | 12 | } 13 | 14 | } 15 | -------------------------------------------------------------------------------- /page/.gitignore: -------------------------------------------------------------------------------- 1 | /.project 2 | .idea/ 3 | dist/ 4 | node_modules/ 5 | build/ -------------------------------------------------------------------------------- /page/151688086754999.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smartboy37597/NewsCMS/96b3a562aaedadeaeabcf3a7b594644f1e01f459/page/151688086754999.png -------------------------------------------------------------------------------- /page/README.md: -------------------------------------------------------------------------------- 1 | # WeAdmin 2 | 3 | 基于Layui的后台管理系统前端模板 http://lovetime.gitee.io/weadmin/ 4 | 5 | ## 更新记录 6 | 7 | 2019-06-20 8 | WeAdmin左侧菜单修改为动态获取方式 9 | - layui基础版本更新为V2.5.4 10 | - 新增扩展方法menu,左侧菜单修改为本地JSON模拟动态获取 11 | - layui预计在V2.5.6版本为稳定版本(期待ing) 12 | 13 | 2019-01-15 14 | Layui基础版本更新 15 | - layui基础版本更新为V2.4.5 16 | - 字体图标引入方式修改为iconfont(仅为示例,未完全修改) 17 | 18 | 2018-10-21 19 | Layui基础版本更新 20 | - 感谢@Charlie @yinzhili 同学提交代码 21 | - layui基础版本更新为V2.3.0 22 | - layui基础版本2.4稳定后将再次更新 23 | 24 | 2018-03-28 25 | WeAdmin小版本修复 26 | - 增加了文章分类添加、编辑页面 27 | - 增加公用eleDel.js,个别通用页面独立加载 28 | - 修复右键加载刷新后个别图表、表格页面样式错乱问题(判断加载后首次点击刷新frame子页面) 29 | - 优化数据表格中表单元素点击问题(checked第一次点击无效) 30 | - 优化修复部分示例js报错及细节问题 31 | 32 | 2018-02-05 33 | WeAdmin重新整理js调用方法 34 | - 增加了Tab菜单栏鼠标右键刷新、关闭方法 35 | - 增加了Tab菜单栏已打开菜单本地存储记录,刷新前已打开菜单不消失 36 | - 增加了Tab切换监听和删除监听事件 37 | - 使用[layui扩展模块](http://www.layui.com/doc/base/modules.html#extend)的方法重写了admin.js,里面包含了整个WeAdmin后台框架中常用的方法。 38 | 39 | 40 | 2018-02-01 41 | 增加echarts定制使用实例 42 | - 基于echarts 4.0版本实现中国地图指定省份使用不同颜色标识,指定省份显示气泡图标。 43 | 44 | 2018-01-01 45 | WeAdmin立项 46 | 47 | ## TODO 48 | 49 | - [ ] layui更新为2.5.x稳定版 50 | - [ ] layui版本稳定后,引入官方tree 51 | - [ ] 修复Bug 52 | 53 | ## 简介 54 | 55 | WeAdmin是基于Layui框架设计的Frame型后台管理系统。Layui是由职业前端倾情打造,面向所有层次的前后端开发者,零门槛开箱即用的前端UI解决方案。 56 | Layui发版以来一直受到不少猿的推崇,作为其中的小白,我也一直在推崇和学习中挣扎,WeAdmin无他,也只是小白实操的一个记录。 57 | 58 | 59 | 60 | 61 | ## 组件说明 62 | 63 | ### Layui 64 | 目前基于Layui 2.5.4版本 65 | 官网: http://www.layui.com/ 66 | 67 | ### echarts 68 | 目前基于echarts 4.0.2版本 69 | 官网: http://echarts.baidu.com/ 70 | > 项目中图标示例页面引用echarts来源cdn.bootcss.com,正式项目使用请务必修改为自己的地址 71 | 72 | ## 借鉴参考 73 | WeAdmin借鉴了Layui相关案例:Layuicms/vip-admin/x-admin/jqadmin等等,及AdminLte/H-ui admin的demo 74 | 75 | http://blog.csdn.net/sj0613xz/article/details/79021890 76 | 77 | https://www.cnblogs.com/zhoushangwu/p/7891543.html 78 | 79 | -------------------------------------------------------------------------------- /page/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smartboy37597/NewsCMS/96b3a562aaedadeaeabcf3a7b594644f1e01f459/page/favicon.ico -------------------------------------------------------------------------------- /page/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 后台管理-DDCMS Frame型后台管理系统-DDCMS 1.0 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 |
21 | 24 |
25 | 26 | 27 | 28 |
29 |
    30 |
  • 31 | smartboy 32 |
    33 | 34 | 35 |
    36 | 退出 37 |
    38 |
    39 |
  • 40 | 41 |
42 | 43 |
44 | 45 | 46 | 47 |
48 |
49 |
50 | 51 | 52 | 53 |
54 |
55 |
    56 |
  • 我的桌面
  • 57 |
58 |
59 |
60 | 61 |
62 |
63 |
64 |
65 |
66 | 67 | 68 | 69 | 72 | 73 | 111 | 112 | 113 |
    114 |
  • 刷新
  • 115 |
  • 关闭当前
  • 116 |
  • 关闭其它
  • 117 |
  • 关闭所有
  • 118 |
119 | 120 | -------------------------------------------------------------------------------- /page/json/menu.json: -------------------------------------------------------------------------------- 1 | { 2 | "status": 0, 3 | "msg": "ok", 4 | "data": [{ 5 | "id": 1, 6 | "name": "会员管理", 7 | "icon": "", 8 | "url": "", 9 | "children": [{ 10 | "id": 2, 11 | "name": "会员列表", 12 | "icon": "", 13 | "url": "./pages/member/list.html" 14 | }] 15 | }, 16 | { 17 | "id": 8, 18 | "name": "文章管理", 19 | "icon": "", 20 | "url": "", 21 | "children": [{ 22 | "id": 9, 23 | "name": "文章列表", 24 | "icon": "", 25 | "url": "./pages/article/list.html" 26 | }, { 27 | "id": 10, 28 | "name": "分类管理", 29 | "icon": "", 30 | "url": "./pages/article/category.html" 31 | }] 32 | } 33 | ] 34 | } 35 | -------------------------------------------------------------------------------- /page/lib/layui/css/modules/code.css: -------------------------------------------------------------------------------- 1 | /** layui-v2.5.4 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} -------------------------------------------------------------------------------- /page/lib/layui/css/modules/layer/default/icon-ext.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smartboy37597/NewsCMS/96b3a562aaedadeaeabcf3a7b594644f1e01f459/page/lib/layui/css/modules/layer/default/icon-ext.png -------------------------------------------------------------------------------- /page/lib/layui/css/modules/layer/default/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smartboy37597/NewsCMS/96b3a562aaedadeaeabcf3a7b594644f1e01f459/page/lib/layui/css/modules/layer/default/icon.png -------------------------------------------------------------------------------- /page/lib/layui/css/modules/layer/default/loading-0.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smartboy37597/NewsCMS/96b3a562aaedadeaeabcf3a7b594644f1e01f459/page/lib/layui/css/modules/layer/default/loading-0.gif -------------------------------------------------------------------------------- /page/lib/layui/css/modules/layer/default/loading-1.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smartboy37597/NewsCMS/96b3a562aaedadeaeabcf3a7b594644f1e01f459/page/lib/layui/css/modules/layer/default/loading-1.gif -------------------------------------------------------------------------------- /page/lib/layui/css/modules/layer/default/loading-2.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smartboy37597/NewsCMS/96b3a562aaedadeaeabcf3a7b594644f1e01f459/page/lib/layui/css/modules/layer/default/loading-2.gif -------------------------------------------------------------------------------- /page/lib/layui/font/iconfont.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smartboy37597/NewsCMS/96b3a562aaedadeaeabcf3a7b594644f1e01f459/page/lib/layui/font/iconfont.eot -------------------------------------------------------------------------------- /page/lib/layui/font/iconfont.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smartboy37597/NewsCMS/96b3a562aaedadeaeabcf3a7b594644f1e01f459/page/lib/layui/font/iconfont.ttf -------------------------------------------------------------------------------- /page/lib/layui/font/iconfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smartboy37597/NewsCMS/96b3a562aaedadeaeabcf3a7b594644f1e01f459/page/lib/layui/font/iconfont.woff -------------------------------------------------------------------------------- /page/lib/layui/font/iconfont.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smartboy37597/NewsCMS/96b3a562aaedadeaeabcf3a7b594644f1e01f459/page/lib/layui/font/iconfont.woff2 -------------------------------------------------------------------------------- /page/lib/layui/images/face/0.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smartboy37597/NewsCMS/96b3a562aaedadeaeabcf3a7b594644f1e01f459/page/lib/layui/images/face/0.gif -------------------------------------------------------------------------------- /page/lib/layui/images/face/1.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smartboy37597/NewsCMS/96b3a562aaedadeaeabcf3a7b594644f1e01f459/page/lib/layui/images/face/1.gif -------------------------------------------------------------------------------- /page/lib/layui/images/face/10.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smartboy37597/NewsCMS/96b3a562aaedadeaeabcf3a7b594644f1e01f459/page/lib/layui/images/face/10.gif -------------------------------------------------------------------------------- /page/lib/layui/images/face/11.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smartboy37597/NewsCMS/96b3a562aaedadeaeabcf3a7b594644f1e01f459/page/lib/layui/images/face/11.gif -------------------------------------------------------------------------------- /page/lib/layui/images/face/12.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smartboy37597/NewsCMS/96b3a562aaedadeaeabcf3a7b594644f1e01f459/page/lib/layui/images/face/12.gif -------------------------------------------------------------------------------- /page/lib/layui/images/face/13.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smartboy37597/NewsCMS/96b3a562aaedadeaeabcf3a7b594644f1e01f459/page/lib/layui/images/face/13.gif -------------------------------------------------------------------------------- /page/lib/layui/images/face/14.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smartboy37597/NewsCMS/96b3a562aaedadeaeabcf3a7b594644f1e01f459/page/lib/layui/images/face/14.gif -------------------------------------------------------------------------------- /page/lib/layui/images/face/15.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smartboy37597/NewsCMS/96b3a562aaedadeaeabcf3a7b594644f1e01f459/page/lib/layui/images/face/15.gif -------------------------------------------------------------------------------- /page/lib/layui/images/face/16.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smartboy37597/NewsCMS/96b3a562aaedadeaeabcf3a7b594644f1e01f459/page/lib/layui/images/face/16.gif -------------------------------------------------------------------------------- /page/lib/layui/images/face/17.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smartboy37597/NewsCMS/96b3a562aaedadeaeabcf3a7b594644f1e01f459/page/lib/layui/images/face/17.gif -------------------------------------------------------------------------------- /page/lib/layui/images/face/18.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smartboy37597/NewsCMS/96b3a562aaedadeaeabcf3a7b594644f1e01f459/page/lib/layui/images/face/18.gif -------------------------------------------------------------------------------- /page/lib/layui/images/face/19.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smartboy37597/NewsCMS/96b3a562aaedadeaeabcf3a7b594644f1e01f459/page/lib/layui/images/face/19.gif -------------------------------------------------------------------------------- /page/lib/layui/images/face/2.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smartboy37597/NewsCMS/96b3a562aaedadeaeabcf3a7b594644f1e01f459/page/lib/layui/images/face/2.gif -------------------------------------------------------------------------------- /page/lib/layui/images/face/20.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smartboy37597/NewsCMS/96b3a562aaedadeaeabcf3a7b594644f1e01f459/page/lib/layui/images/face/20.gif -------------------------------------------------------------------------------- /page/lib/layui/images/face/21.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smartboy37597/NewsCMS/96b3a562aaedadeaeabcf3a7b594644f1e01f459/page/lib/layui/images/face/21.gif -------------------------------------------------------------------------------- /page/lib/layui/images/face/22.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smartboy37597/NewsCMS/96b3a562aaedadeaeabcf3a7b594644f1e01f459/page/lib/layui/images/face/22.gif -------------------------------------------------------------------------------- /page/lib/layui/images/face/23.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smartboy37597/NewsCMS/96b3a562aaedadeaeabcf3a7b594644f1e01f459/page/lib/layui/images/face/23.gif -------------------------------------------------------------------------------- /page/lib/layui/images/face/24.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smartboy37597/NewsCMS/96b3a562aaedadeaeabcf3a7b594644f1e01f459/page/lib/layui/images/face/24.gif -------------------------------------------------------------------------------- /page/lib/layui/images/face/25.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smartboy37597/NewsCMS/96b3a562aaedadeaeabcf3a7b594644f1e01f459/page/lib/layui/images/face/25.gif -------------------------------------------------------------------------------- /page/lib/layui/images/face/26.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smartboy37597/NewsCMS/96b3a562aaedadeaeabcf3a7b594644f1e01f459/page/lib/layui/images/face/26.gif -------------------------------------------------------------------------------- /page/lib/layui/images/face/27.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smartboy37597/NewsCMS/96b3a562aaedadeaeabcf3a7b594644f1e01f459/page/lib/layui/images/face/27.gif -------------------------------------------------------------------------------- /page/lib/layui/images/face/28.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smartboy37597/NewsCMS/96b3a562aaedadeaeabcf3a7b594644f1e01f459/page/lib/layui/images/face/28.gif -------------------------------------------------------------------------------- /page/lib/layui/images/face/29.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smartboy37597/NewsCMS/96b3a562aaedadeaeabcf3a7b594644f1e01f459/page/lib/layui/images/face/29.gif -------------------------------------------------------------------------------- /page/lib/layui/images/face/3.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smartboy37597/NewsCMS/96b3a562aaedadeaeabcf3a7b594644f1e01f459/page/lib/layui/images/face/3.gif -------------------------------------------------------------------------------- /page/lib/layui/images/face/30.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smartboy37597/NewsCMS/96b3a562aaedadeaeabcf3a7b594644f1e01f459/page/lib/layui/images/face/30.gif -------------------------------------------------------------------------------- /page/lib/layui/images/face/31.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smartboy37597/NewsCMS/96b3a562aaedadeaeabcf3a7b594644f1e01f459/page/lib/layui/images/face/31.gif -------------------------------------------------------------------------------- /page/lib/layui/images/face/32.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smartboy37597/NewsCMS/96b3a562aaedadeaeabcf3a7b594644f1e01f459/page/lib/layui/images/face/32.gif -------------------------------------------------------------------------------- /page/lib/layui/images/face/33.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smartboy37597/NewsCMS/96b3a562aaedadeaeabcf3a7b594644f1e01f459/page/lib/layui/images/face/33.gif -------------------------------------------------------------------------------- /page/lib/layui/images/face/34.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smartboy37597/NewsCMS/96b3a562aaedadeaeabcf3a7b594644f1e01f459/page/lib/layui/images/face/34.gif -------------------------------------------------------------------------------- /page/lib/layui/images/face/35.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smartboy37597/NewsCMS/96b3a562aaedadeaeabcf3a7b594644f1e01f459/page/lib/layui/images/face/35.gif -------------------------------------------------------------------------------- /page/lib/layui/images/face/36.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smartboy37597/NewsCMS/96b3a562aaedadeaeabcf3a7b594644f1e01f459/page/lib/layui/images/face/36.gif -------------------------------------------------------------------------------- /page/lib/layui/images/face/37.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smartboy37597/NewsCMS/96b3a562aaedadeaeabcf3a7b594644f1e01f459/page/lib/layui/images/face/37.gif -------------------------------------------------------------------------------- /page/lib/layui/images/face/38.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smartboy37597/NewsCMS/96b3a562aaedadeaeabcf3a7b594644f1e01f459/page/lib/layui/images/face/38.gif -------------------------------------------------------------------------------- /page/lib/layui/images/face/39.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smartboy37597/NewsCMS/96b3a562aaedadeaeabcf3a7b594644f1e01f459/page/lib/layui/images/face/39.gif -------------------------------------------------------------------------------- /page/lib/layui/images/face/4.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smartboy37597/NewsCMS/96b3a562aaedadeaeabcf3a7b594644f1e01f459/page/lib/layui/images/face/4.gif -------------------------------------------------------------------------------- /page/lib/layui/images/face/40.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smartboy37597/NewsCMS/96b3a562aaedadeaeabcf3a7b594644f1e01f459/page/lib/layui/images/face/40.gif -------------------------------------------------------------------------------- /page/lib/layui/images/face/41.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smartboy37597/NewsCMS/96b3a562aaedadeaeabcf3a7b594644f1e01f459/page/lib/layui/images/face/41.gif -------------------------------------------------------------------------------- /page/lib/layui/images/face/42.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smartboy37597/NewsCMS/96b3a562aaedadeaeabcf3a7b594644f1e01f459/page/lib/layui/images/face/42.gif -------------------------------------------------------------------------------- /page/lib/layui/images/face/43.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smartboy37597/NewsCMS/96b3a562aaedadeaeabcf3a7b594644f1e01f459/page/lib/layui/images/face/43.gif -------------------------------------------------------------------------------- /page/lib/layui/images/face/44.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smartboy37597/NewsCMS/96b3a562aaedadeaeabcf3a7b594644f1e01f459/page/lib/layui/images/face/44.gif -------------------------------------------------------------------------------- /page/lib/layui/images/face/45.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smartboy37597/NewsCMS/96b3a562aaedadeaeabcf3a7b594644f1e01f459/page/lib/layui/images/face/45.gif -------------------------------------------------------------------------------- /page/lib/layui/images/face/46.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smartboy37597/NewsCMS/96b3a562aaedadeaeabcf3a7b594644f1e01f459/page/lib/layui/images/face/46.gif -------------------------------------------------------------------------------- /page/lib/layui/images/face/47.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smartboy37597/NewsCMS/96b3a562aaedadeaeabcf3a7b594644f1e01f459/page/lib/layui/images/face/47.gif -------------------------------------------------------------------------------- /page/lib/layui/images/face/48.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smartboy37597/NewsCMS/96b3a562aaedadeaeabcf3a7b594644f1e01f459/page/lib/layui/images/face/48.gif -------------------------------------------------------------------------------- /page/lib/layui/images/face/49.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smartboy37597/NewsCMS/96b3a562aaedadeaeabcf3a7b594644f1e01f459/page/lib/layui/images/face/49.gif -------------------------------------------------------------------------------- /page/lib/layui/images/face/5.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smartboy37597/NewsCMS/96b3a562aaedadeaeabcf3a7b594644f1e01f459/page/lib/layui/images/face/5.gif -------------------------------------------------------------------------------- /page/lib/layui/images/face/50.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smartboy37597/NewsCMS/96b3a562aaedadeaeabcf3a7b594644f1e01f459/page/lib/layui/images/face/50.gif -------------------------------------------------------------------------------- /page/lib/layui/images/face/51.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smartboy37597/NewsCMS/96b3a562aaedadeaeabcf3a7b594644f1e01f459/page/lib/layui/images/face/51.gif -------------------------------------------------------------------------------- /page/lib/layui/images/face/52.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smartboy37597/NewsCMS/96b3a562aaedadeaeabcf3a7b594644f1e01f459/page/lib/layui/images/face/52.gif -------------------------------------------------------------------------------- /page/lib/layui/images/face/53.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smartboy37597/NewsCMS/96b3a562aaedadeaeabcf3a7b594644f1e01f459/page/lib/layui/images/face/53.gif -------------------------------------------------------------------------------- /page/lib/layui/images/face/54.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smartboy37597/NewsCMS/96b3a562aaedadeaeabcf3a7b594644f1e01f459/page/lib/layui/images/face/54.gif -------------------------------------------------------------------------------- /page/lib/layui/images/face/55.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smartboy37597/NewsCMS/96b3a562aaedadeaeabcf3a7b594644f1e01f459/page/lib/layui/images/face/55.gif -------------------------------------------------------------------------------- /page/lib/layui/images/face/56.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smartboy37597/NewsCMS/96b3a562aaedadeaeabcf3a7b594644f1e01f459/page/lib/layui/images/face/56.gif -------------------------------------------------------------------------------- /page/lib/layui/images/face/57.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smartboy37597/NewsCMS/96b3a562aaedadeaeabcf3a7b594644f1e01f459/page/lib/layui/images/face/57.gif -------------------------------------------------------------------------------- /page/lib/layui/images/face/58.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smartboy37597/NewsCMS/96b3a562aaedadeaeabcf3a7b594644f1e01f459/page/lib/layui/images/face/58.gif -------------------------------------------------------------------------------- /page/lib/layui/images/face/59.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smartboy37597/NewsCMS/96b3a562aaedadeaeabcf3a7b594644f1e01f459/page/lib/layui/images/face/59.gif -------------------------------------------------------------------------------- /page/lib/layui/images/face/6.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smartboy37597/NewsCMS/96b3a562aaedadeaeabcf3a7b594644f1e01f459/page/lib/layui/images/face/6.gif -------------------------------------------------------------------------------- /page/lib/layui/images/face/60.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smartboy37597/NewsCMS/96b3a562aaedadeaeabcf3a7b594644f1e01f459/page/lib/layui/images/face/60.gif -------------------------------------------------------------------------------- /page/lib/layui/images/face/61.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smartboy37597/NewsCMS/96b3a562aaedadeaeabcf3a7b594644f1e01f459/page/lib/layui/images/face/61.gif -------------------------------------------------------------------------------- /page/lib/layui/images/face/62.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smartboy37597/NewsCMS/96b3a562aaedadeaeabcf3a7b594644f1e01f459/page/lib/layui/images/face/62.gif -------------------------------------------------------------------------------- /page/lib/layui/images/face/63.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smartboy37597/NewsCMS/96b3a562aaedadeaeabcf3a7b594644f1e01f459/page/lib/layui/images/face/63.gif -------------------------------------------------------------------------------- /page/lib/layui/images/face/64.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smartboy37597/NewsCMS/96b3a562aaedadeaeabcf3a7b594644f1e01f459/page/lib/layui/images/face/64.gif -------------------------------------------------------------------------------- /page/lib/layui/images/face/65.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smartboy37597/NewsCMS/96b3a562aaedadeaeabcf3a7b594644f1e01f459/page/lib/layui/images/face/65.gif -------------------------------------------------------------------------------- /page/lib/layui/images/face/66.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smartboy37597/NewsCMS/96b3a562aaedadeaeabcf3a7b594644f1e01f459/page/lib/layui/images/face/66.gif -------------------------------------------------------------------------------- /page/lib/layui/images/face/67.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smartboy37597/NewsCMS/96b3a562aaedadeaeabcf3a7b594644f1e01f459/page/lib/layui/images/face/67.gif -------------------------------------------------------------------------------- /page/lib/layui/images/face/68.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smartboy37597/NewsCMS/96b3a562aaedadeaeabcf3a7b594644f1e01f459/page/lib/layui/images/face/68.gif -------------------------------------------------------------------------------- /page/lib/layui/images/face/69.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smartboy37597/NewsCMS/96b3a562aaedadeaeabcf3a7b594644f1e01f459/page/lib/layui/images/face/69.gif -------------------------------------------------------------------------------- /page/lib/layui/images/face/7.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smartboy37597/NewsCMS/96b3a562aaedadeaeabcf3a7b594644f1e01f459/page/lib/layui/images/face/7.gif -------------------------------------------------------------------------------- /page/lib/layui/images/face/70.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smartboy37597/NewsCMS/96b3a562aaedadeaeabcf3a7b594644f1e01f459/page/lib/layui/images/face/70.gif -------------------------------------------------------------------------------- /page/lib/layui/images/face/71.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smartboy37597/NewsCMS/96b3a562aaedadeaeabcf3a7b594644f1e01f459/page/lib/layui/images/face/71.gif -------------------------------------------------------------------------------- /page/lib/layui/images/face/8.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smartboy37597/NewsCMS/96b3a562aaedadeaeabcf3a7b594644f1e01f459/page/lib/layui/images/face/8.gif -------------------------------------------------------------------------------- /page/lib/layui/images/face/9.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smartboy37597/NewsCMS/96b3a562aaedadeaeabcf3a7b594644f1e01f459/page/lib/layui/images/face/9.gif -------------------------------------------------------------------------------- /page/lib/layui/lay/modules/carousel.js: -------------------------------------------------------------------------------- 1 | /** layui-v2.5.4 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&&(clearInterval(e.timer),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"); -------------------------------------------------------------------------------- /page/lib/layui/lay/modules/flow.js: -------------------------------------------------------------------------------- 1 | /** layui-v2.5.4 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)}); -------------------------------------------------------------------------------- /page/lib/layui/lay/modules/laypage.js: -------------------------------------------------------------------------------- 1 | /** layui-v2.5.4 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)}); -------------------------------------------------------------------------------- /page/lib/layui/lay/modules/laytpl.js: -------------------------------------------------------------------------------- 1 | /** layui-v2.5.4 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)}); -------------------------------------------------------------------------------- /page/lib/layui/lay/modules/rate.js: -------------------------------------------------------------------------------- 1 | /** layui-v2.5.4 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)}); -------------------------------------------------------------------------------- /page/lib/layui/lay/modules/util.js: -------------------------------------------------------------------------------- 1 | /** layui-v2.5.4 MIT License By https://www.layui.com */ 2 | ;layui.define("jquery",function(t){"use strict";var e=layui.$,i={fixbar:function(t){var i,n,a="layui-fixbar",o="layui-fixbar-top",r=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("."+o),u=function(){var e=r.scrollTop();e>=t.showHeight?i||(s.show(),i=1):i&&(s.hide(),i=0)};e("."+a)[0]||("object"==typeof t.css&&g.css(t.css),l.append(g),u(),g.find("li").on("click",function(){var i=e(this),n=i.attr("lay-type");"top"===n&&e("html,body").animate({scrollTop:0},200),t.click&&t.click.call(this,n)}),r.on("scroll",function(){clearTimeout(n),n=setTimeout(function(){u()},100)}))},countdown:function(t,e,i){var n=this,a="function"==typeof e,o=new Date(t).getTime(),r=new Date(!e||a?(new Date).getTime():e).getTime(),l=o-r,c=[Math.floor(l/864e5),Math.floor(l/36e5)%24,Math.floor(l/6e4)%60,Math.floor(l/1e3)%60];a&&(i=e);var g=setTimeout(function(){n.countdown(t,r+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,n=[[],[]],a=(new Date).getTime()-new Date(t).getTime();return a>6912e5?(a=new Date(t),n[0][0]=i.digit(a.getFullYear(),4),n[0][1]=i.digit(a.getMonth()+1),n[0][2]=i.digit(a.getDate()),e||(n[1][0]=i.digit(a.getHours()),n[1][1]=i.digit(a.getMinutes()),n[1][2]=i.digit(a.getSeconds())),n[0].join("-")+" "+n[1].join(":")):a>=864e5?(a/1e3/60/60/24|0)+"天前":a>=36e5?(a/1e3/60/60|0)+"小时前":a>=12e4?(a/1e3/60|0)+"分钟前":a<0?"未来":"刚刚"},digit:function(t,e){var i="";t=String(t),e=e||2;for(var n=t.length;n/g,">").replace(/'/g,"'").replace(/"/g,""")},event:function(t,n,a){n=i.event[t]=e.extend(!0,i.event[t],n)||{},e("body").on(a||"click","*["+t+"]",function(){var i=e(this),a=i.attr(t);n[a]&&n[a].call(this,i)})}};!function(t,e,i){"$:nomunge";function n(){a=e[l](function(){o.each(function(){var e=t(this),i=e.width(),n=e.height(),a=t.data(this,g);(i!==a.w||n!==a.h)&&e.trigger(c,[a.w=i,a.h=n])}),n()},r[s])}var a,o=t([]),r=t.resize=t.extend(t.resize,{}),l="setTimeout",c="resize",g=c+"-special-event",s="delay",u="throttleWindow";r[s]=250,r[u]=!0,t.event.special[c]={setup:function(){if(!r[u]&&this[l])return!1;var e=t(this);o=o.add(e),t.data(this,g,{w:e.width(),h:e.height()}),1===o.length&&n()},teardown:function(){if(!r[u]&&this[l])return!1;var e=t(this);o=o.not(e),e.removeData(g),o.length||clearTimeout(a)},add:function(e){function n(e,n,o){var r=t(this),l=t.data(this,g)||{};l.w=n!==i?n:r.width(),l.h=o!==i?o:r.height(),a.apply(this,arguments)}if(!r[u]&&this[l])return!1;var a;return t.isFunction(e)?(a=e,n):(a=e.handler,void(e.handler=n))}}}(e,window),t("util",i)}); -------------------------------------------------------------------------------- /page/login.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 管理员登录-DDCMS Frame型后台管理系统-DDCMS 1.0 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 32 | 33 | 67 | 68 | 69 | 70 | -------------------------------------------------------------------------------- /page/pages/404.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 欢迎页面-WeAdmin Frame型后台管理系统-WeAdmin 1.0 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 |
14 |
15 | 占位页面 16 |
17 |
18 | 19 | -------------------------------------------------------------------------------- /page/pages/admin/add.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 添加管理员-WeAdmin Frame型后台管理系统-WeAdmin 1.0 7 | 8 | 9 | 10 | 11 | 12 | 13 | 17 | 18 | 19 | 20 |
21 |
22 |
23 | 26 |
27 | 29 |
30 |
31 | *将会成为您唯一的登入名 32 |
33 |
34 |
35 | 38 |
39 | 41 |
42 |
43 | *将会成为您唯一的登入名 44 |
45 |
46 |
47 | 50 |
51 | 53 |
54 |
55 | * 56 |
57 |
58 |
59 | 60 |
61 | 62 | 63 | 64 |
65 |
66 |
67 | 70 |
71 | 73 |
74 |
75 | 6到16个字符 76 |
77 |
78 |
79 | 82 |
83 | 85 |
86 |
87 |
88 | 89 | 90 |
91 |
92 |
93 | 94 | 132 | 133 | 134 | -------------------------------------------------------------------------------- /page/pages/admin/cate.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 权限分类-WeAdmin Frame型后台管理系统-WeAdmin 1.0 7 | 8 | 9 | 10 | 11 | 12 | 13 | 17 | 18 | 19 | 20 |
21 | 22 | 首页 23 | 管理员管理 24 | 25 | 权限分类 26 | 27 | 28 | 29 |
30 |
31 |
32 | 38 |
39 |
40 | 41 | 共有数据:88 条 42 |
43 | 44 | 45 | 46 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 58 | 59 | 60 | 68 | 69 | 70 |
47 |
48 |
ID分类名操作
56 |
57 |
1会员相关 61 | 62 | 63 | 64 | 65 | 66 | 67 |
71 |
72 |
73 | 74 | 1 75 | 2 76 | 3 77 | 489 78 | 79 |
80 |
81 |
82 | 83 | 84 | 85 | 86 | -------------------------------------------------------------------------------- /page/pages/admin/list.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 管理员列表-WeAdmin Frame型后台管理系统-WeAdmin 1.0 7 | 8 | 9 | 10 | 11 | 12 | 13 | 17 | 18 | 19 | 20 |
21 | 22 | 首页 23 | 管理员管理 24 | 25 | 管理员列表 26 | 27 | 28 | 29 |
30 |
31 |
32 | 44 |
45 |
46 | 47 | 48 | 共有数据:88 条 49 |
50 | 51 | 52 | 53 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 78 | 89 | 90 | 91 |
54 |
55 |
ID登录名手机邮箱角色加入时间状态操作
68 |
69 |
1admin18925139194113664000@qq.com超级管理员2017-01-01 11:11:42 77 | 已启用 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 |
92 |
93 |
94 | 95 | 1 96 | 2 97 | 3 98 | 489 99 | 100 |
101 |
102 |
103 | 104 | 105 | 106 | 107 | -------------------------------------------------------------------------------- /page/pages/admin/role-add.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 角色管理-WeAdmin Frame型后台管理系统-WeAdmin 1.0 7 | 8 | 9 | 10 | 11 | 12 | 13 | 17 | 18 | 19 | 20 |
21 |
22 |
23 | 26 |
27 | 28 |
29 |
30 |
31 | 34 | 35 | 36 | 37 | 41 | 50 | 51 | 52 | 56 | 65 | 66 | 67 |
38 | 用户管理 39 | 40 | 42 |
43 | 用户停用 44 | 用户删除 45 | 用户修改 46 | 用户改密 47 | 用户列表 48 |
49 |
53 | 文章管理 54 | 55 | 57 |
58 | 文章添加 59 | 文章删除 60 | 文章修改 61 | 文章改密 62 | 文章列表 63 |
64 |
68 |
69 |
70 | 73 |
74 | 75 |
76 |
77 |
78 | 79 |
80 |
81 |
82 | 83 | 109 | 110 | 111 | -------------------------------------------------------------------------------- /page/pages/admin/role.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 角色管理-WeAdmin Frame型后台管理系统-WeAdmin 1.0 7 | 8 | 9 | 10 | 11 | 12 | 13 | 17 | 18 | 19 | 20 |
21 | 22 | 首页 23 | 管理员管理 24 | 25 | 角色管理 26 | 27 | 28 | 29 |
30 |
31 |
32 | 44 |
45 |
46 | 47 | 48 | 共有数据:88 条 49 |
50 | 51 | 52 | 53 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 68 | 69 | 70 | 71 | 72 | 74 | 85 | 86 | 87 |
54 |
55 |
ID角色名拥有权限规则描述状态操作
66 |
67 |
1超级管理员会员列表,问题列表具有至高无上的权利 73 | 已启用 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 |
88 |
89 |
90 | 91 | 1 92 | 2 93 | 3 94 | 489 95 | 96 |
97 |
98 |
99 | 100 | 101 | 102 | 103 | -------------------------------------------------------------------------------- /page/pages/admin/rule.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 权限管理-WeAdmin Frame型后台管理系统-WeAdmin 1.0 7 | 8 | 9 | 10 | 11 | 12 | 13 | 17 | 18 | 19 | 20 |
21 | 22 | 首页 23 | 管理员管理 24 | 25 | 权限管理 26 | 27 | 28 | 29 |
30 |
31 |
32 | 62 |
63 |
64 | 65 | 共有数据:88 条 66 |
67 | 68 | 69 | 70 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 84 | 85 | 86 | 87 | 88 | 96 | 97 | 98 |
71 |
72 |
ID权限规则权限名称所属分类操作
82 |
83 |
1admin/user/userlist会员列表会员相关 89 | 90 | 91 | 92 | 93 | 94 | 95 |
99 |
100 |
101 | 102 | 1 103 | 2 104 | 3 105 | 489 106 | 107 |
108 |
109 |
110 | 111 | 112 | 113 | 114 | -------------------------------------------------------------------------------- /page/pages/article/category-add.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 8 | 9 | 10 | 添加分类-WeAdmin Frame型后台管理系统-WeAdmin 1.0 11 | 12 | 13 | 14 | 15 | 16 | 17 | 21 | 22 | 23 | 24 |
25 | 26 |
27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 |
46 | 47 |
48 | 49 |
50 |
51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 |
65 |
66 | 67 | 68 |
69 |
70 | 71 |
72 |
73 | 74 | 141 | 142 | 143 | -------------------------------------------------------------------------------- /page/pages/article/category-add.html.bak: -------------------------------------------------------------------------------- 1 | 2 | 3 | 8 | 9 | 10 | 添加分类-WeAdmin Frame型后台管理系统-WeAdmin 1.0 11 | 12 | 13 | 14 | 15 | 16 | 17 | 21 | 22 | 23 | 24 |
25 | 26 |
27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 |
46 | 47 |
48 | 49 |
50 |
51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 |
65 |
66 | 67 | 68 |
69 |
70 | 71 |
72 |
73 | 74 | 141 | 142 | 143 | -------------------------------------------------------------------------------- /page/pages/article/category-edit.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 会员资料编辑-WeAdmin Frame型后台管理系统-WeAdmin 1.0 7 | 8 | 9 | 10 | 11 | 12 | 13 | 17 | 18 | 19 | 20 |
21 |
22 |
23 | 24 |
25 | 26 | 27 | 28 |
29 | 31 | 32 | 33 | 34 |
35 |
36 |
37 | 38 | 142 | 143 | 144 | -------------------------------------------------------------------------------- /page/pages/article/category-edit.js: -------------------------------------------------------------------------------- 1 | layui.extend({ 2 | admin: '{/}../../static/js/admin' 3 | }); 4 | layui.use(['admin', 'jquery', 'element', 'upload', 'form', 'layer', 'layedit'], function() { 5 | 6 | var admin = layui.admin, 7 | $ = layui.jquery, 8 | element = layui.element, 9 | upload = layui.upload, 10 | form = layui.form, 11 | layer = layui.layer, 12 | layedit = layui.layedit; 13 | //图片上传 14 | //上传缩略图,设定文件大小限制 15 | upload.render({ 16 | elem: '#topicImg', 17 | url: '/upload/', 18 | size: 500 //限制文件大小,单位 KB 19 | , 20 | done: function(res) { 21 | console.log(res) 22 | } 23 | }); 24 | //选择文件,栏目模板 25 | upload.render({ 26 | elem: '#topicModelBtn', 27 | url: '/upload/', 28 | auto: false, 29 | accept: 'file' 30 | //,multiple: true 31 | , 32 | bindAction: '#editTopic', 33 | choose: function(res) { 34 | //var files = res.pushFile(); 35 | //预读本地文件,如果是多文件,则会遍历。(不支持ie8/9) 36 | res.preview(function(index, file, result) { 37 | //console.log(index); //得到文件索引 38 | //console.log(file); //得到文件对象 39 | //console.log(result); //得到文件base64编码,比如图片 40 | $('input[name=topicModel]').val(file.name); 41 | //console.log($('input[name=topicModel]').val()) 42 | 43 | }); 44 | } 45 | }); 46 | 47 | layedit.build('topicBody'); //建立编辑器 48 | 49 | //监听提交 50 | form.on('submit(add)', function(data) { 51 | console.log(data.field); 52 | //发异步,把数据提交给php 53 | layer.alert("增加成功", { 54 | icon: 6 55 | }, function() { 56 | // 获得frame索引 57 | var index = parent.layer.getFrameIndex(window.name); 58 | //关闭当前frame 59 | parent.layer.close(index); 60 | }); 61 | return false; 62 | }); 63 | 64 | //遍历select option 65 | $(document).ready(function() { 66 | $("#pid-select option").each(function(text) { 67 | 68 | var level = $(this).attr('data-level'); 69 | var text = $(this).text(); 70 | //console.log(text); 71 | if(level > 0) { 72 | text = "├ " + text; 73 | for(var i = 0; i < level; i++) { 74 | text = "  " + text;  //js中连续显示多个空格,需要使用全角的空格 75 | //console.log(i+"text:"+text); 76 | } 77 | } 78 | $(this).text(text); 79 | 80 | }); 81 | 82 | form.render('select'); //刷新select选择框渲染 83 | }); 84 | 85 | }); -------------------------------------------------------------------------------- /page/pages/article/category.html.bak: -------------------------------------------------------------------------------- 1 | 2 | 3 | 8 | 9 | 10 | 文章分类-WeAdmin Frame型后台管理系统-WeAdmin 1.0 11 | 12 | 13 | 14 | 15 | 16 | 17 | 21 | 22 | 23 | 24 |
25 | 26 | 首页 27 | 文章管理 28 | 分类管理 29 | 30 | 31 | 32 |
33 |
34 |
35 | 36 | 37 | 38 | 共有数据:66 条 39 |
40 | 41 |
42 |
43 | 44 | 45 | 46 | 47 | -------------------------------------------------------------------------------- /page/pages/article/category.js: -------------------------------------------------------------------------------- 1 | function del(nodeId) { 2 | alert(nodeId) 3 | } 4 | /*分类-停用*/ 5 | function member_stop(obj, id) { 6 | var confirmTip; 7 | if($(obj).attr('title') == '启用') { 8 | confirmTip = '确认要停用吗?'; 9 | } else { 10 | confirmTip = '确认要启用吗?'; 11 | } 12 | layer.confirm(confirmTip, function(index) { 13 | if($(obj).attr('title') == '启用') { 14 | //发异步把用户状态进行更改 15 | $(obj).attr('title', '停用') 16 | $(obj).find('i').html(''); 17 | $(obj).parents("tr").find(".td-status").find('span').addClass('layui-btn-disabled').html('已停用'); 18 | layer.msg('已停用!', { 19 | icon: 5, 20 | time: 1000 21 | }); 22 | } else { 23 | $(obj).attr('title', '启用') 24 | $(obj).find('i').html(''); 25 | 26 | $(obj).parents("tr").find(".td-status").find('span').removeClass('layui-btn-disabled').html('已启用'); 27 | layer.msg('已启用!', { 28 | icon: 6, 29 | time: 1000 30 | }); 31 | } 32 | }); 33 | } 34 | //自定义的render渲染输出多列表格 35 | var layout = [{ 36 | name: '菜单名称', 37 | treeNodes: true, 38 | headerClass: 'value_col', 39 | colClass: 'value_col', 40 | style: 'width: 60%' 41 | }, 42 | { 43 | name: '状态', 44 | headerClass: 'td-status', 45 | colClass: 'td-status', 46 | style: 'width: 10%', 47 | render: function(row) { 48 | return '已启用'; 49 | } 50 | }, 51 | { 52 | name: '操作', 53 | headerClass: 'td-manage', 54 | colClass: 'td-manage', 55 | style: 'width: 20%', 56 | render: function(row) { 57 | return '' + 58 | '' + 59 | '' + 60 | '\'; 61 | //return ' 删除'; //列渲染 62 | } 63 | }, 64 | ]; 65 | //加载扩展模块 treeGird 66 | // layui.config({ 67 | // base: './static/js/' 68 | // ,version: '101100' 69 | // }).use('admin'); 70 | layui.extend({ 71 | admin: '{/}../../static/js/admin', 72 | treeGird: '{/}../../lib/layui/lay/treeGird' // {/}的意思即代表采用自有路径,即不跟随 base 路径 73 | }); 74 | layui.use(['treeGird', 'jquery', 'admin', 'layer'], function() { 75 | var layer = layui.layer, 76 | $ = layui.jquery, 77 | admin = layui.admin, 78 | treeGird = layui.treeGird; 79 | 80 | var tree1 = layui.treeGird({ 81 | elem: '#demo', //传入元素选择器 82 | spreadable: true, //设置是否全展开,默认不展开 83 | nodes: [{ 84 | "id": "1", 85 | "name": "父节点1", 86 | "children": [{ 87 | "id": "11", 88 | "name": "子节点11" 89 | }, 90 | { 91 | "id": "12", 92 | "name": "子节点12" 93 | } 94 | ] 95 | }, 96 | { 97 | "id": "2", 98 | "name": "父节点2", 99 | "children": [{ 100 | "id": "21", 101 | "name": "子节点21", 102 | "children": [{ 103 | "id": "211", 104 | "name": "子节点211" 105 | }] 106 | }] 107 | } 108 | ], 109 | layout: layout 110 | }); 111 | $('#collapse').on('click', function() { 112 | layui.collapse(tree1); 113 | }); 114 | 115 | $('#expand').on('click', function() { 116 | layui.expand(tree1); 117 | }); 118 | }); -------------------------------------------------------------------------------- /page/pages/article/list.js: -------------------------------------------------------------------------------- 1 | layui.extend({ 2 | admin: '{/}../../static/js/admin' 3 | }); 4 | 5 | layui.use(['table', 'jquery','form', 'admin'], function() { 6 | var table = layui.table, 7 | $ = layui.jquery, 8 | form = layui.form, 9 | admin = layui.admin; 10 | var data = ""; 11 | $.ajax({ 12 | url: 'http://localhost:8080/api/user/getAllUser', 13 | type: 'get', 14 | // 设置的是请求参数 15 | // data: data.field, 16 | // 用于设置响应体的类型 注意 跟 data 参数没关系!!! 17 | dataType: 'json', 18 | success: function (res) { 19 | // 一旦设置的 dataType 选项,就不再关心 服务端 响应的 Content-Type 了 20 | // 客户端会主观认为服务端返回的就是 JSON 格式的字符串 21 | data=res.data.list; 22 | // var data=""; 23 | // $('#memberList > tbody').html(""); 24 | // console.log(res.data.list); 25 | // for (var i = 0;i" + 34 | // "
" + 35 | // "
"+res.data.list[i]["id"]+""+res.data.list[i]["name"]+"" + 36 | // ""+res.data.list[i]["mobile"]+"" + 37 | // ""+res.data.list[i]["mail"]+"" + 38 | // ""+formatDate(res.data.list[i]["createTime"])+""+formatDate(res.data.list[i]["updateTime"])+"" + 39 | // ""+auth+"" + 40 | // "" + 41 | // 42 | // "" + 43 | // ""; 44 | // 45 | // $('#memberList > tbody').html(data); 46 | // // console.log("1123123") 47 | // } 48 | 49 | } 50 | }) 51 | table.render({ 52 | elem: '#articleList', 53 | cellMinWidth: 80, 54 | cols: [ 55 | [{ 56 | type: 'checkbox' 57 | }, { 58 | field: 'id',title: 'ID',sort: true 59 | }, { 60 | field: 'title',title: '标题',templet: '#usernameTpl' 61 | }, { 62 | field: 'date',title: '发布时间',sort: true 63 | }, { 64 | field: 'category',title: '分类',sort: true 65 | }, { 66 | field: 'sort',title: '排序',sort: true 67 | }, { 68 | field: 'recommend',title: '推荐',templet: '#recommendTpl',unresize: true 69 | }, { 70 | field: 'top',title: '置顶',templet: '#topTpl',unresize: true 71 | }, { 72 | field: 'review',title: '审核',templet: '#reviewTpl',unresize: true 73 | }, { 74 | field: 'operate',title: '操作',toolbar: '#operateTpl',unresize: true 75 | }] 76 | ], 77 | data: [{ 78 | "id": "1", 79 | "title": "1", 80 | "date": "2018-02-03", 81 | "category": "官方动态", 82 | "sort": "1", 83 | "recommend": "checked", 84 | "top": "checked" 85 | }, { 86 | "id": "2", 87 | "title": "WeAdmin的测试数据一二三四五六七", 88 | "date": "2018-02-03", 89 | "category": "新闻资讯", 90 | "sort": "1", 91 | "recommend": "", 92 | "top": "checked" 93 | }], 94 | event: true, 95 | page: true 96 | }); 97 | /* 98 | *数据表格中form表单元素是动态插入,所以需要更新渲染下 99 | * http://www.layui.com/doc/modules/form.html#render 100 | * */ 101 | $(function(){ 102 | form.render(); 103 | }); 104 | 105 | var active = { 106 | getCheckData: function() { //获取选中数据 107 | var checkStatus = table.checkStatus('articleList'), 108 | data = checkStatus.data; 109 | //console.log(data); 110 | //layer.alert(JSON.stringify(data)); 111 | if(data.length > 0) { 112 | layer.confirm('确认要删除吗?' + JSON.stringify(data), function(index) { 113 | layer.msg('删除成功', { 114 | icon: 1 115 | }); 116 | //找到所有被选中的,发异步进行删除 117 | $(".layui-table-body .layui-form-checked").parents('tr').remove(); 118 | }); 119 | } else { 120 | layer.msg("请先选择需要删除的文章!"); 121 | } 122 | 123 | }, 124 | Recommend: function() { 125 | var checkStatus = table.checkStatus('articleList'), 126 | data = checkStatus.data; 127 | if(data.length > 0) { 128 | layer.msg("您点击了推荐操作"); 129 | for(var i = 0; i < data.length; i++) { 130 | console.log("a:" + data[i].recommend); 131 | data[i].recommend = "checked"; 132 | console.log("aa:" + data[i].recommend); 133 | form.render(); 134 | } 135 | 136 | } else { 137 | console.log("b"); 138 | layer.msg("请先选择"); 139 | } 140 | 141 | //$(".layui-table-body .layui-form-checked").parents('tr').children().children('input[name="zzz"]').attr("checked","checked"); 142 | }, 143 | Top: function() { 144 | layer.msg("您点击了置顶操作"); 145 | }, 146 | Review: function() { 147 | layer.msg("您点击了审核操作"); 148 | } 149 | 150 | }; 151 | 152 | $('.demoTable .layui-btn').on('click', function() { 153 | var type = $(this).data('type'); 154 | active[type] ? active[type].call(this) : ''; 155 | }); 156 | 157 | /*用户-删除*/ 158 | window.member_del = function(obj, id) { 159 | layer.confirm('确认要删除吗?', function(index) { 160 | //发异步删除数据 161 | $(obj).parents("tr").remove(); 162 | layer.msg('已删除!', { 163 | icon: 1, 164 | time: 1000 165 | }); 166 | }); 167 | } 168 | 169 | }); 170 | 171 | function delAll(argument) { 172 | var data = tableCheck.getData(); 173 | layer.confirm('确认要删除吗?' + data, function(index) { 174 | //捉到所有被选中的,发异步进行删除 175 | layer.msg('删除成功', { 176 | icon: 1 177 | }); 178 | $(".layui-form-checked").not('.header').parents('tr').remove(); 179 | }); 180 | } -------------------------------------------------------------------------------- /page/pages/echarts/echarts1.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 统计图表-WeAdmin Frame型后台管理系统-WeAdmin 1.0 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 |
15 |
16 | 特别声明:ECharts,一个纯 Javascript 的图表库,可以流畅的运行在 PC 和移动设备上,兼容当前绝大部分浏览器(IE8/9/10/11,Chrome,Firefox,Safari等),底层依赖轻量级的 Canvas 类库 ZRender,提供直观,生动,可交互,可高度个性化定制的数据可视化图表。WeAdmin提示:如需使用或者详细更多案例可以访问官网 ECharts。 17 |
18 | 19 |
20 |
21 | 注意:本案例的Echarts图表库由cdn引入,需要在线才能正常使用,若要离线使用,请至Echarts官网下载。 22 |
23 |
24 | 25 | 97 | 98 | -------------------------------------------------------------------------------- /page/pages/echarts/echarts2.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 统计图表-WeAdmin Frame型后台管理系统-WeAdmin 1.0 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 |
15 |
16 | 特别声明:ECharts,一个纯 Javascript 的图表库,可以流畅的运行在 PC 和移动设备上,兼容当前绝大部分浏览器(IE8/9/10/11,Chrome,Firefox,Safari等),底层依赖轻量级的 Canvas 类库 ZRender,提供直观,生动,可交互,可高度个性化定制的数据可视化图表。WeAdmin提示:如需使用或者详细更多案例可以访问官网 ECharts。 17 |
18 | 19 |
20 |
21 | 注意:本案例的Echarts图表库由cdn引入,需要在线才能正常使用,若要离线使用,请至Echarts官网下载。 22 |
23 |
24 | 25 | 95 | 96 | 97 | -------------------------------------------------------------------------------- /page/pages/echarts/echarts4.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 统计图表-WeAdmin Frame型后台管理系统-WeAdmin 1.0 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 |
15 |
16 | 特别声明:ECharts,一个纯 Javascript 的图表库,可以流畅的运行在 PC 和移动设备上,兼容当前绝大部分浏览器(IE8/9/10/11,Chrome,Firefox,Safari等),底层依赖轻量级的 Canvas 类库 ZRender,提供直观,生动,可交互,可高度个性化定制的数据可视化图表。WeAdmin提示:如需使用或者详细更多案例可以访问官网 ECharts。 17 |
18 | 19 |
20 |
21 | 注意:本案例的Echarts图表库由cdn引入,需要在线才能正常使用,若要离线使用,请至Echarts官网下载。 22 |
23 |
24 | 25 | 26 | 103 | 104 | -------------------------------------------------------------------------------- /page/pages/echarts/echarts5.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 统计图表-WeAdmin Frame型后台管理系统-WeAdmin 1.0 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 |
15 |
16 | 特别声明:ECharts,一个纯 Javascript 的图表库,可以流畅的运行在 PC 和移动设备上,兼容当前绝大部分浏览器(IE8/9/10/11,Chrome,Firefox,Safari等),底层依赖轻量级的 Canvas 类库 ZRender,提供直观,生动,可交互,可高度个性化定制的数据可视化图表。WeAdmin提示:如需使用或者详细更多案例可以访问官网 ECharts。 WeAdmin不承担任何版权问题。 17 |
18 | 19 |
20 |
21 | 注意:本案例的Echarts图表库由cdn引入,需要在线才能正常使用,若要离线使用,请至Echarts官网下载。 22 |
23 |
24 | 25 | 69 | 70 | -------------------------------------------------------------------------------- /page/pages/member/addInput.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 无刷新添加删除input输入框-WeAdmin Frame型后台管理系统-WeAdmin 1.0 7 | 8 | 9 | 10 | 11 | 12 | 13 | 17 | 41 | 42 | 43 | 44 | 45 |
46 | 47 | 首页 48 | 会员管理 49 | 输入框操作 50 | 51 | 53 | 54 | 55 |
56 |
57 |
58 | 59 | 共有数据:88 60 |
61 |
62 | 63 | 64 |
65 | 66 | 67 |
68 |
69 | 71 | 72 |
73 |
74 | 76 | 77 |
78 |
79 | 81 | 82 |
83 |
84 | 86 | 87 |
88 |
89 | 90 |
91 | 92 | 148 | 149 | 150 | 151 | 152 | -------------------------------------------------------------------------------- /page/pages/member/del.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 8 | 9 | 10 | 删除会员-WeAdmin Frame型后台管理系统-WeAdmin 1.0 11 | 12 | 13 | 14 | 15 | 16 | 17 | 21 | 22 | 23 | 24 |
25 | 26 | 首页 会员管理 27 | 删除会员 28 | 29 | 31 | 32 | 33 |
34 |
35 |
36 | 51 |
52 |
53 | 56 | 共有数据:88 条 57 |
58 | 59 | 60 | 61 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 103 | 104 | 105 | 108 | 109 | 110 | 111 | 112 | 113 | 114 | 115 | 127 | 128 | 129 |
62 |
63 | 64 |
65 |
ID用户名性别手机邮箱地址加入时间状态操作
80 |
81 | 82 |
83 |
1小明13000000000admin@mail.com北京市 海淀区2017-01-01 11:11:42 92 | 93 | 已删除 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 |
106 |
107 |
1小明13000000000admin@mail.com北京市 海淀区2017-01-01 11:11:42 116 | 117 | 已删除 118 | 119 | 120 | 121 | 122 | 123 | 124 | 125 | 126 |
130 |
131 |
132 | 133 | 1 134 | 2 135 | 3 136 | 489 137 | 138 |
139 |
140 | 141 |
142 | 143 | 144 | 145 | 146 | 147 | -------------------------------------------------------------------------------- /page/pages/member/index.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smartboy37597/NewsCMS/96b3a562aaedadeaeabcf3a7b594644f1e01f459/page/pages/member/index.js -------------------------------------------------------------------------------- /page/pages/member/password.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 修改密码-WeAdmin Frame型后台管理系统-WeAdmin 1.0 7 | 8 | 9 | 10 | 11 | 12 | 13 | 17 | 18 | 19 | 20 |
21 |
22 |
23 | 26 |
27 | 28 |
29 |
30 |
31 | 34 |
35 | 36 |
37 |
38 |
39 | 42 |
43 | 44 |
45 |
46 | 6到16个字符 47 |
48 |
49 |
50 | 53 |
54 | 55 |
56 |
57 |
58 | 60 | 61 |
62 |
63 |
64 | 65 | 91 | 92 | 93 | -------------------------------------------------------------------------------- /page/pages/welcome.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 欢迎页面-DDCMS Frame型后台管理系统-DDCMS 1.0 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 |
18 |
欢迎使用 DDCMS 新闻管理后台!
19 | 20 |
21 | 22 | 23 | 61 | 62 | -------------------------------------------------------------------------------- /page/static/css/font.css: -------------------------------------------------------------------------------- 1 | @font-face { 2 | font-family: 'iconfont'; 3 | src: url('../fonts/iconfont.eot'); 4 | src: url('../fonts/iconfont.eot?#iefix') format('embedded-opentype'), 5 | url('../fonts/iconfont.woff') format('woff'), 6 | url('../fonts/iconfont.ttf') format('truetype'), 7 | url('../fonts/iconfont.svg#iconfont') format('svg'); 8 | } 9 | .iconfont{ 10 | font-family:"iconfont" !important; 11 | font-size:16px;font-style:normal; 12 | -webkit-font-smoothing: antialiased; 13 | -webkit-text-stroke-width: 0.2px; 14 | -moz-osx-font-smoothing: grayscale; 15 | } 16 | 17 | -------------------------------------------------------------------------------- /page/static/fonts/iconfont.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smartboy37597/NewsCMS/96b3a562aaedadeaeabcf3a7b594644f1e01f459/page/static/fonts/iconfont.eot -------------------------------------------------------------------------------- /page/static/fonts/iconfont.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smartboy37597/NewsCMS/96b3a562aaedadeaeabcf3a7b594644f1e01f459/page/static/fonts/iconfont.ttf -------------------------------------------------------------------------------- /page/static/fonts/iconfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smartboy37597/NewsCMS/96b3a562aaedadeaeabcf3a7b594644f1e01f459/page/static/fonts/iconfont.woff -------------------------------------------------------------------------------- /page/static/images/aiwrap.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smartboy37597/NewsCMS/96b3a562aaedadeaeabcf3a7b594644f1e01f459/page/static/images/aiwrap.png -------------------------------------------------------------------------------- /page/static/images/bg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smartboy37597/NewsCMS/96b3a562aaedadeaeabcf3a7b594644f1e01f459/page/static/images/bg.png -------------------------------------------------------------------------------- /page/static/images/mapico1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smartboy37597/NewsCMS/96b3a562aaedadeaeabcf3a7b594644f1e01f459/page/static/images/mapico1.png -------------------------------------------------------------------------------- /page/static/images/mapico2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smartboy37597/NewsCMS/96b3a562aaedadeaeabcf3a7b594644f1e01f459/page/static/images/mapico2.png -------------------------------------------------------------------------------- /page/static/images/mapico3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smartboy37597/NewsCMS/96b3a562aaedadeaeabcf3a7b594644f1e01f459/page/static/images/mapico3.png -------------------------------------------------------------------------------- /page/static/images/mapico4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smartboy37597/NewsCMS/96b3a562aaedadeaeabcf3a7b594644f1e01f459/page/static/images/mapico4.png -------------------------------------------------------------------------------- /page/static/js/eleDel.js: -------------------------------------------------------------------------------- 1 | /* 2 | * @Author: https://github.com/WangEn 3 | * @Author: https://gitee.com/lovetime/ 4 | * @Date: 2018-03-27 5 | * @lastModify 2018-3-28 6 | * +---------------------------------------------------------------------- 7 | * | WeAdmin 表格table中多个删除等操作公用js 8 | * | 有改用时直接复制到对应页面也不影响使用 9 | * +---------------------------------------------------------------------- 10 | */ 11 | layui.extend({ 12 | admin: '{/}../../static/js/admin' 13 | }); 14 | layui.use(['laydate', 'jquery', 'admin'], function() { 15 | var laydate = layui.laydate, 16 | $ = layui.jquery, 17 | admin = layui.admin; 18 | //执行一个laydate实例 19 | laydate.render({ 20 | elem: '#start' //指定元素 21 | }); 22 | //执行一个laydate实例 23 | laydate.render({ 24 | elem: '#end' //指定元素 25 | }); 26 | /*用户-停用*/ 27 | window.member_stop = function (obj, id) { 28 | layer.confirm('确认要停用吗?', function(index) { 29 | if($(obj).attr('title') == '启用') { 30 | 31 | //发异步把用户状态进行更改 32 | $(obj).attr('title', '停用') 33 | $(obj).find('i').html(''); 34 | 35 | $(obj).parents("tr").find(".td-status").find('span').addClass('layui-btn-disabled').html('已停用'); 36 | layer.msg('已停用!', { 37 | icon: 5, 38 | time: 1000 39 | }); 40 | 41 | } else { 42 | $(obj).attr('title', '启用') 43 | $(obj).find('i').html(''); 44 | 45 | $(obj).parents("tr").find(".td-status").find('span').removeClass('layui-btn-disabled').html('已启用'); 46 | layer.msg('已启用!', { 47 | icon: 5, 48 | time: 1000 49 | }); 50 | } 51 | }); 52 | } 53 | 54 | /*用户-删除*/ 55 | window.member_del = function (obj, id) { 56 | layer.confirm('确认要删除吗?', function(index) { 57 | //发异步删除数据 58 | $(obj).parents("tr").remove(); 59 | layer.msg('已删除!', { 60 | icon: 1, 61 | time: 1000 62 | }); 63 | }); 64 | } 65 | 66 | window.delAll = function (argument) { 67 | var data = tableCheck.getData(); 68 | layer.confirm('确认要删除吗?' + data, function(index) { 69 | //捉到所有被选中的,发异步进行删除 70 | layer.msg('删除成功', { 71 | icon: 1 72 | }); 73 | $(".layui-form-checked").not('.header').parents('tr').remove(); 74 | }); 75 | } 76 | 77 | }); -------------------------------------------------------------------------------- /page/static/js/menu.1.js: -------------------------------------------------------------------------------- 1 | /** 2 | * 废弃,仅供参考代码,可直接删除!! 3 | * 扩展一个Menu模块,dev中间版本 4 | * 通过插入的方式,直接一级级完全拼接进去 5 | **/ 6 | 7 | layui.define(['jquery'], function(exports) { //提示:模块也可以依赖其它模块,如:layui.define('layer', callback); 8 | var $ = layui.jquery; 9 | var obj = { 10 | getMenu: function(curl) { 11 | if(!$('#side-nav').length){ 12 | return; 13 | } 14 | $.getJSON(curl, function(res) { 15 | var menuList = res.data; 16 | var items = []; 17 | var _ul = $('
    ').addClass('nav').attr('id', 'nav'); 18 | $.each(menuList, function(index, val) { 19 | var item = '
  • ' + val.icon + '' + val.name + 20 | ''; 21 | if(val.children && val.children.length){ 22 | //有二级子菜单 23 | var _subitems = []; 24 | var _subul = $('
      ').addClass('sub-menu'); 25 | $.each(val.children, function(idx, submenu){ 26 | var _subitem = '
    • '+ submenu.name +''; 27 | if(submenu.children && submenu.children.length){ 28 | // 有三级子菜单 29 | var _seconditems = []; 30 | var _secondul = $('
        ').addClass('sub-menu'); 31 | $.each(submenu.children, function(idxx, secondmenu){ 32 | var _seconditem = '
      • '+ secondmenu.name +'
      • '; 33 | _seconditems.push(_seconditem); 34 | }); 35 | _secondul.append(_seconditems.join('')); 36 | _subitem += ''; 37 | } 38 | _subitem += ''; 39 | _subitems.push(_subitem); 40 | }) 41 | _subul.append(_subitems.join('')); 42 | item += ''; 43 | } 44 | item += ''; 45 | items.push(item); 46 | }); 47 | $('#side-nav').empty(); 48 | _ul.append(items.join('')); 49 | $('#side-nav').append(_ul); 50 | }); 51 | }, 52 | /** 53 | * @param {Object} id 上级子菜单id,拼接menu获取元素 54 | * @param {Object} subList 子菜单列表 55 | */ 56 | getSubMenu: function(id, subList){ 57 | var subItems = []; 58 | var subUl = $('
          ').addClass('sub-menu'); 59 | $.each(subList, function(idx, sub){ 60 | var subItem = '
        • '+ sub.name +'
        • '; 61 | subItems.push(subItem); 62 | }); 63 | subUl.append(subItems.join('')); 64 | $('#menu'+id).appendTo(subUl); 65 | } 66 | }; 67 | 68 | //输出test接口 69 | exports('menu', obj); 70 | }); 71 | -------------------------------------------------------------------------------- /page/static/js/menu.js: -------------------------------------------------------------------------------- 1 | /* 2 | * @Author: https://github.com/WangEn 3 | * @Author: https://gitee.com/lovetime/ 4 | * @Date: 2019-06-18 5 | * @lastModify 2019-06-20 11:45:41 6 | * +---------------------------------------------------------------------- 7 | * | Weadmin [ 后台管理模板 ] 8 | * | 基于Layui http://www.layui.com/ 9 | * +---------------------------------------------------------------------- 10 | */ 11 | /** 12 | * 扩展一个Menu模块,动态获取左侧菜单 13 | * 目前多级子菜单是通过延时循环获取的方式 14 | * 也可以采用点击时获取下级子菜单的方式 15 | * 当然,具体的情况要参照自己的需求及api返回结构 16 | **/ 17 | 18 | layui.define('jquery', function(exports) { 19 | var $ = layui.jquery; 20 | var menu = { 21 | getMenu: function(curl) { 22 | var that = this; 23 | if (!$('#side-nav').length) { 24 | return; 25 | } 26 | $.getJSON(curl, function(res) { 27 | var menuList = res.data; 28 | var items = []; 29 | var _ul = $('
            ').addClass('nav').attr('id', 'nav'); 30 | $.each(menuList, function(index, val) { 31 | var item = ''; 34 | 35 | items.push(item); 36 | if (val.children && val.children.length) { 37 | //有二级子菜单 38 | setTimeout(function() { 39 | that.getSubMenu(val.id, val.children); 40 | }, 500); 41 | } 42 | }); 43 | $('#side-nav').empty(); 44 | _ul.append(items.join('')); 45 | $('#side-nav').append(_ul); 46 | }); 47 | }, 48 | /** 49 | * @param {Object} id 上级子菜单id,拼接menu获取元素 50 | * @param {Object} subList 子菜单列表 51 | */ 52 | getSubMenu: function(id, subList) { 53 | var that = this; 54 | var subItems = []; 55 | var subUl = $('
              ').addClass('sub-menu'); 56 | $.each(subList, function(idx, sub) { 57 | var subItem = ''; 59 | subItems.push(subItem); 60 | if (sub.children && sub.children.length) { 61 | setTimeout(function() { 62 | that.getSubMenu(sub.id, sub.children); 63 | }, 1500); 64 | } 65 | }); 66 | subUl.append(subItems.join('')); 67 | $('#menu' + id).append(subUl); 68 | } 69 | }; 70 | 71 | exports('menu', menu); 72 | }); 73 | -------------------------------------------------------------------------------- /page/static/js/weadmin.js: -------------------------------------------------------------------------------- 1 | //废弃代码,仅供参考 2 | $(function() { 3 | //加载弹出层 4 | layui.use(['form', 'element'], 5 | function() { 6 | layer = layui.layer; 7 | element = layui.element; 8 | }); 9 | 10 | //触发事件 11 | var tab = { 12 | tabAdd: function(title, url, id) { 13 | //新增一个Tab项 14 | element.tabAdd('wenav_tab', { 15 | title: title, 16 | content: '', 17 | id: id 18 | }) 19 | }, 20 | tabDelete: function(othis) { 21 | //删除指定Tab项 22 | element.tabDelete('wenav_tab', '44'); //删除:“商品管理” 23 | 24 | othis.addClass('layui-btn-disabled'); 25 | }, 26 | tabChange: function(id) { 27 | //切换到指定Tab项 28 | element.tabChange('wenav_tab', id); //切换到:用户管理 29 | } 30 | }; 31 | 32 | tableCheck = { 33 | init: function() { 34 | $(".layui-form-checkbox").click(function(event) { 35 | if($(this).hasClass('layui-form-checked')) { 36 | $(this).removeClass('layui-form-checked'); 37 | if($(this).hasClass('header')) { 38 | $(".layui-form-checkbox").removeClass('layui-form-checked'); 39 | } 40 | } else { 41 | $(this).addClass('layui-form-checked'); 42 | if($(this).hasClass('header')) { 43 | $(".layui-form-checkbox").addClass('layui-form-checked'); 44 | } 45 | } 46 | 47 | }); 48 | }, 49 | getData: function() { 50 | var obj = $(".layui-form-checked").not('.header'); 51 | var arr = []; 52 | obj.each(function(index, el) { 53 | arr.push(obj.eq(index).attr('data-id')); 54 | }); 55 | return arr; 56 | } 57 | } 58 | 59 | //开启表格多选 60 | tableCheck.init(); 61 | 62 | $('.container .left_open i').click(function(event) { 63 | if($('.left-nav').css('left') == '0px') { 64 | $('.left-nav').animate({ 65 | left: '-221px' 66 | }, 100); 67 | $('.page-content').animate({ 68 | left: '0px' 69 | }, 100); 70 | $('.page-content-bg').hide(); 71 | } else { 72 | $('.left-nav').animate({ 73 | left: '0px' 74 | }, 100); 75 | $('.page-content').animate({ 76 | left: '221px' 77 | }, 100); 78 | if($(window).width() < 768) { 79 | $('.page-content-bg').show(); 80 | } 81 | } 82 | 83 | }); 84 | 85 | $('.page-content-bg').click(function(event) { 86 | $('.left-nav').animate({ 87 | left: '-221px' 88 | }, 100); 89 | $('.page-content').animate({ 90 | left: '0px' 91 | }, 100); 92 | $(this).hide(); 93 | }); 94 | 95 | $('.layui-tab-close').click(function(event) { 96 | $('.layui-tab-title li').eq(0).find('i').remove(); 97 | }); 98 | 99 | //左侧菜单效果 100 | // $('#content').bind("click",function(event){ 101 | $('.left-nav #nav li').click(function(event) { 102 | 103 | if($(this).children('.sub-menu').length) { 104 | if($(this).hasClass('open')) { 105 | $(this).removeClass('open'); 106 | $(this).find('.nav_right').html(''); 107 | $(this).children('.sub-menu').stop().slideUp(); 108 | $(this).siblings().children('.sub-menu').slideUp(); 109 | } else { 110 | $(this).addClass('open'); 111 | $(this).children('a').find('.nav_right').html(''); 112 | $(this).children('.sub-menu').stop().slideDown(); 113 | $(this).siblings().children('.sub-menu').stop().slideUp(); 114 | $(this).siblings().find('.nav_right').html(''); 115 | $(this).siblings().removeClass('open'); 116 | } 117 | } else { 118 | 119 | var url = $(this).children('a').attr('_href'); 120 | var title = $(this).find('cite').html(); 121 | var index = $('.left-nav #nav li').index($(this)); 122 | 123 | for(var i = 0; i < $('.x-iframe').length; i++) { 124 | if($('.x-iframe').eq(i).attr('tab-id') == index + 1) { 125 | tab.tabChange(index + 1); 126 | event.stopPropagation(); 127 | return; 128 | } 129 | }; 130 | 131 | tab.tabAdd(title, url, index + 1); 132 | tab.tabChange(index + 1); 133 | } 134 | 135 | event.stopPropagation(); 136 | 137 | }) 138 | 139 | }) 140 | 141 | /*弹出层*/ 142 | /* 143 | 参数解释: 144 | title 标题 145 | url 请求的url 146 | id 需要操作的数据id 147 | w 弹出层宽度(缺省调默认值) 148 | h 弹出层高度(缺省调默认值) 149 | */ 150 | function x_admin_show(title, url, w, h) { 151 | if(title == null || title == '') { 152 | title = false; 153 | }; 154 | if(url == null || url == '') { 155 | url = "404.html"; 156 | }; 157 | if(w == null || w == '') { 158 | w = ($(window).width() * 0.9); 159 | }; 160 | if(h == null || h == '') { 161 | h = ($(window).height() - 50); 162 | }; 163 | layer.open({ 164 | type: 2, 165 | area: [w + 'px', h + 'px'], 166 | fix: false, //不固定 167 | maxmin: true, 168 | shadeClose: true, 169 | shade: 0.4, 170 | title: title, 171 | content: url 172 | }); 173 | } 174 | 175 | /*关闭弹出框口*/ 176 | function x_admin_close() { 177 | var index = parent.layer.getFrameIndex(window.name); 178 | parent.layer.close(index); 179 | } -------------------------------------------------------------------------------- /page/user.json: -------------------------------------------------------------------------------- 1 | {"code":0,"msg":"","count":1000,"data":[{"id":10000,"username":"user-0","sex":"女","city":"城市-0","sign":"签名-0","experience":255,"logins":24,"wealth":82830700,"classify":"作家","score":57},{"id":10001,"username":"user-1","sex":"男","city":"城市-1","sign":"签名-1","experience":884,"logins":58,"wealth":64928690,"classify":"词人","score":27},{"id":10002,"username":"user-2","sex":"女","city":"城市-2","sign":"签名-2","experience":650,"logins":77,"wealth":6298078,"classify":"酱油","score":31},{"id":10003,"username":"user-3","sex":"女","city":"城市-3","sign":"签名-3","experience":362,"logins":157,"wealth":37117017,"classify":"诗人","score":68},{"id":10004,"username":"user-4","sex":"男","city":"城市-4","sign":"签名-4","experience":807,"logins":51,"wealth":76263262,"classify":"作家","score":6},{"id":10005,"username":"user-5","sex":"女","city":"城市-5","sign":"签名-5","experience":173,"logins":68,"wealth":60344147,"classify":"作家","score":87},{"id":10006,"username":"user-6","sex":"女","city":"城市-6","sign":"签名-6","experience":982,"logins":37,"wealth":57768166,"classify":"作家","score":34},{"id":10007,"username":"user-7","sex":"男","city":"城市-7","sign":"签名-7","experience":727,"logins":150,"wealth":82030578,"classify":"作家","score":28},{"id":10008,"username":"user-8","sex":"男","city":"城市-8","sign":"签名-8","experience":951,"logins":133,"wealth":16503371,"classify":"词人","score":14}]} --------------------------------------------------------------------------------