├── .gitignore ├── doc ├── ~$学生选课系统.docx └── 高校学生选课系统.docx ├── logs └── mylog-2017-03-03.0.log ├── pom.xml └── src ├── main ├── java │ └── com │ │ └── hus │ │ ├── Application.java │ │ ├── common │ │ ├── config │ │ │ ├── DruidConfiguration.java │ │ │ ├── MelodyConfiguration.java │ │ │ ├── MybaitsConfig.java │ │ │ ├── TransactionConfig.java │ │ │ └── WebConfiguration.java │ │ ├── consts │ │ │ ├── App.java │ │ │ ├── Url.java │ │ │ └── View.java │ │ ├── swagger │ │ │ └── Swagger2.java │ │ └── utils │ │ │ └── MyX509TrustManagerUtil.java │ │ └── web │ │ ├── controller │ │ ├── api │ │ │ └── ApiController.java │ │ ├── web │ │ │ ├── BaseConrtoller.java │ │ │ ├── CourseController.java │ │ │ ├── DemoController.java │ │ │ ├── LoginController.java │ │ │ └── UserController.java │ │ └── wechat │ │ │ ├── WechatAuthController.java │ │ │ └── WechatEventController.java │ │ ├── entity │ │ ├── Course.java │ │ ├── SystemModule.java │ │ └── User.java │ │ ├── mapper │ │ ├── CourseMapper.java │ │ ├── DepartmentMapper.java │ │ ├── SystemModuleMapper.java │ │ └── UserMapper.java │ │ ├── service │ │ ├── CourseService.java │ │ ├── LoginService.java │ │ └── UserService.java │ │ └── utils │ │ ├── HttpClientUtil.java │ │ └── SignUtil.java ├── resources │ ├── config │ │ └── application.yml │ └── sqlMap │ │ ├── CourseMapper.xml │ │ ├── DepartmentMapper.xml │ │ ├── SystemModuleMapper.xml │ │ └── UserMapper.xml └── webapp │ ├── WEB-INF │ ├── view │ │ ├── course │ │ │ ├── admin_index.jsp │ │ │ └── index.jsp │ │ ├── error.jsp │ │ ├── home │ │ │ └── index.jsp │ │ ├── login │ │ │ └── index.jsp │ │ ├── mobile │ │ │ ├── index.jsp │ │ │ └── student_choosed_page.jsp │ │ ├── student │ │ │ ├── choosed_course.jsp │ │ │ └── index.jsp │ │ └── teacher │ │ │ └── index.jsp │ └── web.xml │ ├── base.jsp │ ├── bootstrap │ ├── css │ │ ├── bootstrap-switch.css │ │ ├── bootstrap-switch.min.css │ │ ├── bootstrap-theme.css │ │ ├── bootstrap-theme.css.map │ │ ├── bootstrap-theme.min.css │ │ ├── bootstrap-theme.min.css.map │ │ ├── bootstrap.css │ │ ├── bootstrap.css.map │ │ ├── bootstrap.min.css │ │ └── bootstrap.min.css.map │ ├── fonts │ │ ├── glyphicons-halflings-regular.eot │ │ ├── glyphicons-halflings-regular.svg │ │ ├── glyphicons-halflings-regular.ttf │ │ ├── glyphicons-halflings-regular.woff │ │ └── glyphicons-halflings-regular.woff2 │ └── js │ │ ├── bootstrap-paginator.js │ │ ├── bootstrap-switch.js │ │ ├── bootstrap-switch.min.js │ │ ├── bootstrap.js │ │ ├── bootstrap.min.js │ │ └── npm.js │ ├── css │ ├── leftMenu.css │ └── signin.css │ ├── js │ └── jquery.min.js │ ├── layui │ ├── css │ │ ├── layui.css │ │ ├── layui.mobile.css │ │ └── modules │ │ │ ├── code.css │ │ │ ├── laydate │ │ │ ├── icon.png │ │ │ └── laydate.css │ │ │ └── layer │ │ │ └── default │ │ │ ├── icon-ext.png │ │ │ ├── icon.png │ │ │ ├── layer.css │ │ │ ├── loading-0.gif │ │ │ ├── loading-1.gif │ │ │ └── loading-2.gif │ ├── font │ │ ├── iconfont.eot │ │ ├── iconfont.svg │ │ ├── iconfont.ttf │ │ └── iconfont.woff │ ├── images │ │ └── face │ │ │ ├── 0.gif │ │ │ ├── 1.gif │ │ │ ├── 10.gif │ │ │ ├── 11.gif │ │ │ ├── 12.gif │ │ │ ├── 13.gif │ │ │ ├── 14.gif │ │ │ ├── 15.gif │ │ │ ├── 16.gif │ │ │ ├── 17.gif │ │ │ ├── 18.gif │ │ │ ├── 19.gif │ │ │ ├── 2.gif │ │ │ ├── 20.gif │ │ │ ├── 21.gif │ │ │ ├── 22.gif │ │ │ ├── 23.gif │ │ │ ├── 24.gif │ │ │ ├── 25.gif │ │ │ ├── 26.gif │ │ │ ├── 27.gif │ │ │ ├── 28.gif │ │ │ ├── 29.gif │ │ │ ├── 3.gif │ │ │ ├── 30.gif │ │ │ ├── 31.gif │ │ │ ├── 32.gif │ │ │ ├── 33.gif │ │ │ ├── 34.gif │ │ │ ├── 35.gif │ │ │ ├── 36.gif │ │ │ ├── 37.gif │ │ │ ├── 38.gif │ │ │ ├── 39.gif │ │ │ ├── 4.gif │ │ │ ├── 40.gif │ │ │ ├── 41.gif │ │ │ ├── 42.gif │ │ │ ├── 43.gif │ │ │ ├── 44.gif │ │ │ ├── 45.gif │ │ │ ├── 46.gif │ │ │ ├── 47.gif │ │ │ ├── 48.gif │ │ │ ├── 49.gif │ │ │ ├── 5.gif │ │ │ ├── 50.gif │ │ │ ├── 51.gif │ │ │ ├── 52.gif │ │ │ ├── 53.gif │ │ │ ├── 54.gif │ │ │ ├── 55.gif │ │ │ ├── 56.gif │ │ │ ├── 57.gif │ │ │ ├── 58.gif │ │ │ ├── 59.gif │ │ │ ├── 6.gif │ │ │ ├── 60.gif │ │ │ ├── 61.gif │ │ │ ├── 62.gif │ │ │ ├── 63.gif │ │ │ ├── 64.gif │ │ │ ├── 65.gif │ │ │ ├── 66.gif │ │ │ ├── 67.gif │ │ │ ├── 68.gif │ │ │ ├── 69.gif │ │ │ ├── 7.gif │ │ │ ├── 70.gif │ │ │ ├── 71.gif │ │ │ ├── 8.gif │ │ │ └── 9.gif │ ├── lay │ │ ├── dest │ │ │ └── layui.all.js │ │ └── modules │ │ │ ├── code.js │ │ │ ├── element.js │ │ │ ├── flow.js │ │ │ ├── form.js │ │ │ ├── jquery.js │ │ │ ├── laydate.js │ │ │ ├── layedit.js │ │ │ ├── layer.js │ │ │ ├── laypage.js │ │ │ ├── laytpl.js │ │ │ ├── mobile.js │ │ │ ├── tree.js │ │ │ ├── upload.js │ │ │ └── util.js │ └── layui.js │ ├── menu.jsp │ └── nav.jsp └── test └── java └── com └── hus └── DemoApplicationTests.java /.gitignore: -------------------------------------------------------------------------------- 1 | target/ 2 | !.mvn/wrapper/maven-wrapper.jar 3 | 4 | ### STS ### 5 | .apt_generated 6 | .classpath 7 | .factorypath 8 | .project 9 | .settings 10 | .springBeans 11 | 12 | ### IntelliJ IDEA ### 13 | .idea 14 | *.iws 15 | *.iml 16 | *.ipr 17 | /log 18 | ### NetBeans ### 19 | nbproject/private/ 20 | build/ 21 | nbbuild/ 22 | dist/ 23 | nbdist/ 24 | .nb-gradle/ -------------------------------------------------------------------------------- /doc/~$学生选课系统.docx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/heavenfucking/SpringBootHus/58ea23de02f0868afdf43879f9e45b2d676df16c/doc/~$学生选课系统.docx -------------------------------------------------------------------------------- /doc/高校学生选课系统.docx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/heavenfucking/SpringBootHus/58ea23de02f0868afdf43879f9e45b2d676df16c/doc/高校学生选课系统.docx -------------------------------------------------------------------------------- /logs/mylog-2017-03-03.0.log: -------------------------------------------------------------------------------- 1 | https://open.weixin.qq.com/connect/oauth2/authorize?appid=wxa4cc0a202b65477c&redirect_uri=http://17157bv023.51mypc.cn/hus/wechat/callback&response_type=code&scope=snsapi_userinfo&state=STATE#wechat_redirect 2 | https://open.weixin.qq.com/connect/oauth2/authorize?appid=wxa4cc0a202b65477c&redirect_uri=http://17157bv023.51mypc.cn/hus/wechat/callback&response_type=code&scope=snsapi_userinfo&state=123#wechat_redirect 3 | { 4 | "button":[ 5 | { 6 | "name":"自助服务", 7 | "sub_button":[ 8 | { 9 | "type":"view", 10 | "name":"高校学生选课系统学生登录", 11 | "url":"http://17157bv023.51mypc.cn/hus/wechat/enter" 12 | }] 13 | }] 14 | } -------------------------------------------------------------------------------- /pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 4.0.0 5 | 6 | com.example 7 | demo 8 | 0.0.1-SNAPSHOT 9 | war 10 | 11 | demo 12 | Demo project for Spring Boot 13 | 14 | 15 | org.springframework.boot 16 | spring-boot-starter-parent 17 | 1.5.1.RELEASE 18 | 19 | 20 | 21 | 22 | UTF-8 23 | UTF-8 24 | 1.8 25 | 26 | 27 | 28 | 29 | org.springframework.boot 30 | spring-boot-starter-web 31 | 32 | 33 | 34 | 35 | javax.servlet 36 | javax.servlet-api 37 | 38 | 39 | javax.servlet 40 | jstl 41 | 42 | 43 | 44 | 45 | org.springframework.boot 46 | spring-boot-starter-tomcat 47 | 48 | 49 | org.apache.tomcat.embed 50 | tomcat-embed-jasper 51 | 52 | 53 | 54 | 55 | mysql 56 | mysql-connector-java 57 | 5.1.39 58 | 59 | 60 | 61 | org.springframework.boot 62 | spring-boot-starter-jdbc 63 | 64 | 65 | 66 | com.alibaba 67 | druid 68 | 1.0.26 69 | 70 | 71 | 72 | 73 | org.mybatis 74 | mybatis 75 | 3.4.1 76 | 77 | 78 | org.mybatis 79 | mybatis-spring 80 | 1.3.0 81 | 82 | 83 | 84 | 85 | net.bull.javamelody 86 | javamelody-core 87 | 1.60.0 88 | 89 | 90 | 91 | org.apache.httpcomponents 92 | httpclient 93 | 4.3.4 94 | 95 | 96 | org.apache.httpcomponents 97 | httpasyncclient 98 | 4.0.2 99 | 100 | 101 | commons-httpclient 102 | commons-httpclient 103 | 3.1 104 | 105 | 106 | 107 | io.springfox 108 | springfox-swagger-ui 109 | 2.6.1 110 | 111 | 112 | io.springfox 113 | springfox-swagger2 114 | 2.6.1 115 | 116 | 117 | 118 | commons-lang 119 | commons-lang 120 | 2.6 121 | 122 | 123 | 124 | 125 | net.sf.json-lib 126 | json-lib 127 | 2.4 128 | jdk15 129 | 130 | 131 | 132 | org.springframework.boot 133 | spring-boot-starter-test 134 | test 135 | 136 | 137 | 138 | 139 | demo 140 | 141 | 142 | org.springframework.boot 143 | spring-boot-maven-plugin 144 | 145 | 146 | 147 | 148 | 149 | -------------------------------------------------------------------------------- /src/main/java/com/hus/Application.java: -------------------------------------------------------------------------------- 1 | package com.hus; 2 | 3 | import org.springframework.boot.SpringApplication; 4 | import org.springframework.boot.autoconfigure.SpringBootApplication; 5 | 6 | @SpringBootApplication 7 | public class Application { 8 | public static void main(String[] args) { 9 | SpringApplication.run(Application.class, args); 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /src/main/java/com/hus/common/config/DruidConfiguration.java: -------------------------------------------------------------------------------- 1 | package com.hus.common.config; 2 | 3 | import com.alibaba.druid.pool.DruidDataSource; 4 | import com.alibaba.druid.support.http.StatViewServlet; 5 | import com.alibaba.druid.support.http.WebStatFilter; 6 | import org.springframework.beans.factory.annotation.Value; 7 | import org.springframework.boot.web.servlet.FilterRegistrationBean; 8 | import org.springframework.boot.web.servlet.ServletRegistrationBean; 9 | import org.springframework.context.annotation.Bean; 10 | import org.springframework.context.annotation.Configuration; 11 | 12 | import javax.sql.DataSource; 13 | import java.sql.SQLException; 14 | 15 | /** 16 | * Created by zhao on 2017/3/3. 17 | */ 18 | @Configuration 19 | public class DruidConfiguration { 20 | 21 | @Bean 22 | public ServletRegistrationBean druidServlet() { 23 | return new ServletRegistrationBean(new StatViewServlet(), "/druid/*"); 24 | } 25 | 26 | @Bean 27 | public DataSource druidDataSource(@Value("${spring.datasource.driver}") String driver, 28 | @Value("${spring.datasource.url}") String url, 29 | @Value("${spring.datasource.username}") String username, 30 | @Value("${spring.datasource.password}") String password) { 31 | DruidDataSource druidDataSource = new DruidDataSource(); 32 | druidDataSource.setDriverClassName(driver); 33 | druidDataSource.setUrl(url); 34 | druidDataSource.setUsername(username); 35 | druidDataSource.setPassword(password); 36 | try { 37 | druidDataSource.setFilters("stat, wall"); 38 | } catch (SQLException e) { 39 | e.printStackTrace(); 40 | } 41 | return druidDataSource; 42 | } 43 | 44 | @Bean 45 | public FilterRegistrationBean filterRegistrationBean() { 46 | FilterRegistrationBean filterRegistrationBean = new FilterRegistrationBean(); 47 | filterRegistrationBean.setFilter(new WebStatFilter()); 48 | filterRegistrationBean.addUrlPatterns("/*"); 49 | filterRegistrationBean.addInitParameter("exclusions", "*.js,*.gif,*.jpg,*.png,*.css,*.ico,/druid/*"); 50 | return filterRegistrationBean; 51 | } 52 | } 53 | -------------------------------------------------------------------------------- /src/main/java/com/hus/common/config/MelodyConfiguration.java: -------------------------------------------------------------------------------- 1 | package com.hus.common.config; 2 | 3 | import net.bull.javamelody.MonitoringFilter; 4 | import net.bull.javamelody.Parameter; 5 | import net.bull.javamelody.SessionListener; 6 | import org.springframework.boot.web.servlet.FilterRegistrationBean; 7 | import org.springframework.boot.web.servlet.ServletContextInitializer; 8 | import org.springframework.context.annotation.Bean; 9 | import org.springframework.stereotype.Component; 10 | 11 | import javax.servlet.DispatcherType; 12 | import javax.servlet.ServletContext; 13 | import javax.servlet.ServletException; 14 | 15 | /** 16 | * Created by zhu on 2017/2/21. 17 | */ 18 | @Component 19 | public class MelodyConfiguration implements ServletContextInitializer { 20 | @Override 21 | public void onStartup(ServletContext servletContext) throws ServletException { 22 | 23 | } 24 | @Bean 25 | public FilterRegistrationBean registrationBean() { 26 | FilterRegistrationBean javaMelody = new FilterRegistrationBean(); 27 | javaMelody.setFilter(new MonitoringFilter()); 28 | javaMelody.setAsyncSupported(true); 29 | javaMelody.setName("melody"); 30 | javaMelody.setDispatcherTypes(DispatcherType.REQUEST, DispatcherType.ASYNC); 31 | javaMelody.addInitParameter(Parameter.LOG.getCode(), "true"); 32 | return javaMelody; 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /src/main/java/com/hus/common/config/MybaitsConfig.java: -------------------------------------------------------------------------------- 1 | package com.hus.common.config; 2 | 3 | import org.mybatis.spring.SqlSessionFactoryBean; 4 | import org.mybatis.spring.annotation.MapperScan; 5 | import org.mybatis.spring.mapper.MapperScannerConfigurer; 6 | import org.springframework.beans.factory.annotation.Autowired; 7 | import org.springframework.context.annotation.Bean; 8 | import org.springframework.context.annotation.Configuration; 9 | import org.springframework.core.io.support.PathMatchingResourcePatternResolver; 10 | 11 | import javax.sql.DataSource; 12 | import java.io.IOException; 13 | 14 | /** 15 | * Created by zhh on 2017/3/3. 16 | */ 17 | @Configuration 18 | @MapperScan("com.hus.web.mapper") 19 | public class MybaitsConfig { 20 | 21 | @Autowired 22 | private DataSource dataSource; 23 | @Bean(name = "sqlSessionFactory") 24 | public SqlSessionFactoryBean sqlSessionFactory() { 25 | SqlSessionFactoryBean session = new SqlSessionFactoryBean(); 26 | try { 27 | session.setDataSource(dataSource); 28 | PathMatchingResourcePatternResolver resolver = new PathMatchingResourcePatternResolver(); 29 | session.setMapperLocations(resolver.getResources("classpath:sqlMap/*.xml")); 30 | } catch (IOException e) { 31 | e.printStackTrace(); 32 | } 33 | return session; 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /src/main/java/com/hus/common/config/TransactionConfig.java: -------------------------------------------------------------------------------- 1 | package com.hus.common.config; 2 | 3 | import org.springframework.beans.factory.annotation.Autowired; 4 | import org.springframework.context.annotation.Bean; 5 | import org.springframework.context.annotation.Configuration; 6 | import org.springframework.jdbc.datasource.DataSourceTransactionManager; 7 | import org.springframework.transaction.PlatformTransactionManager; 8 | import org.springframework.transaction.annotation.EnableTransactionManagement; 9 | import org.springframework.transaction.annotation.TransactionManagementConfigurer; 10 | 11 | import javax.annotation.Resource; 12 | import javax.sql.DataSource; 13 | 14 | /** 15 | * Created by tanghong on 2017/2/21. 16 | */ 17 | @Configuration 18 | public class TransactionConfig implements TransactionManagementConfigurer { 19 | 20 | 21 | @Resource(name = "transactionManager") 22 | PlatformTransactionManager transactionManager; 23 | 24 | @Bean(name ="transactionManager") 25 | public PlatformTransactionManager getManager(DataSource dataSource){ 26 | return new DataSourceTransactionManager(dataSource); 27 | } 28 | @Override 29 | public PlatformTransactionManager annotationDrivenTransactionManager() { 30 | return transactionManager; 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /src/main/java/com/hus/common/config/WebConfiguration.java: -------------------------------------------------------------------------------- 1 | package com.hus.common.config; 2 | 3 | import org.slf4j.Logger; 4 | import org.slf4j.LoggerFactory; 5 | import org.springframework.context.annotation.Configuration; 6 | import org.springframework.web.servlet.HandlerInterceptor; 7 | import org.springframework.web.servlet.ModelAndView; 8 | import org.springframework.web.servlet.config.annotation.EnableWebMvc; 9 | import org.springframework.web.servlet.config.annotation.InterceptorRegistry; 10 | import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter; 11 | import org.springframework.web.servlet.handler.HandlerInterceptorAdapter; 12 | 13 | import javax.servlet.http.HttpServletRequest; 14 | import javax.servlet.http.HttpServletResponse; 15 | 16 | /** 17 | * Created by zhh on 2017/3/3. 18 | */ 19 | //@Configuration 20 | //@EnableWebMvc 21 | public class WebConfiguration extends WebMvcConfigurerAdapter { 22 | 23 | @Override 24 | public void addInterceptors(InterceptorRegistry registry) { 25 | // 多个拦截器组成一个拦截器链 26 | // addPathPatterns 用于添加拦截规则 27 | // excludePathPatterns 用户排除拦截 28 | // registry.addInterceptor(new MyInterceptor1()).excludePathPatterns("/**"); 29 | // registry.addInterceptor(new MyInterceptor2()).addPathPatterns("/**"); 30 | super.addInterceptors(registry); 31 | } 32 | 33 | private class MyInterceptor1 extends HandlerInterceptorAdapter{ 34 | private Logger logger = LoggerFactory.getLogger(this.getClass()); 35 | 36 | @Override 37 | public boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object handler) throws Exception { 38 | logger.info("remoteAddr="+request.getRemoteAddr()+" request="+request.getRequestURI()); 39 | return true; 40 | } 41 | 42 | @Override 43 | public void postHandle(HttpServletRequest request, HttpServletResponse response, Object handler, ModelAndView modelAndView) throws Exception { 44 | super.postHandle(request, response, handler, modelAndView); 45 | } 46 | 47 | } 48 | 49 | private class MyInterceptor2 implements HandlerInterceptor { 50 | 51 | @Override 52 | public boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object handler) 53 | throws Exception { 54 | System.out.println(">>>MyInterceptor2>>>>>>>在请求处理之前进行调用(Controller方法调用之前)"); 55 | 56 | return true;// 只有返回true才会继续向下执行,返回false取消当前请求 57 | } 58 | 59 | @Override 60 | public void postHandle(HttpServletRequest request, HttpServletResponse response, Object handler, 61 | ModelAndView modelAndView) throws Exception { 62 | System.out.println(">>>MyInterceptor2>>>>>>>请求处理之后进行调用,但是在视图被渲染之前(Controller方法调用之后)"); 63 | } 64 | 65 | @Override 66 | public void afterCompletion(HttpServletRequest request, HttpServletResponse response, Object handler, Exception ex) 67 | throws Exception { 68 | System.out.println(">>>MyInterceptor2>>>>>>>在整个请求结束之后被调用,也就是在DispatcherServlet 渲染了对应的视图之后执行(主要是用于进行资源清理工作)"); 69 | } 70 | 71 | } 72 | } -------------------------------------------------------------------------------- /src/main/java/com/hus/common/consts/App.java: -------------------------------------------------------------------------------- 1 | package com.hus.common.consts; 2 | 3 | import org.springframework.beans.factory.annotation.Value; 4 | import org.springframework.stereotype.Component; 5 | 6 | /** 7 | * Created by zhu on 2017/3/15. 8 | */ 9 | public interface App { 10 | 11 | @Component 12 | class Wechat { 13 | /** 微信公众号唯一标识*/ 14 | public static String APPID; 15 | /** 微信公众号的appsecret */ 16 | public static String APPSECRET; 17 | 18 | @Value("${spring.wechat.appID}") 19 | public void setAPPID(String APPID) { 20 | Wechat.APPID = APPID; 21 | } 22 | @Value("${spring.wechat.appsecret}") 23 | public void setAPPSECRET(String APPSECRET) { 24 | Wechat.APPSECRET = APPSECRET; 25 | } 26 | } 27 | 28 | class Session { 29 | /** 当前用户的ACCESS_TOKEN */ 30 | public static final String WECHAT_USER_ACCESS_TOKEN = "session_key_wechat_user_access_token"; 31 | /** 当前用户的openid */ 32 | public static final String WECHAT_USER_OPEN_ID = "session_key_user_open_id"; 33 | /** 当前用户对象 */ 34 | public static final String CURRENT_USER_OBJECT = "session_key_current_user_object"; 35 | /** 系统菜单 */ 36 | public static final String SYSTEM_MENU_ALL = "session_key_system_menu_all"; 37 | } 38 | 39 | } 40 | -------------------------------------------------------------------------------- /src/main/java/com/hus/common/consts/Url.java: -------------------------------------------------------------------------------- 1 | package com.hus.common.consts; 2 | 3 | public interface Url { 4 | 5 | /** 微信接口 */ 6 | class Wechat { 7 | /** 微信开发者接口 */ 8 | public static final String CORE_SERVICE = "coreService"; 9 | /** 微信授权回调接口 */ 10 | public static final String CALL_BACK = "wechat/callback"; 11 | /** 获取用户授权access_token的url */ 12 | public static final String AUTH_ACCESS_TOKEN_URL = "https://api.weixin.qq.com/sns/oauth2/access_token?appid=%s&secret=%s&code=%s&grant_type=authorization_code"; 13 | /** 14 | * 菜单创建-微信接口 15 | */ 16 | public static final String CREATE_NORMAL_MENU_URL = "https://api.weixin.qq.com/cgi-bin/menu/create?access_token=ACCESS_TOKEN"; 17 | /** 18 | * 获取accessToken 19 | */ 20 | public static final String GET_ACCESSTOKEN = "https://api.weixin.qq.com/cgi-bin/token?grant_type=" 21 | + "client_credential&appid=APPID&secret=APPSECRET"; 22 | 23 | } 24 | 25 | class Login{ 26 | 27 | public static final String SHOW_LOGIN_PAGE = ""; 28 | 29 | 30 | public static final String USER_LOGIN_URL = "user/login"; 31 | 32 | public static final String WECHAT_USER_LOGIN_URL = "wechatuser/login"; 33 | } 34 | 35 | class Course{ 36 | 37 | public static final String COURSE_LIST_URL = "course/list"; 38 | 39 | public static final String COURSE_ADD_URL = "course/add"; 40 | 41 | public static final String COURSE_UPDATE_URL = "course/update"; 42 | 43 | public static final String COURSE_INFO_URL = "course/info/{id}"; 44 | 45 | public static final String COURSE_DELETE_URL = "course/delete/{id}"; 46 | 47 | public static final String COURSE_LIST_URL_FOR_STU = "course/stulist"; 48 | 49 | public static final String WX_COURSE_LIST_URL_FOR_STU = "wx_course/stulist"; 50 | 51 | public static final String COURSE_LIST_URL_FOR_DDMIN = "course/adminlist"; 52 | } 53 | 54 | class Student{ 55 | 56 | public static final String STUDENt_LIST_URL = "student/list"; 57 | 58 | public static final String STUDENt_ADD_URL = "student/add"; 59 | 60 | public static final String STUDENT_UPDATE_URL = "student/update"; 61 | 62 | public static final String STUDENT_DELETE_URL = "student/delete/{id}"; 63 | 64 | public static final String STUDENT_INFO_URL = "student/info/{id}"; 65 | 66 | public static final String STUDENT_CHOOSED_COURSE = "student/choose/course"; 67 | 68 | public static final String STUDENT_UNCHOOSED_COURSE = "student/unchoose/course"; 69 | } 70 | 71 | class Teacher{ 72 | public static final String TEACHER_LIST_URL = "teacher/list"; 73 | public static final String TEACHER_ADD_URL = "teacher/add"; 74 | public static final String TEACHER_UPDATE_URL = "teacher/update"; 75 | public static final String TEACHER_DELETE_URL = "teacher/delete/{id}"; 76 | public static final String TEACHER_INFO_URL = "teacher/info/{id}"; 77 | } 78 | } 79 | -------------------------------------------------------------------------------- /src/main/java/com/hus/common/consts/View.java: -------------------------------------------------------------------------------- 1 | package com.hus.common.consts; 2 | 3 | /** 4 | * Created by zhh on 2017/5/4. 5 | */ 6 | public interface View { 7 | 8 | /** 9 | * 首页 10 | */ 11 | class Index{ 12 | 13 | /** 登陆主页 */ 14 | public static final String LOGIN_HOME_PAGE = "home/index"; 15 | 16 | /** WX 登陆主页 */ 17 | public static final String WX_LOGIN_HOME_PAGE = "mobile/index"; 18 | 19 | 20 | /**登录页面 **/ 21 | public static final String LOGIN_PAGE = "login/index"; 22 | } 23 | 24 | class Course{ 25 | 26 | /** 课程课表 */ 27 | public static final String COURSE_LIST_VIEW = "course/index"; 28 | 29 | /** 管理员看到的课程列表 */ 30 | public static final String ADMIN_COURSE_LIST_VIEW = "course/admin_index"; 31 | 32 | 33 | } 34 | 35 | class Student{ 36 | 37 | public static final String STUDENt_LIST_VIEW = "student/index"; 38 | 39 | /** 学生选课时看到的课程列表 */ 40 | public static final String COURSE_LIST_VIEW = "student/choosed_course"; 41 | 42 | /** 微信端 学生选课时看到的课程列表 */ 43 | public static final String COURSE_LIST_VIEW2 = "mobile/student_choosed_page"; 44 | } 45 | 46 | class Teacher{ 47 | 48 | public static final String TEACHER_LIST_VIEW = "teacher/index"; 49 | 50 | } 51 | 52 | class Error { 53 | public static final String ERROR_PAGE_VIEW = "teacher/index"; 54 | } 55 | 56 | 57 | } 58 | -------------------------------------------------------------------------------- /src/main/java/com/hus/common/swagger/Swagger2.java: -------------------------------------------------------------------------------- 1 | package com.hus.common.swagger; 2 | 3 | 4 | import io.swagger.annotations.ApiOperation; 5 | import org.springframework.context.annotation.Bean; 6 | import org.springframework.context.annotation.Configuration; 7 | import org.springframework.web.bind.annotation.RequestMethod; 8 | import springfox.documentation.builders.PathSelectors; 9 | import springfox.documentation.builders.RequestHandlerSelectors; 10 | import springfox.documentation.builders.ResponseMessageBuilder; 11 | import springfox.documentation.schema.ModelRef; 12 | import springfox.documentation.service.ApiInfo; 13 | import springfox.documentation.service.Contact; 14 | import springfox.documentation.spi.DocumentationType; 15 | import springfox.documentation.spring.web.plugins.Docket; 16 | import springfox.documentation.swagger2.annotations.EnableSwagger2; 17 | 18 | import static com.google.common.collect.Lists.newArrayList; 19 | 20 | /** 21 | * Created by zzh on 16/9/12. 22 | */ 23 | @Configuration 24 | @EnableSwagger2 25 | public class Swagger2 { 26 | @Bean 27 | public Docket api() { 28 | return new Docket(DocumentationType.SWAGGER_2) 29 | .select() 30 | .apis(RequestHandlerSelectors.withMethodAnnotation(ApiOperation.class)) 31 | .paths(PathSelectors.any()) 32 | .build() 33 | .apiInfo(apiInfo()) 34 | .useDefaultResponseMessages(false) 35 | .globalResponseMessage(RequestMethod.POST, 36 | newArrayList( 37 | new ResponseMessageBuilder() 38 | .code(0) 39 | .message("请求成功,返回结果") 40 | .build(), 41 | new ResponseMessageBuilder() 42 | .code(-1) 43 | .message("系统错误,请提交Bug") 44 | .responseModel(new ModelRef("Error")) 45 | .build() 46 | )); 47 | } 48 | private ApiInfo apiInfo() { 49 | return new ApiInfo( 50 | "标题", 51 | "描述", 52 | "1.0", 53 | "", 54 | new Contact("朱昊", "", ""), 55 | "zhuhao.info", 56 | "zhuhao.info"); 57 | } 58 | 59 | } 60 | -------------------------------------------------------------------------------- /src/main/java/com/hus/common/utils/MyX509TrustManagerUtil.java: -------------------------------------------------------------------------------- 1 | package com.hus.common.utils; 2 | 3 | import javax.net.ssl.X509TrustManager; 4 | import java.security.cert.CertificateException; 5 | import java.security.cert.X509Certificate; 6 | 7 | /** 8 | * 证书信任管理器(用于https请求) 9 | */ 10 | public class MyX509TrustManagerUtil implements X509TrustManager { 11 | 12 | /** 13 | * @param chain c 14 | * @param authType t 15 | * @throws CertificateException 异常 16 | */ 17 | public void checkClientTrusted(X509Certificate[] chain, String authType) throws CertificateException { 18 | } 19 | 20 | /** 21 | * @param chain c 22 | * @param authType t 23 | * @throws CertificateException 异常 24 | */ 25 | public void checkServerTrusted(X509Certificate[] chain, String authType) throws CertificateException { 26 | } 27 | 28 | public X509Certificate[] getAcceptedIssuers() { 29 | return null; 30 | } 31 | } -------------------------------------------------------------------------------- /src/main/java/com/hus/web/controller/api/ApiController.java: -------------------------------------------------------------------------------- 1 | package com.hus.web.controller.api; 2 | 3 | import io.swagger.annotations.*; 4 | import org.springframework.http.MediaType; 5 | import org.springframework.web.bind.annotation.*; 6 | 7 | /** 8 | * Created by zhh on 2017/3/3. 9 | */ 10 | @Api(value = "hus", description = "测试API", produces = MediaType.APPLICATION_JSON_VALUE) 11 | @RestController 12 | public class ApiController { 13 | @ApiOperation(value = "线上订单列表", httpMethod = "POST", produces = MediaType.APPLICATION_JSON_VALUE) 14 | @ApiResponses(value = {@ApiResponse(code = 0, message = "线上订单列表", response = String.class)}) 15 | @RequestMapping(value = "test/api", method = RequestMethod.POST) 16 | public Object orderListForMall( @ApiParam("页码") @RequestParam(defaultValue = "1") Integer pageNo, 17 | @ApiParam("日期类型(-1:全部,0:今天,1:一周内,2:一个月内,3:三个月内,4:半年内,5:一年内)") 18 | @RequestParam(defaultValue = "-1") String dateType, 19 | @ApiParam("订单状态(-1:全部,1:待付款,2:未发货,4:已发货,5:交易完成)") 20 | @RequestParam(defaultValue = "-1") Integer status, 21 | @ApiParam("商品ID") @RequestParam(defaultValue = "-1") String productId, 22 | @ApiParam("门店ID") @RequestParam(defaultValue = "-1") Integer storeId) { 23 | return "success"; 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /src/main/java/com/hus/web/controller/web/BaseConrtoller.java: -------------------------------------------------------------------------------- 1 | package com.hus.web.controller.web; 2 | 3 | import com.hus.common.consts.App; 4 | import com.hus.web.entity.User; 5 | 6 | import javax.servlet.http.HttpServletRequest; 7 | 8 | /** 9 | * Created by zhh on 2017/5/8. 10 | */ 11 | public class BaseConrtoller { 12 | 13 | public Integer getUserId(HttpServletRequest request){ 14 | User user = (User) request.getSession().getAttribute(App.Session.CURRENT_USER_OBJECT); 15 | if(user==null){ 16 | return -1; 17 | } 18 | return user.getId(); 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /src/main/java/com/hus/web/controller/web/CourseController.java: -------------------------------------------------------------------------------- 1 | package com.hus.web.controller.web; 2 | 3 | import com.hus.common.consts.Url; 4 | import com.hus.web.entity.Course; 5 | import com.hus.web.entity.User; 6 | import com.hus.web.mapper.CourseMapper; 7 | import com.hus.web.service.CourseService; 8 | import org.springframework.beans.factory.annotation.Autowired; 9 | import org.springframework.stereotype.Controller; 10 | import org.springframework.web.bind.annotation.PathVariable; 11 | import org.springframework.web.bind.annotation.RequestMapping; 12 | import org.springframework.web.bind.annotation.RequestMethod; 13 | import org.springframework.web.bind.annotation.ResponseBody; 14 | import org.springframework.web.servlet.ModelAndView; 15 | 16 | import javax.servlet.http.HttpServletRequest; 17 | 18 | /** 19 | * Created by zhh on 2017/5/5. 20 | */ 21 | @Controller 22 | public class CourseController extends BaseConrtoller{ 23 | 24 | @Autowired 25 | private CourseService courseService; 26 | 27 | /** 28 | * 显示教师自己创建的课程列表 29 | * @param request 30 | * @return 31 | */ 32 | @RequestMapping(value = Url.Course.COURSE_LIST_URL, method = RequestMethod.GET) 33 | public ModelAndView list(HttpServletRequest request){ 34 | return courseService.list(request, getUserId(request)); 35 | } 36 | 37 | /** 38 | * 显示学生选课时的看到的课程列表 39 | * @param request 40 | * @return 41 | */ 42 | @RequestMapping(value = Url.Course.COURSE_LIST_URL_FOR_STU, method = RequestMethod.GET) 43 | public ModelAndView studentlist(HttpServletRequest request){ 44 | return courseService.studentlist(request, getUserId(request)); 45 | } 46 | 47 | /** 48 | * 微信 显示学生选课时的看到的课程列表 49 | * @param request 50 | * @return 51 | */ 52 | @RequestMapping(value = Url.Course.WX_COURSE_LIST_URL_FOR_STU, method = RequestMethod.GET) 53 | public ModelAndView wechatStudentlist(HttpServletRequest request){ 54 | return courseService.wechatStudentlist(request, getUserId(request)); 55 | } 56 | 57 | /** 58 | * 显示管理员选课时的看到的课程列表 59 | * @param request 60 | * @return 61 | */ 62 | @RequestMapping(value = Url.Course.COURSE_LIST_URL_FOR_DDMIN, method = RequestMethod.GET) 63 | public ModelAndView adminlist(HttpServletRequest request){ 64 | return courseService.adminlist(request); 65 | } 66 | 67 | /** 68 | * 添加课程信息 69 | * @param request 70 | * @param course 71 | * @return 72 | */ 73 | @RequestMapping(value = Url.Course.COURSE_ADD_URL, method = RequestMethod.POST) 74 | public ModelAndView addCourse(HttpServletRequest request, Course course){ 75 | course.setTeacherId(getUserId(request)); 76 | return courseService.addCourse(course); 77 | } 78 | 79 | /** 80 | * 更新课程信息 81 | * @param course 82 | * @return 83 | */ 84 | @RequestMapping(value = Url.Course.COURSE_UPDATE_URL, method = RequestMethod.POST) 85 | @ResponseBody 86 | public Object updateCourse(Course course){ 87 | return courseService.updateCourse(course); 88 | } 89 | 90 | /** 91 | * 根据主键获取课程信息 92 | * @param id 93 | * @return 94 | */ 95 | @RequestMapping(value = Url.Course.COURSE_INFO_URL, method = RequestMethod.GET) 96 | @ResponseBody 97 | public Object getCourseInfoById(@PathVariable Integer id){ 98 | return courseService.getCourseInfoById(id); 99 | } 100 | 101 | /** 102 | * 根据主键删除课程信息 103 | * @param id 104 | * @return 105 | */ 106 | @RequestMapping(value = Url.Course.COURSE_DELETE_URL, method = RequestMethod.GET) 107 | public ModelAndView deleteCourseById(@PathVariable Integer id){ 108 | return courseService.deleteCourseById(id); 109 | } 110 | 111 | /** 112 | * 学生选课 113 | * @param request 114 | * @param id 115 | * @return 116 | */ 117 | @RequestMapping(value = Url.Student.STUDENT_CHOOSED_COURSE, method = RequestMethod.GET) 118 | public ModelAndView studentChoosedCourse(HttpServletRequest request, Integer id){ 119 | return courseService.studentChoosedCourse(getUserId(request), id); 120 | } 121 | 122 | /** 123 | * 学生退选 124 | * @param scId 125 | * @param id 126 | * @return 127 | */ 128 | @RequestMapping(value = Url.Student.STUDENT_UNCHOOSED_COURSE, method = RequestMethod.GET) 129 | public ModelAndView studentUnChoosedCourse(HttpServletRequest request, Integer id){ 130 | return courseService.studentUnChoosedCourse(getUserId(request), id); 131 | } 132 | } 133 | -------------------------------------------------------------------------------- /src/main/java/com/hus/web/controller/web/DemoController.java: -------------------------------------------------------------------------------- 1 | package com.hus.web.controller.web; 2 | 3 | import com.hus.web.mapper.DepartmentMapper; 4 | import org.springframework.beans.factory.annotation.Autowired; 5 | import org.springframework.stereotype.Controller; 6 | import org.springframework.web.bind.annotation.RequestMapping; 7 | import org.springframework.web.bind.annotation.RequestMethod; 8 | import org.springframework.web.bind.annotation.ResponseBody; 9 | import org.springframework.web.bind.annotation.RestController; 10 | 11 | import java.util.ArrayList; 12 | import java.util.HashMap; 13 | import java.util.List; 14 | import java.util.Map; 15 | 16 | /** 17 | * Created by zhh on 2017/3/3. 18 | */ 19 | @Controller 20 | public class DemoController { 21 | 22 | @Autowired 23 | private DepartmentMapper departmentMapper; 24 | @RequestMapping(value = "/home", method = RequestMethod.GET) 25 | public String test() 26 | { 27 | 28 | return "mobile/index"; 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /src/main/java/com/hus/web/controller/web/LoginController.java: -------------------------------------------------------------------------------- 1 | package com.hus.web.controller.web; 2 | 3 | import com.hus.common.consts.App; 4 | import com.hus.common.consts.Url; 5 | import com.hus.common.consts.View; 6 | import com.hus.web.entity.User; 7 | import com.hus.web.service.LoginService; 8 | import com.hus.web.service.UserService; 9 | import org.springframework.beans.factory.annotation.Autowired; 10 | import org.springframework.stereotype.Controller; 11 | import org.springframework.web.bind.annotation.RequestMapping; 12 | import org.springframework.web.bind.annotation.RequestMethod; 13 | import org.springframework.web.servlet.ModelAndView; 14 | 15 | import javax.servlet.http.HttpServletRequest; 16 | import javax.servlet.http.HttpServletResponse; 17 | import java.io.IOException; 18 | 19 | /** 20 | * 登录控制器 21 | * Created by zhh on 2017/5/4. 22 | */ 23 | @Controller 24 | public class LoginController { 25 | 26 | @Autowired 27 | private LoginService loginService; 28 | 29 | /** 30 | * 显示登录界面 31 | * @return 32 | */ 33 | @RequestMapping(value = Url.Login.SHOW_LOGIN_PAGE, method = RequestMethod.GET) 34 | public ModelAndView login(HttpServletRequest request) { 35 | return new ModelAndView(View.Index.LOGIN_PAGE); 36 | } 37 | 38 | /** 39 | * PC端登录逻辑 40 | * @param request 41 | * @param sno 42 | * @param password 43 | * @return 44 | */ 45 | @RequestMapping(value = Url.Login.USER_LOGIN_URL, method = RequestMethod.POST) 46 | public ModelAndView userLogin(HttpServletRequest request, String sno, String password){ 47 | return loginService.userLogin(request, sno, password); 48 | } 49 | 50 | /** 51 | * 微信端登录 52 | * @param request 53 | * @return 54 | */ 55 | @RequestMapping(value = Url.Login.WECHAT_USER_LOGIN_URL, method = RequestMethod.GET) 56 | public ModelAndView wechatLogin(HttpServletRequest request) { 57 | return loginService.WechatuserLogin(request); 58 | } 59 | 60 | @RequestMapping(value = "wechat/enter", method = RequestMethod.GET) 61 | public void wechatenter(HttpServletResponse response) throws IOException { 62 | response.sendRedirect("https://open.weixin.qq.com/connect/oauth2/authorize" + 63 | "?appid=wxa4cc0a202b65477c&redirect_uri=http://17157bv023.51mypc.cn/hus/wechat/callback" + 64 | "&response_type=code&scope=snsapi_userinfo&state=123#wechat_redirect"); 65 | } 66 | 67 | } 68 | -------------------------------------------------------------------------------- /src/main/java/com/hus/web/controller/web/UserController.java: -------------------------------------------------------------------------------- 1 | package com.hus.web.controller.web; 2 | 3 | import com.hus.common.consts.Url; 4 | import com.hus.web.entity.User; 5 | import com.hus.web.service.UserService; 6 | import org.springframework.beans.factory.annotation.Autowired; 7 | import org.springframework.stereotype.Controller; 8 | import org.springframework.web.bind.annotation.PathVariable; 9 | import org.springframework.web.bind.annotation.RequestMapping; 10 | import org.springframework.web.bind.annotation.RequestMethod; 11 | import org.springframework.web.bind.annotation.ResponseBody; 12 | import org.springframework.web.servlet.ModelAndView; 13 | 14 | import javax.servlet.http.HttpServletRequest; 15 | import java.util.Map; 16 | 17 | /** 18 | * Created by zhh on 2017/5/5. 19 | */ 20 | @Controller 21 | public class UserController { 22 | 23 | @Autowired 24 | private UserService userService; 25 | @RequestMapping(value = Url.Student.STUDENt_LIST_URL, method = RequestMethod.GET) 26 | public ModelAndView studentlist(HttpServletRequest request){ 27 | return userService.studentList(request); 28 | } 29 | 30 | @RequestMapping(value = Url.Student.STUDENt_ADD_URL, method = RequestMethod.POST) 31 | public ModelAndView addStudent(HttpServletRequest request, User user){ 32 | return userService.addStudent(request, user); 33 | } 34 | 35 | @RequestMapping(value = Url.Student.STUDENT_INFO_URL, method = RequestMethod.GET) 36 | @ResponseBody 37 | public Map getStudentInfo(@PathVariable Integer id){ 38 | return userService.getStudentInfo(id); 39 | } 40 | 41 | @RequestMapping(value = Url.Student.STUDENT_UPDATE_URL, method = RequestMethod.POST) 42 | @ResponseBody 43 | public Object updateStudent(User user){ 44 | return userService.updateStudent(user); 45 | } 46 | 47 | @RequestMapping(value = Url.Student.STUDENT_DELETE_URL, method = RequestMethod.GET) 48 | public ModelAndView deleteStudent(@PathVariable Integer id){ 49 | return userService.delateStudent(id); 50 | } 51 | 52 | 53 | // 教师 54 | @RequestMapping(value = Url.Teacher.TEACHER_LIST_URL, method = RequestMethod.GET) 55 | public ModelAndView teaherlist(HttpServletRequest request){ 56 | return userService.teacherList(request); 57 | } 58 | 59 | @RequestMapping(value = Url.Teacher.TEACHER_ADD_URL, method = RequestMethod.POST) 60 | public ModelAndView addTeacher(HttpServletRequest request, User user){ 61 | return userService.addTeacher(request, user); 62 | } 63 | 64 | @RequestMapping(value = Url.Teacher.TEACHER_UPDATE_URL, method = RequestMethod.POST) 65 | @ResponseBody 66 | public Object updateTeacher(User user){ 67 | return userService.updateTeacher(user); 68 | } 69 | @RequestMapping(value = Url.Teacher.TEACHER_DELETE_URL, method = RequestMethod.GET) 70 | public ModelAndView deleteTeacher(@PathVariable Integer id){ 71 | return userService.delateTeacher(id); 72 | } 73 | @RequestMapping(value = Url.Teacher.TEACHER_INFO_URL, method = RequestMethod.GET) 74 | @ResponseBody 75 | public Map getTeacherInfo(@PathVariable Integer id){ 76 | return userService.getTeacherInfo(id); 77 | } 78 | 79 | } 80 | -------------------------------------------------------------------------------- /src/main/java/com/hus/web/controller/wechat/WechatAuthController.java: -------------------------------------------------------------------------------- 1 | package com.hus.web.controller.wechat; 2 | import com.hus.common.consts.App; 3 | import com.hus.common.consts.Url; 4 | import com.hus.common.consts.View; 5 | import com.hus.common.utils.MyX509TrustManagerUtil; 6 | import com.hus.web.utils.HttpClientUtil; 7 | import io.swagger.annotations.Api; 8 | import net.sf.json.JSONArray; 9 | import net.sf.json.JSONObject; 10 | import org.apache.commons.lang.StringUtils; 11 | import org.apache.log4j.Logger; 12 | import org.springframework.http.MediaType; 13 | import org.springframework.stereotype.Controller; 14 | import org.springframework.web.bind.annotation.CrossOrigin; 15 | import org.springframework.web.bind.annotation.RequestMapping; 16 | import org.springframework.web.bind.annotation.ResponseBody; 17 | import org.springframework.web.servlet.ModelAndView; 18 | 19 | import javax.net.ssl.HttpsURLConnection; 20 | import javax.net.ssl.SSLContext; 21 | import javax.net.ssl.SSLSocketFactory; 22 | import javax.net.ssl.TrustManager; 23 | import javax.servlet.http.HttpServletRequest; 24 | import java.io.BufferedReader; 25 | import java.io.InputStream; 26 | import java.io.InputStreamReader; 27 | import java.io.OutputStream; 28 | import java.net.URL; 29 | 30 | /** 31 | * Created by zhu on 2017/3/15. 32 | */ 33 | @Api(value = "wechat_api", description = "微信相关Api", produces = MediaType.APPLICATION_JSON_VALUE) 34 | @CrossOrigin 35 | @Controller 36 | public class WechatAuthController { 37 | 38 | Logger logger = Logger.getLogger(WechatAuthController.class); 39 | /** 40 | * 微信回调处理(获取用户openId) 41 | * @author 朱昊 42 | * @param code 微信返回,用于获取授权的access token 43 | * @param state 随机字符,用作校验 44 | */ 45 | @RequestMapping(Url.Wechat.CALL_BACK) 46 | // @ResponseBody 47 | public ModelAndView callBack(String code, String state, HttpServletRequest request) 48 | { 49 | if(StringUtils.isBlank(code)){ 50 | request.setAttribute("error_tips", "获取openId失败"); 51 | return new ModelAndView(View.Error.ERROR_PAGE_VIEW); 52 | } 53 | String accessTokenRes = HttpClientUtil.sendPostRequest(String.format(Url.Wechat.AUTH_ACCESS_TOKEN_URL, 54 | App.Wechat.APPID, App.Wechat.APPSECRET, code), null, HttpClientUtil.REQUEST_PARAM_DATA_TYPE_POST); 55 | JSONObject accessTokenJson = JSONObject.fromObject(accessTokenRes); 56 | //授权失败 57 | if (accessTokenJson.containsKey("errcode")) { 58 | String errcode = accessTokenJson.get("errcode").toString(); 59 | String errmsg = accessTokenJson.get("errmsg").toString(); 60 | logger.error("use weixin login err, code " + code + ", errcode " + errcode + ", errmsg " + errmsg); 61 | request.setAttribute("error_tips", "获取openId失败"); 62 | return new ModelAndView(View.Error.ERROR_PAGE_VIEW); 63 | } 64 | request.getSession().setAttribute(App.Session.WECHAT_USER_OPEN_ID, accessTokenJson.getString("openid")); 65 | request.getSession().setAttribute(App.Session.WECHAT_USER_ACCESS_TOKEN, accessTokenJson.getString("access_token")); 66 | // getNormalMenuList(accessTokenJson.getString("access_token")); 67 | return new ModelAndView("redirect:/"+Url.Login.WECHAT_USER_LOGIN_URL); 68 | } 69 | 70 | // /** 71 | // * 获取微信默认菜单 72 | // * @author 张进军 73 | // * @date Jan 27, 2016 11:39:58 AM 74 | // * @param storeId 门店标识 75 | // * @return 微信默认菜单 76 | // */ 77 | // private boolean getNormalMenuList(String accessToken){ 78 | // 79 | // 80 | // JSONObject normalMemu = new JSONObject(); 81 | // String url = Url.Wechat.CREATE_NORMAL_MENU_URL.replace("ACCESS_TOKEN", accessToken); 82 | // JSONObject resultJson =httpRequest(url, "POST", "{\n" + 83 | // " \"button\":[\n" + 84 | // " {\t\n" + 85 | // " \"type\":\"click\",\n" + 86 | // " \"name\":\"今日歌曲\",\n" + 87 | // " \"key\":\"V1001_TODAY_MUSIC\"\n" + 88 | // " },\n" + 89 | // " {\n" + 90 | // " \"name\":\"菜单\",\n" + 91 | // " \"sub_button\":[\n" + 92 | // " {\t\n" + 93 | // " \"type\":\"view\",\n" + 94 | // " \"name\":\"搜索\",\n" + 95 | // " \"url\":\"http://www.soso.com/\"\n" + 96 | // " },\n" + 97 | // " {\n" + 98 | // " \"type\":\"view\",\n" + 99 | // " \"name\":\"视频\",\n" + 100 | // " \"url\":\"http://v.qq.com/\"\n" + 101 | // " },\n" + 102 | // " {\n" + 103 | // " \"type\":\"click\",\n" + 104 | // " \"name\":\"赞一下我们\",\n" + 105 | // " \"key\":\"V1001_GOOD\"\n" + 106 | // " }]\n" + 107 | // " }]\n" + 108 | // " }"); 109 | // if (resultJson.containsKey("errcode") && resultJson.getInt("errcode") != 0) { 110 | // return false; 111 | // } 112 | // return true; 113 | // } 114 | // 115 | // /** 116 | // * HTTPS 请求方式 117 | // * @author 高国藩 118 | // * @date 2015年8月10日 下午11:47:59 119 | // * @param requestUrl 请求链接 120 | // * @param requestMethod 请求方式 121 | // * @param outputStr 请求数据 122 | // * @return 返回json 123 | // */ 124 | // public static JSONObject httpRequest(String requestUrl, 125 | // String requestMethod, String outputStr) { 126 | // JSONObject jsonObject = null; 127 | // StringBuffer buffer = new StringBuffer(); 128 | // try { 129 | // TrustManager[] tm = { new MyX509TrustManagerUtil() }; 130 | // SSLContext sslContext = SSLContext.getInstance("SSL", "SunJSSE"); 131 | // sslContext.init(null, tm, new java.security.SecureRandom()); 132 | // SSLSocketFactory ssf = sslContext.getSocketFactory(); 133 | // URL url = new URL(requestUrl); 134 | // HttpsURLConnection httpUrlConn = (HttpsURLConnection) url 135 | // .openConnection(); 136 | // httpUrlConn.setSSLSocketFactory(ssf); 137 | // httpUrlConn.setDoOutput(true); 138 | // httpUrlConn.setDoInput(true); 139 | // httpUrlConn.setUseCaches(false); 140 | // httpUrlConn.setRequestMethod(requestMethod); 141 | // if ("GET".equalsIgnoreCase(requestMethod)) { 142 | // httpUrlConn.connect(); 143 | // } 144 | // if (null != outputStr) { 145 | // OutputStream outputStream = httpUrlConn.getOutputStream(); 146 | // outputStream.write(outputStr.getBytes("UTF-8")); 147 | // outputStream.close(); 148 | // } 149 | // InputStream inputStream = httpUrlConn.getInputStream(); 150 | // InputStreamReader inputStreamReader = new InputStreamReader( 151 | // inputStream, "utf-8"); 152 | // BufferedReader bufferedReader = new BufferedReader( 153 | // inputStreamReader); 154 | // String str = null; 155 | // while ((str = bufferedReader.readLine()) != null) { 156 | // buffer.append(str); 157 | // } 158 | // bufferedReader.close(); 159 | // inputStreamReader.close(); 160 | // inputStream.close(); 161 | // inputStream = null; 162 | // httpUrlConn.disconnect(); 163 | // jsonObject = JSONObject.fromObject(buffer.toString()); 164 | // } 165 | // catch (Exception ce) { 166 | // ce.printStackTrace(); 167 | // } 168 | // // logger.info(jsonObject.toString()); 169 | // return jsonObject; 170 | // } 171 | 172 | } 173 | -------------------------------------------------------------------------------- /src/main/java/com/hus/web/controller/wechat/WechatEventController.java: -------------------------------------------------------------------------------- 1 | package com.hus.web.controller.wechat; 2 | 3 | import com.hus.common.consts.Url; 4 | import com.hus.web.utils.SignUtil; 5 | import org.springframework.stereotype.Controller; 6 | import org.springframework.web.bind.annotation.RequestMapping; 7 | import org.springframework.web.bind.annotation.RequestMethod; 8 | import org.springframework.web.bind.annotation.RequestParam; 9 | import org.springframework.web.bind.annotation.ResponseBody; 10 | 11 | /** 12 | * Created by zhu on 2017/3/14. 13 | */ 14 | @Controller 15 | public class WechatEventController { 16 | /** 17 | * 18 | * @param signature 微信加密签名,signature结合了开发者填写的token参数和请求中的timestamp参数、nonce参数 19 | * @param timestamp 时间戳 20 | * @param nonce 随机数 21 | * @param echostr 随机字符串 22 | * @return 23 | */ 24 | @RequestMapping(value = Url.Wechat.CORE_SERVICE, method = RequestMethod.GET) 25 | @ResponseBody 26 | public String chectToken(@RequestParam(value = "signature") String signature, 27 | @RequestParam(value = "timestamp") String timestamp, 28 | @RequestParam(value = "nonce") String nonce, 29 | @RequestParam(value = "echostr") String echostr) { 30 | // 通过检验signature对请求进行校验,若校验成功则原样返回echostr,表示接入成功,否则接入失败 31 | if (SignUtil.checkSignature(signature, timestamp, nonce)) { 32 | return echostr; 33 | } 34 | return "failed!"; 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /src/main/java/com/hus/web/entity/Course.java: -------------------------------------------------------------------------------- 1 | package com.hus.web.entity; 2 | 3 | /** 4 | * Created by zhh on 2017/5/5. 5 | */ 6 | public class Course { 7 | 8 | private Integer id; 9 | 10 | private String sno; 11 | 12 | private String name; 13 | 14 | private Integer teacherId; 15 | 16 | private Integer studyScore; 17 | 18 | private Integer studySlot; 19 | 20 | private String address; 21 | 22 | private Integer status; 23 | 24 | private Integer allQuato; 25 | 26 | private Integer choosedQuato; 27 | 28 | public Course() { 29 | } 30 | 31 | public Integer getId() { 32 | return id; 33 | } 34 | 35 | public void setId(Integer id) { 36 | this.id = id; 37 | } 38 | 39 | public String getSno() { 40 | return sno; 41 | } 42 | 43 | public void setSno(String sno) { 44 | this.sno = sno; 45 | } 46 | 47 | public Integer getTeacherId() { 48 | return teacherId; 49 | } 50 | 51 | public void setTeacherId(Integer teacherId) { 52 | this.teacherId = teacherId; 53 | } 54 | 55 | public Integer getStudyScore() { 56 | return studyScore; 57 | } 58 | 59 | public void setStudyScore(Integer studyScore) { 60 | this.studyScore = studyScore; 61 | } 62 | 63 | public Integer getStudySlot() { 64 | return studySlot; 65 | } 66 | 67 | public void setStudySlot(Integer studySlot) { 68 | this.studySlot = studySlot; 69 | } 70 | 71 | public String getAddress() { 72 | return address; 73 | } 74 | 75 | public void setAddress(String address) { 76 | this.address = address; 77 | } 78 | 79 | public Integer getStatus() { 80 | return status; 81 | } 82 | 83 | public void setStatus(Integer status) { 84 | this.status = status; 85 | } 86 | 87 | public String getName() { 88 | return name; 89 | } 90 | 91 | public void setName(String name) { 92 | this.name = name; 93 | } 94 | 95 | public Integer getChoosedQuato() { 96 | return choosedQuato; 97 | } 98 | 99 | public void setChoosedQuato(Integer choosedQuato) { 100 | this.choosedQuato = choosedQuato; 101 | } 102 | 103 | public Integer getAllQuato() { 104 | return allQuato; 105 | } 106 | 107 | public void setAllQuato(Integer allQuato) { 108 | this.allQuato = allQuato; 109 | } 110 | } 111 | -------------------------------------------------------------------------------- /src/main/java/com/hus/web/entity/SystemModule.java: -------------------------------------------------------------------------------- 1 | package com.hus.web.entity; 2 | 3 | import java.util.List; 4 | 5 | /** 6 | * Created by zhh on 2017/5/4. 7 | */ 8 | public class SystemModule { 9 | 10 | private Integer id; 11 | 12 | private Integer type; 13 | 14 | private String name; 15 | 16 | private String url; 17 | 18 | private Integer parentId; 19 | 20 | private List childrenModule; 21 | 22 | public SystemModule() { 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 Integer getType() { 34 | return type; 35 | } 36 | 37 | public void setType(Integer type) { 38 | this.type = type; 39 | } 40 | 41 | public String getName() { 42 | return name; 43 | } 44 | 45 | public void setName(String name) { 46 | this.name = name; 47 | } 48 | 49 | public String getUrl() { 50 | return url; 51 | } 52 | 53 | public void setUrl(String url) { 54 | this.url = url; 55 | } 56 | 57 | public Integer getParentId() { 58 | return parentId; 59 | } 60 | 61 | public void setParentId(Integer parentId) { 62 | this.parentId = parentId; 63 | } 64 | 65 | public List getChildrenModule() { 66 | return childrenModule; 67 | } 68 | 69 | public void setChildrenModule(List childrenModule) { 70 | this.childrenModule = childrenModule; 71 | } 72 | } 73 | -------------------------------------------------------------------------------- /src/main/java/com/hus/web/entity/User.java: -------------------------------------------------------------------------------- 1 | package com.hus.web.entity; 2 | 3 | /** 4 | * 用户信息实体 5 | * Created by zhh on 2017/5/4. 6 | */ 7 | public class User { 8 | 9 | /** 10 | * 用户唯一标识 11 | */ 12 | private Integer id; 13 | 14 | /** 15 | * 用户角色 1 学生 2 管理员 16 | */ 17 | private Integer type; 18 | 19 | /** 20 | * 用户名 21 | */ 22 | private String sno; 23 | 24 | /** 25 | * 姓名 26 | */ 27 | private String name; 28 | 29 | /** 30 | * 系别 31 | */ 32 | private Integer departmentId; 33 | 34 | /** 35 | * 微信用户唯一标识 36 | */ 37 | private String openId; 38 | 39 | private String password; 40 | 41 | public User() { 42 | } 43 | 44 | public Integer getId() { 45 | return id; 46 | } 47 | 48 | public void setId(Integer id) { 49 | this.id = id; 50 | } 51 | 52 | public String getSno() { 53 | return sno; 54 | } 55 | 56 | public void setSno(String sno) { 57 | this.sno = sno; 58 | } 59 | 60 | public String getName() { 61 | return name; 62 | } 63 | 64 | public void setName(String name) { 65 | this.name = name; 66 | } 67 | 68 | public Integer getDepartmentId() { 69 | return departmentId; 70 | } 71 | 72 | public void setDepartmentId(Integer departmentId) { 73 | this.departmentId = departmentId; 74 | } 75 | 76 | public Integer getType() { 77 | return type; 78 | } 79 | 80 | public void setType(Integer type) { 81 | this.type = type; 82 | } 83 | 84 | 85 | public String getPassword() { 86 | return password; 87 | } 88 | 89 | public String getOpenId() { 90 | return openId; 91 | } 92 | 93 | public void setOpenId(String openId) { 94 | this.openId = openId; 95 | } 96 | 97 | public void setPassword(String password) { 98 | this.password = password; 99 | } 100 | } 101 | -------------------------------------------------------------------------------- /src/main/java/com/hus/web/mapper/CourseMapper.java: -------------------------------------------------------------------------------- 1 | package com.hus.web.mapper; 2 | 3 | import com.hus.common.consts.Url; 4 | import com.hus.web.entity.Course; 5 | import org.apache.ibatis.annotations.Param; 6 | 7 | import java.util.List; 8 | import java.util.Map; 9 | 10 | /** 11 | * Created by zhh on 2017/5/5. 12 | */ 13 | public interface CourseMapper { 14 | List> selectAll(); 15 | 16 | Integer insert(Course course); 17 | 18 | Integer update(Course course); 19 | 20 | List> selectByteacherId(Integer teacherId); 21 | 22 | Course selectByPrimaryKey(Integer id); 23 | 24 | Integer delete(Integer id); 25 | 26 | String generateCourseSno(); 27 | 28 | Integer studentChoosedCourse(@Param(value = "studentId") Integer studentId, 29 | @Param(value = "courseId") Integer courseId); 30 | 31 | List> selectAllStudentUnChoosed(Integer studentId); 32 | 33 | List> selectAllStudentChoosed(Integer studentId); 34 | 35 | Integer addChoosedQuota(@Param(value = "num") Integer num, 36 | @Param(value = "courseId")Integer courseId); 37 | Integer deleteStudentCourseByStudentIdAndCourseId(@Param(value = "studentId") Integer studentId, 38 | @Param(value = "courseId")Integer courseId); 39 | 40 | } 41 | -------------------------------------------------------------------------------- /src/main/java/com/hus/web/mapper/DepartmentMapper.java: -------------------------------------------------------------------------------- 1 | package com.hus.web.mapper; 2 | 3 | import java.util.List; 4 | import java.util.Map; 5 | 6 | /** 7 | * Created by zhh on 2017/5/5. 8 | */ 9 | public interface DepartmentMapper { 10 | List> selectIdAndDP(); 11 | } 12 | -------------------------------------------------------------------------------- /src/main/java/com/hus/web/mapper/SystemModuleMapper.java: -------------------------------------------------------------------------------- 1 | package com.hus.web.mapper; 2 | 3 | import com.hus.web.entity.SystemModule; 4 | 5 | import java.util.List; 6 | 7 | 8 | /** 9 | * Created by zhh on 2017/5/4. 10 | */ 11 | public interface SystemModuleMapper { 12 | 13 | 14 | List selectParentModuleByType(Integer type); 15 | 16 | List selectChildModuleByParentId(Integer parentId); 17 | 18 | } 19 | -------------------------------------------------------------------------------- /src/main/java/com/hus/web/mapper/UserMapper.java: -------------------------------------------------------------------------------- 1 | package com.hus.web.mapper; 2 | 3 | import com.hus.web.entity.User; 4 | 5 | import java.util.List; 6 | import java.util.Map; 7 | 8 | /** 9 | * Created by zhh on 2017/3/3. 10 | */ 11 | 12 | public interface UserMapper { 13 | 14 | Integer insert(User u); 15 | 16 | Integer update(User u); 17 | 18 | Integer delete(Integer id); 19 | 20 | User selectUserBySno(String sno); 21 | 22 | List> selectStudentInfo(); 23 | 24 | List> selectTeacherInfo(); 25 | 26 | List> selectTeacherMap(); 27 | 28 | Map selectStudentInfoByPrimaryKey(Integer id); 29 | 30 | User selectUserByOpenId(String openId); 31 | } 32 | -------------------------------------------------------------------------------- /src/main/java/com/hus/web/service/CourseService.java: -------------------------------------------------------------------------------- 1 | package com.hus.web.service; 2 | 3 | import com.hus.common.consts.App; 4 | import com.hus.common.consts.Url; 5 | import com.hus.common.consts.View; 6 | import com.hus.web.entity.Course; 7 | import com.hus.web.mapper.CourseMapper; 8 | import com.hus.web.mapper.UserMapper; 9 | import org.springframework.beans.factory.NamedBean; 10 | import org.springframework.beans.factory.annotation.Autowired; 11 | import org.springframework.stereotype.Service; 12 | import org.springframework.transaction.annotation.Transactional; 13 | import org.springframework.web.servlet.ModelAndView; 14 | 15 | import javax.servlet.http.HttpServletRequest; 16 | import java.util.Map; 17 | 18 | /** 19 | * Created by zhh on 2017/5/5. 20 | */ 21 | @Service 22 | public class CourseService { 23 | 24 | @Autowired 25 | private CourseMapper courseMapper; 26 | 27 | @Autowired 28 | private UserMapper userMapper; 29 | 30 | public ModelAndView list(HttpServletRequest request, Integer teacherId){ 31 | request.setAttribute("course_lists", courseMapper.selectByteacherId(teacherId)); 32 | return new ModelAndView(View.Course.COURSE_LIST_VIEW); 33 | } 34 | 35 | 36 | public ModelAndView studentlist(HttpServletRequest request, Integer studentId){ 37 | request.setAttribute("unchoosed_course_lists", courseMapper.selectAllStudentUnChoosed(studentId)); 38 | request.setAttribute("choosed_course_lists", courseMapper.selectAllStudentChoosed(studentId)); 39 | return new ModelAndView(View.Student.COURSE_LIST_VIEW); 40 | } 41 | 42 | public ModelAndView wechatStudentlist(HttpServletRequest request, Integer studentId){ 43 | request.setAttribute("unchoosed_course_lists", courseMapper.selectAllStudentUnChoosed(studentId)); 44 | request.setAttribute("choosed_course_lists", courseMapper.selectAllStudentChoosed(studentId)); 45 | System.out.println(courseMapper.selectAllStudentUnChoosed(studentId).size()); 46 | System.out.println(courseMapper.selectAllStudentChoosed(studentId).size()); 47 | return new ModelAndView(View.Student.COURSE_LIST_VIEW2); 48 | } 49 | 50 | public ModelAndView addCourse(Course course){ 51 | course.setSno(courseMapper.generateCourseSno()); 52 | courseMapper.insert(course); 53 | return new ModelAndView("redirect:/"+ Url.Course.COURSE_LIST_URL); 54 | } 55 | 56 | public Integer updateCourse(Course course){ 57 | return courseMapper.update(course); 58 | } 59 | 60 | public Course getCourseInfoById(Integer id){ 61 | return courseMapper.selectByPrimaryKey(id); 62 | } 63 | 64 | public ModelAndView deleteCourseById(Integer id){ 65 | courseMapper.delete(id); 66 | return new ModelAndView("redirect:/"+ Url.Course.COURSE_LIST_URL); 67 | } 68 | 69 | @Transactional 70 | public ModelAndView studentChoosedCourse(Integer studentId, Integer courseId){ 71 | courseMapper.addChoosedQuota(1, courseId); 72 | courseMapper.studentChoosedCourse(studentId, courseId); 73 | return new ModelAndView("redirect:/"+Url.Course.COURSE_LIST_URL_FOR_STU); 74 | } 75 | @Transactional 76 | public ModelAndView studentUnChoosedCourse(Integer scId, Integer courseId){ 77 | courseMapper.addChoosedQuota(-1, courseId); 78 | courseMapper.deleteStudentCourseByStudentIdAndCourseId(scId, courseId); 79 | return new ModelAndView("redirect:/"+Url.Course.COURSE_LIST_URL_FOR_STU); 80 | } 81 | 82 | public ModelAndView adminlist(HttpServletRequest request){ 83 | request.setAttribute("course_lists", courseMapper.selectAll()); 84 | return new ModelAndView(View.Course.ADMIN_COURSE_LIST_VIEW); 85 | } 86 | 87 | } 88 | -------------------------------------------------------------------------------- /src/main/java/com/hus/web/service/LoginService.java: -------------------------------------------------------------------------------- 1 | package com.hus.web.service; 2 | 3 | import com.hus.common.consts.App; 4 | import com.hus.common.consts.Url; 5 | import com.hus.common.consts.View; 6 | import com.hus.web.entity.SystemModule; 7 | import com.hus.web.entity.User; 8 | import com.hus.web.mapper.SystemModuleMapper; 9 | import com.hus.web.mapper.UserMapper; 10 | 11 | import org.slf4j.Logger; 12 | import org.slf4j.LoggerFactory; 13 | import org.springframework.beans.factory.annotation.Autowired; 14 | import org.springframework.stereotype.Service; 15 | import org.springframework.web.servlet.ModelAndView; 16 | 17 | import javax.servlet.http.HttpServletRequest; 18 | import java.util.List; 19 | 20 | 21 | /** 22 | * Created by zhh on 2017/5/4. 23 | */ 24 | @Service 25 | public class LoginService { 26 | 27 | /** 日志记录对象 */ 28 | private Logger logger = LoggerFactory.getLogger(LoginService.class); 29 | 30 | @Autowired 31 | private SystemModuleMapper systemModuleMapper; 32 | 33 | @Autowired 34 | private UserMapper userMapper; 35 | 36 | public ModelAndView userLogin(HttpServletRequest request, String sno, String password){ 37 | 38 | User user = userMapper.selectUserBySno(sno); 39 | if(user==null){ 40 | //用户不存在 41 | logger.error("用户不存在"); 42 | return new ModelAndView(View.Index.LOGIN_PAGE); 43 | } 44 | if(!user.getPassword().equals(password)){ 45 | //用户不存在 46 | logger.error("密码错误"); 47 | return new ModelAndView(View.Index.LOGIN_PAGE); 48 | } 49 | String openId = (String) request.getSession().getAttribute(App.Session.WECHAT_USER_OPEN_ID); 50 | if(openId!=null){ 51 | user.setOpenId(openId); 52 | userMapper.update(user); 53 | } 54 | request.getSession().setAttribute(App.Session.CURRENT_USER_OBJECT, user); 55 | List list = systemModuleMapper.selectParentModuleByType(user.getType()); 56 | list.stream().forEach((m)->{ 57 | m.setChildrenModule(systemModuleMapper.selectChildModuleByParentId(m.getId())); 58 | }); 59 | request.getSession().setAttribute(App.Session.SYSTEM_MENU_ALL, list); 60 | return new ModelAndView(View.Index.LOGIN_HOME_PAGE); 61 | } 62 | 63 | public ModelAndView WechatuserLogin(HttpServletRequest request){ 64 | String openId = (String) request.getSession().getAttribute(App.Session.WECHAT_USER_OPEN_ID); 65 | User user = userMapper.selectUserByOpenId(openId); 66 | if(user==null){ 67 | return new ModelAndView("redirect:/"+ Url.Login.SHOW_LOGIN_PAGE); 68 | } 69 | request.getSession().setAttribute(App.Session.CURRENT_USER_OBJECT, user); 70 | List list = systemModuleMapper.selectParentModuleByType(user.getType()); 71 | list.stream().forEach((m)->{ 72 | m.setChildrenModule(systemModuleMapper.selectChildModuleByParentId(m.getId())); 73 | }); 74 | request.getSession().setAttribute(App.Session.SYSTEM_MENU_ALL, list); 75 | return new ModelAndView(View.Index.WX_LOGIN_HOME_PAGE); 76 | } 77 | } 78 | -------------------------------------------------------------------------------- /src/main/java/com/hus/web/service/UserService.java: -------------------------------------------------------------------------------- 1 | package com.hus.web.service; 2 | 3 | import com.hus.common.consts.Url; 4 | import com.hus.common.consts.View; 5 | import com.hus.web.entity.User; 6 | import com.hus.web.mapper.DepartmentMapper; 7 | import com.hus.web.mapper.UserMapper; 8 | import org.springframework.beans.factory.annotation.Autowired; 9 | import org.springframework.stereotype.Service; 10 | import org.springframework.web.servlet.ModelAndView; 11 | 12 | import javax.servlet.http.HttpServletRequest; 13 | import java.util.Map; 14 | 15 | /** 16 | * Created by zhh on 2017/5/5. 17 | */ 18 | @Service 19 | public class UserService { 20 | @Autowired 21 | private UserMapper userMapper; 22 | 23 | @Autowired 24 | private DepartmentMapper departmentMapper; 25 | 26 | public ModelAndView studentList(HttpServletRequest request){ 27 | request.setAttribute("student_lists", userMapper.selectStudentInfo()); 28 | request.setAttribute("department_lists", departmentMapper.selectIdAndDP()); 29 | return new ModelAndView(View.Student.STUDENt_LIST_VIEW); 30 | } 31 | 32 | public ModelAndView addStudent(HttpServletRequest request, User user){ 33 | userMapper.insert(user); 34 | return new ModelAndView("redirect:/"+ Url.Student.STUDENt_LIST_URL); 35 | } 36 | 37 | public Map getStudentInfo(Integer id){ 38 | return userMapper.selectStudentInfoByPrimaryKey(id); 39 | } 40 | 41 | public Integer updateStudent(User user){ 42 | return userMapper.update(user); 43 | } 44 | 45 | public ModelAndView delateStudent(Integer id){ 46 | userMapper.delete(id); 47 | return new ModelAndView("redirect:/"+ Url.Student.STUDENt_LIST_URL); 48 | } 49 | 50 | 51 | public ModelAndView teacherList(HttpServletRequest request){ 52 | request.setAttribute("teacher_lists", userMapper.selectTeacherInfo()); 53 | request.setAttribute("department_lists", departmentMapper.selectIdAndDP()); 54 | return new ModelAndView(View.Teacher.TEACHER_LIST_VIEW); 55 | } 56 | 57 | public ModelAndView addTeacher(HttpServletRequest request, User user){ 58 | userMapper.insert(user); 59 | return new ModelAndView("redirect:/"+ Url.Teacher.TEACHER_LIST_URL); 60 | } 61 | 62 | public Integer updateTeacher(User user){ 63 | return userMapper.update(user); 64 | } 65 | 66 | public ModelAndView delateTeacher(Integer id){ 67 | userMapper.delete(id); 68 | return new ModelAndView("redirect:/"+ Url.Teacher.TEACHER_LIST_URL); 69 | } 70 | public Map getTeacherInfo(Integer id){ 71 | return userMapper.selectStudentInfoByPrimaryKey(id); 72 | } 73 | 74 | } 75 | -------------------------------------------------------------------------------- /src/main/java/com/hus/web/utils/SignUtil.java: -------------------------------------------------------------------------------- 1 | package com.hus.web.utils; 2 | 3 | import java.security.MessageDigest; 4 | import java.security.NoSuchAlgorithmException; 5 | import java.util.Arrays; 6 | 7 | /** 8 | * Created by zhu on 2017/3/14. 9 | */ 10 | public class SignUtil { 11 | /** 12 | * 与接口配置信息中的Token要一致 13 | */ 14 | private static String token = "weixinCourse"; 15 | 16 | /** 17 | * 验证签名 18 | * @param signature s 19 | * @param timestamp t 20 | * @param nonce b 21 | * @return boolean b 22 | */ 23 | public static boolean checkSignature(String signature, String timestamp, String nonce) { 24 | String[] arr = new String[] { token, timestamp, nonce }; 25 | // 将token、timestamp、nonce三个参数进行字典序排序 26 | Arrays.sort(arr); 27 | StringBuilder content = new StringBuilder(); 28 | for (int i = 0; i < arr.length; i++) { 29 | content.append(arr[i]); 30 | } 31 | MessageDigest md = null; 32 | String tmpStr = null; 33 | 34 | try { 35 | md = MessageDigest.getInstance("SHA-1"); 36 | // 将三个参数字符串拼接成一个字符串进行sha1加密 37 | byte[] digest = md.digest(content.toString().getBytes()); 38 | tmpStr = byteToStr(digest); 39 | } 40 | catch (NoSuchAlgorithmException e) { 41 | e.printStackTrace(); 42 | } 43 | // 将sha1加密后的字符串可与signature对比,标识该请求来源于微信 44 | return tmpStr != null ? tmpStr.equals(signature.toUpperCase()) : false; 45 | } 46 | 47 | /** 48 | * 将字节数组转换为十六进制字符串 49 | * @param byteArray 数组 50 | * @return String 51 | */ 52 | private static String byteToStr(byte[] byteArray) { 53 | String strDigest = ""; 54 | for (int i = 0; i < byteArray.length; i++) { 55 | strDigest += byteToHexStr(byteArray[i]); 56 | } 57 | return strDigest; 58 | } 59 | 60 | /** 61 | * 将字节转换为十六进制字符串 62 | * @param mByte b 63 | * @return String 64 | */ 65 | private static String byteToHexStr(byte mByte) { 66 | char[] digit = { '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'A', 'B', 'C', 'D', 'E', 'F' }; 67 | char[] tempArr = new char[2]; 68 | tempArr[0] = digit[(mByte >>> 4) & 0X0F]; 69 | tempArr[1] = digit[mByte & 0X0F]; 70 | 71 | String s = new String(tempArr); 72 | return s; 73 | } 74 | } 75 | -------------------------------------------------------------------------------- /src/main/resources/config/application.yml: -------------------------------------------------------------------------------- 1 | spring: 2 | profiles.active: dev 3 | mvc.view.prefix: /WEB-INF/view/ 4 | mvc.view.suffix: .jsp 5 | server: 6 | contextPath: /hus 7 | port: 80 8 | 9 | 10 | --- 11 | spring: 12 | profiles: dev 13 | datasource: 14 | driver: com.mysql.jdbc.Driver 15 | url: jdbc:mysql://127.0.0.1:3306/hh 16 | username: root 17 | password: root 18 | wechat: 19 | appID: wxa4cc0a202b65477c 20 | appsecret: 29d8103ec273d5af766ed8ba7eaec315 21 | 22 | -------------------------------------------------------------------------------- /src/main/resources/sqlMap/CourseMapper.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 18 | 34 | 35 | insert into course_info 36 | 37 | 38 | sno, 39 | 40 | 41 | name, 42 | 43 | 44 | teacher_id, 45 | 46 | 47 | study_score, 48 | 49 | 50 | study_slot, 51 | 52 | 53 | address, 54 | 55 | 56 | status, 57 | 58 | 59 | all_quato, 60 | 61 | 62 | choosed_quato, 63 | 64 | 65 | 66 | 67 | #{sno, jdbcType=VARCHAR}, 68 | 69 | 70 | #{name, jdbcType=VARCHAR}, 71 | 72 | 73 | #{teacherId, jdbcType=INTEGER}, 74 | 75 | 76 | #{studyScore, jdbcType=INTEGER}, 77 | 78 | 79 | #{studySlot, jdbcType=INTEGER}, 80 | 81 | 82 | #{address, jdbcType=VARCHAR}, 83 | 84 | 85 | #{status, jdbcType=INTEGER}, 86 | 87 | 88 | #{allQuato, jdbcType=INTEGER}, 89 | 90 | 91 | #{choosedQuato, jdbcType=INTEGER}, 92 | 93 | 94 | 95 | 96 | 97 | update course_info 98 | 99 | 100 | sno = #{sno, jdbcType=VARCHAR}, 101 | 102 | 103 | name = #{name, jdbcType=VARCHAR}, 104 | 105 | 106 | teacher_id = #{teacherId, jdbcType=INTEGER}, 107 | 108 | 109 | study_score = #{studyScore, jdbcType=INTEGER}, 110 | 111 | 112 | study_slot = #{studySlot, jdbcType=INTEGER}, 113 | 114 | 115 | address = #{address, jdbcType=VARCHAR}, 116 | 117 | 118 | status = #{status, jdbcType=INTEGER}, 119 | 120 | 121 | all_quato = #{allQuato, jdbcType=INTEGER}, 122 | 123 | 124 | choosed_quato = #{choosedQuato, jdbcType=INTEGER}, 125 | 126 | 127 | where 128 | id = #{id, jdbcType=INTEGER} 129 | 130 | 131 | 148 | 149 | 150 | delete from course_info where id = #{id, jdbcType=INTEGER} 151 | 152 | 153 | 156 | 157 | 158 | insert into student_course (student_id, course_id) values (#{studentId, jdbcType=INTEGER}, #{courseId, jdbcType=INTEGER}) 159 | 160 | 161 | 180 | 181 | 200 | 201 | 202 | update course_info 203 | set choosed_quato = choosed_quato + #{num, jdbcType=INTEGER } 204 | where id = #{courseId, jdbcType=INTEGER} 205 | 206 | 207 | 208 | delete from student_course where student_id = #{studentId, jdbcType=INTEGER} and course_id = #{courseId, jdbcType=INTEGER} 209 | 210 | 211 | -------------------------------------------------------------------------------- /src/main/resources/sqlMap/DepartmentMapper.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 11 | 12 | -------------------------------------------------------------------------------- /src/main/resources/sqlMap/SystemModuleMapper.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 16 | 17 | 29 | 30 | -------------------------------------------------------------------------------- /src/main/resources/sqlMap/UserMapper.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | insert into user_info 6 | 7 | 8 | type, 9 | 10 | 11 | sno, 12 | 13 | 14 | password, 15 | 16 | 17 | name, 18 | 19 | 20 | department_id, 21 | 22 | 23 | open_id, 24 | 25 | 26 | 27 | 28 | #{type, jdbcType=INTEGER}, 29 | 30 | 31 | #{sno,jdbcType=VARCHAR}, 32 | 33 | 34 | #{password,jdbcType=VARCHAR}, 35 | 36 | 37 | #{name, jdbcType=VARCHAR}, 38 | 39 | 40 | #{departmentId, jdbcType=INTEGER}, 41 | 42 | 43 | #{openId, jdbcType=VARCHAR}, 44 | 45 | 46 | 47 | 48 | update user_info 49 | 50 | 51 | type = #{type, jdbcType=INTEGER}, 52 | 53 | 54 | sno = #{sno,jdbcType=VARCHAR}, 55 | 56 | 57 | password = #{password,jdbcType=VARCHAR}, 58 | 59 | 60 | name = #{name, jdbcType=VARCHAR}, 61 | 62 | 63 | department_id = #{departmentId, jdbcType=INTEGER}, 64 | 65 | 66 | open_id = #{openId, jdbcType=VARCHAR}, 67 | 68 | 69 | where 70 | id = #{id, jdbcType=INTEGER} 71 | 72 | 86 | 87 | 101 | 102 | 115 | 116 | 129 | 130 | 131 | 143 | 144 | 145 | delete from user_info where id = #{id, jdbcType=INTEGER} 146 | 147 | 148 | 157 | 158 | -------------------------------------------------------------------------------- /src/main/webapp/WEB-INF/view/error.jsp: -------------------------------------------------------------------------------- 1 | <%-- 2 | Created by IntelliJ IDEA. 3 | User: zhh 4 | Date: 2017/5/10 5 | Time: 13:10 6 | To change this template use File | Settings | File Templates. 7 | --%> 8 | <%@ page contentType="text/html;charset=UTF-8" language="java" %> 9 | 10 | 11 | 错误 12 | 13 | 14 | ${error_tips} 15 | 16 | 17 | -------------------------------------------------------------------------------- /src/main/webapp/WEB-INF/view/home/index.jsp: -------------------------------------------------------------------------------- 1 | <%-- 2 | Created by IntelliJ IDEA. 3 | User: zhh 4 | Date: 2017/5/4 5 | Time: 15:42 6 | To change this template use File | Settings | File Templates. 7 | --%> 8 | <%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %> 9 | <%@ include file="/base.jsp" %> 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | <%@include file="/nav.jsp"%> 22 |
23 |
24 |
25 | <%@include file="/menu.jsp"%> 26 |
27 |
28 | 主窗口 29 |
30 |
31 |
32 | 34 | 35 | 36 | -------------------------------------------------------------------------------- /src/main/webapp/WEB-INF/view/login/index.jsp: -------------------------------------------------------------------------------- 1 | 2 | <%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %> 3 | <%@ include file="/base.jsp" %> 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 登录 12 | 13 | 14 | 15 | 16 |
17 | 25 |
26 | 27 | 28 | -------------------------------------------------------------------------------- /src/main/webapp/WEB-INF/view/mobile/index.jsp: -------------------------------------------------------------------------------- 1 | <%-- 2 | Created by IntelliJ IDEA. 3 | User: zhh 4 | Date: 2017/5/10 5 | Time: 15:51 6 | To change this template use File | Settings | File Templates. 7 | --%> 8 | <%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %> 9 | <%@include file="/base.jsp"%> 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 58 | 59 | -------------------------------------------------------------------------------- /src/main/webapp/WEB-INF/view/mobile/student_choosed_page.jsp: -------------------------------------------------------------------------------- 1 | <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> 2 | <%-- 3 | Created by IntelliJ IDEA. 4 | User: zhh 5 | Date: 2017/5/10 6 | Time: 15:51 7 | To change this template use File | Settings | File Templates. 8 | --%> 9 | <%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %> 10 | <%@include file="/base.jsp"%> 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 59 |
60 |
61 |
62 |
63 |
64 |
65 |
66 |
67 | 68 | 69 | 70 | 71 |
72 |
73 |
74 |
75 |
76 |
77 | 78 | 80 | 81 | 82 | 83 | 84 | <%----%> 85 | <%----%> 86 | <%----%> 87 | <%----%> 88 | <%----%> 89 | <%----%> 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | <%----%> 99 | <%----%> 100 | <%----%> 101 | <%----%> 102 | <%----%> 103 | <%----%> 104 | 110 | 111 | 112 | 113 |
79 |
课程编号课程名称授课教师上课地点学      分学      时限定人数已选人数操      作
${i['sno']}${i['name']}${i['teacherName']}${i['address']}${i['studyScore']}${i['studySlot']}${i['allQuato']}${i['choosedQuato']} 105 |
106 | 选课 108 |
109 |
114 | 118 |
119 |
120 |
121 |
122 | 123 | 125 | 126 | 127 | 128 | 129 | <%----%> 130 | <%----%> 131 | <%----%> 132 | <%----%> 133 | <%----%> 134 | <%----%> 135 | 136 | 137 | 138 | 139 | 140 | 141 | 142 | 143 | <%----%> 144 | <%----%> 145 | <%----%> 146 | <%----%> 147 | <%----%> 148 | <%----%> 149 | 155 | 156 | 157 | 158 |
124 |
课程编号课程名称授课教师上课地点学      分学      时限定人数已选人数操      作
${i['sno']}${i['name']}${i['teacherName']}${i['address']}${i['studyScore']}${i['studySlot']}${i['allQuato']}${i['choosedQuato']} 150 |
151 | 退选 153 |
154 |
159 |
160 |
161 |
162 |
163 |
164 | 165 | -------------------------------------------------------------------------------- /src/main/webapp/WEB-INF/view/student/choosed_course.jsp: -------------------------------------------------------------------------------- 1 | <%-- 2 | Created by IntelliJ IDEA. 3 | User: zhh 4 | Date: 2017/5/4 5 | Time: 15:42 6 | To change this template use File | Settings | File Templates. 7 | --%> 8 | <%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %> 9 | <%@ include file="/base.jsp" %> 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | <%@include file="/nav.jsp"%> 22 |
23 |
24 |
25 | <%@include file="/menu.jsp"%> 26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 | 34 | 35 | 36 | 37 |
38 |
39 |
40 |
41 |
42 |
43 | 44 | 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 | 77 | 78 | 79 | 80 |
45 |
课程编号课程名称授课教师上课地点学      分学      时限定人数已选人数操      作
${i['sno']}${i['name']}${i['teacherName']}${i['address']}${i['studyScore']}${i['studySlot']}${i['allQuato']}${i['choosedQuato']} 71 |
72 | 选课 74 | 75 |
76 |
81 | 85 |
86 |
87 |
88 |
89 | 90 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | 110 | 111 | 112 | 113 | 114 | 115 | 116 | 122 | 123 | 124 | 125 |
91 |
课程编号课程名称授课教师上课地点学      分学      时限定人数已选人数操      作
${i['sno']}${i['name']}${i['teacherName']}${i['address']}${i['studyScore']}${i['studySlot']}${i['allQuato']}${i['choosedQuato']} 117 |
118 | 退选 120 |
121 |
126 |
127 |
128 |
129 |
130 |
131 | 132 | 133 | -------------------------------------------------------------------------------- /src/main/webapp/WEB-INF/web.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /src/main/webapp/base.jsp: -------------------------------------------------------------------------------- 1 | <%-- 2 | Created by IntelliJ IDEA. 3 | User: zhh 4 | Date: 2017/5/4 5 | Time: 13:50 6 | To change this template use File | Settings | File Templates. 7 | --%> 8 | <%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> 9 | <% 10 | String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort() 11 | + request.getContextPath() + "/"; 12 | %> 13 | 16 | 17 | -------------------------------------------------------------------------------- /src/main/webapp/bootstrap/css/bootstrap-switch.css: -------------------------------------------------------------------------------- 1 | /** 2 | * bootstrap-switch - Turn checkboxes and radio buttons into toggle switches. 3 | * 4 | * @version v3.3.4 5 | * @homepage https://bttstrp.github.io/bootstrap-switch 6 | * @author Mattia Larentis (http://larentis.eu) 7 | * @license Apache-2.0 8 | */ 9 | 10 | .bootstrap-switch { 11 | display: inline-block; 12 | direction: ltr; 13 | cursor: pointer; 14 | border-radius: 4px; 15 | border: 1px solid; 16 | border-color: #ccc; 17 | position: relative; 18 | text-align: left; 19 | overflow: hidden; 20 | line-height: 8px; 21 | z-index: 0; 22 | -webkit-user-select: none; 23 | -moz-user-select: none; 24 | -ms-user-select: none; 25 | user-select: none; 26 | vertical-align: middle; 27 | -webkit-transition: border-color ease-in-out .15s, box-shadow ease-in-out .15s; 28 | -o-transition: border-color ease-in-out .15s, box-shadow ease-in-out .15s; 29 | transition: border-color ease-in-out .15s, box-shadow ease-in-out .15s; 30 | } 31 | .bootstrap-switch .bootstrap-switch-container { 32 | display: inline-block; 33 | top: 0; 34 | border-radius: 4px; 35 | -webkit-transform: translate3d(0, 0, 0); 36 | transform: translate3d(0, 0, 0); 37 | } 38 | .bootstrap-switch .bootstrap-switch-handle-on, 39 | .bootstrap-switch .bootstrap-switch-handle-off, 40 | .bootstrap-switch .bootstrap-switch-label { 41 | -webkit-box-sizing: border-box; 42 | -moz-box-sizing: border-box; 43 | box-sizing: border-box; 44 | cursor: pointer; 45 | display: table-cell; 46 | vertical-align: middle; 47 | padding: 6px 12px; 48 | font-size: 14px; 49 | line-height: 20px; 50 | } 51 | .bootstrap-switch .bootstrap-switch-handle-on, 52 | .bootstrap-switch .bootstrap-switch-handle-off { 53 | text-align: center; 54 | z-index: 1; 55 | } 56 | .bootstrap-switch .bootstrap-switch-handle-on.bootstrap-switch-primary, 57 | .bootstrap-switch .bootstrap-switch-handle-off.bootstrap-switch-primary { 58 | color: #fff; 59 | background: #337ab7; 60 | } 61 | .bootstrap-switch .bootstrap-switch-handle-on.bootstrap-switch-info, 62 | .bootstrap-switch .bootstrap-switch-handle-off.bootstrap-switch-info { 63 | color: #fff; 64 | background: #5bc0de; 65 | } 66 | .bootstrap-switch .bootstrap-switch-handle-on.bootstrap-switch-success, 67 | .bootstrap-switch .bootstrap-switch-handle-off.bootstrap-switch-success { 68 | color: #fff; 69 | background: #5cb85c; 70 | } 71 | .bootstrap-switch .bootstrap-switch-handle-on.bootstrap-switch-warning, 72 | .bootstrap-switch .bootstrap-switch-handle-off.bootstrap-switch-warning { 73 | background: #f0ad4e; 74 | color: #fff; 75 | } 76 | .bootstrap-switch .bootstrap-switch-handle-on.bootstrap-switch-danger, 77 | .bootstrap-switch .bootstrap-switch-handle-off.bootstrap-switch-danger { 78 | color: #fff; 79 | background: #d9534f; 80 | } 81 | .bootstrap-switch .bootstrap-switch-handle-on.bootstrap-switch-default, 82 | .bootstrap-switch .bootstrap-switch-handle-off.bootstrap-switch-default { 83 | color: #000; 84 | background: #eeeeee; 85 | } 86 | .bootstrap-switch .bootstrap-switch-label { 87 | text-align: center; 88 | margin-top: -1px; 89 | margin-bottom: -1px; 90 | z-index: 100; 91 | color: #333; 92 | background: #fff; 93 | } 94 | .bootstrap-switch span::before { 95 | content: "\200b"; 96 | } 97 | .bootstrap-switch .bootstrap-switch-handle-on { 98 | border-bottom-left-radius: 3px; 99 | border-top-left-radius: 3px; 100 | } 101 | .bootstrap-switch .bootstrap-switch-handle-off { 102 | border-bottom-right-radius: 3px; 103 | border-top-right-radius: 3px; 104 | } 105 | .bootstrap-switch input[type='radio'], 106 | .bootstrap-switch input[type='checkbox'] { 107 | position: absolute !important; 108 | top: 0; 109 | left: 0; 110 | margin: 0; 111 | z-index: -1; 112 | opacity: 0; 113 | filter: alpha(opacity=0); 114 | visibility: hidden; 115 | } 116 | .bootstrap-switch.bootstrap-switch-mini .bootstrap-switch-handle-on, 117 | .bootstrap-switch.bootstrap-switch-mini .bootstrap-switch-handle-off, 118 | .bootstrap-switch.bootstrap-switch-mini .bootstrap-switch-label { 119 | padding: 1px 5px; 120 | font-size: 12px; 121 | line-height: 1.5; 122 | } 123 | .bootstrap-switch.bootstrap-switch-small .bootstrap-switch-handle-on, 124 | .bootstrap-switch.bootstrap-switch-small .bootstrap-switch-handle-off, 125 | .bootstrap-switch.bootstrap-switch-small .bootstrap-switch-label { 126 | padding: 5px 10px; 127 | font-size: 12px; 128 | line-height: 1.5; 129 | } 130 | .bootstrap-switch.bootstrap-switch-large .bootstrap-switch-handle-on, 131 | .bootstrap-switch.bootstrap-switch-large .bootstrap-switch-handle-off, 132 | .bootstrap-switch.bootstrap-switch-large .bootstrap-switch-label { 133 | padding: 6px 16px; 134 | font-size: 18px; 135 | line-height: 1.3333333; 136 | } 137 | .bootstrap-switch.bootstrap-switch-disabled, 138 | .bootstrap-switch.bootstrap-switch-readonly, 139 | .bootstrap-switch.bootstrap-switch-indeterminate { 140 | cursor: default !important; 141 | } 142 | .bootstrap-switch.bootstrap-switch-disabled .bootstrap-switch-handle-on, 143 | .bootstrap-switch.bootstrap-switch-readonly .bootstrap-switch-handle-on, 144 | .bootstrap-switch.bootstrap-switch-indeterminate .bootstrap-switch-handle-on, 145 | .bootstrap-switch.bootstrap-switch-disabled .bootstrap-switch-handle-off, 146 | .bootstrap-switch.bootstrap-switch-readonly .bootstrap-switch-handle-off, 147 | .bootstrap-switch.bootstrap-switch-indeterminate .bootstrap-switch-handle-off, 148 | .bootstrap-switch.bootstrap-switch-disabled .bootstrap-switch-label, 149 | .bootstrap-switch.bootstrap-switch-readonly .bootstrap-switch-label, 150 | .bootstrap-switch.bootstrap-switch-indeterminate .bootstrap-switch-label { 151 | opacity: 0.5; 152 | filter: alpha(opacity=50); 153 | cursor: default !important; 154 | } 155 | .bootstrap-switch.bootstrap-switch-animate .bootstrap-switch-container { 156 | -webkit-transition: margin-left 0.5s; 157 | -o-transition: margin-left 0.5s; 158 | transition: margin-left 0.5s; 159 | } 160 | .bootstrap-switch.bootstrap-switch-inverse .bootstrap-switch-handle-on { 161 | border-bottom-left-radius: 0; 162 | border-top-left-radius: 0; 163 | border-bottom-right-radius: 3px; 164 | border-top-right-radius: 3px; 165 | } 166 | .bootstrap-switch.bootstrap-switch-inverse .bootstrap-switch-handle-off { 167 | border-bottom-right-radius: 0; 168 | border-top-right-radius: 0; 169 | border-bottom-left-radius: 3px; 170 | border-top-left-radius: 3px; 171 | } 172 | .bootstrap-switch.bootstrap-switch-focused { 173 | border-color: #66afe9; 174 | outline: 0; 175 | -webkit-box-shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(102, 175, 233, 0.6); 176 | box-shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(102, 175, 233, 0.6); 177 | } 178 | .bootstrap-switch.bootstrap-switch-on .bootstrap-switch-label, 179 | .bootstrap-switch.bootstrap-switch-inverse.bootstrap-switch-off .bootstrap-switch-label { 180 | border-bottom-right-radius: 3px; 181 | border-top-right-radius: 3px; 182 | } 183 | .bootstrap-switch.bootstrap-switch-off .bootstrap-switch-label, 184 | .bootstrap-switch.bootstrap-switch-inverse.bootstrap-switch-on .bootstrap-switch-label { 185 | border-bottom-left-radius: 3px; 186 | border-top-left-radius: 3px; 187 | } 188 | -------------------------------------------------------------------------------- /src/main/webapp/bootstrap/css/bootstrap-switch.min.css: -------------------------------------------------------------------------------- 1 | /** 2 | * bootstrap-switch - Turn checkboxes and radio buttons into toggle switches. 3 | * 4 | * @version v3.3.4 5 | * @homepage https://bttstrp.github.io/bootstrap-switch 6 | * @author Mattia Larentis (http://larentis.eu) 7 | * @license Apache-2.0 8 | */ 9 | 10 | .bootstrap-switch{display:inline-block;direction:ltr;cursor:pointer;border-radius:4px;border:1px solid #ccc;position:relative;text-align:left;overflow:hidden;line-height:8px;z-index:0;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;vertical-align:middle;-webkit-transition:border-color ease-in-out .15s,box-shadow ease-in-out .15s;-o-transition:border-color ease-in-out .15s,box-shadow ease-in-out .15s;transition:border-color ease-in-out .15s,box-shadow ease-in-out .15s}.bootstrap-switch .bootstrap-switch-container{display:inline-block;top:0;border-radius:4px;-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}.bootstrap-switch .bootstrap-switch-handle-off,.bootstrap-switch .bootstrap-switch-handle-on,.bootstrap-switch .bootstrap-switch-label{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;cursor:pointer;display:table-cell;vertical-align:middle;padding:6px 12px;font-size:14px;line-height:20px}.bootstrap-switch .bootstrap-switch-handle-off,.bootstrap-switch .bootstrap-switch-handle-on{text-align:center;z-index:1}.bootstrap-switch .bootstrap-switch-handle-off.bootstrap-switch-primary,.bootstrap-switch .bootstrap-switch-handle-on.bootstrap-switch-primary{color:#fff;background:#337ab7}.bootstrap-switch .bootstrap-switch-handle-off.bootstrap-switch-info,.bootstrap-switch .bootstrap-switch-handle-on.bootstrap-switch-info{color:#fff;background:#5bc0de}.bootstrap-switch .bootstrap-switch-handle-off.bootstrap-switch-success,.bootstrap-switch .bootstrap-switch-handle-on.bootstrap-switch-success{color:#fff;background:#5cb85c}.bootstrap-switch .bootstrap-switch-handle-off.bootstrap-switch-warning,.bootstrap-switch .bootstrap-switch-handle-on.bootstrap-switch-warning{background:#f0ad4e;color:#fff}.bootstrap-switch .bootstrap-switch-handle-off.bootstrap-switch-danger,.bootstrap-switch .bootstrap-switch-handle-on.bootstrap-switch-danger{color:#fff;background:#d9534f}.bootstrap-switch .bootstrap-switch-handle-off.bootstrap-switch-default,.bootstrap-switch .bootstrap-switch-handle-on.bootstrap-switch-default{color:#000;background:#eee}.bootstrap-switch .bootstrap-switch-label{text-align:center;margin-top:-1px;margin-bottom:-1px;z-index:100;color:#333;background:#fff}.bootstrap-switch span::before{content:"\200b"}.bootstrap-switch .bootstrap-switch-handle-on{border-bottom-left-radius:3px;border-top-left-radius:3px}.bootstrap-switch .bootstrap-switch-handle-off{border-bottom-right-radius:3px;border-top-right-radius:3px}.bootstrap-switch input[type=radio],.bootstrap-switch input[type=checkbox]{position:absolute!important;top:0;left:0;margin:0;z-index:-1;opacity:0;filter:alpha(opacity=0);visibility:hidden}.bootstrap-switch.bootstrap-switch-mini .bootstrap-switch-handle-off,.bootstrap-switch.bootstrap-switch-mini .bootstrap-switch-handle-on,.bootstrap-switch.bootstrap-switch-mini .bootstrap-switch-label{padding:1px 5px;font-size:12px;line-height:1.5}.bootstrap-switch.bootstrap-switch-small .bootstrap-switch-handle-off,.bootstrap-switch.bootstrap-switch-small .bootstrap-switch-handle-on,.bootstrap-switch.bootstrap-switch-small .bootstrap-switch-label{padding:5px 10px;font-size:12px;line-height:1.5}.bootstrap-switch.bootstrap-switch-large .bootstrap-switch-handle-off,.bootstrap-switch.bootstrap-switch-large .bootstrap-switch-handle-on,.bootstrap-switch.bootstrap-switch-large .bootstrap-switch-label{padding:6px 16px;font-size:18px;line-height:1.3333333}.bootstrap-switch.bootstrap-switch-disabled,.bootstrap-switch.bootstrap-switch-indeterminate,.bootstrap-switch.bootstrap-switch-readonly{cursor:default!important}.bootstrap-switch.bootstrap-switch-disabled .bootstrap-switch-handle-off,.bootstrap-switch.bootstrap-switch-disabled .bootstrap-switch-handle-on,.bootstrap-switch.bootstrap-switch-disabled .bootstrap-switch-label,.bootstrap-switch.bootstrap-switch-indeterminate .bootstrap-switch-handle-off,.bootstrap-switch.bootstrap-switch-indeterminate .bootstrap-switch-handle-on,.bootstrap-switch.bootstrap-switch-indeterminate .bootstrap-switch-label,.bootstrap-switch.bootstrap-switch-readonly .bootstrap-switch-handle-off,.bootstrap-switch.bootstrap-switch-readonly .bootstrap-switch-handle-on,.bootstrap-switch.bootstrap-switch-readonly .bootstrap-switch-label{opacity:.5;filter:alpha(opacity=50);cursor:default!important}.bootstrap-switch.bootstrap-switch-animate .bootstrap-switch-container{-webkit-transition:margin-left .5s;-o-transition:margin-left .5s;transition:margin-left .5s}.bootstrap-switch.bootstrap-switch-inverse .bootstrap-switch-handle-on{border-radius:0 3px 3px 0}.bootstrap-switch.bootstrap-switch-inverse .bootstrap-switch-handle-off{border-radius:3px 0 0 3px}.bootstrap-switch.bootstrap-switch-focused{border-color:#66afe9;outline:0;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 8px rgba(102,175,233,.6);box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 8px rgba(102,175,233,.6)}.bootstrap-switch.bootstrap-switch-inverse.bootstrap-switch-off .bootstrap-switch-label,.bootstrap-switch.bootstrap-switch-on .bootstrap-switch-label{border-bottom-right-radius:3px;border-top-right-radius:3px}.bootstrap-switch.bootstrap-switch-inverse.bootstrap-switch-on .bootstrap-switch-label,.bootstrap-switch.bootstrap-switch-off .bootstrap-switch-label{border-bottom-left-radius:3px;border-top-left-radius:3px} -------------------------------------------------------------------------------- /src/main/webapp/bootstrap/fonts/glyphicons-halflings-regular.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/heavenfucking/SpringBootHus/58ea23de02f0868afdf43879f9e45b2d676df16c/src/main/webapp/bootstrap/fonts/glyphicons-halflings-regular.eot -------------------------------------------------------------------------------- /src/main/webapp/bootstrap/fonts/glyphicons-halflings-regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/heavenfucking/SpringBootHus/58ea23de02f0868afdf43879f9e45b2d676df16c/src/main/webapp/bootstrap/fonts/glyphicons-halflings-regular.ttf -------------------------------------------------------------------------------- /src/main/webapp/bootstrap/fonts/glyphicons-halflings-regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/heavenfucking/SpringBootHus/58ea23de02f0868afdf43879f9e45b2d676df16c/src/main/webapp/bootstrap/fonts/glyphicons-halflings-regular.woff -------------------------------------------------------------------------------- /src/main/webapp/bootstrap/fonts/glyphicons-halflings-regular.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/heavenfucking/SpringBootHus/58ea23de02f0868afdf43879f9e45b2d676df16c/src/main/webapp/bootstrap/fonts/glyphicons-halflings-regular.woff2 -------------------------------------------------------------------------------- /src/main/webapp/bootstrap/js/npm.js: -------------------------------------------------------------------------------- 1 | // This file is autogenerated via the `commonjs` Grunt task. You can require() this file in a CommonJS environment. 2 | require('../../js/transition.js') 3 | require('../../js/alert.js') 4 | require('../../js/button.js') 5 | require('../../js/carousel.js') 6 | require('../../js/collapse.js') 7 | require('../../js/dropdown.js') 8 | require('../../js/modal.js') 9 | require('../../js/tooltip.js') 10 | require('../../js/popover.js') 11 | require('../../js/scrollspy.js') 12 | require('../../js/tab.js') 13 | require('../../js/affix.js') -------------------------------------------------------------------------------- /src/main/webapp/css/leftMenu.css: -------------------------------------------------------------------------------- 1 | #main-nav { 2 | margin-left: 1px; 3 | } 4 | 5 | #main-nav.nav-tabs.nav-stacked > li > a { 6 | padding: 10px 8px; 7 | font-size: 14px; 8 | font-weight: 600; 9 | color: #4A515B; 10 | background: #E9E9E9; 11 | background: -moz-linear-gradient(top, #FAFAFA 0%, #E9E9E9 100%); 12 | background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#FAFAFA), color-stop(100%,#E9E9E9)); 13 | background: -webkit-linear-gradient(top, #FAFAFA 0%,#E9E9E9 100%); 14 | background: -o-linear-gradient(top, #FAFAFA 0%,#E9E9E9 100%); 15 | background: -ms-linear-gradient(top, #FAFAFA 0%,#E9E9E9 100%); 16 | background: linear-gradient(top, #FAFAFA 0%,#E9E9E9 100%); 17 | filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#FAFAFA', endColorstr='#E9E9E9'); 18 | -ms-filter: "progid:DXImageTransform.Microsoft.gradient(startColorstr='#FAFAFA', endColorstr='#E9E9E9')"; 19 | border: 1px solid #D5D5D5; 20 | border-radius: 4px; 21 | } 22 | 23 | #main-nav.nav-tabs.nav-stacked > li > a > span { 24 | color: #4A515B; 25 | } 26 | 27 | #main-nav.nav-tabs.nav-stacked > li.active > a, #main-nav.nav-tabs.nav-stacked > li > a:hover { 28 | color: #FFF; 29 | background: #3C4049; 30 | background: -moz-linear-gradient(top, #4A515B 0%, #3C4049 100%); 31 | background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#4A515B), color-stop(100%,#3C4049)); 32 | background: -webkit-linear-gradient(top, #4A515B 0%,#3C4049 100%); 33 | background: -o-linear-gradient(top, #4A515B 0%,#3C4049 100%); 34 | background: -ms-linear-gradient(top, #4A515B 0%,#3C4049 100%); 35 | background: linear-gradient(top, #4A515B 0%,#3C4049 100%); 36 | filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#4A515B', endColorstr='#3C4049'); 37 | -ms-filter: "progid:DXImageTransform.Microsoft.gradient(startColorstr='#4A515B', endColorstr='#3C4049')"; 38 | border-color: #2B2E33; 39 | } 40 | 41 | #main-nav.nav-tabs.nav-stacked > li.active > a, #main-nav.nav-tabs.nav-stacked > li > a:hover > span { 42 | color: #FFF; 43 | } 44 | 45 | #main-nav.nav-tabs.nav-stacked > li { 46 | margin-bottom: 4px; 47 | } 48 | 49 | /*定义二级菜单样式*/ 50 | .secondmenu a { 51 | font-size: 12px; 52 | color: #4A515B; 53 | /*text-align: center;*/ 54 | } 55 | 56 | .navbar-static-top { 57 | background-color: #212121; 58 | margin-bottom: 5px; 59 | } 60 | 61 | .navbar-brand { 62 | background: url('') no-repeat 10px 8px; 63 | display: inline-block; 64 | vertical-align: middle; 65 | padding-left: 50px; 66 | color: #fff; 67 | } -------------------------------------------------------------------------------- /src/main/webapp/css/signin.css: -------------------------------------------------------------------------------- 1 | body { 2 | padding-top: 40px; 3 | padding-bottom: 40px; 4 | background-color: #eee; 5 | } 6 | 7 | .form-signin { 8 | max-width: 330px; 9 | padding: 15px; 10 | margin: 0 auto; 11 | } 12 | .form-signin .form-signin-heading, 13 | .form-signin .checkbox { 14 | margin-bottom: 10px; 15 | } 16 | .form-signin .checkbox { 17 | font-weight: normal; 18 | } 19 | .form-signin .form-control { 20 | position: relative; 21 | height: auto; 22 | -webkit-box-sizing: border-box; 23 | -moz-box-sizing: border-box; 24 | box-sizing: border-box; 25 | padding: 10px; 26 | font-size: 16px; 27 | } 28 | .form-signin .form-control:focus { 29 | z-index: 2; 30 | } 31 | .form-signin input { 32 | margin-bottom: -1px; 33 | border-bottom-right-radius: 0; 34 | border-bottom-left-radius: 0; 35 | } 36 | .form-signin input[type="password"] { 37 | margin-bottom: 10px; 38 | border-top-left-radius: 0; 39 | border-top-right-radius: 0; 40 | } 41 | -------------------------------------------------------------------------------- /src/main/webapp/layui/css/layui.mobile.css: -------------------------------------------------------------------------------- 1 | /** layui-v1.0.9_rls MIT License By http://www.layui.com */ 2 | blockquote,body,button,dd,div,dl,dt,form,h1,h2,h3,h4,h5,h6,input,legend,li,ol,p,td,textarea,th,ul{margin:0;padding:0;-webkit-tap-highlight-color:rgba(0,0,0,0)}html{font:12px 'Helvetica Neue','PingFang SC',STHeitiSC-Light,Helvetica,Arial,sans-serif;-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%}a,button,input{-webkit-tap-highlight-color:rgba(255,0,0,0)}a{text-decoration:none;background:0 0}a:active,a:hover{outline:0}table{border-collapse:collapse;border-spacing:0}li{list-style:none}b,strong{font-weight:700}h1,h2,h3,h4,h5,h6{font-weight:500}address,cite,dfn,em,var{font-style:normal}dfn{font-style:italic}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}img{border:0;vertical-align:bottom}.layui-inline,input,label{vertical-align:middle}button,input,optgroup,select,textarea{color:inherit;font:inherit;margin:0;outline:0}button,select{text-transform:none}select{-webkit-appearance:none;border:none}input{line-height:normal}input[type=checkbox],input[type=radio]{box-sizing:border-box;padding:0}input[type=number]::-webkit-inner-spin-button,input[type=number]::-webkit-outer-spin-button{height:auto}input[type=search]{-webkit-appearance:textfield;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;box-sizing:content-box}input[type=search]::-webkit-search-cancel-button,input[type=search]::-webkit-search-decoration{-webkit-appearance:none}@font-face{font-family:layui-icon;src:url(../font/iconfont.eot?v=1.0.7);src:url(../font/iconfont.eot?v=1.0.7#iefix) format('embedded-opentype'),url(../font/iconfont.woff?v=1.0.7) format('woff'),url(../font/iconfont.ttf?v=1.0.7) format('truetype'),url(../font/iconfont.svg?v=1.0.7#iconfont) format('svg')}.layui-icon{font-family:layui-icon!important;font-size:16px;font-style:normal;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.layui-box,.layui-box *{-webkit-box-sizing:content-box!important;-moz-box-sizing:content-box!important;box-sizing:content-box!important}.layui-border-box,.layui-border-box *{-webkit-box-sizing:border-box!important;-moz-box-sizing:border-box!important;box-sizing:border-box!important}.layui-inline{position:relative;display:inline-block;*display:inline;*zoom:1}.layui-edge,.layui-upload-iframe{position:absolute;width:0;height:0}.layui-edge{border-style:dashed;border-color:transparent;overflow:hidden}.layui-elip{text-overflow:ellipsis;overflow:hidden;white-space:nowrap}.layui-unselect{-moz-user-select:none;-webkit-user-select:none;-ms-user-select:none}.layui-disabled,.layui-disabled:active{background-color:#d2d2d2!important;color:#fff!important;cursor:not-allowed!important}.layui-circle{border-radius:100%}.layui-show{display:block!important}.layui-hide{display:none!important}.layui-upload-iframe{border:0;visibility:hidden}.layui-upload-enter{border:1px solid #009E94;background-color:#009E94;color:#fff;-webkit-transform:scale(1.1);transform:scale(1.1)}.layui-m-layer{position:relative;z-index:19891014}.layui-m-layer *{-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box}.layui-m-layermain,.layui-m-layershade{position:fixed;left:0;top:0;width:100%;height:100%}.layui-m-layershade{background-color:rgba(0,0,0,.7);pointer-events:auto}.layui-m-layermain{display:table;font-family:Helvetica,arial,sans-serif;pointer-events:none}.layui-m-layermain .layui-m-layersection{display:table-cell;vertical-align:middle;text-align:center}.layui-m-layerchild{position:relative;display:inline-block;text-align:left;background-color:#fff;font-size:14px;border-radius:5px;box-shadow:0 0 8px rgba(0,0,0,.1);pointer-events:auto;-webkit-overflow-scrolling:touch;-webkit-animation-fill-mode:both;animation-fill-mode:both;-webkit-animation-duration:.2s;animation-duration:.2s}@-webkit-keyframes layui-m-anim-scale{0%{opacity:0;-webkit-transform:scale(.5);transform:scale(.5)}100%{opacity:1;-webkit-transform:scale(1);transform:scale(1)}}@keyframes layui-m-anim-scale{0%{opacity:0;-webkit-transform:scale(.5);transform:scale(.5)}100%{opacity:1;-webkit-transform:scale(1);transform:scale(1)}}.layui-m-anim-scale{animation-name:layui-m-anim-scale;-webkit-animation-name:layui-m-anim-scale}@-webkit-keyframes layui-m-anim-up{0%{opacity:0;-webkit-transform:translateY(800px);transform:translateY(800px)}100%{opacity:1;-webkit-transform:translateY(0);transform:translateY(0)}}@keyframes layui-m-anim-up{0%{opacity:0;-webkit-transform:translateY(800px);transform:translateY(800px)}100%{opacity:1;-webkit-transform:translateY(0);transform:translateY(0)}}.layui-m-anim-up{-webkit-animation-name:layui-m-anim-up;animation-name:layui-m-anim-up}.layui-m-layer0 .layui-m-layerchild{width:90%;max-width:640px}.layui-m-layer1 .layui-m-layerchild{border:none;border-radius:0}.layui-m-layer2 .layui-m-layerchild{width:auto;max-width:260px;min-width:40px;border:none;background:0 0;box-shadow:none;color:#fff}.layui-m-layerchild h3{padding:0 10px;height:60px;line-height:60px;font-size:16px;font-weight:400;border-radius:5px 5px 0 0;text-align:center}.layui-m-layerbtn span,.layui-m-layerchild h3{text-overflow:ellipsis;overflow:hidden;white-space:nowrap}.layui-m-layercont{padding:50px 30px;line-height:22px;text-align:center}.layui-m-layer1 .layui-m-layercont{padding:0;text-align:left}.layui-m-layer2 .layui-m-layercont{text-align:center;padding:0;line-height:0}.layui-m-layer2 .layui-m-layercont i{width:25px;height:25px;margin-left:8px;display:inline-block;background-color:#fff;border-radius:100%;-webkit-animation:layui-m-anim-loading 1.4s infinite ease-in-out;animation:layui-m-anim-loading 1.4s infinite ease-in-out;-webkit-animation-fill-mode:both;animation-fill-mode:both}.layui-m-layerbtn,.layui-m-layerbtn span{position:relative;text-align:center;border-radius:0 0 5px 5px}.layui-m-layer2 .layui-m-layercont p{margin-top:20px}@-webkit-keyframes layui-m-anim-loading{0%,100%,80%{transform:scale(0);-webkit-transform:scale(0)}40%{transform:scale(1);-webkit-transform:scale(1)}}@keyframes layui-m-anim-loading{0%,100%,80%{transform:scale(0);-webkit-transform:scale(0)}40%{transform:scale(1);-webkit-transform:scale(1)}}.layui-m-layer2 .layui-m-layercont i:first-child{margin-left:0;-webkit-animation-delay:-.32s;animation-delay:-.32s}.layui-m-layer2 .layui-m-layercont i.layui-m-layerload{-webkit-animation-delay:-.16s;animation-delay:-.16s}.layui-m-layer2 .layui-m-layercont>div{line-height:22px;padding-top:7px;margin-bottom:20px;font-size:14px}.layui-m-layerbtn{display:box;display:-moz-box;display:-webkit-box;width:100%;height:50px;line-height:50px;font-size:0;border-top:1px solid #D0D0D0;background-color:#F2F2F2}.layui-m-layerbtn span{display:block;-moz-box-flex:1;box-flex:1;-webkit-box-flex:1;font-size:14px;cursor:pointer}.layui-m-layerbtn span[yes]{color:#40AFFE}.layui-m-layerbtn span[no]{border-right:1px solid #D0D0D0;border-radius:0 0 0 5px}.layui-m-layerbtn span:active{background-color:#F6F6F6}.layui-m-layerend{position:absolute;right:7px;top:10px;width:30px;height:30px;border:0;font-weight:400;background:0 0;cursor:pointer;-webkit-appearance:none;font-size:30px}.layui-m-layerend::after,.layui-m-layerend::before{position:absolute;left:5px;top:15px;content:'';width:18px;height:1px;background-color:#999;transform:rotate(45deg);-webkit-transform:rotate(45deg);border-radius:3px}.layui-m-layerend::after{transform:rotate(-45deg);-webkit-transform:rotate(-45deg)}body .layui-m-layer .layui-m-layer-footer{position:fixed;width:95%;max-width:100%;margin:0 auto;left:0;right:0;bottom:10px;background:0 0}.layui-m-layer-footer .layui-m-layercont{padding:20px;border-radius:5px 5px 0 0;background-color:rgba(255,255,255,.8)}.layui-m-layer-footer .layui-m-layerbtn{display:block;height:auto;background:0 0;border-top:none}.layui-m-layer-footer .layui-m-layerbtn span{background-color:rgba(255,255,255,.8)}.layui-m-layer-footer .layui-m-layerbtn span[no]{color:#FD482C;border-top:1px solid #c2c2c2;border-radius:0 0 5px 5px}.layui-m-layer-footer .layui-m-layerbtn span[yes]{margin-top:10px;border-radius:5px}body .layui-m-layer .layui-m-layer-msg{width:auto;max-width:90%;margin:0 auto;bottom:-150px;background-color:rgba(0,0,0,.7);color:#fff}.layui-m-layer-msg .layui-m-layercont{padding:10px 20px} -------------------------------------------------------------------------------- /src/main/webapp/layui/css/modules/code.css: -------------------------------------------------------------------------------- 1 | /** layui-v1.0.9_rls MIT License By http://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 #ddd;border-left-width:6px;background-color:#F2F2F2;color:#333;font-family:Courier New}.layui-code-h3{padding:0 10px;height:30px;line-height:30px;border-bottom:1px solid #ddd}.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 #ddd;list-style-type:decimal-leading-zero;*list-style-type:decimal;background-color:#fff}.layui-code-view pre{margin:0}.layui-code-notepad{border:1px solid #0C0C0C;border-left-color:#3F3F3F;background-color:#0C0C0C;color:#C2BE9E}.layui-code-notepad .layui-code-h3{border-bottom:none}.layui-code-notepad .layui-code-ol li{background-color:#3F3F3F;border-left:none} -------------------------------------------------------------------------------- /src/main/webapp/layui/css/modules/laydate/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/heavenfucking/SpringBootHus/58ea23de02f0868afdf43879f9e45b2d676df16c/src/main/webapp/layui/css/modules/laydate/icon.png -------------------------------------------------------------------------------- /src/main/webapp/layui/css/modules/laydate/laydate.css: -------------------------------------------------------------------------------- 1 | /** layui-v1.0.9_rls MIT License By http://www.layui.com */ 2 | #layuicss-laydatecss{display:none;position:absolute;width:1989px}.laydate_body .laydate_box,.laydate_body .laydate_box *{margin:0;padding:0;box-sizing:content-box}.laydate-icon,.laydate-icon-dahong,.laydate-icon-danlan,.laydate-icon-default,.laydate-icon-molv{height:22px;line-height:22px;padding-right:20px;border:1px solid #C6C6C6;background-repeat:no-repeat;background-position:right center;background-color:#fff;outline:0}.laydate-icon-default{background-image:url(../skins/default/icon.png)}.laydate-icon-danlan{border:1px solid #B1D2EC;background-image:url(../skins/danlan/icon.png)}.laydate-icon-dahong{background-image:url(../skins/dahong/icon.png)}.laydate-icon-molv{background-image:url(../skins/molv/icon.png)}.laydate_body .laydate_box{width:240px;font:12px '\5B8B\4F53';z-index:99999999;*overflow:hidden;_margin:0;_position:absolute!important}.laydate_body .laydate_box li{list-style:none}.laydate_body .laydate_box .laydate_void{cursor:text!important}.laydate_body .laydate_box cite,.laydate_body .laydate_box label{position:absolute;width:0;height:0;border-width:5px;border-style:dashed;border-color:transparent;overflow:hidden;cursor:pointer}.laydate_body .laydate_box .laydate_time,.laydate_body .laydate_box .laydate_yms{display:none}.laydate_body .laydate_box .laydate_show{display:block}.laydate_body .laydate_box input{outline:0;font-size:14px;background-color:#fff;color:#333}.laydate_body .laydate_top{position:relative;height:26px;padding:5px;*width:100%;z-index:99}.laydate_body .laydate_ym{position:relative;float:left;height:24px;cursor:pointer}.laydate_body .laydate_ym input{float:left;height:24px;line-height:24px;text-align:center;border:none;cursor:pointer}.laydate_body .laydate_ym .laydate_yms{position:absolute;left:-1px;top:24px;height:181px}.laydate_body .laydate_y{width:121px;margin-right:6px}.laydate_body .laydate_y input{width:64px;margin-right:15px}.laydate_body .laydate_y .laydate_yms{width:121px;text-align:center}.laydate_body .laydate_y .laydate_yms a{position:relative;display:block;height:20px}.laydate_body .laydate_y .laydate_yms ul{height:139px;padding:0;*overflow:hidden}.laydate_body .laydate_y .laydate_yms ul li{float:left;width:60px;height:20px;line-height:20px;text-overflow:ellipsis;overflow:hidden;white-space:nowrap}.laydate_body .laydate_m{width:99px}.laydate_body .laydate_m .laydate_yms{width:99px;padding:0}.laydate_body .laydate_m input{width:42px;margin-right:15px}.laydate_body .laydate_m .laydate_yms span{display:block;float:left;width:42px;margin:5px 0 0 5px;line-height:24px;text-align:center;_display:inline}.laydate_body .laydate_choose{display:block;float:left;position:relative;width:20px;height:24px}.laydate_body .laydate_choose cite,.laydate_body .laydate_tab cite{left:50%;top:50%}.laydate_body .laydate_chtop cite{margin:-7px 0 0 -5px;border-bottom-style:solid}.laydate_body .laydate_chdown cite,.laydate_body .laydate_ym label{top:50%;margin:-2px 0 0 -5px;border-top-style:solid}.laydate_body .laydate_chprev cite{margin:-5px 0 0 -7px}.laydate_body .laydate_chnext cite{margin:-5px 0 0 -2px}.laydate_body .laydate_ym label{right:28px}.laydate_body .laydate_table{width:230px;margin:0 5px;border-collapse:collapse;border-spacing:0}.laydate_body .laydate_table td{width:31px;text-align:center;cursor:pointer;font-size:12px}.laydate_body .laydate_table thead th{font-weight:400;font-size:12px;text-align:center}.laydate_body .laydate_bottom{position:relative;height:22px;line-height:20px;padding:5px;font-size:12px}.laydate_body .laydate_bottom #laydate_hms{position:relative;z-index:1;float:left}.laydate_body .laydate_time{position:absolute;left:5px;bottom:26px;width:129px;height:125px;*overflow:hidden}.laydate_body .laydate_time .laydate_hmsno{padding:5px 0 0 5px}.laydate_body .laydate_time .laydate_hmsno span{display:block;float:left;width:24px;height:19px;line-height:19px;text-align:center;cursor:pointer;*margin-bottom:-5px}.laydate_body .laydate_time1{width:228px;height:154px}.laydate_body .laydate_time1 .laydate_hmsno{padding:6px 0 0 8px}.laydate_body .laydate_time1 .laydate_hmsno span{width:21px;height:20px;line-height:20px}.laydate_body .laydate_msg{left:49px;bottom:67px;width:141px;height:auto;overflow:hidden}.laydate_body .laydate_msg p{padding:5px 10px}.laydate_body .laydate_bottom li{float:left;height:20px;line-height:20px;border-right:none;font-weight:900}.laydate_body .laydate_bottom .laydate_sj{width:33px;text-align:center;font-weight:400}.laydate_body .laydate_bottom input{float:left;width:21px;height:20px;line-height:20px;border:none;text-align:center;cursor:pointer;font-size:12px;font-weight:400}.laydate_body .laydate_bottom .laydte_hsmtex{height:20px;line-height:20px;text-align:center}.laydate_body .laydate_bottom .laydte_hsmtex span{position:absolute;width:20px;top:0;right:0;cursor:pointer}.laydate_body .laydate_bottom .laydte_hsmtex span:hover{font-size:14px}.laydate_body .laydate_bottom .laydate_btn{position:absolute;right:5px;top:5px}.laydate_body .laydate_bottom .laydate_btn a{float:left;height:20px;padding:0 6px;_padding:0 5px}.laydate_body .laydate_table td,.laydate_body .laydate_table thead{height:21px!important;line-height:21px!important}.laydate-icon{border:1px solid #C6C6C6;background-image:url(icon.png)}.laydate_body .laydate_bottom #laydate_hms,.laydate_body .laydate_bottom .laydate_btn a,.laydate_body .laydate_box,.laydate_body .laydate_table,.laydate_body .laydate_table td,.laydate_body .laydate_time,.laydate_body .laydate_ym,.laydate_body .laydate_ym .laydate_yms{border:1px solid #ccc}.laydate_body .laydate_bottom .laydte_hsmtex,.laydate_body .laydate_choose,.laydate_body .laydate_table thead,.laydate_body .laydate_y .laydate_yms a{background-color:#F6F6F6}.laydate_body .laydate_box,.laydate_body .laydate_time,.laydate_body .laydate_ym .laydate_yms{box-shadow:2px 2px 5px rgba(0,0,0,.1)}.laydate_body .laydate_box{border-top:none;border-bottom:none;background-color:#fff;color:#333}.laydate_body .laydate_box .laydate_void{color:#ccc!important}.laydate_body .laydate_box .laydate_void:hover{background-color:#fff!important}.laydate_body .laydate_box a,.laydate_body .laydate_box a:hover{text-decoration:none;blr:expression(this.onFocus=this.blur());cursor:pointer;color:#333}.laydate_body .laydate_box a:hover{text-decoration:none;color:#666}.laydate_body .laydate_click{background-color:#eee!important}.laydate_body .laydate_bottom #laydate_hms,.laydate_body .laydate_choose:hover,.laydate_body .laydate_table td,.laydate_body .laydate_time,.laydate_body .laydate_y .laydate_yms a:hover{background-color:#fff}.laydate_body .laydate_top{border-top:1px solid #C6C6C6}.laydate_body .laydate_ym .laydate_yms{border:1px solid #C6C6C6;background-color:#fff}.laydate_body .laydate_y .laydate_yms a{border-bottom:1px solid #C6C6C6}.laydate_body .laydate_y .laydate_yms .laydate_chdown{border-top:1px solid #C6C6C6;border-bottom:none}.laydate_body .laydate_choose{border-left:1px solid #C6C6C6}.laydate_body .laydate_chprev{border-left:none;border-right:1px solid #C6C6C6}.laydate_body .laydate_chtop cite{border-bottom-color:#666}.laydate_body .laydate_chdown cite,.laydate_body .laydate_ym label{border-top-color:#666}.laydate_body .laydate_chprev cite{border-right-style:solid;border-right-color:#666}.laydate_body .laydate_chnext cite{border-left-style:solid;border-left-color:#666}.laydate_body .laydate_table td{border:none}.laydate_body .laydate_table .laydate_nothis{color:#999}.laydate_body .laydate_table thead th{border-bottom:1px solid #ccc}.laydate_body .laydate_bottom,.laydate_body .laydate_bottom .laydte_hsmtex{border-bottom:1px solid #C6C6C6}.laydate_body .laydate_bottom .laydate_sj{border-right:1px solid #C6C6C6;background-color:#F6F6F6}.laydate_body .laydate_bottom input{background-color:#fff}.laydate_body .laydate_bottom .laydate_btn{border-right:1px solid #C6C6C6}.laydate_body .laydate_bottom .laydate_v{position:absolute;left:10px;top:6px;font-family:Courier;z-index:0;color:#999}.laydate_body .laydate_bottom .laydate_btn a{border-right:none;background-color:#F6F6F6}.laydate_body .laydate_bottom .laydate_btn a:hover{color:#000;background-color:#fff}.laydate_body .laydate_m .laydate_yms span:hover,.laydate_body .laydate_table td:hover,.laydate_body .laydate_time .laydate_hmsno span:hover,.laydate_body .laydate_y .laydate_yms ul li:hover{background-color:#F3F3F3} -------------------------------------------------------------------------------- /src/main/webapp/layui/css/modules/layer/default/icon-ext.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/heavenfucking/SpringBootHus/58ea23de02f0868afdf43879f9e45b2d676df16c/src/main/webapp/layui/css/modules/layer/default/icon-ext.png -------------------------------------------------------------------------------- /src/main/webapp/layui/css/modules/layer/default/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/heavenfucking/SpringBootHus/58ea23de02f0868afdf43879f9e45b2d676df16c/src/main/webapp/layui/css/modules/layer/default/icon.png -------------------------------------------------------------------------------- /src/main/webapp/layui/css/modules/layer/default/loading-0.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/heavenfucking/SpringBootHus/58ea23de02f0868afdf43879f9e45b2d676df16c/src/main/webapp/layui/css/modules/layer/default/loading-0.gif -------------------------------------------------------------------------------- /src/main/webapp/layui/css/modules/layer/default/loading-1.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/heavenfucking/SpringBootHus/58ea23de02f0868afdf43879f9e45b2d676df16c/src/main/webapp/layui/css/modules/layer/default/loading-1.gif -------------------------------------------------------------------------------- /src/main/webapp/layui/css/modules/layer/default/loading-2.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/heavenfucking/SpringBootHus/58ea23de02f0868afdf43879f9e45b2d676df16c/src/main/webapp/layui/css/modules/layer/default/loading-2.gif -------------------------------------------------------------------------------- /src/main/webapp/layui/font/iconfont.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/heavenfucking/SpringBootHus/58ea23de02f0868afdf43879f9e45b2d676df16c/src/main/webapp/layui/font/iconfont.eot -------------------------------------------------------------------------------- /src/main/webapp/layui/font/iconfont.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/heavenfucking/SpringBootHus/58ea23de02f0868afdf43879f9e45b2d676df16c/src/main/webapp/layui/font/iconfont.ttf -------------------------------------------------------------------------------- /src/main/webapp/layui/font/iconfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/heavenfucking/SpringBootHus/58ea23de02f0868afdf43879f9e45b2d676df16c/src/main/webapp/layui/font/iconfont.woff -------------------------------------------------------------------------------- /src/main/webapp/layui/images/face/0.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/heavenfucking/SpringBootHus/58ea23de02f0868afdf43879f9e45b2d676df16c/src/main/webapp/layui/images/face/0.gif -------------------------------------------------------------------------------- /src/main/webapp/layui/images/face/1.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/heavenfucking/SpringBootHus/58ea23de02f0868afdf43879f9e45b2d676df16c/src/main/webapp/layui/images/face/1.gif -------------------------------------------------------------------------------- /src/main/webapp/layui/images/face/10.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/heavenfucking/SpringBootHus/58ea23de02f0868afdf43879f9e45b2d676df16c/src/main/webapp/layui/images/face/10.gif -------------------------------------------------------------------------------- /src/main/webapp/layui/images/face/11.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/heavenfucking/SpringBootHus/58ea23de02f0868afdf43879f9e45b2d676df16c/src/main/webapp/layui/images/face/11.gif -------------------------------------------------------------------------------- /src/main/webapp/layui/images/face/12.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/heavenfucking/SpringBootHus/58ea23de02f0868afdf43879f9e45b2d676df16c/src/main/webapp/layui/images/face/12.gif -------------------------------------------------------------------------------- /src/main/webapp/layui/images/face/13.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/heavenfucking/SpringBootHus/58ea23de02f0868afdf43879f9e45b2d676df16c/src/main/webapp/layui/images/face/13.gif -------------------------------------------------------------------------------- /src/main/webapp/layui/images/face/14.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/heavenfucking/SpringBootHus/58ea23de02f0868afdf43879f9e45b2d676df16c/src/main/webapp/layui/images/face/14.gif -------------------------------------------------------------------------------- /src/main/webapp/layui/images/face/15.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/heavenfucking/SpringBootHus/58ea23de02f0868afdf43879f9e45b2d676df16c/src/main/webapp/layui/images/face/15.gif -------------------------------------------------------------------------------- /src/main/webapp/layui/images/face/16.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/heavenfucking/SpringBootHus/58ea23de02f0868afdf43879f9e45b2d676df16c/src/main/webapp/layui/images/face/16.gif -------------------------------------------------------------------------------- /src/main/webapp/layui/images/face/17.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/heavenfucking/SpringBootHus/58ea23de02f0868afdf43879f9e45b2d676df16c/src/main/webapp/layui/images/face/17.gif -------------------------------------------------------------------------------- /src/main/webapp/layui/images/face/18.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/heavenfucking/SpringBootHus/58ea23de02f0868afdf43879f9e45b2d676df16c/src/main/webapp/layui/images/face/18.gif -------------------------------------------------------------------------------- /src/main/webapp/layui/images/face/19.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/heavenfucking/SpringBootHus/58ea23de02f0868afdf43879f9e45b2d676df16c/src/main/webapp/layui/images/face/19.gif -------------------------------------------------------------------------------- /src/main/webapp/layui/images/face/2.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/heavenfucking/SpringBootHus/58ea23de02f0868afdf43879f9e45b2d676df16c/src/main/webapp/layui/images/face/2.gif -------------------------------------------------------------------------------- /src/main/webapp/layui/images/face/20.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/heavenfucking/SpringBootHus/58ea23de02f0868afdf43879f9e45b2d676df16c/src/main/webapp/layui/images/face/20.gif -------------------------------------------------------------------------------- /src/main/webapp/layui/images/face/21.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/heavenfucking/SpringBootHus/58ea23de02f0868afdf43879f9e45b2d676df16c/src/main/webapp/layui/images/face/21.gif -------------------------------------------------------------------------------- /src/main/webapp/layui/images/face/22.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/heavenfucking/SpringBootHus/58ea23de02f0868afdf43879f9e45b2d676df16c/src/main/webapp/layui/images/face/22.gif -------------------------------------------------------------------------------- /src/main/webapp/layui/images/face/23.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/heavenfucking/SpringBootHus/58ea23de02f0868afdf43879f9e45b2d676df16c/src/main/webapp/layui/images/face/23.gif -------------------------------------------------------------------------------- /src/main/webapp/layui/images/face/24.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/heavenfucking/SpringBootHus/58ea23de02f0868afdf43879f9e45b2d676df16c/src/main/webapp/layui/images/face/24.gif -------------------------------------------------------------------------------- /src/main/webapp/layui/images/face/25.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/heavenfucking/SpringBootHus/58ea23de02f0868afdf43879f9e45b2d676df16c/src/main/webapp/layui/images/face/25.gif -------------------------------------------------------------------------------- /src/main/webapp/layui/images/face/26.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/heavenfucking/SpringBootHus/58ea23de02f0868afdf43879f9e45b2d676df16c/src/main/webapp/layui/images/face/26.gif -------------------------------------------------------------------------------- /src/main/webapp/layui/images/face/27.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/heavenfucking/SpringBootHus/58ea23de02f0868afdf43879f9e45b2d676df16c/src/main/webapp/layui/images/face/27.gif -------------------------------------------------------------------------------- /src/main/webapp/layui/images/face/28.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/heavenfucking/SpringBootHus/58ea23de02f0868afdf43879f9e45b2d676df16c/src/main/webapp/layui/images/face/28.gif -------------------------------------------------------------------------------- /src/main/webapp/layui/images/face/29.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/heavenfucking/SpringBootHus/58ea23de02f0868afdf43879f9e45b2d676df16c/src/main/webapp/layui/images/face/29.gif -------------------------------------------------------------------------------- /src/main/webapp/layui/images/face/3.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/heavenfucking/SpringBootHus/58ea23de02f0868afdf43879f9e45b2d676df16c/src/main/webapp/layui/images/face/3.gif -------------------------------------------------------------------------------- /src/main/webapp/layui/images/face/30.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/heavenfucking/SpringBootHus/58ea23de02f0868afdf43879f9e45b2d676df16c/src/main/webapp/layui/images/face/30.gif -------------------------------------------------------------------------------- /src/main/webapp/layui/images/face/31.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/heavenfucking/SpringBootHus/58ea23de02f0868afdf43879f9e45b2d676df16c/src/main/webapp/layui/images/face/31.gif -------------------------------------------------------------------------------- /src/main/webapp/layui/images/face/32.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/heavenfucking/SpringBootHus/58ea23de02f0868afdf43879f9e45b2d676df16c/src/main/webapp/layui/images/face/32.gif -------------------------------------------------------------------------------- /src/main/webapp/layui/images/face/33.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/heavenfucking/SpringBootHus/58ea23de02f0868afdf43879f9e45b2d676df16c/src/main/webapp/layui/images/face/33.gif -------------------------------------------------------------------------------- /src/main/webapp/layui/images/face/34.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/heavenfucking/SpringBootHus/58ea23de02f0868afdf43879f9e45b2d676df16c/src/main/webapp/layui/images/face/34.gif -------------------------------------------------------------------------------- /src/main/webapp/layui/images/face/35.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/heavenfucking/SpringBootHus/58ea23de02f0868afdf43879f9e45b2d676df16c/src/main/webapp/layui/images/face/35.gif -------------------------------------------------------------------------------- /src/main/webapp/layui/images/face/36.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/heavenfucking/SpringBootHus/58ea23de02f0868afdf43879f9e45b2d676df16c/src/main/webapp/layui/images/face/36.gif -------------------------------------------------------------------------------- /src/main/webapp/layui/images/face/37.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/heavenfucking/SpringBootHus/58ea23de02f0868afdf43879f9e45b2d676df16c/src/main/webapp/layui/images/face/37.gif -------------------------------------------------------------------------------- /src/main/webapp/layui/images/face/38.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/heavenfucking/SpringBootHus/58ea23de02f0868afdf43879f9e45b2d676df16c/src/main/webapp/layui/images/face/38.gif -------------------------------------------------------------------------------- /src/main/webapp/layui/images/face/39.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/heavenfucking/SpringBootHus/58ea23de02f0868afdf43879f9e45b2d676df16c/src/main/webapp/layui/images/face/39.gif -------------------------------------------------------------------------------- /src/main/webapp/layui/images/face/4.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/heavenfucking/SpringBootHus/58ea23de02f0868afdf43879f9e45b2d676df16c/src/main/webapp/layui/images/face/4.gif -------------------------------------------------------------------------------- /src/main/webapp/layui/images/face/40.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/heavenfucking/SpringBootHus/58ea23de02f0868afdf43879f9e45b2d676df16c/src/main/webapp/layui/images/face/40.gif -------------------------------------------------------------------------------- /src/main/webapp/layui/images/face/41.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/heavenfucking/SpringBootHus/58ea23de02f0868afdf43879f9e45b2d676df16c/src/main/webapp/layui/images/face/41.gif -------------------------------------------------------------------------------- /src/main/webapp/layui/images/face/42.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/heavenfucking/SpringBootHus/58ea23de02f0868afdf43879f9e45b2d676df16c/src/main/webapp/layui/images/face/42.gif -------------------------------------------------------------------------------- /src/main/webapp/layui/images/face/43.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/heavenfucking/SpringBootHus/58ea23de02f0868afdf43879f9e45b2d676df16c/src/main/webapp/layui/images/face/43.gif -------------------------------------------------------------------------------- /src/main/webapp/layui/images/face/44.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/heavenfucking/SpringBootHus/58ea23de02f0868afdf43879f9e45b2d676df16c/src/main/webapp/layui/images/face/44.gif -------------------------------------------------------------------------------- /src/main/webapp/layui/images/face/45.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/heavenfucking/SpringBootHus/58ea23de02f0868afdf43879f9e45b2d676df16c/src/main/webapp/layui/images/face/45.gif -------------------------------------------------------------------------------- /src/main/webapp/layui/images/face/46.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/heavenfucking/SpringBootHus/58ea23de02f0868afdf43879f9e45b2d676df16c/src/main/webapp/layui/images/face/46.gif -------------------------------------------------------------------------------- /src/main/webapp/layui/images/face/47.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/heavenfucking/SpringBootHus/58ea23de02f0868afdf43879f9e45b2d676df16c/src/main/webapp/layui/images/face/47.gif -------------------------------------------------------------------------------- /src/main/webapp/layui/images/face/48.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/heavenfucking/SpringBootHus/58ea23de02f0868afdf43879f9e45b2d676df16c/src/main/webapp/layui/images/face/48.gif -------------------------------------------------------------------------------- /src/main/webapp/layui/images/face/49.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/heavenfucking/SpringBootHus/58ea23de02f0868afdf43879f9e45b2d676df16c/src/main/webapp/layui/images/face/49.gif -------------------------------------------------------------------------------- /src/main/webapp/layui/images/face/5.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/heavenfucking/SpringBootHus/58ea23de02f0868afdf43879f9e45b2d676df16c/src/main/webapp/layui/images/face/5.gif -------------------------------------------------------------------------------- /src/main/webapp/layui/images/face/50.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/heavenfucking/SpringBootHus/58ea23de02f0868afdf43879f9e45b2d676df16c/src/main/webapp/layui/images/face/50.gif -------------------------------------------------------------------------------- /src/main/webapp/layui/images/face/51.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/heavenfucking/SpringBootHus/58ea23de02f0868afdf43879f9e45b2d676df16c/src/main/webapp/layui/images/face/51.gif -------------------------------------------------------------------------------- /src/main/webapp/layui/images/face/52.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/heavenfucking/SpringBootHus/58ea23de02f0868afdf43879f9e45b2d676df16c/src/main/webapp/layui/images/face/52.gif -------------------------------------------------------------------------------- /src/main/webapp/layui/images/face/53.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/heavenfucking/SpringBootHus/58ea23de02f0868afdf43879f9e45b2d676df16c/src/main/webapp/layui/images/face/53.gif -------------------------------------------------------------------------------- /src/main/webapp/layui/images/face/54.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/heavenfucking/SpringBootHus/58ea23de02f0868afdf43879f9e45b2d676df16c/src/main/webapp/layui/images/face/54.gif -------------------------------------------------------------------------------- /src/main/webapp/layui/images/face/55.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/heavenfucking/SpringBootHus/58ea23de02f0868afdf43879f9e45b2d676df16c/src/main/webapp/layui/images/face/55.gif -------------------------------------------------------------------------------- /src/main/webapp/layui/images/face/56.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/heavenfucking/SpringBootHus/58ea23de02f0868afdf43879f9e45b2d676df16c/src/main/webapp/layui/images/face/56.gif -------------------------------------------------------------------------------- /src/main/webapp/layui/images/face/57.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/heavenfucking/SpringBootHus/58ea23de02f0868afdf43879f9e45b2d676df16c/src/main/webapp/layui/images/face/57.gif -------------------------------------------------------------------------------- /src/main/webapp/layui/images/face/58.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/heavenfucking/SpringBootHus/58ea23de02f0868afdf43879f9e45b2d676df16c/src/main/webapp/layui/images/face/58.gif -------------------------------------------------------------------------------- /src/main/webapp/layui/images/face/59.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/heavenfucking/SpringBootHus/58ea23de02f0868afdf43879f9e45b2d676df16c/src/main/webapp/layui/images/face/59.gif -------------------------------------------------------------------------------- /src/main/webapp/layui/images/face/6.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/heavenfucking/SpringBootHus/58ea23de02f0868afdf43879f9e45b2d676df16c/src/main/webapp/layui/images/face/6.gif -------------------------------------------------------------------------------- /src/main/webapp/layui/images/face/60.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/heavenfucking/SpringBootHus/58ea23de02f0868afdf43879f9e45b2d676df16c/src/main/webapp/layui/images/face/60.gif -------------------------------------------------------------------------------- /src/main/webapp/layui/images/face/61.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/heavenfucking/SpringBootHus/58ea23de02f0868afdf43879f9e45b2d676df16c/src/main/webapp/layui/images/face/61.gif -------------------------------------------------------------------------------- /src/main/webapp/layui/images/face/62.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/heavenfucking/SpringBootHus/58ea23de02f0868afdf43879f9e45b2d676df16c/src/main/webapp/layui/images/face/62.gif -------------------------------------------------------------------------------- /src/main/webapp/layui/images/face/63.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/heavenfucking/SpringBootHus/58ea23de02f0868afdf43879f9e45b2d676df16c/src/main/webapp/layui/images/face/63.gif -------------------------------------------------------------------------------- /src/main/webapp/layui/images/face/64.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/heavenfucking/SpringBootHus/58ea23de02f0868afdf43879f9e45b2d676df16c/src/main/webapp/layui/images/face/64.gif -------------------------------------------------------------------------------- /src/main/webapp/layui/images/face/65.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/heavenfucking/SpringBootHus/58ea23de02f0868afdf43879f9e45b2d676df16c/src/main/webapp/layui/images/face/65.gif -------------------------------------------------------------------------------- /src/main/webapp/layui/images/face/66.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/heavenfucking/SpringBootHus/58ea23de02f0868afdf43879f9e45b2d676df16c/src/main/webapp/layui/images/face/66.gif -------------------------------------------------------------------------------- /src/main/webapp/layui/images/face/67.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/heavenfucking/SpringBootHus/58ea23de02f0868afdf43879f9e45b2d676df16c/src/main/webapp/layui/images/face/67.gif -------------------------------------------------------------------------------- /src/main/webapp/layui/images/face/68.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/heavenfucking/SpringBootHus/58ea23de02f0868afdf43879f9e45b2d676df16c/src/main/webapp/layui/images/face/68.gif -------------------------------------------------------------------------------- /src/main/webapp/layui/images/face/69.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/heavenfucking/SpringBootHus/58ea23de02f0868afdf43879f9e45b2d676df16c/src/main/webapp/layui/images/face/69.gif -------------------------------------------------------------------------------- /src/main/webapp/layui/images/face/7.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/heavenfucking/SpringBootHus/58ea23de02f0868afdf43879f9e45b2d676df16c/src/main/webapp/layui/images/face/7.gif -------------------------------------------------------------------------------- /src/main/webapp/layui/images/face/70.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/heavenfucking/SpringBootHus/58ea23de02f0868afdf43879f9e45b2d676df16c/src/main/webapp/layui/images/face/70.gif -------------------------------------------------------------------------------- /src/main/webapp/layui/images/face/71.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/heavenfucking/SpringBootHus/58ea23de02f0868afdf43879f9e45b2d676df16c/src/main/webapp/layui/images/face/71.gif -------------------------------------------------------------------------------- /src/main/webapp/layui/images/face/8.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/heavenfucking/SpringBootHus/58ea23de02f0868afdf43879f9e45b2d676df16c/src/main/webapp/layui/images/face/8.gif -------------------------------------------------------------------------------- /src/main/webapp/layui/images/face/9.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/heavenfucking/SpringBootHus/58ea23de02f0868afdf43879f9e45b2d676df16c/src/main/webapp/layui/images/face/9.gif -------------------------------------------------------------------------------- /src/main/webapp/layui/lay/modules/code.js: -------------------------------------------------------------------------------- 1 | /** layui-v1.0.9_rls MIT License By http://www.layui.com */ 2 | ;layui.define("jquery",function(e){"use strict";var a=layui.jquery,l="http://www.layui.com/doc/modules/code.html";e("code",function(e){var t=[];e=e||{},e.elem=a(e.elem||".layui-code"),e.about=!("about"in e)||e.about,e.elem.each(function(){t.push(this)}),layui.each(t.reverse(),function(t,i){var c=a(i),o=c.html();(c.attr("lay-encode")||e.encode)&&(o=o.replace(/&(?!#?[a-zA-Z0-9]+;)/g,"&").replace(//g,">").replace(/'/g,"'").replace(/"/g,""")),c.html('
  1. '+o.replace(/[\r\t\n]+/g,"
  2. ")+"
"),c.find(">.layui-code-h3")[0]||c.prepend('

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

");var d=c.find(">.layui-code-ol");c.addClass("layui-box layui-code-view"),(c.attr("lay-skin")||e.skin)&&c.addClass("layui-code-"+(c.attr("lay-skin")||e.skin)),(d.find("li").length/100|0)>0&&d.css("margin-left",(d.find("li").length/100|0)+"px"),(c.attr("lay-height")||e.height)&&d.css("max-height",c.attr("lay-height")||e.height)})})}).addcss("modules/code.css","skincodecss"); -------------------------------------------------------------------------------- /src/main/webapp/layui/lay/modules/element.js: -------------------------------------------------------------------------------- 1 | /** layui-v1.0.9_rls MIT License By http://www.layui.com */ 2 | ;layui.define("jquery",function(i){"use strict";var a=layui.jquery,t=(layui.hint(),layui.device()),l="element",e="layui-this",n="layui-show",s=function(){this.config={}};s.prototype.set=function(i){var t=this;return a.extend(!0,t.config,i),t},s.prototype.on=function(i,a){return layui.onevent(l,i,a)},s.prototype.tabAdd=function(i,t){var l=".layui-tab-title",e=a(".layui-tab[lay-filter="+i+"]"),n=e.children(l),s=e.children(".layui-tab-content");return n.append('
  • '+(t.title||"unnaming")+"
  • "),s.append('
    '+(t.content||"")+"
    "),f.hideTabMore(!0),f.tabAuto(),this},s.prototype.tabDelete=function(i,t){var l=".layui-tab-title",e=a(".layui-tab[lay-filter="+i+"]"),n=e.children(l),s=n.find('>li[lay-id="'+t+'"]');return f.tabDelete(null,s),this},s.prototype.tabChange=function(i,t){var l=".layui-tab-title",e=a(".layui-tab[lay-filter="+i+"]"),n=e.children(l),s=n.find('>li[lay-id="'+t+'"]');return f.tabClick(null,null,s),this},s.prototype.progress=function(i,t){var l="layui-progress",e=a("."+l+"[lay-filter="+i+"]"),n=e.find("."+l+"-bar"),s=n.find("."+l+"-text");return n.css("width",t),s.text(t),this};var o=".layui-nav",c="layui-nav-item",r="layui-nav-bar",u="layui-nav-tree",d="layui-nav-child",h="layui-nav-more",y="layui-anim layui-anim-upbit",f={tabClick:function(i,t,s){var o=s||a(this),t=t||o.parent().children("li").index(o),c=o.parents(".layui-tab").eq(0),r=c.children(".layui-tab-content").children(".layui-tab-item"),u=c.attr("lay-filter");o.addClass(e).siblings().removeClass(e),r.eq(t).addClass(n).siblings().removeClass(n),layui.event.call(this,l,"tab("+u+")",{elem:c,index:t})},tabDelete:function(i,t){var l=t||a(this).parent(),n=l.index(),s=l.parents(".layui-tab").eq(0),o=s.children(".layui-tab-content").children(".layui-tab-item");l.hasClass(e)&&(l.next()[0]?f.tabClick.call(l.next()[0],null,n+1):l.prev()[0]&&f.tabClick.call(l.prev()[0],null,n-1)),l.remove(),o.eq(n).remove(),setTimeout(function(){f.tabAuto()},50)},tabAuto:function(){var i="layui-tab-more",l="layui-tab-bar",e="layui-tab-close",n=this;a(".layui-tab").each(function(){var s=a(this),o=s.children(".layui-tab-title"),c=(s.children(".layui-tab-content").children(".layui-tab-item"),'lay-stope="tabmore"'),r=a('');if(n===window&&8!=t.ie&&f.hideTabMore(!0),s.attr("lay-allowClose")&&o.find("li").each(function(){var i=a(this);if(!i.find("."+e)[0]){var t=a('');t.on("click",f.tabDelete),i.append(t)}}),o.prop("scrollWidth")>o.outerWidth()+1){if(o.find("."+l)[0])return;o.append(r),s.attr("overflow",""),r.on("click",function(a){o[this.title?"removeClass":"addClass"](i),this.title=this.title?"":"收缩"})}else o.find("."+l).remove(),s.removeAttr("overflow")})},hideTabMore:function(i){var t=a(".layui-tab-title");i!==!0&&"tabmore"===a(i.target).attr("lay-stope")||(t.removeClass("layui-tab-more"),t.find(".layui-tab-bar").attr("title",""))},clickThis:function(){var i=a(this),t=i.parents(o),n=t.attr("lay-filter");i.find("."+d)[0]||(t.find("."+e).removeClass(e),i.addClass(e),layui.event.call(this,l,"nav("+n+")",i))},clickChild:function(){var i=a(this),t=i.parents(o),n=t.attr("lay-filter");t.find("."+e).removeClass(e),i.addClass(e),layui.event.call(this,l,"nav("+n+")",i)},showChild:function(){var i=a(this),t=i.parents(o),l=i.parent(),e=i.siblings("."+d);t.hasClass(u)&&(e.removeClass(y),l["none"===e.css("display")?"addClass":"removeClass"](c+"ed"))},collapse:function(){var i=a(this),t=i.find(".layui-colla-icon"),e=i.siblings(".layui-colla-content"),s=i.parents(".layui-collapse").eq(0),o=s.attr("lay-filter"),c="none"===e.css("display");if("string"==typeof s.attr("lay-accordion")){var r=s.children(".layui-colla-item").children("."+n);r.siblings(".layui-colla-title").children(".layui-colla-icon").html(""),r.removeClass(n)}e[c?"addClass":"removeClass"](n),t.html(c?"":""),layui.event.call(this,l,"collapse("+o+")",{title:i,content:e,show:c})}};s.prototype.init=function(i){var l={tab:function(){f.tabAuto.call({})},nav:function(){var i,l,e,s=200,p=function(o,c){var r=a(this),f=r.find("."+d);c.hasClass(u)?o.css({top:r.position().top,height:r.children("a").height(),opacity:1}):(f.addClass(y),o.css({left:r.position().left+parseFloat(r.css("marginLeft")),top:r.position().top+r.height()-5}),i=setTimeout(function(){o.css({width:r.width(),opacity:1})},t.ie&&t.ie<10?0:s),clearTimeout(e),"block"===f.css("display")&&clearTimeout(l),l=setTimeout(function(){f.addClass(n),r.find("."+h).addClass(h+"d")},300))};a(o).each(function(){var t=a(this),o=a(''),y=t.find("."+c);t.find("."+r)[0]||(t.append(o),y.on("mouseenter",function(){p.call(this,o,t)}).on("mouseleave",function(){t.hasClass(u)||(clearTimeout(l),l=setTimeout(function(){t.find("."+d).removeClass(n),t.find("."+h).removeClass(h+"d")},300))}),t.on("mouseleave",function(){clearTimeout(i),e=setTimeout(function(){t.hasClass(u)?o.css({height:0,top:o.position().top+o.height()/2,opacity:0}):o.css({width:0,left:o.position().left+o.width()/2,opacity:0})},s)})),y.each(function(){var i=a(this),t=i.find("."+d);if(t[0]&&!i.find("."+h)[0]){var l=i.children("a");l.append('')}i.off("click",f.clickThis).on("click",f.clickThis),i.children("a").off("click",f.showChild).on("click",f.showChild),t.children("dd").off("click",f.clickChild).on("click",f.clickChild)})})},breadcrumb:function(){var i=".layui-breadcrumb";a(i).each(function(){var i=a(this),t=i.attr("lay-separator")||">",l=i.find("a");l.find(".layui-box")[0]||(l.each(function(i){i!==l.length-1&&a(this).append(''+t+"")}),i.css("visibility","visible"))})},progress:function(){var i="layui-progress";a("."+i).each(function(){var t=a(this),l=t.find(".layui-progress-bar"),e=l.attr("lay-percent");l.css("width",e),t.attr("lay-showPercent")&&setTimeout(function(){var a=Math.round(l.width()/t.width()*100);a>100&&(a=100),l.html(''+a+"%")},350)})},collapse:function(){var i="layui-collapse";a("."+i).each(function(){var i=a(this).find(".layui-colla-item");i.each(function(){var i=a(this),t=i.find(".layui-colla-title"),l=i.find(".layui-colla-content"),e="none"===l.css("display");t.find(".layui-colla-icon").remove(),t.append(''+(e?"":"")+""),t.off("click",f.collapse).on("click",f.collapse)})})}};return layui.each(l,function(i,a){a()})};var p=new s,v=a(document);p.init();var b=".layui-tab-title li";v.on("click",b,f.tabClick),v.on("click",f.hideTabMore),a(window).on("resize",f.tabAuto),i(l,function(i){return p.set(i)})}); -------------------------------------------------------------------------------- /src/main/webapp/layui/lay/modules/flow.js: -------------------------------------------------------------------------------- 1 | /** layui-v1.0.9_rls MIT License By http://www.layui.com */ 2 | ;layui.define("jquery",function(e){"use strict";var l=layui.jquery,o=function(e){},t='';o.prototype.load=function(e){var o,i,n,r,a=this,c=0;e=e||{};var u=l(e.elem);if(u[0]){var f=l(e.scrollElem||document),m=e.mb||50,s=!("isAuto"in e)||e.isAuto,y=e.end||"没有更多了",v=e.scrollElem&&e.scrollElem!==document,d="加载更多",h=l('");u.find(".layui-flow-more")[0]||u.append(h);var p=function(e,t){e=l(e),h.before(e),t=0==t||null,t?h.html(y):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?(f.on("scroll",function(){var e=l(this),t=e.scrollTop();r&&clearTimeout(r),i||(r=setTimeout(function(){var i=v?e.height():l(window).height(),n=v?e.prop("scrollHeight"):document.documentElement.scrollHeight;n-t-i<=m&&(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 f=e.attr("lay-src");layui.img(f,function(){var l=t.lazyimg.elem.eq(i);e.attr("src",f).removeAttr("lay-src"),l[0]&&u(l),i++})}},u=function(e,o){var u=a?(o||n).height():l(window).height(),f=n.scrollTop(),m=f+u;if(t.lazyimg.elem=l(r),e)c(e,u);else for(var s=0;sm)break}};if(u(),!o){var f;n.on("scroll",function(){var e=l(this);f&&clearTimeout(f),f=setTimeout(function(){u(null,e)},50)}),o=!0}return u},e("flow",new o)}); -------------------------------------------------------------------------------- /src/main/webapp/layui/lay/modules/form.js: -------------------------------------------------------------------------------- 1 | /** layui-v1.0.9_rls MIT License By http://www.layui.com */ 2 | ;layui.define("layer",function(e){"use strict";var i=layui.jquery,t=layui.layer,a=layui.hint(),n=layui.device(),l="form",r=".layui-form",s="layui-this",o="layui-hide",c="layui-disabled",u=function(){this.config={verify:{required:[/[\S]+/,"必填项不能为空"],phone:[/^1\d{10}$/,"请输入正确的手机号"],email:[/^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$/,"邮箱格式不正确"],url:[/(^#)|(^http(s*):\/\/[^\s]+\.[^\s]+)/,"链接格式不正确"],number:[/^\d+$/,"只能填写数字"],date:[/^(\d{4})[-\/](\d{1}|0\d{1}|1[0-2])([-\/](\d{1}|0\d{1}|[1-2][0-9]|3[0-1]))*$/,"日期格式不正确"],identity:[/(^\d{15}$)|(^\d{17}(x|X|\d)$)/,"请输入正确的身份证号"]}}};u.prototype.set=function(e){var t=this;return i.extend(!0,t.config,e),t},u.prototype.verify=function(e){var t=this;return i.extend(!0,t.config.verify,e),t},u.prototype.on=function(e,i){return layui.onevent(l,e,i)},u.prototype.render=function(e){var t=this,n={select:function(){var e,t="请选择",a="layui-form-select",n="layui-select-title",u="layui-select-none",d="",f=i(r).find("select"),y=function(t,l){i(t.target).parent().hasClass(n)&&!l||(i("."+a).removeClass(a+"ed"),e&&d&&e.val(d)),e=null},v=function(t,r,f){var v=i(this),h=t.find("."+n),p=h.find("input"),m=t.find("dl"),k=m.children("dd");if(!r){var b=function(){t.addClass(a+"ed"),k.removeClass(o)},x=function(){t.removeClass(a+"ed"),p.blur(),g(p.val(),function(e){e&&(d=m.find("."+s).html(),p&&p.val(d))})};h.on("click",function(e){t.hasClass(a+"ed")?x():(y(e,!0),b()),m.find("."+u).remove()}),h.find(".layui-edge").on("click",function(){p.focus()}),p.on("keyup",function(e){var i=e.keyCode;9===i&&b()}).on("keydown",function(e){var i=e.keyCode;9===i?x():13===i&&e.preventDefault()});var g=function(e,t,a){var n=0;layui.each(k,function(){var t=i(this),l=t.text(),r=l.indexOf(e)===-1;(""===e||"blur"===a?e!==l:r)&&n++,"keyup"===a&&t[r?"addClass":"removeClass"](o)});var l=n===k.length;return t(l),l},C=function(e){var i=this.value,t=e.keyCode;return 9!==t&&13!==t&&37!==t&&38!==t&&39!==t&&40!==t&&(g(i,function(e){e?m.find("."+u)[0]||m.append('

    无匹配项

    '):m.find("."+u).remove()},"keyup"),void(""===i&&m.find("."+u).remove()))};f&&p.on("keyup",C).on("blur",function(i){e=p,d=m.find("."+s).html(),setTimeout(function(){g(p.val(),function(e){e&&!d&&p.val("")},"blur")},200)}),k.on("click",function(){var e=i(this),a=e.attr("lay-value"),n=v.attr("lay-filter");return!e.hasClass(c)&&(v.val(a).removeClass("layui-form-danger"),p.val(e.text()),e.addClass(s).siblings().removeClass(s),layui.event.call(this,l,"select("+n+")",{elem:v[0],value:a,othis:t}),x(),!1)}),t.find("dl>dt").on("click",function(e){return!1}),i(document).off("click",y).on("click",y)}};f.each(function(e,l){var r=i(this),o=r.next("."+a),u=this.disabled,d=l.value,f=i(l.options[l.selectedIndex]);if("string"==typeof r.attr("lay-ignore"))return r.show();var y="string"==typeof r.attr("lay-search"),h=i(['
    ','
    ','
    ','
    '+function(e){var i=[];return layui.each(e,function(e,t){(0!==e||t.value)&&("optgroup"===t.tagName.toLowerCase()?i.push("
    "+t.label+"
    "):i.push('
    '+t.innerHTML+"
    "))}),i.join("")}(r.find("*"))+"
    ","
    "].join(""));o[0]&&o.remove(),r.after(h),v.call(this,h,u,y)})},checkbox:function(){var e={checkbox:["layui-form-checkbox","layui-form-checked","checkbox"],_switch:["layui-form-switch","layui-form-onswitch","switch"]},t=i(r).find("input[type=checkbox]"),a=function(e,t){var a=i(this);e.on("click",function(){var i=a.attr("lay-filter"),n=(a.attr("lay-text")||"").split("|");a[0].disabled||(a[0].checked?(a[0].checked=!1,e.removeClass(t[1]).find("em").text(n[1])):(a[0].checked=!0,e.addClass(t[1]).find("em").text(n[0])),layui.event.call(a[0],l,t[2]+"("+i+")",{elem:a[0],value:a[0].value,othis:e}))})};t.each(function(t,n){var l=i(this),r=l.attr("lay-skin"),s=(l.attr("lay-text")||"").split("|"),o=this.disabled;"switch"===r&&(r="_"+r);var u=e[r]||e.checkbox;if("string"==typeof l.attr("lay-ignore"))return l.show();var d=l.next("."+u[0]),f=i(['
    ',{_switch:""+((n.checked?s[0]:s[1])||"")+""}[r]||(n.title.replace(/\s/g,"")?""+n.title+"":"")+''+(r?"":"")+"","
    "].join(""));d[0]&&d.remove(),l.after(f),a.call(this,f,u)})},radio:function(){var e="layui-form-radio",t=["",""],a=i(r).find("input[type=radio]"),n=function(a){var n=i(this),s="layui-anim-scaleSpring";a.on("click",function(){var o=n[0].name,c=n.parents(r),u=n.attr("lay-filter"),d=c.find("input[name="+o.replace(/(\.|#|\[|\])/g,"\\$1")+"]");n[0].disabled||(layui.each(d,function(){var a=i(this).next("."+e);this.checked=!1,a.removeClass(e+"ed"),a.find(".layui-icon").removeClass(s).html(t[1])}),n[0].checked=!0,a.addClass(e+"ed"),a.find(".layui-icon").addClass(s).html(t[0]),layui.event.call(n[0],l,"radio("+u+")",{elem:n[0],value:n[0].value,othis:a}))})};a.each(function(a,l){var r=i(this),s=r.next("."+e),o=this.disabled;if("string"==typeof r.attr("lay-ignore"))return r.show();var u=i(['
    ',''+t[l.checked?0:1]+"",""+(l.title||"未命名")+"","
    "].join(""));s[0]&&s.remove(),r.after(u),n.call(this,u)})}};return e?n[e]?n[e]():a.error("不支持的"+e+"表单渲染"):layui.each(n,function(e,i){i()}),t};var d=function(){var e=i(this),a=f.config.verify,s=null,o="layui-form-danger",c={},u=e.parents(r),d=u.find("*[lay-verify]"),y=e.parents("form")[0],v=u.find("input,select,textarea"),h=e.attr("lay-filter");return layui.each(d,function(e,l){var r=i(this),c=r.attr("lay-verify").split("|"),u="",d=r.val();if(r.removeClass(o),layui.each(c,function(e,i){var c="function"==typeof a[i];if(a[i]&&(c?u=a[i](d,l):!a[i][0].test(d)))return t.msg(u||a[i][1],{icon:5,shift:6}),n.android||n.ios||l.focus(),r.addClass(o),s=!0}),s)return s}),!s&&(layui.each(v,function(e,i){i.name&&(/^checkbox|radio$/.test(i.type)&&!i.checked||(c[i.name]=i.value))}),layui.event.call(this,l,"submit("+h+")",{elem:this,form:y,field:c}))},f=new u,y=i(document);f.render(),y.on("reset",r,function(){setTimeout(function(){f.render()},50)}),y.on("submit",r,d).on("click","*[lay-submit]",d),e(l,function(e){return f.set(e)})}); -------------------------------------------------------------------------------- /src/main/webapp/layui/lay/modules/layedit.js: -------------------------------------------------------------------------------- 1 | /** layui-v1.0.9_rls MIT License By http://www.layui.com */ 2 | ;layui.define(["layer","form"],function(t){"use strict";var e=layui.jquery,i=layui.layer,a=layui.form(),l=(layui.hint(),layui.device()),n="layedit",o="layui-show",r="layui-disabled",s=function(){var t=this;t.index=0,t.config={tool:["strong","italic","underline","del","|","left","center","right","|","link","unlink","face","image"],hideTool:[],height:280}};s.prototype.set=function(t){var i=this;return e.extend(!0,i.config,t),i},s.prototype.on=function(t,e){return layui.onevent(n,t,e)},s.prototype.build=function(t,i){i=i||{};var a=this,n=a.config,r="layui-layedit",s=e("#"+t),u="LAY_layedit_"+ ++a.index,d=s.next("."+r),y=e.extend({},n,i),f=function(){var t=[],e={};return layui.each(y.hideTool,function(t,i){e[i]=!0}),layui.each(y.tool,function(i,a){C[a]&&!e[a]&&t.push(C[a])}),t.join("")}(),m=e(['
    ','
    '+f+"
    ",'
    ','',"
    ","
    "].join(""));return l.ie&&l.ie<8?s.removeClass("layui-hide").addClass(o):(d[0]&&d.remove(),c.call(a,m,s[0],y),s.addClass("layui-hide").after(m),a.index)},s.prototype.getContent=function(t){var e=u(t);if(e[0])return d(e[0].document.body.innerHTML)},s.prototype.getText=function(t){var i=u(t);if(i[0])return e(i[0].document.body).text()},s.prototype.sync=function(t){var i=u(t);if(i[0]){var a=e("#"+i[1].attr("textarea"));a.val(d(i[0].document.body.innerHTML))}},s.prototype.getSelection=function(t){var e=u(t);if(e[0]){var i=m(e[0].document);return document.selection?i.text:i.toString()}};var c=function(t,i,a){var l=this,n=t.find("iframe");n.css({height:a.height}).on("load",function(){var o=n.contents(),r=n.prop("contentWindow"),s=o.find("head"),c=e([""].join("")),u=o.find("body");s.append(c),u.attr("contenteditable","true").css({"min-height":a.height}).html(i.value||""),y.apply(l,[r,n,i,a]),g.call(l,r,t,a)})},u=function(t){var i=e("#LAY_layedit_"+t),a=i.prop("contentWindow");return[a,i]},d=function(t){return 8==l.ie&&(t=t.replace(/<.+>/g,function(t){return t.toLowerCase()})),t},y=function(t,a,n,o){var r=t.document,s=e(r.body);s.on("keydown",function(t){var e=t.keyCode;if(13===e){var a=m(r),l=p(a),n=l.parentNode;if("pre"===n.tagName.toLowerCase()){if(t.shiftKey)return;return i.msg("请暂时用shift+enter"),!1}r.execCommand("formatBlock",!1,"

    ")}}),e(n).parents("form").on("submit",function(){var t=s.html();8==l.ie&&(t=t.replace(/<.+>/g,function(t){return t.toLowerCase()})),n.value=t}),s.on("paste",function(e){r.execCommand("formatBlock",!1,"

    "),setTimeout(function(){f.call(t,s),n.value=s.html()},100)})},f=function(t){var i=this;i.document;t.find("*[style]").each(function(){var t=this.style.textAlign;this.removeAttribute("style"),e(this).css({"text-align":t||""})}),t.find("table").addClass("layui-table"),t.find("script,link").remove()},m=function(t){return t.selection?t.selection.createRange():t.getSelection().getRangeAt(0)},p=function(t){return t.endContainer||t.parentElement().childNodes[0]},v=function(t,i,a){var l=this.document,n=document.createElement(t);for(var o in i)n.setAttribute(o,i[o]);if(n.removeAttribute("text"),l.selection){var r=a.text||i.text;if("a"===t&&!r)return;r&&(n.innerHTML=r),a.pasteHTML(e(n).prop("outerHTML")),a.select()}else{var r=a.toString()||i.text;if("a"===t&&!r)return;r&&(n.innerHTML=r),a.deleteContents(),a.insertNode(n)}},h=function(t,i){var a=this.document,l="layedit-tool-active",n=p(m(a)),o=function(e){return t.find(".layedit-tool-"+e)};i&&i[i.hasClass(l)?"removeClass":"addClass"](l),t.find(">i").removeClass(l),o("unlink").addClass(r),e(n).parents().each(function(){var t=this.tagName.toLowerCase(),e=this.style.textAlign;"b"!==t&&"strong"!==t||o("b").addClass(l),"i"!==t&&"em"!==t||o("i").addClass(l),"u"===t&&o("u").addClass(l),"strike"===t&&o("d").addClass(l),"p"===t&&("center"===e?o("center").addClass(l):"right"===e?o("right").addClass(l):o("left").addClass(l)),"a"===t&&(o("link").addClass(l),o("unlink").removeClass(r))})},g=function(t,a,l){var n=t.document,o=e(n.body),s={link:function(i){var a=p(i),l=e(a).parent();b.call(o,{href:l.attr("href"),target:l.attr("target")},function(e){var a=l[0];"A"===a.tagName?a.href=e.url:v.call(t,"a",{target:e.target,href:e.url,text:e.url},i)})},unlink:function(t){n.execCommand("unlink")},face:function(e){x.call(this,function(i){v.call(t,"img",{src:i.src,alt:i.alt},e)})},image:function(a){var n=this;layui.use("upload",function(o){var r=l.uploadImage||{};o({url:r.url,method:r.type,elem:e(n).find("input")[0],unwrap:!0,success:function(e){0==e.code?(e.data=e.data||{},v.call(t,"img",{src:e.data.src,alt:e.data.title},a)):i.msg(e.msg||"上传失败")}})})},code:function(e){k.call(o,function(i){v.call(t,"pre",{text:i.code,"lay-lang":i.lang},e)})},help:function(){i.open({type:2,title:"帮助",area:["600px","380px"],shadeClose:!0,shade:.1,skin:"layui-layer-msg",content:["http://www.layui.com/about/layedit/help.html","no"]})}},c=a.find(".layui-layedit-tool"),u=function(){var i=e(this),a=i.attr("layedit-event"),l=i.attr("lay-command");if(!i.hasClass(r)){o.focus();var u=m(n);u.commonAncestorContainer;l?(n.execCommand(l),/justifyLeft|justifyCenter|justifyRight/.test(l)&&n.execCommand("formatBlock",!1,"

    "),setTimeout(function(){o.focus()},10)):s[a]&&s[a].call(this,u),h.call(t,c,i)}},d=/image/;c.find(">i").on("mousedown",function(){var t=e(this),i=t.attr("layedit-event");d.test(i)||u.call(this)}).on("click",function(){var t=e(this),i=t.attr("layedit-event");d.test(i)&&u.call(this)}),o.on("click",function(){h.call(t,c),i.close(x.index)})},b=function(t,e){var l=this,n=i.open({type:1,id:"LAY_layedit_link",area:"350px",shade:.05,shadeClose:!0,moveType:1,title:"超链接",skin:"layui-layer-msg",content:['

      ','
    • ','','
      ','',"
      ","
    • ",'
    • ','','
      ','",'","
      ","
    • ",'
    • ','','',"
    • ","
    "].join(""),success:function(t,n){var o="submit(layedit-link-yes)";a.render("radio"),t.find(".layui-btn-primary").on("click",function(){i.close(n),l.focus()}),a.on(o,function(t){i.close(b.index),e&&e(t.field)})}});b.index=n},x=function(t){var a=function(){var t=["[微笑]","[嘻嘻]","[哈哈]","[可爱]","[可怜]","[挖鼻]","[吃惊]","[害羞]","[挤眼]","[闭嘴]","[鄙视]","[爱你]","[泪]","[偷笑]","[亲亲]","[生病]","[太开心]","[白眼]","[右哼哼]","[左哼哼]","[嘘]","[衰]","[委屈]","[吐]","[哈欠]","[抱抱]","[怒]","[疑问]","[馋嘴]","[拜拜]","[思考]","[汗]","[困]","[睡]","[钱]","[失望]","[酷]","[色]","[哼]","[鼓掌]","[晕]","[悲伤]","[抓狂]","[黑线]","[阴险]","[怒骂]","[互粉]","[心]","[伤心]","[猪头]","[熊猫]","[兔子]","[ok]","[耶]","[good]","[NO]","[赞]","[来]","[弱]","[草泥马]","[神马]","[囧]","[浮云]","[给力]","[围观]","[威武]","[奥特曼]","[礼物]","[钟]","[话筒]","[蜡烛]","[蛋糕]"],e={};return layui.each(t,function(t,i){e[i]=layui.cache.dir+"images/face/"+t+".gif"}),e}();return x.hide=x.hide||function(t){"face"!==e(t.target).attr("layedit-event")&&i.close(x.index)},x.index=i.tips(function(){var t=[];return layui.each(a,function(e,i){t.push('
  • '+e+'
  • ')}),'
      '+t.join("")+"
    "}(),this,{tips:1,time:0,skin:"layui-box layui-util-face",maxWidth:500,success:function(l,n){l.css({marginTop:-4,marginLeft:-10}).find(".layui-clear>li").on("click",function(){t&&t({src:a[this.title],alt:this.title}),i.close(n)}),e(document).off("click",x.hide).on("click",x.hide)}})},k=function(t){var e=this,l=i.open({type:1,id:"LAY_layedit_code",area:"550px",shade:.05,shadeClose:!0,moveType:1,title:"插入代码",skin:"layui-layer-msg",content:['
      ','
    • ','','
      ','","
      ","
    • ",'
    • ','','
      ','',"
      ","
    • ",'
    • ','','',"
    • ","
    "].join(""),success:function(l,n){var o="submit(layedit-code-yes)";a.render("select"),l.find(".layui-btn-primary").on("click",function(){i.close(n),e.focus()}),a.on(o,function(e){i.close(k.index),t&&t(e.field)})}});k.index=l},C={html:'',strong:'',italic:'',underline:'',del:'',"|":'',left:'',center:'',right:'',link:'',unlink:'',face:'',image:'',code:'',help:''},w=new s;t(n,w)}); -------------------------------------------------------------------------------- /src/main/webapp/layui/lay/modules/laypage.js: -------------------------------------------------------------------------------- 1 | /** layui-v1.0.9_rls MIT License By http://www.layui.com */ 2 | ;layui.define(function(a){"use strict";function t(a){new p(a)}var e=document,r="getElementById",n="getElementsByTagName",s=0,p=function(a){var t=this,e=t.config=a||{};e.item=s++,t.render(!0)};p.on=function(a,t,e){return a.attachEvent?a.attachEvent("on"+t,function(){e.call(a,window.even)}):a.addEventListener(t,e,!1),p},p.prototype.type=function(){var a=this.config;if("object"==typeof a.cont)return void 0===a.cont.length?2:3},p.prototype.view=function(){var a=this,t=a.config,e=[],r={};if(t.pages=0|t.pages,t.curr=0|t.curr||1,t.groups="groups"in t?0|t.groups:5,t.first="first"in t?t.first:"首页",t.last="last"in t?t.last:"末页",t.prev="prev"in t?t.prev:"上一页",t.next="next"in t?t.next:"下一页",t.pages<=1)return"";for(t.groups>t.pages&&(t.groups=t.pages),r.index=Math.ceil((t.curr+(t.groups>1&&t.groups!==t.pages?1:0))/(0===t.groups?1:t.groups)),t.curr>1&&t.prev&&e.push(''+t.prev+""),r.index>1&&t.first&&0!==t.groups&&e.push(''+t.first+""),r.poor=Math.floor((t.groups-1)/2),r.start=r.index>1?t.curr-r.poor:1,r.end=r.index>1?function(){var a=t.curr+(t.groups-r.poor-1);return a>t.pages?t.pages:a}():t.groups,r.end-r.start"+r.start+""):e.push(''+r.start+"");return t.pages>t.groups&&r.end'+t.last+""),r.flow=!t.prev&&0===t.groups,(t.curr!==t.pages&&t.next||r.flow)&&e.push(function(){return r.flow&&t.curr===t.pages?''+t.next+"":''+t.next+""}()),'
    '+e.join("")+function(){return t.skip?'到第 ':""}()+"
    "},p.prototype.jump=function(a){if(a){for(var t=this,e=t.config,r=a.children,s=a[n]("button")[0],i=a[n]("input")[0],u=0,o=r.length;u/g,">").replace(/'/g,"'").replace(/"/g,""")},error:function(e,r){var n="Laytpl Error:";return"object"==typeof console&&console.error(n+e+"\n"+(r||"")),n+e}},c=n.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=c("^"+r.open+"#",""),l=c(r.close+"$","");e=e.replace(/\s+|\r|\t|\n/g," ").replace(c(r.open+"#"),r.open+"# ").replace(c(r.close+"}"),"} "+r.close).replace(/\\/g,"\\\\").replace(/(?="|')/g,"\\").replace(n.query(),function(e){return e=e.replace(a,"").replace(l,""),'";'+e.replace(/\\/g,"")+';view+="'}).replace(n.query(1),function(e){var n='"+(';return e.replace(/\s/g,"")===r.open+r.close?"":(e=e.replace(c(r.open+"|"+r.close),""),/^=/.test(e)&&(e=e.replace(/^=/,""),n='"+_escape_('),n+e.replace(/\\/g,"")+')+"')}),e='"use strict";var view = "'+e+'";return view;';try{return o.cache=e=new Function("d, _escape_",e),e(t,n.escape)}catch(u){return delete o.cache,n.error(u,p)}},t.pt.render=function(e,r){var c,t=this;return e?(c=t.cache?t.cache(e,n.escape):t.parse(t.tpl,e),r?void r(c):c):n.error("no data")};var o=function(e){return"string"!=typeof e?n.error("Template not found"):new t(e)};o.config=function(e){e=e||{};for(var n in e)r[n]=e[n]},o.v="1.2.0",e("laytpl",o)}); -------------------------------------------------------------------------------- /src/main/webapp/layui/lay/modules/tree.js: -------------------------------------------------------------------------------- 1 | /** layui-v1.0.9_rls MIT License By http://www.layui.com */ 2 | ;layui.define("jquery",function(e){"use strict";var o=layui.jquery,a=layui.hint(),r="layui-tree-enter",i=function(e){this.options=e},t={arrow:["",""],checkbox:["",""],radio:["",""],branch:["",""],leaf:""};i.prototype.init=function(e){var o=this;e.addClass("layui-box layui-tree"),o.options.skin&&e.addClass("layui-tree-skin-"+o.options.skin),o.tree(e),o.on(e)},i.prototype.tree=function(e,a){var r=this,i=r.options,n=a||i.nodes;layui.each(n,function(a,n){var l=n.children&&n.children.length>0,c=o('
      '),s=o(["
    • ",function(){return l?''+(n.spread?t.arrow[1]:t.arrow[0])+"":""}(),function(){return i.check?''+("checkbox"===i.check?t.checkbox[0]:"radio"===i.check?t.radio[0]:"")+"":""}(),function(){return'"+(''+(l?n.spread?t.branch[1]:t.branch[0]:t.leaf)+"")+(""+(n.name||"未命名")+"")}(),"
    • "].join(""));l&&(s.append(c),r.tree(c,n.children)),e.append(s),"function"==typeof i.click&&r.click(s,n),r.spread(s,n),i.drag&&r.drag(s,n)})},i.prototype.click=function(e,o){var a=this,r=a.options;e.children("a").on("click",function(e){layui.stope(e),r.click(o)})},i.prototype.spread=function(e,o){var a=this,r=(a.options,e.children(".layui-tree-spread")),i=e.children("ul"),n=e.children("a"),l=function(){e.data("spread")?(e.data("spread",null),i.removeClass("layui-show"),r.html(t.arrow[0]),n.find(".layui-icon").html(t.branch[0])):(e.data("spread",!0),i.addClass("layui-show"),r.html(t.arrow[1]),n.find(".layui-icon").html(t.branch[1]))};i[0]&&(r.on("click",l),n.on("dblclick",l))},i.prototype.on=function(e){var a=this,i=a.options,t="layui-tree-drag";e.find("i").on("selectstart",function(e){return!1}),i.drag&&o(document).on("mousemove",function(e){var r=a.move;if(r.from){var i=(r.to,o('
      '));e.preventDefault(),o("."+t)[0]||o("body").append(i);var n=o("."+t)[0]?o("."+t):i;n.addClass("layui-show").html(r.from.elem.children("a").html()),n.css({left:e.pageX+10,top:e.pageY+10})}}).on("mouseup",function(){var e=a.move;e.from&&(e.from.elem.children("a").removeClass(r),e.to&&e.to.elem.children("a").removeClass(r),a.move={},o("."+t).remove())})},i.prototype.move={},i.prototype.drag=function(e,a){var i=this,t=(i.options,e.children("a")),n=function(){var t=o(this),n=i.move;n.from&&(n.to={item:a,elem:e},t.addClass(r))};t.on("mousedown",function(){var o=i.move;o.from={item:a,elem:e}}),t.on("mouseenter",n).on("mousemove",n).on("mouseleave",function(){var e=o(this),a=i.move;a.from&&(delete a.to,e.removeClass(r))})},e("tree",function(e){var r=new i(e=e||{}),t=o(e.elem);return t[0]?void r.init(t):a.error("layui.tree 没有找到"+e.elem+"元素")})}); -------------------------------------------------------------------------------- /src/main/webapp/layui/lay/modules/upload.js: -------------------------------------------------------------------------------- 1 | /** layui-v1.0.9_rls MIT License By http://www.layui.com */ 2 | ;layui.define("layer",function(e){"use strict";var a=layui.jquery,t=layui.layer,i=(layui.device(),"layui-upload-enter"),n="layui-upload-iframe",r={icon:2,shift:6},o={file:"文件",video:"视频",audio:"音频"},s=function(e){this.options=e};s.prototype.init=function(){var e=this,t=e.options,r=a("body"),s=a(t.elem||".layui-upload-file"),u=a('');return a("#"+n)[0]||r.append(u),s.each(function(r,s){s=a(s);var u='
      ',l=s.attr("lay-type")||t.type;t.unwrap||(u='
      '+u+''+(s.attr("lay-title")||t.title||"上传"+(o[l]||"图片"))+"
      "),u=a(u),t.unwrap||u.on("dragover",function(e){e.preventDefault(),a(this).addClass(i)}).on("dragleave",function(){a(this).removeClass(i)}).on("drop",function(){a(this).removeClass(i)}),s.parent("form").attr("target")===n&&(t.unwrap?s.unwrap():(s.parent().next().remove(),s.unwrap().unwrap())),s.wrap(u),s.off("change").on("change",function(){e.action(this,l)})})},s.prototype.action=function(e,i){var o=this,s=o.options,u=e.value,l=a(e),p=l.attr("lay-ext")||s.ext||"";if(u){switch(i){case"file":if(p&&!RegExp("\\w\\.("+p+")$","i").test(escape(u)))return t.msg("不支持该文件格式",r),e.value="";break;case"video":if(!RegExp("\\w\\.("+(p||"avi|mp4|wma|rmvb|rm|flash|3gp|flv")+")$","i").test(escape(u)))return t.msg("不支持该视频格式",r),e.value="";break;case"audio":if(!RegExp("\\w\\.("+(p||"mp3|wav|mid")+")$","i").test(escape(u)))return t.msg("不支持该音频格式",r),e.value="";break;default:if(!RegExp("\\w\\.("+(p||"jpg|png|gif|bmp|jpeg")+")$","i").test(escape(u)))return t.msg("不支持该图片格式",r),e.value=""}s.before&&s.before(e),l.parent().submit();var c=a("#"+n),f=setInterval(function(){var a;try{a=c.contents().find("body").text()}catch(i){t.msg("上传接口存在跨域",r),clearInterval(f)}if(a){clearInterval(f),c.contents().find("body").html("");try{a=JSON.parse(a)}catch(i){return a={},t.msg("请对上传接口返回JSON字符",r)}"function"==typeof s.success&&s.success(a,e)}},30);e.value=""}},e("upload",function(e){var a=new s(e=e||{});a.init()})}); -------------------------------------------------------------------------------- /src/main/webapp/layui/lay/modules/util.js: -------------------------------------------------------------------------------- 1 | /** layui-v1.0.9_rls MIT License By http://www.layui.com */ 2 | ;layui.define("jquery",function(l){"use strict";var o=layui.jquery,i={fixbar:function(l){l=l||{},l.bgcolor=l.bgcolor?"background-color:"+l.bgcolor:"";var i,a,c="layui-fixbar-top",t=[l.bar1===!0?"":l.bar1,l.bar2===!0?"":l.bar2,""],r=o(['
        ',l.bar1?'
      • '+t[0]+"
      • ":"",l.bar2?'
      • '+t[1]+"
      • ":"",'
      • '+t[2]+"
      • ","
      "].join("")),e=r.find("."+c),s=function(){var i=o(document).scrollTop();i>=(l.showHeight||200)?a||(e.show(),a=1):a&&(e.hide(),a=0)};o(".layui-fixbar")[0]||("object"==typeof l.css&&r.css(l.css),o("body").append(r),s(),r.find("li").on("click",function(){var i=o(this),a=i.attr("lay-type");"top"===a&&o("html,body").animate({scrollTop:0},200),l.click&&l.click.call(this,a)}),o(document).on("scroll",function(){i&&clearTimeout(i),i=setTimeout(function(){s()},100)}))}};l("util",i)}); -------------------------------------------------------------------------------- /src/main/webapp/layui/layui.js: -------------------------------------------------------------------------------- 1 | /** layui-v1.0.9_rls MIT License By http://www.layui.com */ 2 | ;!function(e){"use strict";var t=function(){this.v="1.0.9_rls"};t.fn=t.prototype;var n=document,o=t.fn.cache={},i=function(){var e=n.scripts,t=e[e.length-1].src;return t.substring(0,t.lastIndexOf("/")+1)}(),r=function(t){e.console&&console.error&&console.error("Layui hint: "+t)},l="undefined"!=typeof opera&&"[object Opera]"===opera.toString(),a={layer:"modules/layer",laydate:"modules/laydate",laypage:"modules/laypage",laytpl:"modules/laytpl",layim:"modules/layim",layedit:"modules/layedit",form:"modules/form",upload:"modules/upload",tree:"modules/tree",table:"modules/table",element:"modules/element",util:"modules/util",flow:"modules/flow",carousel:"modules/carousel",code:"modules/code",jquery:"modules/jquery",mobile:"modules/mobile","layui.all":"dest/layui.all"};o.modules={},o.status={},o.timeout=10,o.event={},t.fn.define=function(e,t){var n=this,i="function"==typeof e,r=function(){return"function"==typeof t&&t(function(e,t){layui[e]=t,o.status[e]=!0}),this};return i&&(t=e,e=[]),layui["layui.all"]||!layui["layui.all"]&&layui["layui.mobile"]?r.call(n):(n.use(e,r),n)},t.fn.use=function(e,t,u){function s(e,t){var n="PLaySTATION 3"===navigator.platform?/^complete$/:/^(complete|loaded)$/;("load"===e.type||n.test((e.currentTarget||e.srcElement).readyState))&&(o.modules[m]=t,y.removeChild(p),function i(){return++v>1e3*o.timeout/4?r(m+" is not a valid module"):void(o.status[m]?c():setTimeout(i,4))}())}function c(){u.push(layui[m]),e.length>1?f.use(e.slice(1),t,u):"function"==typeof t&&t.apply(layui,u)}var f=this,d=o.dir=o.dir?o.dir:i,y=n.getElementsByTagName("head")[0];e="string"==typeof e?[e]:e,window.jQuery&&jQuery.fn.on&&(f.each(e,function(t,n){"jquery"===n&&e.splice(t,1)}),layui.jquery=jQuery);var m=e[0],v=0;if(u=u||[],o.host=o.host||(d.match(/\/\/([\s\S]+?)\//)||["//"+location.host+"/"])[0],0===e.length||layui["layui.all"]&&a[m]||!layui["layui.all"]&&layui["layui.mobile"]&&a[m])return c(),f;var p=n.createElement("script"),h=(a[m]?d+"lay/":o.base||"")+(f.modules[m]||m)+".js";return p.async=!0,p.charset="utf-8",p.src=h+function(){var e=o.version===!0?o.v||(new Date).getTime():o.version||"";return e?"?v="+e:""}(),o.modules[m]?!function g(){return++v>1e3*o.timeout/4?r(m+" is not a valid module"):void("string"==typeof o.modules[m]&&o.status[m]?c():setTimeout(g,4))}():(y.appendChild(p),!p.attachEvent||p.attachEvent.toString&&p.attachEvent.toString().indexOf("[native code")<0||l?p.addEventListener("load",function(e){s(e,h)},!1):p.attachEvent("onreadystatechange",function(e){s(e,h)})),o.modules[m]=h,f},t.fn.getStyle=function(t,n){var o=t.currentStyle?t.currentStyle:e.getComputedStyle(t,null);return o[o.getPropertyValue?"getPropertyValue":"getAttribute"](n)},t.fn.link=function(e,t,i){var l=this,a=n.createElement("link"),u=n.getElementsByTagName("head")[0];"string"==typeof t&&(i=t);var s=(i||e).replace(/\.|\//g,""),c=a.id="layuicss-"+s,f=0;a.rel="stylesheet",a.href=e+(o.debug?"?v="+(new Date).getTime():""),a.media="all",n.getElementById(c)||u.appendChild(a),"function"==typeof t&&!function d(){return++f>1e3*o.timeout/100?r(e+" timeout"):void(1989===parseInt(l.getStyle(n.getElementById(c),"width"))?function(){t()}():setTimeout(d,100))}()},t.fn.addcss=function(e,t,n){layui.link(o.dir+"css/"+e,t,n)},t.fn.img=function(e,t,n){var o=new Image;return o.src=e,o.complete?t(o):(o.onload=function(){o.onload=null,t(o)},void(o.onerror=function(e){o.onerror=null,n(e)}))},t.fn.config=function(e){e=e||{};for(var t in e)o[t]=e[t];return this},t.fn.modules=function(){var e={};for(var t in a)e[t]=a[t];return e}(),t.fn.extend=function(e){var t=this;e=e||{};for(var n in e)t[n]||t.modules[n]?r("模块名 "+n+" 已被占用"):t.modules[n]=e[n];return t},t.fn.router=function(e){for(var t,n=(e||location.hash).replace(/^#/,"").split("/")||[],o={dir:[]},i=0;i 2 | <%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %> 3 | 31 | -------------------------------------------------------------------------------- /src/main/webapp/nav.jsp: -------------------------------------------------------------------------------- 1 | <%-- 2 | Created by IntelliJ IDEA. 3 | User: zhh 4 | Date: 2017/5/5 5 | Time: 11:05 6 | To change this template use File | Settings | File Templates. 7 | --%> 8 | <%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %> 9 | 23 | -------------------------------------------------------------------------------- /src/test/java/com/hus/DemoApplicationTests.java: -------------------------------------------------------------------------------- 1 | package com.hus; 2 | 3 | import com.hus.common.consts.App; 4 | import com.hus.common.consts.Url; 5 | import com.hus.common.utils.MyX509TrustManagerUtil; 6 | import net.sf.json.JSON; 7 | import net.sf.json.JSONObject; 8 | import org.apache.http.HttpResponse; 9 | import org.apache.http.client.methods.HttpGet; 10 | import org.apache.http.conn.HttpClientConnectionManager; 11 | import org.apache.http.util.EntityUtils; 12 | import org.junit.Test; 13 | import org.junit.runner.RunWith; 14 | import org.springframework.boot.test.context.SpringBootTest; 15 | import org.springframework.test.context.junit4.SpringRunner; 16 | 17 | import javax.net.ssl.HttpsURLConnection; 18 | import javax.net.ssl.SSLContext; 19 | import javax.net.ssl.SSLSocketFactory; 20 | import javax.net.ssl.TrustManager; 21 | import java.io.BufferedReader; 22 | import java.io.InputStream; 23 | import java.io.InputStreamReader; 24 | import java.io.OutputStream; 25 | import java.net.URL; 26 | 27 | @RunWith(SpringRunner.class) 28 | @SpringBootTest 29 | public class DemoApplicationTests { 30 | 31 | @Test 32 | public void contextLoads() throws Exception{ 33 | String s = "{\"button\":[{\"name\":\"休闲娱乐\",\"sub_button\":[{\"type\":\"click\",\"name\":\"笑话大全\",\"key\":\"m_joke\"},{\"type\":\"click\",\"name\":\"内涵段子\",\"key\":\"m_duanzi\"},{\"type\":\"click\",\"name\":\"爆笑图片\",\"key\":\"m_laughImg\"}]},{\"name\":\"实用工具\",\"sub_button\":[{\"type\":\"click\",\"name\":\"天气查询\",\"key\":\"m_weather\"},{\"type\":\"click\",\"name\":\"公交查询\",\"key\":\"m_bus\"},{\"type\":\"click\",\"name\":\"功能菜单\",\"key\":\"m_sysmenu\"}]},{\"name\":\"消息示例\",\"sub_button\":[{\"type\":\"click\",\"name\":\"关于企特\",\"key\":\"m_about\"},{\"type\":\"click\",\"name\":\"图文消息\",\"key\":\"m_imgmsg\"},{\"type\":\"click\",\"name\":\"音乐消息\",\"key\":\"m_musicmsg\"}]}]}"; 34 | // System.out.println(s); 35 | getNormalMenuList(); 36 | } 37 | 38 | /** 39 | * 获取微信默认菜单 40 | * @author 张进军 41 | * @date Jan 27, 2016 11:39:58 AM 42 | * @param storeId 门店标识 43 | * @return 微信默认菜单 44 | */ 45 | private boolean getNormalMenuList() throws Exception{ 46 | 47 | String url = Url.Wechat.CREATE_NORMAL_MENU_URL.replace("ACCESS_TOKEN", getAccessToken()); 48 | JSONObject resultJson = httpRequest(url, "POST", " {\n" + 49 | " \"button\":[\n" + 50 | " {\n" + 51 | " \"name\":\"自助服务\",\n" + 52 | " \"sub_button\":[\n" + 53 | " {\n" + 54 | " \"type\":\"view\",\n" + 55 | " \"name\":\"高校学生选课系统学生登录\",\n" + 56 | " \"url\":\"http://17157bv023.51mypc.cn/hus/wechat/enter\"\n" + 57 | " }]\n" + 58 | " }]\n" + 59 | " }"); 60 | return false; 61 | } 62 | 63 | /** 64 | * 获取accessToken 65 | */ 66 | public String getAccessToken() throws Exception { 67 | String url = Url.Wechat.GET_ACCESSTOKEN; 68 | url = url.replace("APPID", App.Wechat.APPID); 69 | url = url.replace("APPSECRET", App.Wechat.APPSECRET); 70 | JSONObject json = httpRequest(url, "GET", null); 71 | String accessToken = json.getString("access_token"); 72 | return accessToken; 73 | 74 | } 75 | /** 76 | * HTTPS 请求方式 77 | * @author 朱昊 78 | * @date 2015年8月10日 下午11:47:59 79 | * @param requestUrl 请求链接 80 | * @param requestMethod 请求方式 81 | * @param outputStr 请求数据 82 | * @return 返回json 83 | */ 84 | public static JSONObject httpRequest(String requestUrl, String requestMethod, String outputStr) { 85 | JSONObject jsonObject = null; 86 | StringBuffer buffer = new StringBuffer(); 87 | try { 88 | TrustManager[] tm = { new MyX509TrustManagerUtil() }; 89 | SSLContext sslContext = SSLContext.getInstance("SSL", "SunJSSE"); 90 | sslContext.init(null, tm, new java.security.SecureRandom()); 91 | SSLSocketFactory ssf = sslContext.getSocketFactory(); 92 | URL url = new URL(requestUrl); 93 | HttpsURLConnection httpUrlConn = (HttpsURLConnection) url 94 | .openConnection(); 95 | httpUrlConn.setSSLSocketFactory(ssf); 96 | httpUrlConn.setDoOutput(true); 97 | httpUrlConn.setDoInput(true); 98 | httpUrlConn.setUseCaches(false); 99 | httpUrlConn.setRequestMethod(requestMethod); 100 | if ("GET".equalsIgnoreCase(requestMethod)) { 101 | httpUrlConn.connect(); 102 | } 103 | if (null != outputStr) { 104 | OutputStream outputStream = httpUrlConn.getOutputStream(); 105 | outputStream.write(outputStr.getBytes("UTF-8")); 106 | outputStream.close(); 107 | } 108 | InputStream inputStream = httpUrlConn.getInputStream(); 109 | InputStreamReader inputStreamReader = new InputStreamReader( 110 | inputStream, "utf-8"); 111 | BufferedReader bufferedReader = new BufferedReader( 112 | inputStreamReader); 113 | String str = null; 114 | while ((str = bufferedReader.readLine()) != null) { 115 | buffer.append(str); 116 | } 117 | bufferedReader.close(); 118 | inputStreamReader.close(); 119 | inputStream.close(); 120 | inputStream = null; 121 | httpUrlConn.disconnect(); 122 | jsonObject = JSONObject.fromObject(buffer.toString()); 123 | } 124 | catch (Exception ce) { 125 | ce.printStackTrace(); 126 | } 127 | System.out.println(jsonObject.toString()); 128 | return jsonObject; 129 | } 130 | 131 | } 132 | --------------------------------------------------------------------------------