diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000000000000000000000000000000000000..549e00a2a96fa9d7c5dbc9859664a78d980158c2 --- /dev/null +++ b/.gitignore @@ -0,0 +1,33 @@ +HELP.md +target/ +!.mvn/wrapper/maven-wrapper.jar +!**/src/main/**/target/ +!**/src/test/**/target/ + +### STS ### +.apt_generated +.classpath +.factorypath +.project +.settings +.springBeans +.sts4-cache + +### IntelliJ IDEA ### +.idea +*.iws +*.iml +*.ipr + +### NetBeans ### +/nbproject/private/ +/nbbuild/ +/dist/ +/nbdist/ +/.nb-gradle/ +build/ +!**/src/main/**/build/ +!**/src/test/**/build/ + +### VS Code ### +.vscode/ diff --git a/pom.xml b/pom.xml new file mode 100644 index 0000000000000000000000000000000000000000..85cee21246648217d66d383c92f1a079b86180d0 --- /dev/null +++ b/pom.xml @@ -0,0 +1,103 @@ + + + 4.0.0 + + org.springframework.boot + spring-boot-starter-parent + 2.3.1.RELEASE + + + com.book + manager + 0.0.1-SNAPSHOT + manager + the book management system + + + 1.8 + + + + + + org.springframework.boot + spring-boot-starter-thymeleaf + + + + com.github.pagehelper + pagehelper-spring-boot-starter + 1.2.3 + + + + org.mybatis.spring.boot + mybatis-spring-boot-starter + 2.1.3 + + + + + io.springfox + springfox-swagger2 + 2.7.0 + + + io.springfox + springfox-swagger-ui + 2.7.0 + + + + org.springframework.boot + spring-boot-starter-data-jpa + + + + org.springframework.boot + spring-boot-starter-web + + + + mysql + mysql-connector-java + runtime + + + + org.projectlombok + lombok + true + + + + cn.hutool + hutool-all + 5.2.5 + + + + org.springframework.boot + spring-boot-starter-test + test + + + org.junit.vintage + junit-vintage-engine + + + + + + + + + + org.springframework.boot + spring-boot-maven-plugin + + + + + diff --git a/src/main/java/com/book/manager/ManagerApplication.java b/src/main/java/com/book/manager/ManagerApplication.java new file mode 100644 index 0000000000000000000000000000000000000000..0a12306eaf91910aba13dfefd307f35d9d132d32 --- /dev/null +++ b/src/main/java/com/book/manager/ManagerApplication.java @@ -0,0 +1,18 @@ +package com.book.manager; + +import org.springframework.boot.SpringApplication; +import org.springframework.boot.autoconfigure.SpringBootApplication; +import org.springframework.data.jpa.repository.config.EnableJpaRepositories; + +@EnableJpaRepositories +@SpringBootApplication +public class ManagerApplication { + + public static void main(String[] args) { + SpringApplication.run(ManagerApplication.class, args); + System.out.println("| ---------------------------------------------------------------------------------- |"); + System.out.println("| Started Success |"); + System.out.println("| ---------------------------------------------------------------------------------- |"); + } + +} diff --git a/src/main/java/com/book/manager/config/SwaggerConfiguration.java b/src/main/java/com/book/manager/config/SwaggerConfiguration.java new file mode 100644 index 0000000000000000000000000000000000000000..481f67b1b1f83078f4ee8196c2f1ba7852b549d4 --- /dev/null +++ b/src/main/java/com/book/manager/config/SwaggerConfiguration.java @@ -0,0 +1,39 @@ +package com.book.manager.config; + +import org.springframework.context.annotation.Bean; +import org.springframework.context.annotation.Configuration; +import springfox.documentation.builders.ApiInfoBuilder; +import springfox.documentation.builders.PathSelectors; +import springfox.documentation.builders.RequestHandlerSelectors; +import springfox.documentation.service.ApiInfo; +import springfox.documentation.spi.DocumentationType; +import springfox.documentation.spring.web.plugins.Docket; +import springfox.documentation.swagger2.annotations.EnableSwagger2; + +/** + * @Description swagger 配置 + * @Date 2020/7/14 18:36 + * @Author by 尘心 + */ +@Configuration +@EnableSwagger2 +public class SwaggerConfiguration { + + @Bean + public Docket createRestApi() { + return new Docket(DocumentationType.SWAGGER_2) + .apiInfo(apiInfo()) + .select() + .apis(RequestHandlerSelectors.basePackage("com.book.manager.controller")) + .paths(PathSelectors.any()) + .build(); + } + + private ApiInfo apiInfo() { + return new ApiInfoBuilder() + .title("服务:图书管理后台Swagger UI") + .description("服务:图书管理后台Swagger UI") + .version("1.0") + .build(); + } +} diff --git a/src/main/java/com/book/manager/config/WebConfig.java b/src/main/java/com/book/manager/config/WebConfig.java new file mode 100644 index 0000000000000000000000000000000000000000..8d088338e81340344c9f0706cfbbb0b18b81dfad --- /dev/null +++ b/src/main/java/com/book/manager/config/WebConfig.java @@ -0,0 +1,29 @@ +package com.book.manager.config; + +import com.book.manager.interceptor.LoginInterceptor; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.context.annotation.Configuration; +import org.springframework.web.servlet.config.annotation.InterceptorRegistry; +import org.springframework.web.servlet.config.annotation.WebMvcConfigurer; + +/** + * @Description web mvc 配置 + * @Date 2020/7/15 20:47 + * @Author by 尘心 + */ +@Configuration +public class WebConfig implements WebMvcConfigurer { + + @Autowired + private LoginInterceptor loginInterceptor; + + @Override + public void addInterceptors(InterceptorRegistry registry) { + // 添加拦截器 + registry.addInterceptor(loginInterceptor) + .addPathPatterns("/**") + .excludePathPatterns("/") + .excludePathPatterns("/login") + .excludePathPatterns("/login.html"); + } +} diff --git a/src/main/java/com/book/manager/controller/BookController.java b/src/main/java/com/book/manager/controller/BookController.java new file mode 100644 index 0000000000000000000000000000000000000000..8229743d2f481ebcda974c795cfaba3beb5475a7 --- /dev/null +++ b/src/main/java/com/book/manager/controller/BookController.java @@ -0,0 +1,79 @@ +package com.book.manager.controller; + +import com.book.manager.entity.Book; +import com.book.manager.entity.Users; +import com.book.manager.service.BookService; +import com.book.manager.service.UserService; +import com.book.manager.util.R; +import com.book.manager.util.http.CodeEnum; +import com.book.manager.util.po.PageOut; +import com.book.manager.util.vo.PageIn; +import com.github.pagehelper.PageInfo; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Controller; +import org.springframework.web.bind.annotation.*; + +/** + * @Description 用户管理 + * @Date 2020/7/14 16:35 + * @Author by 尘心 + */ +@Api(tags = "图书管理") +@Controller +@RequestMapping("/book") +public class BookController { + + @Autowired + private BookService bookService; + + @ApiOperation("图书搜索列表") + @ResponseBody + @PostMapping("/list") + public R getBookList(@RequestBody PageIn pageIn) { + if (pageIn == null) { + return R.fail(CodeEnum.PARAM_ERROR); + } + // 封装分页出参对象 + PageInfo userList = bookService.getBookList(pageIn); + PageOut pageOut = new PageOut(); + pageOut.setCurrPage(userList.getPageNum()); + pageOut.setPageSize(userList.getPageSize()); + pageOut.setTotal((int) userList.getTotal()); + pageOut.setList(userList.getList()); + + return R.success(CodeEnum.SUCCESS,pageOut); + } + + @ApiOperation("添加图书") + @ResponseBody + @PostMapping("/add") + public R addBook(@RequestBody Book book) { + return R.success(CodeEnum.SUCCESS,bookService.addBook(book)); + } + + @ApiOperation("编辑图书") + @ResponseBody + @PostMapping("/update") + public R modifyBook(@RequestBody Book book) { + return R.success(CodeEnum.SUCCESS,bookService.updateBook(book)); + } + + + @ApiOperation("图书详情") + @ResponseBody + @GetMapping("/detail") + public R bookDetail(Integer id) { + return R.success(CodeEnum.SUCCESS,bookService.findBookById(id)); + } + + @ApiOperation("删除图书") + @ResponseBody + @GetMapping("/delete") + public R delBook(Integer id) { + bookService.deleteBook(id); + return R.success(CodeEnum.SUCCESS); + } + +} diff --git a/src/main/java/com/book/manager/controller/BorrowController.java b/src/main/java/com/book/manager/controller/BorrowController.java new file mode 100644 index 0000000000000000000000000000000000000000..382fd93b9508bb188c4cfc0351c15c7bd9f674fe --- /dev/null +++ b/src/main/java/com/book/manager/controller/BorrowController.java @@ -0,0 +1,69 @@ +package com.book.manager.controller; + +import com.book.manager.entity.Book; +import com.book.manager.entity.Borrow; +import com.book.manager.entity.Users; +import com.book.manager.service.BookService; +import com.book.manager.service.BorrowService; +import com.book.manager.util.R; +import com.book.manager.util.http.CodeEnum; +import com.book.manager.util.po.PageOut; +import com.book.manager.util.vo.PageIn; +import com.github.pagehelper.PageInfo; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Controller; +import org.springframework.web.bind.annotation.*; + +/** + * @Description 用户管理 + * @Date 2020/7/14 16:35 + * @Author by 尘心 + */ +@Api(tags = "借阅管理") +@Controller +@RequestMapping("/borrow") +public class BorrowController { + + @Autowired + private BorrowService borrowService; + + @ApiOperation("借阅列表") + @ResponseBody + @GetMapping("/list") + public R getBorrowList(Integer userId) { + return R.success(CodeEnum.SUCCESS,borrowService.findAllBorrowByUserId(userId)); + } + + @ApiOperation("借阅图书") + @ResponseBody + @PostMapping("/add") + public R addBorrow(@RequestBody Borrow borrow) { + return R.success(CodeEnum.SUCCESS,borrowService.addBorrow(borrow)); + } + + @ApiOperation("编辑借阅") + @ResponseBody + @PostMapping("/update") + public R modifyBorrow(@RequestBody Borrow borrow) { + return R.success(CodeEnum.SUCCESS,borrowService.updateBorrow(borrow)); + } + + + @ApiOperation("借阅详情") + @ResponseBody + @GetMapping("/detail") + public R borrowDetail(Integer id) { + return R.success(CodeEnum.SUCCESS,borrowService.findById(id)); + } + + @ApiOperation("归还图书") + @ResponseBody + @GetMapping("/delete") + public R delBorrow(Integer id) { + borrowService.deleteBorrow(id); + return R.success(CodeEnum.SUCCESS); + } + +} diff --git a/src/main/java/com/book/manager/controller/RouteController.java b/src/main/java/com/book/manager/controller/RouteController.java new file mode 100644 index 0000000000000000000000000000000000000000..b5d56ea1a9380955ef038acbbdb36b74391c412e --- /dev/null +++ b/src/main/java/com/book/manager/controller/RouteController.java @@ -0,0 +1,47 @@ +package com.book.manager.controller; + +import org.springframework.stereotype.Controller; +import org.springframework.web.bind.annotation.PathVariable; +import org.springframework.web.bind.annotation.RequestMapping; + +/** + * @Description 路由 + * @Date 2020/7/16 9:25 + * @Author by 尘心 + */ +@Controller +public class RouteController { + + /** + * 跳转登录 + */ + @RequestMapping({"/login","/"}) + public String toLogin() { + return "login"; + } + + /** + * 跳转首页 + */ + @RequestMapping({"/index"}) + public String toIndex() { + return "index"; + } + + /** + * 跳转首页 + */ + @RequestMapping({"/welcome"}) + public String toWelcome() { + return "welcome"; + } + + /** + * 一级路由跳转 + * @param name 映射名称 + */ + @RequestMapping("/{filename}/{name}") + public String change(@PathVariable String filename,@PathVariable String name) { + return filename+"/"+name; + } +} diff --git a/src/main/java/com/book/manager/controller/UsersController.java b/src/main/java/com/book/manager/controller/UsersController.java new file mode 100644 index 0000000000000000000000000000000000000000..0cd12a27cdbd789fe2d24723b25f6cd7c633f3d5 --- /dev/null +++ b/src/main/java/com/book/manager/controller/UsersController.java @@ -0,0 +1,82 @@ +package com.book.manager.controller; + +import com.book.manager.entity.Users; +import com.book.manager.service.UserService; +import com.book.manager.util.R; +import com.book.manager.util.http.CodeEnum; +import com.book.manager.util.po.PageOut; +import com.book.manager.util.vo.PageIn; +import com.github.pagehelper.PageInfo; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.data.domain.Page; +import org.springframework.data.domain.PageRequest; +import org.springframework.data.domain.Pageable; +import org.springframework.stereotype.Controller; +import org.springframework.web.bind.annotation.*; + +import java.util.List; + +/** + * @Description 用户管理 + * @Date 2020/7/14 16:35 + * @Author by 尘心 + */ +@Api(tags = "用户管理") +@Controller +@RequestMapping("/user") +public class UsersController { + + @Autowired + private UserService userService; + + @ApiOperation("用户列表") + @ResponseBody + @PostMapping("/list") + public R getUsers(@RequestBody PageIn pageIn) { + if (pageIn == null) { + return R.fail(CodeEnum.PARAM_ERROR); + } + // 封装分页出参对象 + PageInfo userList = userService.getUserList(pageIn); + PageOut pageOut = new PageOut(); + pageOut.setCurrPage(userList.getPageNum()); + pageOut.setPageSize(userList.getPageSize()); + pageOut.setTotal((int) userList.getTotal()); + pageOut.setList(userList.getList()); + + return R.success(CodeEnum.SUCCESS,pageOut); + } + + @ApiOperation("添加用户") + @ResponseBody + @PostMapping("/add") + public R getUsers(@RequestBody Users users) { + return R.success(CodeEnum.SUCCESS,userService.addUser(users)); + } + + @ApiOperation("编辑用户") + @ResponseBody + @PostMapping("/update") + public R modifyUsers(@RequestBody Users users) { + return R.success(CodeEnum.SUCCESS,userService.updateUser(users)); + } + + + @ApiOperation("用户详情") + @ResponseBody + @GetMapping("/detail") + public R userDetail(Integer id) { + return R.success(CodeEnum.SUCCESS,userService.findUserById(id)); + } + + @ApiOperation("删除用户") + @ResponseBody + @GetMapping("/delete") + public R delUsers(Integer id) { + userService.deleteUser(id); + return R.success(CodeEnum.SUCCESS); + } + +} diff --git a/src/main/java/com/book/manager/dao/BookMapper.java b/src/main/java/com/book/manager/dao/BookMapper.java new file mode 100644 index 0000000000000000000000000000000000000000..334eadf8868b35aa1070d9d8c246129f2b5072f9 --- /dev/null +++ b/src/main/java/com/book/manager/dao/BookMapper.java @@ -0,0 +1,32 @@ +package com.book.manager.dao; + +import com.book.manager.entity.Users; +import org.apache.ibatis.annotations.Mapper; +import org.springframework.stereotype.Component; + +import java.util.List; +import java.util.Map; + +/** + * @Description + * @Date 2020/7/14 19:57 + * @Author by 尘心 + */ +@Mapper +@Component +public interface BookMapper { + + /** + * 模糊分页查询用户 + * @param keyword 关键字 + * @return + */ + List findBookListByLike(String keyword); + + /** + * 编辑用户 + * @param map + * @return + */ + int updateBook(Map map); +} diff --git a/src/main/java/com/book/manager/dao/BorrowMapper.java b/src/main/java/com/book/manager/dao/BorrowMapper.java new file mode 100644 index 0000000000000000000000000000000000000000..61269fee6f938a5927c2e3393eb6aad7de318459 --- /dev/null +++ b/src/main/java/com/book/manager/dao/BorrowMapper.java @@ -0,0 +1,19 @@ +package com.book.manager.dao; + +import com.book.manager.entity.Borrow; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Update; +import org.springframework.stereotype.Component; + +/** + * @Description 借阅管理 + * @Date 2020/7/15 16:45 + * @Author by 尘心 + */ +@Mapper +@Component +public interface BorrowMapper { + + @Update("update borrow set user_id = #{userId},book_id = #{bookId},update_time = #{updateTime} where id = #{id}") + int updateBorrow(Borrow borrow); +} diff --git a/src/main/java/com/book/manager/dao/UsersMapper.java b/src/main/java/com/book/manager/dao/UsersMapper.java new file mode 100644 index 0000000000000000000000000000000000000000..c20080b20330fd09bb272c56f986354222b329af --- /dev/null +++ b/src/main/java/com/book/manager/dao/UsersMapper.java @@ -0,0 +1,32 @@ +package com.book.manager.dao; + +import com.book.manager.entity.Users; +import org.apache.ibatis.annotations.Mapper; +import org.springframework.stereotype.Component; + +import java.util.List; +import java.util.Map; + +/** + * @Description + * @Date 2020/7/14 19:57 + * @Author by 尘心 + */ +@Mapper +@Component +public interface UsersMapper { + + /** + * 模糊分页查询用户 + * @param keyword 关键字 + * @return + */ + List findListByLike(String keyword); + + /** + * 编辑用户 + * @param map + * @return + */ + int updateUsers(Map map); +} diff --git a/src/main/java/com/book/manager/entity/Book.java b/src/main/java/com/book/manager/entity/Book.java new file mode 100644 index 0000000000000000000000000000000000000000..e554382507b6d315fef9de52932a7d46e011e067 --- /dev/null +++ b/src/main/java/com/book/manager/entity/Book.java @@ -0,0 +1,45 @@ +package com.book.manager.entity; + +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +import javax.persistence.*; +import java.util.Date; + +/** + * @Description 图书实体类 + * @Date 2020/7/14 15:58 + * @Author by 尘心 + */ +@Data +@NoArgsConstructor +@AllArgsConstructor +@Entity +@Table(name = "book") +public class Book { + + @Id + @GeneratedValue(strategy = GenerationType.IDENTITY) + private Integer id; + + private String isbn; + + private String name; + + private String author; + + private Integer pages; + + private String translate; + + private String publish; + + private Double price; + + private Integer size; + + private Integer type; + + private Date publishTime; +} diff --git a/src/main/java/com/book/manager/entity/Borrow.java b/src/main/java/com/book/manager/entity/Borrow.java new file mode 100644 index 0000000000000000000000000000000000000000..dcd4cb8f61e6aafa3e932909eeda1cda9335ab47 --- /dev/null +++ b/src/main/java/com/book/manager/entity/Borrow.java @@ -0,0 +1,33 @@ +package com.book.manager.entity; + +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +import javax.persistence.*; +import java.util.Date; + +/** + * @Description 借阅表 + * @Date 2020/7/14 16:01 + * @Author by 尘心 + */ +@Data +@NoArgsConstructor +@AllArgsConstructor +@Entity +@Table(name = "borrow") +public class Borrow { + + @Id + @GeneratedValue(strategy = GenerationType.IDENTITY) + private Integer id; + + private Integer userId; + + private Integer bookId; + + private Date createTime; + + private Date updateTime; +} diff --git a/src/main/java/com/book/manager/entity/Users.java b/src/main/java/com/book/manager/entity/Users.java new file mode 100644 index 0000000000000000000000000000000000000000..35b24adf1f547bc774550a7a9f8fd7c362ee4864 --- /dev/null +++ b/src/main/java/com/book/manager/entity/Users.java @@ -0,0 +1,48 @@ +package com.book.manager.entity; + +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +import javax.persistence.*; +import java.util.Date; + +/** + * @Description 用户实体类 + * @Date 2020/7/14 15:39 + * @Author by 尘心 + */ +@Data +@NoArgsConstructor +@AllArgsConstructor +@Entity +@Table(name = "users") +public class Users { + + @Id + @GeneratedValue(strategy = GenerationType.IDENTITY) + private Integer id; + + private String avatar; + + private String nickname; + + private String username; + + private String password; + + private Date birthday; + + private Integer isAdmin; + + private String tel; + + private String email; + + private String address; + + private Integer size; + + private Integer identity; + +} diff --git a/src/main/java/com/book/manager/interceptor/LoginInterceptor.java b/src/main/java/com/book/manager/interceptor/LoginInterceptor.java new file mode 100644 index 0000000000000000000000000000000000000000..eba02b29cd152bf5a780cef0bdf7d25279ec151f --- /dev/null +++ b/src/main/java/com/book/manager/interceptor/LoginInterceptor.java @@ -0,0 +1,35 @@ +package com.book.manager.interceptor; + +import lombok.extern.slf4j.Slf4j; +import org.springframework.stereotype.Component; +import org.springframework.web.servlet.HandlerInterceptor; + +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import javax.servlet.http.HttpSession; + +/** + * @Description 登录拦截器 + * @Date 2020/7/15 20:39 + * @Author by 尘心 + */ +@Slf4j +@Component +public class LoginInterceptor implements HandlerInterceptor{ + + @Override + public boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object handler) throws Exception { + HttpSession session = request.getSession(); + // 查看用户session 是否已登录 + Object username = session.getAttribute("username"); + // 暂时去掉拦截 +// if (username == null) { +// // 未登录 直接跳转到登录页 +// response.sendRedirect("/login"); +// return false; +// } + + return true; + } + +} diff --git a/src/main/java/com/book/manager/repos/BookRepository.java b/src/main/java/com/book/manager/repos/BookRepository.java new file mode 100644 index 0000000000000000000000000000000000000000..97849a659001787548ad1535b1a5f74139773c17 --- /dev/null +++ b/src/main/java/com/book/manager/repos/BookRepository.java @@ -0,0 +1,16 @@ +package com.book.manager.repos; + +import com.book.manager.entity.Book; +import org.springframework.data.jpa.repository.JpaRepository; +import org.springframework.stereotype.Repository; + +/** + * @Description 书籍 + * @Date 2020/7/14 16:12 + * @Author by 尘心 + */ +@Repository +public interface BookRepository extends JpaRepository { + + +} diff --git a/src/main/java/com/book/manager/repos/BorrowRepository.java b/src/main/java/com/book/manager/repos/BorrowRepository.java new file mode 100644 index 0000000000000000000000000000000000000000..35ec4e3abea7ed0311e242320f3b9d1ecaea70d6 --- /dev/null +++ b/src/main/java/com/book/manager/repos/BorrowRepository.java @@ -0,0 +1,23 @@ +package com.book.manager.repos; + +import com.book.manager.entity.Borrow; +import org.springframework.data.jpa.repository.JpaRepository; +import org.springframework.stereotype.Repository; + +import java.util.List; + +/** + * @Description 借阅管理 jpa查询 + * @Date 2020/7/14 16:14 + * @Author by 尘心 + */ +@Repository +public interface BorrowRepository extends JpaRepository{ + + /** + * 查询借阅信息 + * @param userId 用户id + * @return + */ + List findBorrowByUserId(Integer userId); +} diff --git a/src/main/java/com/book/manager/repos/UsersRepository.java b/src/main/java/com/book/manager/repos/UsersRepository.java new file mode 100644 index 0000000000000000000000000000000000000000..557d877fc09f49d5b7cbfefd969fa0ecae5af267 --- /dev/null +++ b/src/main/java/com/book/manager/repos/UsersRepository.java @@ -0,0 +1,29 @@ +package com.book.manager.repos; + +import com.book.manager.entity.Users; +import org.springframework.data.domain.Page; +import org.springframework.data.domain.Pageable; +import org.springframework.data.jpa.repository.JpaRepository; +import org.springframework.data.jpa.repository.Query; +import org.springframework.data.repository.query.Param; +import org.springframework.stereotype.Repository; + +import java.util.List; + +/** + * @Description 用户jpa 查询 + * @Date 2020/7/14 16:06 + * @Author by 尘心 + */ +@Repository +public interface UsersRepository extends JpaRepository{ + + /** + * 用户模糊查询 + 分页 用户信息 + * @param keyword 用户名 + * @param pageable 分页对象 + * @return Page + */ + @Query(value="select * from users where username like CONCAT('%',:keyword,'%') limit ",nativeQuery=true) + Page findByUsernameLike(@Param(value = "keyword") String keyword,Pageable pageable); +} diff --git a/src/main/java/com/book/manager/service/BookService.java b/src/main/java/com/book/manager/service/BookService.java new file mode 100644 index 0000000000000000000000000000000000000000..321fb1c0357f6eda6cdd8b82672d18634e485490 --- /dev/null +++ b/src/main/java/com/book/manager/service/BookService.java @@ -0,0 +1,90 @@ +package com.book.manager.service; + +import cn.hutool.core.bean.BeanUtil; +import com.book.manager.dao.BookMapper; +import com.book.manager.dao.UsersMapper; +import com.book.manager.entity.Book; +import com.book.manager.entity.Users; +import com.book.manager.repos.BookRepository; +import com.book.manager.repos.UsersRepository; +import com.book.manager.util.vo.PageIn; +import com.github.pagehelper.PageHelper; +import com.github.pagehelper.PageInfo; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.data.domain.Page; +import org.springframework.data.domain.Pageable; +import org.springframework.stereotype.Service; + +import java.util.List; +import java.util.Optional; + +/** + * @Description 图书业务类 + * @Date 2020/7/14 16:31 + * @Author by 尘心 + */ +@Service +public class BookService { + + @Autowired + private BookRepository bookRepository; + + @Autowired + private BookMapper bookMapper; + + + /** + * 添加用户 + * @param book 图书 + * @return 返回添加的图书 + */ + public Book addBook(Book book) { + return bookRepository.saveAndFlush(book); + } + + /** + * 编辑用户 + * @param book 图书对象 + * @return true or false + */ + public boolean updateBook(Book book) { + return bookMapper.updateBook(BeanUtil.beanToMap(book))>0; + } + + /** + * 图书详情 + * @param id 主键 + * @return 图书详情 + */ + public Book findBookById(Integer id) { + Optional optional = bookRepository.findById(id); + if (optional.isPresent()) { + return optional.get(); + } + return null; + } + + /** + * 删除图书 + * @param id 主键 + * @return true or false + */ + public void deleteBook(Integer id) { + bookRepository.deleteById(id); + } + + + /** + * 图书搜索查询(mybatis 分页) + * @param pageIn + * @return + */ + public PageInfo getBookList(PageIn pageIn) { + + PageHelper.startPage(pageIn.getCurrPage(),pageIn.getPageSize()); + List listByLike = bookMapper.findBookListByLike(pageIn.getKeyword()); + return new PageInfo<>(listByLike); + } + + +} diff --git a/src/main/java/com/book/manager/service/BorrowService.java b/src/main/java/com/book/manager/service/BorrowService.java new file mode 100644 index 0000000000000000000000000000000000000000..0a913139a50a293898f05d475c96e79c4fdee840 --- /dev/null +++ b/src/main/java/com/book/manager/service/BorrowService.java @@ -0,0 +1,64 @@ +package com.book.manager.service; + +import com.book.manager.dao.BorrowMapper; +import com.book.manager.entity.Borrow; +import com.book.manager.repos.BorrowRepository; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +import java.util.List; +import java.util.Optional; + +/** + * @Description 借阅管理 + * @Date 2020/7/15 16:46 + * @Author by 尘心 + */ +@Service +public class BorrowService { + + @Autowired + private BorrowRepository borrowRepository; + + @Autowired + private BorrowMapper borrowMapper; + + /** + * 添加 + */ + public Borrow addBorrow(Borrow borrow) { + return borrowRepository.saveAndFlush(borrow); + } + + /** + * user id查询所有借阅信息 + */ + public List findAllBorrowByUserId(Integer userId) { + return borrowRepository.findBorrowByUserId(userId); + } + + /** + * 详情 + */ + public Borrow findById(Integer id) { + Optional optional = borrowRepository.findById(id); + if (optional.isPresent()) { + return optional.get(); + } + return null; + } + + /** + * 编辑 + */ + public boolean updateBorrow(Borrow borrow) { + return borrowMapper.updateBorrow(borrow)>0; + } + + /** + * s删除 + */ + public void deleteBorrow(Integer id) { + borrowRepository.deleteById(id); + } +} diff --git a/src/main/java/com/book/manager/service/UserService.java b/src/main/java/com/book/manager/service/UserService.java new file mode 100644 index 0000000000000000000000000000000000000000..db893677cb073d58fba1bede077bfb348f908cb7 --- /dev/null +++ b/src/main/java/com/book/manager/service/UserService.java @@ -0,0 +1,96 @@ +package com.book.manager.service; + +import cn.hutool.core.bean.BeanUtil; +import cn.hutool.core.util.StrUtil; +import com.book.manager.dao.UsersMapper; +import com.book.manager.entity.Users; +import com.book.manager.repos.UsersRepository; +import com.book.manager.util.vo.PageIn; +import com.github.pagehelper.PageHelper; +import com.github.pagehelper.PageInfo; +import org.apache.catalina.User; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.data.domain.Page; +import org.springframework.data.domain.Pageable; +import org.springframework.stereotype.Service; + +import java.util.List; +import java.util.Optional; + +/** + * @Description 用户业务类 + * @Date 2020/7/14 16:31 + * @Author by 尘心 + */ +@Service +public class UserService { + + @Autowired + private UsersRepository usersRepository; + + @Autowired + private UsersMapper usersMapper; + + /** + * 获取所有用户, 分页 + * @param pageable 分页对象 + */ + public Page getUsers(String keyword,Pageable pageable) { + return usersRepository.findByUsernameLike(keyword,pageable); + } + + /** + * 添加用户 + * @param users 用户 + * @return 返回添加的用户 + */ + public Users addUser(Users users) { + return usersRepository.saveAndFlush(users); + } + + /** + * 编辑用户 + * @param users 用户对象 + * @return true or false + */ + public boolean updateUser(Users users) { + return usersMapper.updateUsers(BeanUtil.beanToMap(users))>0; + } + + /** + * 用户详情 + * @param id 主键 + * @return 用户详情 + */ + public Users findUserById(Integer id) { + Optional optional = usersRepository.findById(id); + if (optional.isPresent()) { + return optional.get(); + } + return null; + } + + /** + * 删除用户 + * @param id 主键 + * @return true or false + */ + public void deleteUser(Integer id) { + usersRepository.deleteById(id); + } + + + /** + * 用户搜索查询(mybatis 分页) + * @param pageIn + * @return + */ + public PageInfo getUserList(PageIn pageIn) { + + PageHelper.startPage(pageIn.getCurrPage(),pageIn.getPageSize()); + List listByLike = usersMapper.findListByLike(pageIn.getKeyword()); + return new PageInfo<>(listByLike); + } + + +} diff --git a/src/main/java/com/book/manager/util/R.java b/src/main/java/com/book/manager/util/R.java new file mode 100644 index 0000000000000000000000000000000000000000..8b8fde8a50f29e91712b398102fcd374ef423a4b --- /dev/null +++ b/src/main/java/com/book/manager/util/R.java @@ -0,0 +1,83 @@ +package com.book.manager.util; + +import com.book.manager.util.http.CodeEnum; + +import java.io.Serializable; + +/** + * @Description 返回对象 + * @Date 2020/7/14 18:47 + * @Author by 尘心 + */ +public class R implements Serializable{ + + private Integer code; + + private String msg; + + private Object data; + + public R() { + } + + public R(String msg, String data) { + this.msg = msg; + this.data = data; + } + + public R(Integer code, String msg, String data) { + this.code = code; + this.msg = msg; + this.data = data; + } + + + public R(CodeEnum codeEnum,Object data) { + this.code = codeEnum.getCode(); + this.msg = codeEnum.getData(); + this.data = data; + } + + public R(CodeEnum codeEnum) { + this.code = codeEnum.getCode(); + this.msg = codeEnum.getData(); + } + + + public static R success(CodeEnum codeEnum,Object data) { + return new R(codeEnum,data); + } + + public static R success(CodeEnum codeEnum) { + return new R(codeEnum); + } + + public static R fail(CodeEnum codeEnum) { + return new R(codeEnum); + } + + + public Integer getCode() { + return code; + } + + public void setCode(Integer code) { + this.code = code; + } + + public String getMsg() { + return msg; + } + + public void setMsg(String msg) { + this.msg = msg; + } + + public Object getData() { + return data; + } + + public void setData(Object data) { + this.data = data; + } +} diff --git a/src/main/java/com/book/manager/util/http/CodeEnum.java b/src/main/java/com/book/manager/util/http/CodeEnum.java new file mode 100644 index 0000000000000000000000000000000000000000..56746a381d8929e692ff0ecaf915b5a017e38722 --- /dev/null +++ b/src/main/java/com/book/manager/util/http/CodeEnum.java @@ -0,0 +1,41 @@ +package com.book.manager.util.http; + +/** + * @Description TODO + * @Date 2020/7/14 18:49 + * @Author by 尘心 + */ +public enum CodeEnum { + /** 请求成功 */ + SUCCESS(200,"成功!"), + /** 找不到资源 */ + NOT_FOUND(404,"找不到资源!"), + /** 请求参数错误 */ + PARAM_ERROR(444,"请求参数错误!"), + /** 服务器发生异常 */ + FAIL(500,"服务器发生异常!"); + + CodeEnum(int code, String data) { + this.code = code; + this.data = data; + } + + private int code; + private String data; + + public int getCode() { + return code; + } + + public void setCode(int code) { + this.code = code; + } + + public String getData() { + return data; + } + + public void setData(String data) { + this.data = data; + } +} diff --git a/src/main/java/com/book/manager/util/po/PageOut.java b/src/main/java/com/book/manager/util/po/PageOut.java new file mode 100644 index 0000000000000000000000000000000000000000..c8e2f4a70cbc4651cdfd3e70b8a1df2d82fd0f55 --- /dev/null +++ b/src/main/java/com/book/manager/util/po/PageOut.java @@ -0,0 +1,25 @@ +package com.book.manager.util.po; + +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +/** + * @Description 分页返回 + * @Date 2020/7/14 20:53 + * @Author by 尘心 + */ +@Data +public class PageOut { + + @ApiModelProperty("当前页") + private Integer currPage; + + @ApiModelProperty("每页条数") + private Integer pageSize; + + @ApiModelProperty("总数") + private Integer total; + + @ApiModelProperty("数据") + private Object list; +} diff --git a/src/main/java/com/book/manager/util/vo/PageIn.java b/src/main/java/com/book/manager/util/vo/PageIn.java new file mode 100644 index 0000000000000000000000000000000000000000..e279328fc9ef7355684affb3112f7235b4f0c7a1 --- /dev/null +++ b/src/main/java/com/book/manager/util/vo/PageIn.java @@ -0,0 +1,19 @@ +package com.book.manager.util.vo; + +import lombok.Data; + +/** + * @Description 分页对象 + * @Date 2020/7/14 16:51 + * @Author by 尘心 + */ +@Data +public class PageIn { + + /** 搜索关键字 */ + private String keyword; + /** 当前页 */ + private Integer currPage; + /** 当前页条数 */ + private Integer pageSize; +} diff --git a/src/main/resources/application.yml b/src/main/resources/application.yml new file mode 100644 index 0000000000000000000000000000000000000000..6bdf44f2edc686aafc00fa30f9370204d15a3dc6 --- /dev/null +++ b/src/main/resources/application.yml @@ -0,0 +1,26 @@ +# --------------------------------------------- 启动端口 ------------------------------------------------------- # +server: + port: 8080 + +spring: +# --------------------------------------------- 数据库配置(默认使用mysql:5.5+) -----------------------------------# + datasource: + driver-class-name: com.mysql.cj.jdbc.Driver + url: jdbc:mysql://localhost:3306/book_manager?characterEncoding=utf-8&useSSL=true&serverTimezone=Asia/Shanghai + username: root + password: root + +# --------------------------------------------- 配置 JPA ------------------------------------------------------- # + jpa: + hibernate: +# --------------------------------------------- 更新策略 ------------------------------------------------------- # + ddl-auto: update +# --------------------------------------------- 打印SQL ------------------------------------------------------- # + show-sql: true +# --------------------------------------------- 自动生成表结构 ------------------------------------------------- # + generate-ddl: true +# --------------------------------------------- 配置mybatis ---------------------------------------------------- # +mybatis: + mapper-locations: classpath:mapper/*.xml + configuration: + log-impl: org.apache.ibatis.logging.stdout.StdOutImpl diff --git a/src/main/resources/mapper/BookMapper.xml b/src/main/resources/mapper/BookMapper.xml new file mode 100644 index 0000000000000000000000000000000000000000..c30d2b343204b966362044b853f4590e091c70e4 --- /dev/null +++ b/src/main/resources/mapper/BookMapper.xml @@ -0,0 +1,62 @@ + + + + + + + + + + + + + + + + + + + + + + + update book + + + isbn = #{isbn}, + + + `name` = #{name}, + + + pages = #{pages}, + + + `translate` = #{translate}, + + + publish = #{publish}, + + + price = #{price}, + + + `size` = #{size}, + + + `type` = #{type}, + + + publish_time = #{publishTime}, + + + where id = #{id} + + \ No newline at end of file diff --git a/src/main/resources/mapper/BorrowMapper.xml b/src/main/resources/mapper/BorrowMapper.xml new file mode 100644 index 0000000000000000000000000000000000000000..fa60b822ad60ead66b6d1d52645e7915f1affdd3 --- /dev/null +++ b/src/main/resources/mapper/BorrowMapper.xml @@ -0,0 +1,12 @@ + + + + + + + + + + + + \ No newline at end of file diff --git a/src/main/resources/mapper/UsersMapper.xml b/src/main/resources/mapper/UsersMapper.xml new file mode 100644 index 0000000000000000000000000000000000000000..e5e897c3f9012aae817beddc5fb518c4e89f6a5a --- /dev/null +++ b/src/main/resources/mapper/UsersMapper.xml @@ -0,0 +1,65 @@ + + + + + + + + + + + + + + + + + + + + + + + update users + + + avatar = #{avatar}, + + + nickname = #{nickname}, + + + username = #{username}, + + + password = #{password}, + + + birthday = #{birthday}, + + + is_admin = #{isAdmin}, + + + tel = #{tel}, + + + address = #{address}, + + + `size` = #{size}, + + + `identity` = #{identity}, + + + where id = #{id} + + \ No newline at end of file diff --git a/src/main/resources/static/javaex/m/css/animate.css b/src/main/resources/static/javaex/m/css/animate.css new file mode 100644 index 0000000000000000000000000000000000000000..ee85c6a9bbb222fb9fa90234bae49d16dd493588 --- /dev/null +++ b/src/main/resources/static/javaex/m/css/animate.css @@ -0,0 +1,134 @@ +@charset "utf-8"; +/* CSS Document */ +.animated{ + -webkit-animation-duration: 1s; + animation-duration: 1s; + -webkit-animation-fill-mode: both; + animation-fill-mode: both; +} + +/** 加载 */ +@-webkit-keyframes loading_img {0% {transform:rotate3d(0,0,1,0deg);}100% {transform:rotate3d(0,0,1,360deg);}} +@keyframes loading_img {0% {transform:rotate3d(0,0,1,0deg);}100% {transform:rotate3d(0,0,1,360deg);}} + +/* fadeInDown : 缓慢降落 */ +/* -webkit- */ +@-webkit-keyframes fadeInDown{0%{opacity: 0; -webkit-transform: translate3d(0, -20px, 0); transform: translate3d(0, -20px, 0);} 100%{opacity: 1; -webkit-transform: none; transform: none;}} +/* */ +@keyframes fadeInDown{0%{opacity: 0; -webkit-transform: translate3d(0, -20px, 0); transform: translate3d(0, -20px, 0);} 100%{opacity: 1; -webkit-transform: none; transform: none;}} +.fadeInDown{-webkit-animation-name: fadeInDown; animation-name: fadeInDown;} + +/* fadeInDownEx : 缓慢降落(增强) */ +/* -webkit- */ +@-webkit-keyframes fadeInDownEx{0%{opacity:0;-webkit-transform:translate3d(0,-2000px,0);transform:translate3d(0,-2000px,0)}to{opacity:1;-webkit-transform:none;transform:none}} +/* */ +@keyframes fadeInDownEx{0%{opacity:0;-webkit-transform:translate3d(0,-2000px,0);transform:translate3d(0,-2000px,0)}to{opacity:1;-webkit-transform:none;transform:none}} +.fadeInDownEx{-webkit-animation-name:fadeInDownEx;animation-name:fadeInDownEx;} + +/* shake : 左右摇晃 */ +/* -webkit- */ +@-webkit-keyframes shake{0%, 100%{-webkit-transform: translate3d(0, 0, 0); transform: translate3d(0, 0, 0);} 10%, 30%, 50%, 70%, 90%{-webkit-transform: translate3d(-10px, 0, 0); transform: translate3d(-10px, 0, 0);} 20%, 40%, 60%, 80%{-webkit-transform: translate3d(10px, 0, 0); transform: translate3d(10px, 0, 0);}} +/* */ +@keyframes shake{0%, 100%{-webkit-transform: translate3d(0, 0, 0); transform: translate3d(0, 0, 0);} 10%, 30%, 50%, 70%, 90%{-webkit-transform: translate3d(-10px, 0, 0); transform: translate3d(-10px, 0, 0);} 20%, 40%, 60%, 80%{-webkit-transform: translate3d(10px, 0, 0); transform: translate3d(10px, 0, 0);}} +.shake{-webkit-animation-name: shake; animation-name: shake;} + +/* bounce : 弹跳 */ +/* -webkit- */ +@-webkit-keyframes bounce{0%,20%,53%,80%,to{-webkit-animation-timing-function:cubic-bezier(.215,.61,.355,1);animation-timing-function:cubic-bezier(.215,.61,.355,1);-webkit-transform:translateZ(0);transform:translateZ(0)}40%,43%{-webkit-transform:translate3d(0,-30px,0);transform:translate3d(0,-30px,0)}40%,43%,70%{-webkit-animation-timing-function:cubic-bezier(.755,.05,.855,.06);animation-timing-function:cubic-bezier(.755,.05,.855,.06)}70%{-webkit-transform:translate3d(0,-15px,0);transform:translate3d(0,-15px,0)}90%{-webkit-transform:translate3d(0,-4px,0);transform:translate3d(0,-4px,0)}} +/* */ +@keyframes bounce{0%,20%,53%,80%,to{-webkit-animation-timing-function:cubic-bezier(.215,.61,.355,1);animation-timing-function:cubic-bezier(.215,.61,.355,1);-webkit-transform:translateZ(0);transform:translateZ(0)}40%,43%{-webkit-transform:translate3d(0,-30px,0);transform:translate3d(0,-30px,0)}40%,43%,70%{-webkit-animation-timing-function:cubic-bezier(.755,.05,.855,.06);animation-timing-function:cubic-bezier(.755,.05,.855,.06)}70%{-webkit-transform:translate3d(0,-15px,0);transform:translate3d(0,-15px,0)}90%{-webkit-transform:translate3d(0,-4px,0);transform:translate3d(0,-4px,0)}} +.bounce{-webkit-animation-name:bounce;animation-name:bounce;-webkit-transform-origin:center bottom;transform-origin:center bottom;} + +/* pulse : 心脏跳动 */ +/* -webkit- */ +@-webkit-keyframes pulse{0%{-webkit-transform:scaleX(1);transform:scaleX(1)}50%{-webkit-transform:scale3d(1.05,1.05,1.05);transform:scale3d(1.05,1.05,1.05)}to{-webkit-transform:scaleX(1);transform:scaleX(1)}} +/* */ +@keyframes pulse{0%{-webkit-transform:scaleX(1);transform:scaleX(1)}50%{-webkit-transform:scale3d(1.05,1.05,1.05);transform:scale3d(1.05,1.05,1.05)}to{-webkit-transform:scaleX(1);transform:scaleX(1)}} +.pulse{-webkit-animation-name:pulse;animation-name:pulse;} + +/* bounceInDown : 自由落体并反弹 */ +/* -webkit- */ +@-webkit-keyframes bounceInDown{0%,60%,75%,90%,to{-webkit-animation-timing-function:cubic-bezier(.215,.61,.355,1);animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{opacity:0;-webkit-transform:translate3d(0,-3000px,0);transform:translate3d(0,-3000px,0)}60%{opacity:1;-webkit-transform:translate3d(0,25px,0);transform:translate3d(0,25px,0)}75%{-webkit-transform:translate3d(0,-10px,0);transform:translate3d(0,-10px,0)}90%{-webkit-transform:translate3d(0,5px,0);transform:translate3d(0,5px,0)}to{-webkit-transform:none;transform:none}} +/* */ +@keyframes bounceInDown{0%,60%,75%,90%,to{-webkit-animation-timing-function:cubic-bezier(.215,.61,.355,1);animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{opacity:0;-webkit-transform:translate3d(0,-3000px,0);transform:translate3d(0,-3000px,0)}60%{opacity:1;-webkit-transform:translate3d(0,25px,0);transform:translate3d(0,25px,0)}75%{-webkit-transform:translate3d(0,-10px,0);transform:translate3d(0,-10px,0)}90%{-webkit-transform:translate3d(0,5px,0);transform:translate3d(0,5px,0)}to{-webkit-transform:none;transform:none}} +.bounceInDown{-webkit-animation-name:bounceInDown;animation-name:bounceInDown;} + +/* fadeInLeft : 左侧飞入 */ +/* -webkit- */ +@-webkit-keyframes fadeInLeft{0%{opacity:0;-webkit-transform:translate3d(-100%,0,0);transform:translate3d(-100%,0,0)}to{opacity:1;-webkit-transform:none;transform:none}} +/* */ +@keyframes fadeInLeft{0%{opacity:0;-webkit-transform:translate3d(-100%,0,0);transform:translate3d(-100%,0,0)}to{opacity:1;-webkit-transform:none;transform:none}} +.fadeInLeft{-webkit-animation-name:fadeInLeft;animation-name:fadeInLeft;} + + +/* bounceInLeft : 左侧飞入并反弹 */ +/* -webkit- */ +@-webkit-keyframes bounceInLeft{0%,60%,75%,90%,to{-webkit-animation-timing-function:cubic-bezier(.215,.61,.355,1);animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{opacity:0;-webkit-transform:translate3d(-3000px,0,0);transform:translate3d(-3000px,0,0)}60%{opacity:1;-webkit-transform:translate3d(25px,0,0);transform:translate3d(25px,0,0)}75%{-webkit-transform:translate3d(-10px,0,0);transform:translate3d(-10px,0,0)}90%{-webkit-transform:translate3d(5px,0,0);transform:translate3d(5px,0,0)}to{-webkit-transform:none;transform:none}} +/* */ +@keyframes bounceInLeft{0%,60%,75%,90%,to{-webkit-animation-timing-function:cubic-bezier(.215,.61,.355,1);animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{opacity:0;-webkit-transform:translate3d(-3000px,0,0);transform:translate3d(-3000px,0,0)}60%{opacity:1;-webkit-transform:translate3d(25px,0,0);transform:translate3d(25px,0,0)}75%{-webkit-transform:translate3d(-10px,0,0);transform:translate3d(-10px,0,0)}90%{-webkit-transform:translate3d(5px,0,0);transform:translate3d(5px,0,0)}to{-webkit-transform:none;transform:none}} +.bounceInLeft{-webkit-animation-name:bounceInLeft;animation-name:bounceInLeft;} + +/* fadeInRight : 右侧飞入 */ +/* -webkit- */ +@-webkit-keyframes fadeInRight{0%{opacity:0;-webkit-transform:translate3d(100%,0,0);transform:translate3d(100%,0,0)}to{opacity:1;-webkit-transform:none;transform:none}} +/* */ +@keyframes fadeInRight{0%{opacity:0;-webkit-transform:translate3d(100%,0,0);transform:translate3d(100%,0,0)}to{opacity:1;-webkit-transform:none;transform:none}} +.fadeInRight{-webkit-animation-name:fadeInRight;animation-name:fadeInRight;} + +/* bounceInRight : 右侧飞入并反弹 */ +/* -webkit- */ +@-webkit-keyframes bounceInRight{0%,60%,75%,90%,to{-webkit-animation-timing-function:cubic-bezier(.215,.61,.355,1);animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{opacity:0;-webkit-transform:translate3d(3000px,0,0);transform:translate3d(3000px,0,0)}60%{opacity:1;-webkit-transform:translate3d(-25px,0,0);transform:translate3d(-25px,0,0)}75%{-webkit-transform:translate3d(10px,0,0);transform:translate3d(10px,0,0)}90%{-webkit-transform:translate3d(-5px,0,0);transform:translate3d(-5px,0,0)}to{-webkit-transform:none;transform:none}} +/* */ +@keyframes bounceInRight{0%,60%,75%,90%,to{-webkit-animation-timing-function:cubic-bezier(.215,.61,.355,1);animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{opacity:0;-webkit-transform:translate3d(3000px,0,0);transform:translate3d(3000px,0,0)}60%{opacity:1;-webkit-transform:translate3d(-25px,0,0);transform:translate3d(-25px,0,0)}75%{-webkit-transform:translate3d(10px,0,0);transform:translate3d(10px,0,0)}90%{-webkit-transform:translate3d(-5px,0,0);transform:translate3d(-5px,0,0)}to{-webkit-transform:none;transform:none}} +.bounceInRight{-webkit-animation-name:bounceInRight;animation-name:bounceInRight;} + +/* fadeInUpSmall : 小地鼠 */ +@-webkit-keyframes fadeInUpSmall{0%{transform: translate3d(0,20px,0);opacity: 1;}100%{transform: translate3d(0,0,0);opacity: 1;}} +@keyframes fadeInUpSmall{0%{transform: translate3d(0,20px,0);opacity: 1;}100%{transform: translate3d(0,0,0);opacity: 1;}} +.fadeInUpSmall{-webkit-animation-name:fadeInUpSmall;animation-name:fadeInUpSmall;} + +/* fadeInUp : 地鼠 */ +/* -webkit- */ +@-webkit-keyframes fadeInUp{0%{opacity:0;-webkit-transform:translate3d(0,100%,0);transform:translate3d(0,100%,0)}to{opacity:1;-webkit-transform:none;transform:none}} +/* */ +@keyframes fadeInUp{0%{opacity:0;-webkit-transform:translate3d(0,100%,0);transform:translate3d(0,100%,0)}to{opacity:1;-webkit-transform:none;transform:none}} +.fadeInUp{-webkit-animation-name:fadeInUp;animation-name:fadeInUp;} + +/* fadeInUpEX : 火箭 */ +/* -webkit- */ +@-webkit-keyframes fadeInUpEX{0%{opacity:0;-webkit-transform:translate3d(0,2000px,0);transform:translate3d(0,2000px,0)}to{opacity:1;-webkit-transform:none;transform:none}} +/* */ +@keyframes fadeInUpEX{0%{opacity:0;-webkit-transform:translate3d(0,2000px,0);transform:translate3d(0,2000px,0)}to{opacity:1;-webkit-transform:none;transform:none}} +.fadeInUpEX{-webkit-animation-name:fadeInUpEX;animation-name:fadeInUpEX;} + +/* bounceOutLeft : 向左侧飞出 */ +/* -webkit- */ +@-webkit-keyframes bounceOutLeft{20%{opacity:1;-webkit-transform:translate3d(20px,0,0);transform:translate3d(20px,0,0)}to{opacity:0;-webkit-transform:translate3d(-2000px,0,0);transform:translate3d(-2000px,0,0)}} +/* */ +@keyframes bounceOutLeft{20%{opacity:1;-webkit-transform:translate3d(20px,0,0);transform:translate3d(20px,0,0)}to{opacity:0;-webkit-transform:translate3d(-2000px,0,0);transform:translate3d(-2000px,0,0)}} +.bounceOutLeft{-webkit-animation-name:bounceOutLeft;animation-name:bounceOutLeft;} + +/* bounceOutRight : 向右侧飞出 */ +/* -webkit- */ +@-webkit-keyframes bounceOutRight{20%{opacity:1;-webkit-transform:translate3d(-20px,0,0);transform:translate3d(-20px,0,0)}to{opacity:0;-webkit-transform:translate3d(2000px,0,0);transform:translate3d(2000px,0,0)}} +/* */ +@keyframes bounceOutRight{20%{opacity:1;-webkit-transform:translate3d(-20px,0,0);transform:translate3d(-20px,0,0)}to{opacity:0;-webkit-transform:translate3d(2000px,0,0);transform:translate3d(2000px,0,0)}} +.bounceOutRight{-webkit-animation-name:bounceOutRight;animation-name:bounceOutRight;} + +/* zoomIn : 缩放淡入 */ +/* -webkit- */ +@-webkit-keyframes zoomIn{0%{-webkit-transform: scale(0.2);transform: scale(0.2);opacity: 0;}100%{-webkit-transform: scale(1);transform: scale(1);-webkit-transition-timing-function:ease-in;opacity: 1;}} +@keyframes zoomIn{0%{transform: scale(0.2);opacity: 0;}100%{ transform: scale(1);opacity: 1;}} +.zoomIn{-webkit-animation-name:zoomIn;-webkit-animation-duration: 0.3s;animation-name:zoomIn;animation-duration: 0.3s;} + +/* zoomOut : 缩放淡出 */ +/* -webkit- */ +@-webkit-keyframes zoomOut{0%{-webkit-transform: scale(1);transform: scale(1);opacity: 1;}100%{ -webkit-transform: scale(0.2);transform: scale(0.2);opacity: 0;}} +/* */ +@keyframes zoomOut{0%{transform: scale(1);opacity: 1;}100%{transform: scale(0.2);opacity: 0;}} +.zoomOut{-webkit-animation-name:zoomOut;-webkit-animation-duration: 0.3s;animation-name:zoomOut;animation-duration: 0.3s;} + +/*页面渲染*/ +.pop-in{opacity:0;-webkit-animation-duration:.8s;animation-duration:.8s;-webkit-animation-name:popInAnimation;animation-name:popInAnimation;-webkit-animation-fill-mode:forwards;animation-fill-mode:forwards;-webkit-animation-timing-function:cubic-bezier(0,0,.5,1);animation-timing-function:cubic-bezier(0,0,.5,1)} +@-webkit-keyframes popInAnimation{0%{opacity:0;-webkit-transform:scale(.97);transform:scale(.97)}to{opacity:.99;-webkit-transform:scale(1);transform:scale(1)}} +@keyframes popInAnimation{0%{opacity:0;-webkit-transform:scale(.97);transform:scale(.97)}to{opacity:.99;-webkit-transform:scale(1);transform:scale(1)}} diff --git a/src/main/resources/static/javaex/m/css/common.css b/src/main/resources/static/javaex/m/css/common.css new file mode 100644 index 0000000000000000000000000000000000000000..965355a6d106745305d9389a69b1a1154f158b66 --- /dev/null +++ b/src/main/resources/static/javaex/m/css/common.css @@ -0,0 +1,285 @@ +@charset "utf-8"; +/** + * 作者:陈霓清 + * 官网:http://www.javaex.cn + */ + +/*样式重置*/ +* { + /*在手机中,当处于模块一状态时,用户触摸到 按钮,a标签的边框显示出来,加上-webkit-tap-highlight-color即可去除*/ + -webkit-tap-highlight-color: rgba(0,0,0,0); + -webkit-tap-highlight-color: transparent; + /*去除文本框默认样式*/ + -webkit-appearance:none; + /*当样式表里font-size<12px时,浏览器里字体显示仍为12px*/ + -webkit-text-size-adjust: none; + outline: none; +} +html {font-family: "Helvetica Neue", Helvetica, STHeiTi, Arial, sans-serif; -ms-text-size-adjust: 100%; -webkit-text-size-adjust: 100%;} +/*手机端,解决 overflow-y:scroll;卡顿问题-webkit-overflow-scrolling */ +body {margin: 0; font-size: 0.4rem; color: #333; background:#f1f2f3; height: 100%; overflow-x: hidden; -webkit-overflow-scrolling: touch;} +article, aside, details, figcaption, figure, footer, header, hgroup, main, nav, section, summary {display: block;} +a {background: transparent; text-decoration: none; color: #555;} +a:active {outline: 0;} +b, strong {font-weight: bold;} +i, cite, em, var, address, dfn {font-style: normal;} +img {border: 0; vertical-align: middle;} +input,textarea,button {border: 0; margin: 0; padding: 0; font-family:"微软雅黑", "Helvetica Neue", Helvetica, STHeiTi, Arial, sans-serif;} +textarea {resize: none;} +table {border-collapse: collapse; border-spacing: 0;} +td, th {padding: 0;} +h1, h2, h3, h4, h5, h6, p, figure, form, blockquote {margin: 0;} +ul, ol, li, dl, dd {margin: 0; padding: 0;} +ul, ol {list-style: none;} +input::-moz-placeholder, textarea::-moz-placeholder {color: #ccc;} +input:-ms-input-placeholder, textarea:-ms-input-placeholder {color: #ccc;} +input::-webkit-input-placeholder, textarea::-webkit-input-placeholder {color: #ccc;} +/*隐藏滚轮*/ +::-webkit-scrollbar {display: none;} + +*, *:before, *:after {-webkit-box-sizing: border-box; -moz-box-sizing: border-box; box-sizing: border-box;} + +/*通用属性*/ +/*隐藏*/ +.hide{display:none;} +.vh{visibility: hidden;} +/*浮动*/ +.fl{float: left;} +.fr{float: right;} +/*对齐*/ +.tl{text-align: left;} +.tr{float: right;} +.tc{text-align: right;} +/*清浮动*/ +.clear:before, .clear:after {display:table;content:" ";line-height:0} +.clear:after {clear:both} +span.clearfix{display: block; margin: 0; padding: 0; height: auto; line-height: 0; zoom: 1; clear: both;} +/*圆角*/ +.radius-3{border-radius: 3px;} +.radius-5{border-radius: 5px;} +.radius-8{border-radius: 8px;} + +/*栅格系统*/ +[class^="grid-"]{-webkit-box-orient: horizontal;-moz-box-orient: horizontal;box-orient: horizontal;display: -webkit-flex;display: -moz-flex;display: flex;margin: auto;} +[class^="grid-"] > div{-webkit-box-flex: 1;-moz-box-flex: 1;box-flex: 1;} + +/*等分系统*/ +[class^="equal-"]{list-style: none;} +[class^="equal-"] > li{float: left;list-style: none;height: auto;} + +/*按钮*/ +.button{display: inline-block; line-height: 200%; text-align: center; padding: 0 0.4rem; -webkit-tap-highlight-color: rgba(0,0,0,0);font-size: 0.34rem;background: #fff;color: #606060;} +.button.blue{color: #fff; background-color: #2196f3;} +.button.blue.empty{background-color: #fff;color: #2196f3;border: 1px solid #2196f3;} +.button.navy{color: #fff; background-color: #055f95;} +.button.navy.empty{background-color: #fff;color: #055f95;border: 1px solid #055f95;} +.button.indigo{color: #fff; background-color: #3a9bd9;} +.button.indigo.empty{background-color: #fff;color: #3a9bd9;border: 1px solid #3a9bd9;} +.button.wathet{color: #108cee; background-color: #eaf6fe;} +.button.red{color: #fff; background-color: #f6383a;} +.button.red.empty{background-color: #fff;color: #ea2e2e;border: 1px solid #ea2e2e;} +.button.green{color: #fff; background-color: #4cd964;} +.button.green.empty{background-color: #fff;color: #4cae4c;border: 1px solid #4cae4c;} +.button.yellow{color: #fff; background-color: #eea236;} +.button.yellow.empty{background-color: #fff;color: #eea236;border: 1px solid #eea236;} +.button.gray{color: #222; background-color: #d8d8d8;} +.button.gray.empty{background-color: #fff;color: #d8d8d8;border: 1px solid #d8d8d8;} +.button.disable{cursor: not-allowed;color: #999999;background-color: #f6f7fb;} +.button.disable.empty{background-color: #fff;color: #999999;border: 1px solid #999999;} +.button.full{width: 100%;font-size: 0.46rem;margin:0;} +/*按钮组*/ +.group-button{font-size: 0;white-space: nowrap;vertical-align: middle;} + +/*弹出层样式*/ +.dialog-radius{border-radius: 5px;} +.tip{position: fixed; z-index: 1006; top: 0; width: 100%; height: 100%; display: -webkit-box; display: -webkit-flex; display: -ms-flexbox; display: flex; -webkit-box-orient: vertical; -webkit-flex-flow: column; -ms-flex-direction: column; flex-direction: column; -webkit-transition-property: opacity; -webkit-transition-duration: 100ms; -webkit-backface-visibility: hidden;background: transparent;} +.mask, .control-mask, .mask, .tip-mask{position: fixed; z-index: 1004; top: 0; width: 100%; height: 100%; background: rgba(0,0,0,.3); display: -webkit-box; display: -webkit-flex; display: -ms-flexbox; display: flex; -webkit-box-orient: vertical; -webkit-flex-flow: column; -ms-flex-direction: column; flex-direction: column; -webkit-transition-property: opacity; -webkit-transition-duration: 100ms; -webkit-backface-visibility: hidden;} +.mask .container, .control-mask .container, .tip-mask .container{margin: auto 1.5rem;} +.dialog{text-align: center; position: relative; overflow: hidden;} +.dialog .dialog-content{margin: 0.4rem auto; font-size: 0.44rem; line-height: 1rem;} +.dialog .dialog-button-container{display: -webkit-box; display: -webkit-flex; display: -ms-flexbox; display: flex;} +.dialog .dialog-button{color: #222;width: 100%; display: block; -webkit-box-flex: 1; -webkit-flex: 1; -ms-flex: 1; flex: 1; font-size: 0.44rem; overflow: hidden; white-space: nowrap; outline: 0; margin: 0; padding: 0;border: none;} +.dialog .dialog-button-container.vertical{-webkit-box-orient: vertical; -webkit-flex-flow: column; -ms-flex-direction: column; flex-direction: column;} +.tip .container{margin: auto 1.5rem;} +.tip-content{padding: 0.4rem; font-size: 0.4rem; text-align: center; margin: 0 auto;} +.g-mask{width: 100%;height: 100%;background: rgba(0,0,0,.15);position: fixed;left: 0;top: 0;z-index: 1004;} +.g-container{position: fixed; z-index: 1006; bottom: 0; width: 100%; background: rgba(0,0,0,.15); display: -webkit-box; display: -webkit-flex; display: -ms-flexbox; display: flex; -webkit-box-orient: vertical; -webkit-flex-flow: column; -ms-flex-direction: column; flex-direction: column; -webkit-transition-property: opacity; -webkit-transition-duration: 100ms; -webkit-backface-visibility: hidden;} +.popup{position: fixed; left: 0; bottom: 0; width: 100%; z-index: 1005; -webkit-transition-property: -webkit-transform; -o-transition-property: -o-transform; transition-property: transform; -webkit-transform: translate3d(0,100%,0); transform: translate3d(0,100%,0);} +.popup.modal-in{-webkit-transform: translate3d(0,0,0); transform: translate3d(0,0,0);-webkit-transition-duration: .2s; -o-transition-duration: .2s; transition-duration: .2s;} +.popup .dialog-title{width: 100%; height: 1.28rem; text-align: center; line-height: 1.28rem; position: relative;} +.popup .operation{-webkit-box-pack: justify; -ms-flex-pack: justify; justify-content: space-between;} +.popup .button-cancel{width: 100%; height: 1.28rem; text-align: center; line-height: 1.28rem; font-size: 0.5rem;} +.loading{z-index: 1004; width: 2.5rem; min-height: 2.5rem; text-align: center;} +.loading > i{margin: 14px 0 3px; width: 38px; height: 38px; vertical-align: baseline; display: inline-block; animation: loading_img 1s steps(12,end) infinite; background: transparent url(../images/loading.png) no-repeat; background-size: 100%;} +.loading > p{font-size: 0.38rem;} + +/*主体内容结构*/ +.list-content{background: none;border:0;} +[class^="list-content-"]{background: none;border:0;-webkit-border-radius: '0';-moz-border-radius: '0';border-radius: '0';} +.block{position: relative;margin: 0 auto 10px;padding: 0;width: 100%;overflow: hidden;} +.main{margin: 0; text-align: left;padding:10px;} +[class^="main-"]{margin: 0; text-align: left;} +.block .divider{height: 1px; border: none; margin: 8px auto;} +.banner{font-size: 0.45rem; font-weight: normal; line-height: 1.1rem; height: 1.1rem; padding: 0px 10px;background-repeat: repeat;} +.banner > span:first-child{display: inline-block;} +.banner .subtitle{font-weight: normal;float: right;} +.banner .subtitle img{width: 0.5rem; height: 0.5rem; vertical-align: middle;} +.subtitle a span{font-size: 0.6rem;vertical-align: middle;margin-right: -10px;} +.left-right{display: -webkit-box; display: -webkit-flex; display: flex; -webkit-box-pack: justify; -webkit-justify-content: space-between; justify-content: space-between; -webkit-box-align: center; -webkit-align-items: center; align-items: center;} + +/*表单*/ +.unit{-webkit-box-orient: horizontal;-moz-box-orient: horizontal;box-orient: horizontal;display: -webkit-flex;display: -moz-flex;display: flex;margin: auto;} +.unit .left{width: 35%;-webkit-box-flex: 1; -moz-box-flex: 1; box-flex: 1;line-height: 0.8rem;} +.subtitle{display: inline-block; font-size: 0.38rem; padding: 0 4px;} +.unit .right{width: 65%;-webkit-box-flex: 1; -moz-box-flex: 1; box-flex: 1;line-height: 0.8rem;} +.unit .right input{font-size: 0.38rem;width: 100%;height: 100%;} +textarea.desc{font-size: 0.38rem;width: 100%;} +.unit .right label{margin-right: 0.2rem;} + +/*单选框和复选框*/ +/*普通填充样式*/ +.fill-label{display: inline-block; line-height: 0.54rem; height: 0.54rem;} +.fill{display: none;} +.fill-label .fill-text{display: inline-block;vertical-align: top;margin-left: 0.1rem;} +input[type="radio"].fill ~ .fill-css{display: inline-block; width: 0.46rem; height: 0.46rem;border-radius: 50%;} +input[type="checkbox"].fill ~ .fill-css{display: inline-block; width: 0.46rem; height: 0.46rem;} +input[type="radio"].fill:disabled ~ .fill-css{cursor: not-allowed;} +input[type="checkbox"].fill:disabled ~ .fill-css{cursor: not-allowed;} +input[type="radio"].fill:checked[disabled] ~ .fill-css, input[type="checkbox"].fill:checked[disabled] ~ .fill-css{cursor: not-allowed;} +/*伪样式*/ +.fake{display: none;} + +/*svg高级动画样式*/ +.todo{display: block; position: relative; padding-left: 0.8rem; margin: 2px 0;} +.svg{position: absolute; top: 0; left: 0; opacity: 0;} +.todo_text{-webkit-transition: all 0.4s linear 0.4s; transition: all 0.4s linear 0.4s;} +.todo_icon{position: absolute; top: 0; bottom: 0; left: 0; width: 70%; height: auto; margin: auto; fill: none; stroke-width: 1.2; stroke: #27FDC7; stroke-linejoin: round; stroke-linecap: round;} +.todo_line,.todo_box,.todo_check{-webkit-transition: stroke-dashoffset 0.8s cubic-bezier(0.9, 0, 0.5, 1); transition: stroke-dashoffset 0.8s cubic-bezier(0.9, 0, 0.5, 1);} +.todo_circle{stroke: #27FDC7; stroke-dasharray: 1 6; stroke-width: 0; -webkit-transform-origin: 13.5px 12.5px; transform-origin: 13.5px 12.5px; -webkit-transform: scale(0.4) rotate(0deg); transform: scale(0.4) rotate(0deg); -webkit-animation: none 0.8s linear; animation: none 0.8s linear;} +.todo_circle_radio{stroke: #27FDC7; -webkit-transform-origin: 13.5px 12.5px; transform-origin: 13.5px 12.5px; -webkit-animation: none 0.8s linear; animation: none 0.8s linear;} +@-webkit-keyframes explode{30%{stroke-width: 3; stroke-opacity: 1; -webkit-transform: scale(0.8) rotate(40deg); transform: scale(0.8) rotate(40deg);} 100%{stroke-width: 0; stroke-opacity: 0; -webkit-transform: scale(1.1) rotate(60deg); transform: scale(1.1) rotate(60deg);}} +@keyframes explode{30%{stroke-width: 3; stroke-opacity: 1; -webkit-transform: scale(0.8) rotate(40deg); transform: scale(0.8) rotate(40deg);} 100%{stroke-width: 0; stroke-opacity: 0; -webkit-transform: scale(1.1) rotate(60deg); transform: scale(1.1) rotate(60deg);}} +.todo_box{stroke-dasharray: 56.1053, 56.1053; stroke-dashoffset: 0; -webkit-transition-delay: 0.16s; transition-delay: 0.16s;} +.todo_box_radio{stroke-dasharray: 56.1053, 56.1053; stroke-dashoffset: 56.1053; -webkit-transition-delay: 0.16s; transition-delay: 0.16s;} +.todo_check{stroke: #27FDC7; stroke-dasharray: 9.8995, 9.8995; stroke-dashoffset: 9.8995; -webkit-transition-duration: 0.32s; transition-duration: 0.32s;} +.todo_line{stroke-dasharray: 168, 1684; stroke-dashoffset: 168;} +.todo_circle{-webkit-animation-delay: 0.56s; animation-delay: 0.56s; -webkit-animation-duration: 0.56s; animation-duration: 0.56s;} +.svg:checked ~ .todo_text{-webkit-transition-delay: 0s; transition-delay: 0s; color: #5EBEC1; opacity: 0.6;} +.svg:checked ~ .todo_icon .todo_box{stroke-dashoffset: 56.1053; -webkit-transition-delay: 0s; transition-delay: 0s;} +.svg:checked ~ .todo_icon .todo_line{stroke-dashoffset: -8;} +.svg:checked ~ .todo_icon .todo_check{stroke-dashoffset: 0; -webkit-transition-delay: 0.48s; transition-delay: 0.48s;} +.svg:checked ~ .todo_icon .todo_circle{-webkit-animation-name: explode; animation-name: explode;} + +/*开关样式复选框*/ +.switch{vertical-align: middle;width: 1.5rem !important;height: 0.75rem !important; position: relative; box-shadow: #dfdfdf 0 0 0 0 inset; border-radius: 0.37rem; display: inline-block; -webkit-appearance: none; -moz-appearance: none; appearance: none; -webkit-user-select: none; -moz-user-select: none; -o-user-select: none; user-select: none; outline: none;} +.switch:before{content: " "; color: #fff; position: absolute; letter-spacing: 0.7rem; left: 0.25rem; transition: left 0.3s; line-height: 0.75rem; height: 0.75rem; font-size: 0.4rem;} +.switch:after{content: " "; width: 0.64rem; height: 0.64rem; position: absolute; top: 0.05rem;left: 0.06rem; border-radius: 14px; background-color: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.4); transition: left 0.3s;} +.switch:checked:after{left: 0.8rem;} + +/*底部固定*/ +#javaex-footer{position: fixed; bottom: 0px; width: 100%;z-index: 1002;} +.footer-ul{font-size: 0.34rem;height: 1.25rem; width: 100%; text-align: center;box-shadow: 0 0 10px 1px rgba(7,17,27,.1);} +.footer-ul ul li {padding-top: 0.18rem;} +.footer-ul span{font-size: 0.5rem;} +.footer-div{line-height: 1.25rem; width: 100%; text-align: center;box-shadow: 0 0 10px 1px rgba(7,17,27,.1);} +.footer-div > div > div:last-child{border-right:none;} + +/*底部弹出菜单*/ +.javaex-menu{position:relative;} +.javaex-menu .sub-menu{position:absolute; bottom:1.25rem; width:90%;left:5%; display:none;} +.javaex-menu .sub-menu li{width: 100%;} +.javaex-menu .sub-menu li a{background:#fff;} +.javaex-menu .menu-flag{position: absolute; bottom: 5px; right: 5px;} + +/*顶部*/ +#javaex-header{position: fixed;top: 0px;width: 100%;z-index: 1003;} +.header{line-height: 1.2rem; height: 1.2rem; text-align: center; width: 100%;overflow: hidden;} +.header > .left{height: 100%; text-align: center; float: left;} +.header > .mid{height: 1rem;} +.header > .right{height: 100%; text-align: center; float: right;} +.header span{font-size: 0.6rem;line-height: 1.2rem;height: 1.2rem;} + +/*侧栏*/ +#slide-nav{position: fixed; top: 0; bottom: 0;left: -70%; width: 70%;z-index: 1005;transform: translateX(0px); transition: 150ms cubic-bezier(0.165, 0.84, 0.44, 1);} + +/*下拉导航菜单*/ +#guide-nav{position: relative;height: 1rem;} +#guide-nav ul{position: absolute;z-index: 2;height: 1rem;top: 0;left: 0;width: 100%;overflow: hidden; font-size: 0.46rem;border-width: 0 0 1px 0;-webkit-transform: translateZ(0);transform: translateZ(0);transition: height .3s;} +#guide-nav ul li{float: left;height: 1rem;width: 20%;text-align: center;line-height: 1rem;margin-bottom: 5px;} +#guide-nav ul li:nth-child(4){margin-right: 20%;} +#guide-nav ul .more{position: absolute;display: block;padding: 0;border: none;background: none;right: 0;top: 0;width: 20%;height: 1rem;text-align: center;font-size: 0.46rem;line-height: 0.8rem;} +#guide-nav ul .more span{display: block;height: 100%;width: 100%;font-size: 0.7rem;margin-top: -8px;} + +/*滚动公告*/ +.big-title{font-size: 0.25rem; height: 0.5rem; line-height: 0.5rem; padding: 0 3px; text-align: center; position: absolute; left: 0.25rem;} +.roll-box {height: 0.5rem;overflow: hidden;} +.roll-box .roll-tiem {position: relative;font-size: 0.4rem;list-style: none;height: 0.5rem;line-height: 0.5rem;overflow: hidden;} +.roll-box .roll-tiem li {clear: both;width: 100%;height: 0.5rem;line-height: 0.5rem;list-style: none;overflow: hidden;} +.roll-box .roll-tiem li:first-child {z-index: 10;} +.roll-box .roll-tiem li a {display: block;white-space: nowrap;text-overflow: ellipsis;overflow: hidden;} + +/*屏幕预加载*/ +#javaex-loading{position: fixed; top: 0; left: 0; bottom: 0; right: 0; z-index: 9999; display: block; background: rgba(255,255,255,0.7);} +.loading-screen{text-align: center; position: fixed; top: 50%; left: 50%; margin-left: -70px; margin-top: -48px; width: 150px; height: 50px;} + +/*上滑加载(分页)*/ +.infinite-scroll-preloader{display: block; text-align: center;} +.infinite-scroll-preloader .load-data{display: inline-block;} +.infinite-scroll-preloader .no-data{font-size: .32rem; padding: .3rem 0;} +@-webkit-keyframes rotate{0%{-webkit-transform: rotate(0deg);} 50%{-webkit-transform: rotate(180deg);} 100%{-webkit-transform: rotate(360deg);}} +@keyframes rotate{0%{transform: rotate(0deg);} 50%{transform: rotate(180deg);} 100%{transform: rotate(360deg);}} + +/*tab选项卡切换*/ +.tab-title{position: relative; width: 100%; overflow: hidden;} +.tab-title li{float: left; text-align: center;line-height: 0.35rem;padding: 0.35rem 0;} +.tab-title .border{position: absolute; -ms-transition: all 0.3s ease-in-out; -webkit-transition: all 0.3s ease-in-out; transition: all 0.3s ease-in-out; -webkit-transform: scale(.5); -ms-transform: scale(.5); transform: scale(.5);} +.tab-container{position: relative;} +.tab-bar{position: absolute; height: 100%; top: 0; left: 0; -webkit-overflow-scrolling: touch; width: 2rem; font-size: .6rem; background-color: #f2f2f2; border-right: 1px solid #e2e2e2; -webkit-transition: -webkit-transform 300ms; transition: -webkit-transform 300ms; transition: transform 300ms; -webkit-transform: translate(0, 0); transform: translate(0, 0);} +.tab-bar li{position: relative; text-align: center; display: block; padding: 0.34rem 0; border-left: 2px solid #f8f8f8; font-size: 0.34rem; border-bottom: 1px solid #eee; margin-right: -1px; color: #777;} +.tab-content-container{margin-left: 2rem;} + +/*超出屏幕的tab滑动*/ +.tabbar-container{position: relative;height: 1rem;} +.tabbar-container:before{content: ''; display: block; position: absolute; right: 0; width: .25rem; height: 1rem; margin-top: 0; z-index: 3; border-right: .25rem white solid; background: -webkit-linear-gradient(left,rgba(187,187,187,0), rgba(187,187,187,.2)); background: -moz-linear-gradient(left,rgba(187,187,187,0), rgba(187,187,187,.2)); background: linear-gradient(left,rgba(187,187,187,0), rgba(187,187,187,.2));} +.tabbar{position: relative;width: 100%;height: 1rem;display: -webkit-flex;display: flex;white-space: nowrap;overflow-x: auto;overflow-y: hidden;} +.tabbar>a{position: relative;-webkit-flex: 1;flex: 1;display: inline-block;padding: 0 0.375rem;line-height: 1rem;text-align: center;font-size: 0.4rem;} +.tabbar>a.activate::after{content: '';position: absolute;left: 50%;bottom: 0;display: inline-block;width: 0.5rem;margin-left: -.25rem;height: .075rem;border-radius: .05rem;} + +/*日期时间*/ +.mask-data{position:absolute;width:100%;height:100%;top:0;left:0;} +.mask-up{height:2rem; background: linear-gradient(#fff 0%, rgba(255, 255, 255, .85)45%, rgba(255, 255, 255, .6) 75%, rgba(255, 255, 255, .4) 100%); background: -webkit-gradient(linear, left top, left bottom, from(#fff), color-stop(0.45, rgba(255, 255, 255, .85)), color-stop(0.75, rgba(255, 255, 255, .6)), to(rgba(255, 255, 255, .4))); background: -moz-linear-gradient(#fff 0%, rgba(255, 255, 255, .85) 45%, rgba(255, 255, 255, .6) 75%, rgba(255, 255, 255, .4) 100%); background: -o-linear-gradient(#fff 0%, rgba(255, 255, 255, .85) 45%, rgba(255, 255, 255, .6) 75%, rgba(255, 255, 255, .4) 100%);} +.mask-mid{height:1rem;} +.mask-down{height:2rem; background: linear-gradient(rgba(255, 255, 255, .4) 0%, rgba(255, 255, 255, .6)25%, rgba(255, 255, 255, .85) 65%, #fff 100%); background: -webkit-gradient(linear, left top, left bottom, from(rgba(255, 255, 255, .4)), color-stop(0.25, rgba(255, 255, 255, .6)), color-stop(0.65, rgba(255, 255, 255, .85)), to(#fff)); background: -moz-linear-gradient(rgba(255, 255, 255, .4) 0%, rgba(255, 255, 255, .6) 25%, rgba(255, 255, 255, .85) 48%, #fff 100%); background: -o-linear-gradient(rgba(255, 255, 255, .4) 0%, rgba(255, 255, 255, .6) 25%, rgba(255, 255, 255, .85) 48%, #fff 100%);} +.date-ul{-webkit-perspective: 1000; -webkit-backface-visibility: hidden; text-decoration: none; list-style: none; padding: 0; margin: 0;} +.date-li, .select-option{padding: 0 5px; display: block; text-align: center; vertical-align: bottom; filter: Alpha(Opacity=90); white-space: nowrap;line-height: 1rem;height: 1rem;} +.date-hide, .option-hide{visibility: hidden;} + +/*下拉选择框*/ +.search-input{position: relative; padding: 0.2rem;text-align: left;} +.search-input input{width: 85%; height: 0.8rem; border: none; -webkit-appearance: none; -moz-appearance: none; appearance: none; border-radius: 0.1rem; font-family: inherit; font-size: 90%; font-weight: normal;padding-left: 0.3rem;} +.search-input .icon{font-size: 0.8rem; position: absolute;} + +/*富文本编辑器*/ +.javaex-edit-content i, .javaex-edit-content em {font-style: italic;} +.javaex-edit-quote blockquote{color:#777;font-size:16px;display:block;padding:0.45rem;margin:0 0 24px;border-left:8px solid #dddfe4;background:#eef0f4;overflow:auto;word-wrap:normal;word-break:normal;} +.javaex-edit-content {font-size: 0.45rem;line-height: 1.7;} +.javaex-edit-content code{font-size: 0.4rem;} +.javaex-edit-content a {color: #0886e9;} +.javaex-edit-content p {font-size: 0.45rem;margin-bottom: 10px;} +.javaex-edit-content ol {margin-top: 5px;} +.javaex-edit-content ul {list-style:unset;padding-left: 40px;} +.javaex-edit-content ul>li {list-style:unset;line-height: 26px;margin: 12px 0;} +.javaex-edit-content img {margin: 5px 0;max-width: 100%;} +.javaex-edit-content h1, .javaex-edit-content h2, .javaex-edit-content h3, .javaex-edit-content h4, .javaex-edit-content h5, .javaex-edit-content h6{font-family: Helvetica,Arial,Microsoft Jhenghei,Heiti TC,PingFang TC,sans-serif;font-weight: 700;} +.javaex-edit-content h1, .javaex-edit-content h2 {margin-bottom: 0.57rem;} +.javaex-edit-content h3, .javaex-edit-content h4, .javaex-edit-content h5, .javaex-edit-content h6 {margin-bottom: 0.4rem;} + +/*幻灯片*/ +.ex-slide{position:relative;overflow:hidden;} +.ex-slide .slide-prev, .ex-slide .slide-next{position: absolute; z-index: 9;} +.ex-slide ul.focus-bg:before, .ex-slide ul.focus-bg:after{display:table;content:" ";line-height:0} +.ex-slide ul.focus-bg:after{clear:both} +.ex-slide ul.focus-bg li{float: left;} +.ex-slide .focus-title .title{z-index: 10;} +.ex-slide .focus-box{position: absolute; bottom: 8px;} +.ex-slide ul.focus-bg{position: relative; top: 0; bottom: 0; left: 0; right: 0;} diff --git a/src/main/resources/static/javaex/m/css/fonts/icomoon.eot b/src/main/resources/static/javaex/m/css/fonts/icomoon.eot new file mode 100644 index 0000000000000000000000000000000000000000..5545dbad8710213d7f394177121fa20e6c677f1f Binary files /dev/null and b/src/main/resources/static/javaex/m/css/fonts/icomoon.eot differ diff --git a/src/main/resources/static/javaex/m/css/fonts/icomoon.svg b/src/main/resources/static/javaex/m/css/fonts/icomoon.svg new file mode 100644 index 0000000000000000000000000000000000000000..ceef6c796ef37f9d0e2ec8e0b339858d245ef50d --- /dev/null +++ b/src/main/resources/static/javaex/m/css/fonts/icomoon.svg @@ -0,0 +1,293 @@ + + + +Generated by IcoMoon + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/main/resources/static/javaex/m/css/fonts/icomoon.ttf b/src/main/resources/static/javaex/m/css/fonts/icomoon.ttf new file mode 100644 index 0000000000000000000000000000000000000000..f72e0ff64951059bbf91d9913fd35018a0ac3be3 Binary files /dev/null and b/src/main/resources/static/javaex/m/css/fonts/icomoon.ttf differ diff --git a/src/main/resources/static/javaex/m/css/fonts/icomoon.woff b/src/main/resources/static/javaex/m/css/fonts/icomoon.woff new file mode 100644 index 0000000000000000000000000000000000000000..4b304771be2661aa28534c9dd3f748e02702c401 Binary files /dev/null and b/src/main/resources/static/javaex/m/css/fonts/icomoon.woff differ diff --git a/src/main/resources/static/javaex/m/css/icomoon.css b/src/main/resources/static/javaex/m/css/icomoon.css new file mode 100644 index 0000000000000000000000000000000000000000..c932c7e9d1873ae23b29ac3a3bce7c31fd0c6620 --- /dev/null +++ b/src/main/resources/static/javaex/m/css/icomoon.css @@ -0,0 +1,896 @@ +@font-face { + font-family: 'icomoon'; + src: url('fonts/icomoon.eot?vhg86e'); + src: url('fonts/icomoon.eot?vhg86e#iefix') format('embedded-opentype'), + url('fonts/icomoon.ttf?vhg86e') format('truetype'), + url('fonts/icomoon.woff?vhg86e') format('woff'), + url('fonts/icomoon.svg?vhg86e#icomoon') format('svg'); + font-weight: normal; + font-style: normal; +} + +[class^="icon-"], [class*=" icon-"] { + /* use !important to prevent issues with browser extensions that change fonts */ + font-family: 'icomoon' !important; + speak: none; + font-style: normal; + font-weight: normal; + font-variant: normal; + text-transform: none; + line-height: 1; + + /* Better Font Rendering =========== */ + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; +} + +.icon-at-sign:before { + content: "\e981"; +} +.icon-check_circle:before { + content: "\e86c"; +} +.icon-palette1:before { + content: "\e40b"; +} +.icon-colorize1:before { + content: "\e3b9"; +} +.icon-font_download:before { + content: "\e167"; +} +.icon-format_align_center:before { + content: "\e234"; +} +.icon-format_align_left:before { + content: "\e236"; +} +.icon-format_align_right:before { + content: "\e237"; +} +.icon-format_bold:before { + content: "\e238"; +} +.icon-format_clear:before { + content: "\e239"; +} +.icon-format_color_fill:before { + content: "\e23a"; +} +.icon-format_color_text:before { + content: "\e23c"; +} +.icon-format_indent_decrease:before { + content: "\e23d"; +} +.icon-format_indent_increase:before { + content: "\e23e"; +} +.icon-format_italic:before { + content: "\e23f"; +} +.icon-format_list_bulleted:before { + content: "\e241"; +} +.icon-format_list_numbered:before { + content: "\e242"; +} +.icon-format_quote:before { + content: "\e244"; +} +.icon-format_underlined:before { + content: "\e249"; +} +.icon-fullscreen:before { + content: "\e5d0"; +} +.icon-fullscreen_exit:before { + content: "\e5d1"; +} +.icon-functions:before { + content: "\e24a"; +} +.icon-help:before { + content: "\e887"; +} +.icon-help_outline:before { + content: "\e8fd"; +} +.icon-tag_faces:before { + content: "\e420"; +} +.icon-movie_creation:before { + content: "\e404"; +} +.icon-select_all:before { + content: "\e162"; +} +.icon-code:before { + content: "\e978"; +} +.icon-photo:before { + content: "\e979"; +} +.icon-quote-right:before { + content: "\e97a"; +} +.icon-quote-left:before { + content: "\e97b"; +} +.icon-minus:before { + content: "\e97c"; +} +.icon-subtract:before { + content: "\e97c"; +} +.icon-minimize:before { + content: "\e97c"; +} +.icon-line:before { + content: "\e97c"; +} +.icon-table:before { + content: "\e97d"; +} +.icon-wysiwyg:before { + content: "\e97d"; +} +.icon-subscript:before { + content: "\e97e"; +} +.icon-wysiwyg1:before { + content: "\e97e"; +} +.icon-superscript:before { + content: "\e97f"; +} +.icon-wysiwyg2:before { + content: "\e97f"; +} +.icon-strikethrough:before { + content: "\e980"; +} +.icon-wysiwyg3:before { + content: "\e980"; +} +.icon-fast_forward:before { + content: "\e01f"; +} +.icon-fast_rewind:before { + content: "\e020"; +} +.icon-mic_none:before { + content: "\e02a"; +} +.icon-stop:before { + content: "\e047"; +} +.icon-videocam:before { + content: "\e04b"; +} +.icon-videocam_off:before { + content: "\e04c"; +} +.icon-volume_down:before { + content: "\e04d"; +} +.icon-volume_mute:before { + content: "\e04e"; +} +.icon-volume_off:before { + content: "\e04f"; +} +.icon-volume_up:before { + content: "\e050"; +} +.icon-hd:before { + content: "\e052"; +} +.icon-slow_motion_video:before { + content: "\e068"; +} +.icon-call_to_action:before { + content: "\e06c"; +} +.icon-chat3:before { + content: "\e0b7"; +} +.icon-chat_bubble:before { + content: "\e0ca"; +} +.icon-chat_bubble_outline:before { + content: "\e0cb"; +} +.icon-vpn_key:before { + content: "\e0da"; +} +.icon-import_contacts:before { + content: "\e0e0"; +} +.icon-mail_outline:before { + content: "\e0e1"; +} +.icon-add2:before { + content: "\e145"; +} +.icon-add_box:before { + content: "\e146"; +} +.icon-add_circle:before { + content: "\e147"; +} +.icon-content_paste:before { + content: "\e14f"; +} +.icon-remove_circle:before { + content: "\e15c"; +} +.icon-remove_circle_outline:before { + content: "\e15d"; +} +.icon-access_alarms:before { + content: "\e191"; +} +.icon-signal_cellular_4_bar:before { + content: "\e1c8"; +} +.icon-signal_cellular_null:before { + content: "\e1cf"; +} +.icon-signal_cellular_off:before { + content: "\e1d0"; +} +.icon-signal_wifi_4_bar:before { + content: "\e1d8"; +} +.icon-signal_wifi_4_bar_lock:before { + content: "\e1d9"; +} +.icon-signal_wifi_off:before { + content: "\e1da"; +} +.icon-storage:before { + content: "\e1db"; +} +.icon-attach_file:before { + content: "\e226"; +} +.icon-cloud_download:before { + content: "\e2c0"; +} +.icon-cloud_upload:before { + content: "\e2c3"; +} +.icon-cast:before { + content: "\e307"; +} +.icon-headset:before { + content: "\e310"; +} +.icon-headset_mic:before { + content: "\e311"; +} +.icon-keyboard_arrow_down:before { + content: "\e313"; +} +.icon-keyboard_arrow_left:before { + content: "\e314"; +} +.icon-keyboard_arrow_right:before { + content: "\e315"; +} +.icon-keyboard_arrow_up:before { + content: "\e316"; +} +.icon-laptop:before { + content: "\e31e"; +} +.icon-laptop_chromebook:before { + content: "\e31f"; +} +.icon-security:before { + content: "\e32a"; +} +.icon-tv:before { + content: "\e333"; +} +.icon-device_hub:before { + content: "\e335"; +} +.icon-audiotrack:before { + content: "\e3a1"; +} +.icon-camera2:before { + content: "\e3af"; +} +.icon-colorize:before { + content: "\e3b8"; +} +.icon-control_point:before { + content: "\e3ba"; +} +.icon-palette:before { + content: "\e40a"; +} +.icon-timer:before { + content: "\e425"; +} +.icon-beenhere:before { + content: "\e52d"; +} +.icon-local_airport:before { + content: "\e53d"; +} +.icon-local_offer:before { + content: "\e54e"; +} +.icon-local_parking:before { + content: "\e54f"; +} +.icon-local_taxi:before { + content: "\e559"; +} +.icon-arrow_back:before { + content: "\e5c4"; +} +.icon-arrow_forward:before { + content: "\e5c8"; +} +.icon-cancel:before { + content: "\e5c9"; +} +.icon-check:before { + content: "\e5ca"; +} +.icon-close:before { + content: "\e5cd"; +} +.icon-expand_less:before { + content: "\e5ce"; +} +.icon-expand_more:before { + content: "\e5cf"; +} +.icon-refresh:before { + content: "\e5d5"; +} +.icon-arrow_upward:before { + content: "\e5d8"; +} +.icon-arrow_downward:before { + content: "\e5db"; +} +.icon-sync:before { + content: "\e627"; +} +.icon-no_encryption:before { + content: "\e641"; +} +.icon-notifications:before { + content: "\e7f4"; +} +.icon-notifications_none:before { + content: "\e7f5"; +} +.icon-notifications_off:before { + content: "\e7f6"; +} +.icon-notifications_active:before { + content: "\e7f7"; +} +.icon-school:before { + content: "\e80c"; +} +.icon-share:before { + content: "\e80d"; +} +.icon-star:before { + content: "\e838"; +} +.icon-star_half:before { + content: "\e839"; +} +.icon-star_border:before { + content: "\e83a"; +} +.icon-add_shopping_cart:before { + content: "\e854"; +} +.icon-alarm_add:before { + content: "\e856"; +} +.icon-autorenew:before { + content: "\e863"; +} +.icon-build:before { + content: "\e869"; +} +.icon-cached:before { + content: "\e86a"; +} +.icon-chrome_reader_mode:before { + content: "\e86d"; +} +.icon-favorite:before { + content: "\e87d"; +} +.icon-favorite_border:before { + content: "\e87e"; +} +.icon-group_work:before { + content: "\e886"; +} +.icon-language:before { + content: "\e894"; +} +.icon-lock:before { + content: "\e897"; +} +.icon-power_settings_new:before { + content: "\e8ac"; +} +.icon-schedule:before { + content: "\e8b5"; +} +.icon-stars:before { + content: "\e8d0"; +} +.icon-turned_in:before { + content: "\e8e6"; +} +.icon-turned_in_not:before { + content: "\e8e7"; +} +.icon-verified_user:before { + content: "\e8e8"; +} +.icon-comments:before { + content: "\e900"; +} +.icon-chat2:before { + content: "\e901"; +} +.icon-commenting-o:before { + content: "\e902"; +} +.icon-commenting:before { + content: "\e903"; +} +.icon-comments-o:before { + content: "\e904"; +} +.icon-comment-o:before { + content: "\e905"; +} +.icon-rss-alt:before { + content: "\e906"; +} +.icon-call:before { + content: "\e907"; +} +.icon-collect:before { + content: "\e908"; +} +.icon-video-off:before { + content: "\e909"; +} +.icon-video:before { + content: "\e90a"; +} +.icon-document-alt-fill:before { + content: "\e90b"; +} +.icon-fiber_manual_record:before { + content: "\e90c"; +} +.icon-block:before { + content: "\e90d"; +} +.icon-grid:before { + content: "\e90e"; +} +.icon-camera:before { + content: "\e90f"; +} +.icon-indeterminate_check_box:before { + content: "\e910"; +} +.icon-explore:before { + content: "\e911"; +} +.icon-block2:before { + content: "\e912"; +} +.icon-cog:before { + content: "\e913"; +} +.icon-trash-o:before { + content: "\e914"; +} +.icon-copyright:before { + content: "\e915"; +} +.icon-locked:before { + content: "\e916"; +} +.icon-arrow-down-alt1:before { + content: "\e917"; +} +.icon-arrow-up-alt1:before { + content: "\e918"; +} +.icon-arrow-right-alt1:before { + content: "\e919"; +} +.icon-arrow-left-alt1:before { + content: "\e91a"; +} +.icon-reload1:before { + content: "\e91b"; +} +.icon-cw:before { + content: "\e91c"; +} +.icon-home2:before { + content: "\e91d"; +} +.icon-profile:before { + content: "\e91e"; +} +.icon-retweet:before { + content: "\e91f"; +} +.icon-chain-broken:before { + content: "\e920"; +} +.icon-chain:before { + content: "\e921"; +} +.icon-group:before { + content: "\e922"; +} +.icon-filter:before { + content: "\e923"; +} +.icon-file-empty:before { + content: "\e924"; +} +.icon-files-empty:before { + content: "\e925"; +} +.icon-file-text2:before { + content: "\e926"; +} +.icon-thumbs-o-down:before { + content: "\e927"; +} +.icon-thumbs-o-up:before { + content: "\e928"; +} +.icon-thumbs-down:before { + content: "\e929"; +} +.icon-thumbs-up:before { + content: "\e92a"; +} +.icon-cogs:before { + content: "\e92b"; +} +.icon-chevron-right:before { + content: "\e92c"; +} +.icon-chevron-left:before { + content: "\e92d"; +} +.icon-chevron-down:before { + content: "\e92e"; +} +.icon-folder:before { + content: "\e92f"; +} +.icon-folder-open:before { + content: "\e930"; +} +.icon-chevron-up:before { + content: "\e931"; +} +.icon-step-forward:before { + content: "\e932"; +} +.icon-step-backward:before { + content: "\e933"; +} +.icon-book:before { + content: "\e934"; +} +.icon-tags:before { + content: "\e935"; +} +.icon-signal:before { + content: "\e936"; +} +.icon-user-o:before { + content: "\e937"; +} +.icon-user-circle-o:before { + content: "\e938"; +} +.icon-user-circle:before { + content: "\e939"; +} +.icon-user-plus:before { + content: "\e93a"; +} +.icon-user:before { + content: "\e93b"; +} +.icon-print:before { + content: "\e93c"; +} +.icon-filter2:before { + content: "\e93d"; +} +.icon-eye-off:before { + content: "\e93e"; +} +.icon-eye:before { + content: "\e93f"; +} +.icon-home:before { + content: "\e940"; +} +.icon-trash-2:before { + content: "\e941"; +} +.icon-trash:before { + content: "\e942"; +} +.icon-edit-2:before { + content: "\e943"; +} +.icon-search:before { + content: "\e944"; +} +.icon-zoom-out:before { + content: "\e945"; +} +.icon-zoom-in:before { + content: "\e946"; +} +.icon-update:before { + content: "\e947"; +} +.icon-forward:before { + content: "\e948"; +} +.icon-warning:before { + content: "\e949"; +} +.icon-save-disk:before { + content: "\e94a"; +} +.icon-floppy-o:before { + content: "\e94b"; +} +.icon-caret-right:before { + content: "\e94c"; +} +.icon-caret-left:before { + content: "\e94d"; +} +.icon-caret-up:before { + content: "\e94e"; +} +.icon-caret-down:before { + content: "\e94f"; +} +.icon-magic:before { + content: "\e950"; +} +.icon-recycle:before { + content: "\e951"; +} +.icon-paper-plane-o:before { + content: "\e952"; +} +.icon-calendar:before { + content: "\e953"; +} +.icon-paper-plane:before { + content: "\e954"; +} +.icon-flag:before { + content: "\e955"; +} +.icon-barbell:before { + content: "\e956"; +} +.icon-atom:before { + content: "\e957"; +} +.icon-sun:before { + content: "\e958"; +} +.icon-fingerprint:before { + content: "\e959"; +} +.icon-chevron-small-up:before { + content: "\e95a"; +} +.icon-flow-branch:before { + content: "\e95b"; +} +.icon-layers:before { + content: "\e95c"; +} +.icon-adjust:before { + content: "\e95d"; +} +.icon-air:before { + content: "\e95e"; +} +.icon-circular-graph:before { + content: "\e95f"; +} +.icon-compass:before { + content: "\e960"; +} +.icon-drop:before { + content: "\e961"; +} +.icon-email3:before { + content: "\e962"; +} +.icon-log-out:before { + content: "\e963"; +} +.icon-stopwatch:before { + content: "\e964"; +} +.icon-chart-pie:before { + content: "\e965"; +} +.icon-chart-bar:before { + content: "\e966"; +} +.icon-chart:before { + content: "\e967"; +} +.icon-film2:before { + content: "\e968"; +} +.icon-mail2:before { + content: "\e969"; +} +.icon-image:before { + content: "\e96a"; +} +.icon-images:before { + content: "\e96b"; +} +.icon-film:before { + content: "\e96c"; +} +.icon-stats:before { + content: "\e96d"; +} +.icon-stats2:before { + content: "\e96e"; +} +.icon-envelope:before { + content: "\e96f"; +} +.icon-moon-o:before { + content: "\e970"; +} +.icon-line-chart:before { + content: "\e971"; +} +.icon-area-chart:before { + content: "\e972"; +} +.icon-bar-chart:before { + content: "\e973"; +} +.icon-wechat:before { + content: "\e974"; +} +.icon-qq:before { + content: "\e975"; +} +.icon-gavel:before { + content: "\e976"; +} +.icon-remove_shopping_cart:before { + content: "\e977"; +} +.icon-spinner11:before { + content: "\e984"; +} +.icon-key:before { + content: "\e98d"; +} +.icon-equalizer:before { + content: "\e992"; +} +.icon-cog2:before { + content: "\e994"; +} +.icon-cogs2:before { + content: "\e995"; +} +.icon-pie-chart:before { + content: "\e99a"; +} +.icon-stats-dots:before { + content: "\e99b"; +} +.icon-stats-bars:before { + content: "\e99c"; +} +.icon-stats-bars2:before { + content: "\e99d"; +} +.icon-fire:before { + content: "\e9a9"; +} +.icon-earth:before { + content: "\e9ca"; +} +.icon-checkmark2:before { + content: "\ea10"; +} +.icon-volume-high:before { + content: "\ea26"; +} +.icon-volume-medium:before { + content: "\ea27"; +} +.icon-volume-low:before { + content: "\ea28"; +} +.icon-volume-mute:before { + content: "\ea29"; +} +.icon-volume-mute2:before { + content: "\ea2a"; +} +.icon-volume-increase:before { + content: "\ea2b"; +} +.icon-volume-decrease:before { + content: "\ea2c"; +} +.icon-google-drive:before { + content: "\ea8f"; +} +.icon-libreoffice:before { + content: "\eae3"; +} +.icon-check2:before { + content: "\f00c"; +} +.icon-close2:before { + content: "\f00d"; +} +.icon-lock2:before { + content: "\f023"; +} +.icon-plus:before { + content: "\f067"; +} +.icon-minus1:before { + content: "\f068"; +} +.icon-chevron-circle-left:before { + content: "\f137"; +} +.icon-chevron-circle-right:before { + content: "\f138"; +} +.icon-chevron-circle-up:before { + content: "\f139"; +} +.icon-chevron-circle-down:before { + content: "\f13a"; +} diff --git a/src/main/resources/static/javaex/m/css/skin/tina.css b/src/main/resources/static/javaex/m/css/skin/tina.css new file mode 100644 index 0000000000000000000000000000000000000000..9e673e58f618d9b651c439abc6db2ffae99f179c --- /dev/null +++ b/src/main/resources/static/javaex/m/css/skin/tina.css @@ -0,0 +1,262 @@ +@charset "utf-8"; +/*皮肤:缇娜*/ +/*弹出层*/ +.dialog { + background-color: #fff; +} +.dialog .dialog-content { + color: #333; +} +.dialog .dialog-button-container { + border-top: 1px solid #ebedf0; +} +.dialog .dialog-button { + background: #F3F3F3; +} +.dialog .confirm { + color: #444; +} +.tip-content { + background-color: rgba(0,0,0,.8); + border-radius: 8px; color: #fff; +} +.popup { + color: #333; +} +.popup .dialog-title { + color: #333; + background: #F3F3F3; + font-size: 0.44rem; +} +.popup .operation { + background: #fff; +} +.popup .button-cancel { + color: #666; + background: #fff; + border-top:1px solid #eee; +} +.loading { + background: rgba(40,40,40,0.7); + border-radius: 5px; + color: #FFFFFF; +} +.vertical li { + border-bottom: 1px solid #e5e5e5; +} +.vertical li:last-child { + border-bottom: none; +} + +/*主体内容结构*/ +.block { + background-color: #fff; +} +.block .divider { + border-top: 1px solid #eee; +} +.banner { + border-bottom: 1px solid #eee; +} +.banner .subtitle { + color: #888; +} +.subtitle a { + color: #999; +} + +/*表单*/ +.subtitle { + color: #888; +} +.unit .right input { + color: #666; + text-align: right; +} +textarea.desc { + color: #666; +} + +/*单选框和复选框*/ +/*普通填充样式*/ +input[type="radio"].fill ~ .fill-css { + border: 1px solid #c0c0c0; + background-color: #c0c0c0; +} +input[type="checkbox"].fill ~ .fill-css { + border: 1px solid #c0c0c0; +} +input[type="radio"].fill:disabled ~ .fill-css { + border: 1px solid #ddd; + background-color: #ddd; +} +input[type="checkbox"].fill:disabled ~ .fill-css { + border: 1px solid #ccc; +} +input[type="radio"].fill:checked ~ .fill-css, input[type="checkbox"].fill:checked ~ .fill-css { + border: 1px solid #2196f3; + background-color: #2196f3; +} + +input[type="radio"].fill:checked[disabled] ~ .fill-css, input[type="checkbox"].fill:checked[disabled] ~ .fill-css { + border: 1px solid #c9e2f9; + background-color: #c9e2f9; +} +/*开关样式复选框*/ +.switch { + background-color: #999; +} +.switch:checked { + border-color: #3a9bd9; + background-color: #3a9bd9; + box-shadow: #3a9bd9 0 0 0 16px inset; +} + +/*底部固定*/ +.footer-ul { + background-color: #fff; +} +.footer-ul .active { + color: #12b7f5; +} +.footer-ul ul { + color: #666; +} +.footer-div { + background-color: #fff; +} +.footer-div ul { + color: #666; +} +.footer-div > div > div { + border-right: 1px solid #ebebeb; +} + +/*底部弹出菜单*/ +.javaex-menu .sub-menu { + box-shadow: 0 6px 24px rgba(0, 0, 0, .24); +} +.javaex-menu .sub-menu li { + background:#fff; + border-top:1px solid #f2f2f2; +} +.javaex-menu .sub-menu li a { + background:#fff; +} +.javaex-menu .menu-flag { + border: 5px solid transparent; + border-right: 5px solid #333; + border-bottom: 5px solid #333; + opacity: .5; +} + +/*顶部*/ +.header { + background: #12b7f5 !important; + color: #FFF; +} +.header > .left { + left: 0px; + color: #fff; + width: 1.2rem; +} +.header > .right { + right: 0px; + color: #fff; + width: 1.2rem; +} + + +/*侧栏*/ +#slide-nav { + background: #fff; +} + +/*下拉导航菜单*/ +#guide-nav ul { + background: #fff; + border-image: url(../../images/border.png) 2 2 repeat; + -webkit-border-image: url(../../images/border.png) 2 2 repeat; +} +#guide-nav ul li.active { + background-color: #ff851b; +} +#guide-nav ul li.active a { + color: #fff; +} +#guide-nav ul.active .more span { + color: #ff851b; +} + +/*滚动公告*/ +.big-title { + background: #fa4e46; + color: #fff; +} + +/*屏幕预加载*/ +.loading-screen { + background: url(../../images/loading_screen.gif) no-repeat center; + background-size: 80%; +} + +/*上滑加载(分页)*/ +.infinite-scroll-preloader .load-data { + background: url(../../images/loading.gif); + width: 2.5rem; + height: .8rem; + background-size: 2.5rem auto; +} +.infinite-scroll-preloader .no-data { + color: #666; + background-color: #fff; + border-top: 1px solid #eee; +} + +/*tab选项卡切换*/ +.tab-title { + background: #fff; +} +.tab-title li { + color: #666666; +} +.tab-title li.current { + color: #2fb3ff; +} +.tab-title .border { + bottom: -1px; + left: 0; + height: 4px; + background: #2fb3ff; +} +.tab-container{ + background: #fff; + min-height: 500px; +} +.tab-bar li.current { + color: #2fb3ff; + border-left-color: #2fb3ff; + background: #fff; +} + +/*超出屏幕的tab滑动*/ +.tabbar { + background-color: white; + border-bottom: 1px solid #f3f3f3; +} +.tabbar>a.activate::after { + background-color: #61A8FF; +} + +/*下拉选择框*/ +.search-input { + background-color: #f7f7f8; +} +.search-input input { + color: #3d4145; + background-color: #fff; + border: 1px solid #b4b4b4; +} +.search-input .icon { + color: #b4b4b4; +} diff --git a/src/main/resources/static/javaex/m/images/border.png b/src/main/resources/static/javaex/m/images/border.png new file mode 100644 index 0000000000000000000000000000000000000000..7c7e5d31a3a84c23b811e7afa2b48da11ca74da9 Binary files /dev/null and b/src/main/resources/static/javaex/m/images/border.png differ diff --git a/src/main/resources/static/javaex/m/images/link-arrow.png b/src/main/resources/static/javaex/m/images/link-arrow.png new file mode 100644 index 0000000000000000000000000000000000000000..2d9d44e364711aa9c659a9742218808fe0c4cfa8 Binary files /dev/null and b/src/main/resources/static/javaex/m/images/link-arrow.png differ diff --git a/src/main/resources/static/javaex/m/images/loading.gif b/src/main/resources/static/javaex/m/images/loading.gif new file mode 100644 index 0000000000000000000000000000000000000000..e371786d1ec3a3759ab3541454b0dbd6693a9d02 Binary files /dev/null and b/src/main/resources/static/javaex/m/images/loading.gif differ diff --git a/src/main/resources/static/javaex/m/images/loading.png b/src/main/resources/static/javaex/m/images/loading.png new file mode 100644 index 0000000000000000000000000000000000000000..20cc60c7ec34803f8358a557f5055dc5ebf92935 Binary files /dev/null and b/src/main/resources/static/javaex/m/images/loading.png differ diff --git a/src/main/resources/static/javaex/m/images/loading_screen.gif b/src/main/resources/static/javaex/m/images/loading_screen.gif new file mode 100644 index 0000000000000000000000000000000000000000..840d39f8b9c8cd4fb00e4928c040db71a9441545 Binary files /dev/null and b/src/main/resources/static/javaex/m/images/loading_screen.gif differ diff --git a/src/main/resources/static/javaex/m/images/logo.png b/src/main/resources/static/javaex/m/images/logo.png new file mode 100644 index 0000000000000000000000000000000000000000..ba26fd40273210dbb1b46c0c5ce1da4a680d655b Binary files /dev/null and b/src/main/resources/static/javaex/m/images/logo.png differ diff --git a/src/main/resources/static/javaex/m/images/more.png b/src/main/resources/static/javaex/m/images/more.png new file mode 100644 index 0000000000000000000000000000000000000000..6aa49386a338823742cabf02e95704cbf2b71af8 Binary files /dev/null and b/src/main/resources/static/javaex/m/images/more.png differ diff --git a/src/main/resources/static/javaex/m/js/common.js b/src/main/resources/static/javaex/m/js/common.js new file mode 100644 index 0000000000000000000000000000000000000000..81d356ca04093d17c2f48080c16b9164ee44ed88 --- /dev/null +++ b/src/main/resources/static/javaex/m/js/common.js @@ -0,0 +1,157 @@ +/** + * 作者:陈霓清 + * 官网:http://www.javaex.cn + */ +$(function() { + // 栅格系统 + $('[class^="grid-"]').each(function() { + // 判断含有多少个属性 + var classArr = $(this).attr("class").split(" "); + for (var i=0; i=0) { + // 获取栅格布局 + var arr = classArr[i].split("-"); + // 计算一共需要分成多少份 + var sum = 0; + for (var j in arr) { + if (j>0) { + sum = parseInt(sum) + parseInt(arr[j]); + } + } + // 为子级div设置宽度 + $(this).children("div").each(function(k) { + $(this).css("width", (100/sum) * arr[k+1] + "%"); + }); + } else if (classArr[i].indexOf("spacing-")>=0) { + // 获取栅格间距 + var spacing = classArr[i].split("-")[1]; + + // 为子级div设置间距 + var width = "calc(100% + "+parseInt(spacing)+"px)"; + $(this).css("width", width); + $(this).children("div").each(function(k) { + $(this).css("margin-right", parseInt(spacing) + "px"); + }); + } + } + }); + + // 等分系统 + $('[class^="equal-"]').each(function() { + // 判断含有多少个属性 + var classArr = $(this).attr("class").split(" "); + for (var i=0; i=0) { + // 获取等分布局的等分数 + var num = classArr[i].split("-")[1]; + // 为子级li设置宽度 + $(this).children("li").css("width", (100/num) + "%"); + break; + } + } + }); + + // 遍历含有指定类的单选框和复选框 + $(":radio, :checkbox").each(function() { + // 填充样式 + if ($(this).hasClass("fill")) { + // 判断用户是否自己包裹了一层LABEL + if ($(this).parent()[0].tagName=="LABEL") { + $(this).parent().addClass("fill-label"); + // 先获取input之后的文本,保存起来 + var text = $(this)[0].nextSibling.nodeValue; + // 清空input之后的文本 + $(this)[0].nextSibling.nodeValue = ""; + } else { + // 先获取input之后的文本,保存起来 + var text = $(this)[0].nextSibling.nodeValue; + // 清空input之后的文本 + $(this)[0].nextSibling.nodeValue = ""; + // 为input创建父节点 + $(this).wrap(''); + } + + if (!!text) { + // 重新追加之前保存的input之后的文本 + text = text.replace(/(\s*$)/g, ""); + if (text.length==0) { + $(this).parent().append(''); + } else { + $(this).parent().append('' + text + ''); + } + } + // 判断是否已存在span标签 + if ($(this).siblings().length==1) { + $(this).after(''); + } + } else if ($(this).hasClass("svg")) { + // svg动画样式 + var oSvg = document.getElementById("boxGradient"); + if (oSvg==null) { + var svgHtml = ''; + svgHtml += ''; + svgHtml += ''; + svgHtml += ''; + svgHtml += ''; + svgHtml += ''; + svgHtml += ''; + svgHtml += ''; + svgHtml += ''; + svgHtml += ''; + svgHtml += ''; + svgHtml += ''; + svgHtml += ''; + svgHtml += ''; + svgHtml += ''; + svgHtml += ''; + $(document.body).append(svgHtml); + } + var text = ""; + if ($(this).parent()[0].tagName=="LABEL") { + $(this).parent().addClass("todo"); + text = $(this)[0].nextSibling.nodeValue; + $(this)[0].nextSibling.nodeValue = ""; + } else { + text = $(this)[0].nextSibling.nodeValue; + $(this)[0].nextSibling.nodeValue = ""; + $(this).wrap(''); + } + var html = ''; + html += ''; + if (this.type=="radio") { + html += ''; + html += ''; + html += ''; + } else { + html += ''; + html += ''; + html += ''; + } + html += ''; + $(this).after(html); + if (text!="" && text!=null) { + // 判断是否已存在div + if ($(this).next().next().length==0) { + $(this).parent().append('
'+text.replace(/(\s*$)/g, "")+'
'); + } + } + } + }); + + // 弹出底部菜单 + $(".javaex-menu").click(function() { + // 如果当前菜单为激活状态 + if ($(this).hasClass("activate")) { + // 则隐藏其子菜单 + $(this).children(".sub-menu").hide(); + $(".javaex-menu").removeClass("activate"); + } else { + // 否则的话,先关闭其他兄弟菜单的子菜单 + $(".javaex-menu").removeClass("activate"); + $(".javaex-menu").children(".sub-menu").slideUp("fast"); + // 再激活当前菜单 + $(this).addClass("activate"); + $(this).children(".sub-menu").slideDown("fast"); + } + }); +}); diff --git a/src/main/resources/static/javaex/m/js/flexible.js b/src/main/resources/static/javaex/m/js/flexible.js new file mode 100644 index 0000000000000000000000000000000000000000..c71ada7677a5622594d526e6175a99090ad3041b --- /dev/null +++ b/src/main/resources/static/javaex/m/js/flexible.js @@ -0,0 +1,80 @@ +;(function(win) { + var remCalc = {}; + var docEl = win.document.documentElement, + tid; + + function refreshRem() { + // 获取当前窗口的宽度 + var width = docEl.getBoundingClientRect().width; + // 大于640px 按640算 + if (width>640) { + width = 640; + } + // 把窗口的宽度固定分为10份 也就是10rem + // 按视觉稿640算 640/10=64px 那么1rem = 64px + // 640视觉中 80px*80px的按钮 转换为rem 80/64 = 1.25rem + // 按钮的宽高固定为 1.25rem * 1.25rem + // 当窗口宽度缩放为 320px的时候 + // 那么 1rem = 32px + // 原来 80px*80px的按钮现在变为 1.25rem * 32px = 40px + // 按钮变为 40px * 40px + // 其他宽度也类似 + // + // cms做法也类似 + // 只是我们把窗口宽度固定分为 6.4份,即6.4rem + // 所以 1rem = 100px + // 640视觉中 80px*80px的按钮 转换为rem 80/100 = 0.8rem + // ....其他也差不多 + // + // + // 对比 + // 其实也就是计算rem的问题 视觉稿量出来的值 除64 或 100的问题 + // 除100 总比 除64 好口算 + // 就算用sass写个 @function px2rem代替口算 + // .8rem 总比输入 px2rem(80)少几个字符 + var rem = width / 10; // cms 只要把这行改成 var rem = width / 640 * 100 + docEl.style.fontSize = rem + "px"; + remCalc.rem = rem; + // 误差、兼容性处理 + var actualSize = parseFloat(window.getComputedStyle(document.documentElement)["font-size"]); + if (actualSize !== rem && actualSize > 0 && Math.abs(actualSize - rem) > 1) { + var remScaled = rem * rem / actualSize; + docEl.style.fontSize = remScaled + "px"; + } + } + + // 函数节流,避免频繁更新 + function dbcRefresh() { + clearTimeout(tid); + tid = setTimeout(refreshRem, 100); + } + + // 窗口更新动态改变font-size + win.addEventListener("resize", function() { + dbcRefresh(); + }, false); + + // 页面显示的时候再计算一次,难道切换窗口之后再切换来窗口大小会变? + win.addEventListener("pageshow", function(e) { + if (e.persisted) { + dbcRefresh(); + } + }, false); + refreshRem(); + remCalc.refreshRem = refreshRem; + remCalc.rem2px = function(d) { + var val = parseFloat(d) * this.rem; + if (typeof d=="string" && d.match(/rem$/)) { + val += "px"; + } + return val; + }; + remCalc.px2rem = function(d) { + var val = parseFloat(d) / this.rem; + if (typeof d=="string" && d.match(/px$/)) { + val += "rem"; + } + return val; + }; + win.remCalc = remCalc; +})(window); \ No newline at end of file diff --git a/src/main/resources/static/javaex/m/js/javaex-formVerify.js b/src/main/resources/static/javaex/m/js/javaex-formVerify.js new file mode 100644 index 0000000000000000000000000000000000000000..377e9225e70fc840eeeba0497fe831ec815a00f5 --- /dev/null +++ b/src/main/resources/static/javaex/m/js/javaex-formVerify.js @@ -0,0 +1,122 @@ +/** + * 作者:陈霓清 + * 官网:http://www.javaex.cn + */ +// 自定义验证类型 必填项:页面中直接写 data-type="必填" 即可,不需要为其定义正则表达式 +var regJson = { + "金额" : "/(^[1-9]([0-9]+)?(\.[0-9]{1,2})?$)|(^(0){1}$)|(^[0-9]\.[0-9]([0-9])?$)/", // 0 + 正整数 + 最多2位小数(正数) + "整数" : "/^-?\\d+$/", + "正整数" : "/^[0-9]*[1-9][0-9]*$/", + "负整数" : "/^-[0-9]*[1-9][0-9]*$/", + "非负整数" : "/^\\d+$/", // 正整数 + 0 + "非正整数" : "/^((-\\d+)|(0+))$/", // 负整数 + 0 + "正小数" : "/^(([0-9]+\\.[0-9]*[1-9][0-9]*)|([0-9]*[1-9][0-9]*\\.[0-9]+)|([0-9]*[1-9][0-9]*))$/", + "负小数" : "/^(-(([0-9]+\\.[0-9]*[1-9][0-9]*)|([0-9]*[1-9][0-9]*\\.[0-9]+)|([0-9]*[1-9][0-9]*)))$/", + "非负小数" : "/^\\d+(\\.\\d+)?$/", // 0 + 正小数 + "非正小数" : "/^((-\\d+(\\.\\d+)?)|(0+(\\.0+)?))$/", // 0 + 负小数 + "邮箱" : "/^([a-zA-Z0-9]+[_|\_|\.]?)*[a-zA-Z0-9]+@([a-zA-Z0-9]+[_|\_|\.]?)*[a-zA-Z0-9]+\.[a-zA-Z]{2,3}$/", + "手机号" : "/^(1)\\d{10}$/", + "身份证号" : "/(^\\d{15}$)|(^\\d{18}$)|(^\\d{17}(\\d|X|x)$)/", + "中文" : "/^[\u4e00-\u9fa5]+$/", + "英文字母" : "/^[a-zA-Z]+$/", + "英文字母或数字" : "/^[0-9a-zA-Z]+$/", + "QQ" : "/^[1-9][0-9]{4,9}$/", + "车牌号" : "/^[京津沪渝冀豫云辽黑湘皖鲁新苏浙赣鄂桂甘晋蒙陕吉闽贵粤青藏川宁琼使领A-Z]{1}[A-Z]{1}[A-Z0-9]{4}[A-Z0-9挂学警港澳]{1}$/", + "登录名" : "/^[a-zA-Z]{1}([a-zA-Z0-9]){4,9}$/", // 只能输入5-10个以字母开头,可带数字的字符串 + "密码" : "/^[a-zA-Z0-9]{6,16}$/", // 6到16位字母或数字或它们的组合 + "密码强" : "/^(?=.*[a-zA-Z])(?=.*[0-9])(?=.*[!@#$%^~&*]).*$/" // 字符+数字+特殊字符组合,长度需要自己判断 +}; + +/** + * javaex表单验证插件入口 + */ +function javaexVerify() { + var result = false; + // 遍历当前页面所有input元素 + $("input, textarea, select").each(function() { + var dataTypeAll = $(this).attr("data-type"); + // 判断该输入框是否需要进行验证 + if (!!dataTypeAll) { + result = formVerify($(this), dataTypeAll); + if (!result) { + return result; + } + } + }); + + return result; +} + +/** + * 正则表达式验证函数 + * obj : jquery对象 + * dataTypeAll : 需要验证哪些类型(集合) + */ +function formVerify(obj, dataTypeAll) { + // 判断内容去除左右两边空格后是否为空 + if ($.trim(obj.val()).length==0) { + var errorMsg = "不能为空"; + // 获取标签内容 + var label = obj.attr("error-label"); + if (!!label) { + errorMsg = label + ":" + errorMsg; + } + // 添加错误状态 + addErrorMsg(errorMsg); + return false; + } + + // 判断验证类型是否是 必填 + if (dataTypeAll.indexOf("必填")>=0) { + return true; + } + + // 遍历这些验证类型并验证 + var dataTypeArr = dataTypeAll.split("|"); + var regArr = new Array(); + for (var i=0; i0) { + // 定义一个标识,默认验证失败 + var flag = false; + for (var i=0; i ", // 加载提示 + noData : "
没有更多内容了,亲~
", // 没有更多内容了提示 + + // tab选项卡切换 + hasUnderline : true, // 选中项是否含有下划线 + current : 1, // 默认显示第几个标签,从1开始计 + + // 日期选择属性 + date : "" // 默认显示哪一天 + }; + return $.extend(defaults, args); + } + + var info = { + // 生成一个不重复的id + getUUID : function() { + return Date.now().toString(36) + Math.random().toString(36).substr(3, 3); + }, + + /* + * 修改时间显示 + * time : 传入的时间,格式yyyy-MM-dd HH:mm:ss + */ + changeTimeText : function(time) { + var timeText = time; + var now = info.getTime(); + var day = info.getTimeDiff(time, now, "day"); + if (day>6) { + // 直接显示返回的时间,不改变 + } else if (day>0) { + // 修改为几天前 + if (day==1) { + timeText = "昨天 " + time.split(" ")[1]; + } else if (day==2) { + timeText = "前天 " + time.split(" ")[1]; + } else { + timeText = day + " 天前"; + } + } else if (day==0) { + var hour = info.getTimeDiff(time, now, "hour"); + if (hour>0) { + timeText = hour+" 小时前"; + } else if (hour==0) { + var minute = info.getTimeDiff(time, now, "minute"); + if (minute>0) { + timeText = minute+" 分钟前"; + } else if (minute==0) { + var second = info.getTimeDiff(time, now, "second"); + timeText = second+" 秒前"; + } + } + } + + return timeText; + }, + + /* + * 修改时间显示 + * selector : jquery选择器,例如 ".change-time" + */ + changeTimeTexts : function(selector) { + // 当前系统时间 + var now = info.getTime(); + // 修改时间显示 + $(selector).each(function() { + var day = info.getTimeDiff($(this).text(), now, "day"); + if (day>6) { + // 直接显示返回的时间,不改变 + } else if (day>0) { + // 修改为几天前 + if (day==1) { + $(this).text("昨天 " + $(this).text().split(" ")[1]); + } else if (day==2) { + $(this).text("前天 " + $(this).text().split(" ")[1]); + } else { + $(this).text(day + " 天前"); + } + } else if (day==0) { + var hour = info.getTimeDiff($(this).text(), now, "hour"); + if (hour>0) { + $(this).text(hour+" 小时前"); + $(this).addClass("highlight-color"); + } else if (hour==0) { + var minute = info.getTimeDiff($(this).text(), now, "minute"); + if (minute>0) { + $(this).text(minute+" 分钟前"); + $(this).addClass("highlight-color"); + } else if (minute==0) { + var second = info.getTimeDiff($(this).text(), now, "second"); + $(this).text(second+" 秒前"); + $(this).addClass("highlight-color"); + } + } + } + }); + }, + + // 伪单选 + fakeRadio : function(args) { + var settings = defaults(args); + var name = settings.name; + var uncheckClass = settings.uncheckClass; + var checkedClass = settings.checkedClass; + + $(':radio[name="'+name+'"]').each(function() { + if ($(this).is(":checked")) { + $(this).closest("label").addClass(checkedClass); + if (settings.isInit) { + settings.callback({ + "val" : $(this).val() + }); + } + } else { + $(this).closest("label").addClass(uncheckClass); + } + }); + + $(':radio[name="'+name+'"]').change(function() { + $(':radio[name="'+name+'"]').each(function() { + $(this).closest("label").removeClass(checkedClass).addClass(uncheckClass); + }); + $(this).closest("label").removeClass(uncheckClass).addClass(checkedClass); + settings.callback({ + "val" : $(this).val() + }); + }); + }, + + // 伪多选 + fakeCheckbox : function(args) { + var settings = defaults(args); + var name = settings.name; + var uncheckClass = settings.uncheckClass; + var checkedClass = settings.checkedClass; + + $(':checkbox[name="'+name+'"]').each(function() { + if ($(this).is(":checked")) { + $(this).parent("label").addClass(checkedClass); + if (settings.isInit) { + settings.callback({ + "val" : $(this).val() + }); + } + } else { + $(this).parent("label").addClass(uncheckClass); + } + }); + + $(':checkbox[name="'+name+'"]').change(function() { + if ($(this).is(":checked")) { + $(this).closest("label").removeClass(uncheckClass).addClass(checkedClass); + } else { + $(this).closest("label").removeClass(checkedClass).addClass(uncheckClass); + } + }); + }, + + // 倒计时获取验证码 + timerId : null, + code : function(args) { + var settings = defaults(args); + var id = settings.id; + var second = parseInt(settings.second); + if (settings.type=="reset") { + // 解禁 + clearInterval(info.timerId); + $("#"+id).css({ + "pointer-events" : "unset", + "color" : settings.color, + "background-color" : settings.backgroundColor + }); + $("#"+id).text(settings.text); + second = parseInt(settings.second); + } else { + setTimer(); + + function setTimer() { + // 设置禁用 + $("#"+id).css({ + "pointer-events" : "none", + "color" : settings.downColor, + "background-color" : settings.downBackgroundColor + }); + // 启动定时器 + // 实时刷新时间单位为毫秒 + info.timerId = setInterval(function() { + second = second - 1; + if (second>0) { + $("#"+id).text(second + "秒后重试"); + } else { + // 解禁 + clearInterval(info.timerId); + $("#"+id).css({ + "pointer-events" : "unset", + "color" : settings.color, + "background-color" : settings.backgroundColor + }); + $("#"+id).text(settings.text); + second = parseInt(settings.second); + } + }, 1000); + } + } + }, + + // 返回顶部 + goTopBtn : function(args) { + var settings = defaults(args); + var id = settings.id; + + $("#"+id).css("display", "none"); + + // 回到顶部 + $("#"+id).click(function() { + $("body, html").animate({scrollTop:0}, 500); + }); + + $(window).scroll(function() { + var sc = $(window).scrollTop(); + if (sc>300) { + $("#"+id).css("display", "block"); + } else { + $("#"+id).css("display", "none"); + } + }); + }, + + // 幻灯片 + slide : function(args) { + var settings = defaults(args); + var id = settings.id; + // 是否自动轮播 + var isAutoPlay = settings.isAutoPlay; + // 开始切换的位置(即从第几张图开始切换),从1开始计 + var startSlide = parseInt(settings.startSlide); + var index = startSlide-1; + + var diffLeftX = 0; + + var slide = document.getElementById(id); + var focusBg = document.querySelector("#"+id+" .focus-bg"); + var imgLi = document.querySelectorAll("#"+id+" .focus-bg li"); + var imgLiWidth = focusBg.offsetWidth; + + // 设置幻灯片容器的高度 + slide.style.height = imgLi[0].offsetHeight + "px"; + // 设置大图容器的宽度百分比 + focusBg.style.width = imgLi.length*100 + "%"; + // 设置每一张图片所占的百分比 + for (var i=0; i0) { + $slide.find(".focus-title li").each(function(i) { + if (i==index) { + $(this).show(); + } else { + $(this).hide(); + } + }); + } + + // 焦点是否自动居中 + if (settings.focusCenter) { + var box = $slide.find(".focus-box"); + box.css("margin-left", -(box.width()/2)+"px"); + } + + // 默认高亮的焦点 + if ($slide.find(".focus-box").length>0) { + // 如果缺省焦点,则自动补充 + if ($slide.find(".focus-box ul").length==0) { + var html = '
    '; + for (var i=0; i= (count-1)) { + index = 0; + } else { + index++; + } + change.call(slide, index, old); + }); + + // 点击上一张 + $slide.find(".slide-prev").on("click", function() { + var old = index; + if (index <= 0) { + index = count - 1; + } else { + index--; + } + change.call(slide, index, old); + }); + + // 自动轮播 + autoPlay(); + + /** + * 自动轮播 + */ + function autoPlay() { + if (isAutoPlay) { + time = setInterval(function() { + var old = index; + if (index >= (count-1)) { + index = 0; + } else { + index++; + } + change.call(slide, index, old); + }, + delay); + } + } + + function change(show, hide) { + diffLeftX = -show*slide.offsetWidth; + // 背景大图 + var leftX = -show*slide.offsetWidth + "px"; + $("#"+id+" .focus-bg").css("transition", "all .5s"); + $("#"+id+" .focus-bg").css("transform", "translate("+leftX+", 0)"); + // 标题 + $slide.find(".focus-title li").eq(hide).hide(); + $slide.find(".focus-title li").eq(show).show(); + // 焦点 + $slide.find(".focus-box li").removeClass("on"); + $slide.find(".focus-box li").eq(show).addClass("on"); + + // 触发图片懒加载 + var $self = $slide.find(".focus-bg li").eq(show).find("img"); + if ($self.length==0) { + $self = $slide.find(".focus-bg li").eq(show).find("a"); + } + var original = $self.attr(settings.dataOriginal); + if (!!original) { + if ($self.is("img")) { + $self.attr("src", original); + } else { + $self.css("background-image", "url('" + original + "')"); + } + $self.removeAttr(settings.dataOriginal); + } + + // 回调函数 + settings.callback({ + "index": show + }); + } + + // 初始化手指坐标点 + var startPointX = 0; + var startEle = 0; + //手指按下 + slide.addEventListener("touchstart", function(e) { + if (isAutoPlay) { + clearInterval(time); + } + startPointX = e.changedTouches[0].pageX; + startEle = diffLeftX; + }); + //手指滑动 + slide.addEventListener("touchmove", function(e) { + if (isAutoPlay) { + clearInterval(time); + } + e.preventDefault(); + var curPointX = e.changedTouches[0].pageX; + var diffX = curPointX - startPointX; + var left = startEle + diffX; + diffLeftX = left; + + var leftX = left + "px"; + $("#"+id+" .focus-bg").css("transition", "all .5s"); + $("#"+id+" .focus-bg").css("transform", "translate("+leftX+", 0)"); + }); + //当手指抬起的时候,判断图片滚动离左右的距离 + slide.addEventListener("touchend", function(e) { + if (isAutoPlay) { + autoPlay(); + } + + var left = diffLeftX; + // 判断正在滚动的图片距离左右图片的远近,以及是否为最后一张或者第一张 + var curNum = Math.round(-left/imgLiWidth); + curNum = curNum>=(imgLi.length-1) ? imgLi.length-1 : curNum; + curNum = curNum<=0 ? 0 : curNum; + + var old = index; + + if (index==curNum) { + change.call(slide, index, index); + } else { + if (index= (count-1)) { + index = 0; + } else { + index++; + } + } else { + if (index <= 0) { + index = count - 1; + } else { + index--; + } + } + + change.call(slide, index, old); + } + }); + + + }, + + // 超出屏幕的tab滑动 + tabbar : function(args) { + var settings = defaults(args); + var tabId = settings.id; + + $("#"+tabId+">a").click(function() { + $(this).addClass("activate").siblings().removeClass("activate"); + }); + }, + + // 图片懒加载 + lazyload : function(args) { + var settings = defaults(args); + var selector = settings.selector; + var elements = $(selector); + var effect = settings.effect; + if (!effect) { + effect = "fadeIn"; + } + + // 强制初始检查图像是否应显示 + $(document).ready(function() { + $(settings.container).trigger(settings.event); + checkImage(); + }); + // 窗口调整大小时重新检查 + $(window).bind("resize", function() { + checkImage(); + }); + + // 将容器缓存为jquery作为对象 + $container = (settings.container === undefined || settings.container === window) ? $(window) : $(settings.container); + + // 每个滚动触发一个滚动事件 + if (0 === settings.event.indexOf("scroll")) { + $container.bind(settings.event, function() { + return checkImage(); + }); + } + + elements.each(function() { + var self = this; + var $self = $(self); + + self.loaded = false; + + // 如果没有给定的src属性 + if (!$self.attr("src")) { + if ($self.is("img")) { + $self.attr("src", settings.placeholder); + } + } + + // 当触发显示时,加载原始图像 + $self.one("appear", function() { + if (!this.loaded) { + if (settings.appear) { + var elements_left = elements.length; + settings.appear.call(self, elements_left, settings); + } + $("").bind("load", function() { + var original = $self.attr(settings.dataOriginal); + $self.hide(); + if ($self.is("img")) { + $self.attr("src", original); + } else { + $self.css("background-image", "url('" + original + "')"); + } + $self[effect](400); + + self.loaded = true; + // 删除占位属性 + $self.removeAttr(settings.dataOriginal); + + // 从数组中删除图像,以便下次不循环 + var temp = $.grep(elements, function(element) { + return !element.loaded; + }); + elements = $(temp); + + if (settings.load) { + var elements_left = elements.length; + settings.load.call(self, elements_left, settings); + } + }).attr("src", $self.attr(settings.dataOriginal)); + } + }); + }); + + /** + * 检查图像是否应显示 + */ + function checkImage() { + var counter = 0; + + elements.each(function() { + var $this = $(this); + // 跳过隐藏图片 + if (!$this.is(":visible")) { + return; + } + if ($.abovethetop(this, settings) || $.leftofbegin(this, settings)) { + /* Nothing. */ + } else if (!$.belowthefold(this, settings) && !$.rightoffold(this, settings)) { + $this.trigger("appear"); + // 如果找到要加载的图像,请重置计数器 + counter = 0; + } else { + if (++counter > 0) { + return false; + } + } + }); + } + }, + + // 得到系统时间 + getTime : function(param) { + var date = new Date(); + var year = date.getFullYear(); + var month = date.getMonth() + 1; + var day = date.getDate(); + + if (!param) { + // 无参时,直接返回系统时间,格式yyyy-MM-dd HH:mm:ss + return year + "-" + add0(month) + "-" + add0(day) + " " + add0(date.getHours()) + ":" + add0(date.getMinutes()) + ":" + add0(date.getSeconds()); + } else { + param = param.toLowerCase(); + if (param=="year") { + return year; // 返回当前年份 + } + if (param=="month") { + return month; // 返回当前月份 + } + if (param=="day") { + return day; // 返回当前日 + } + if (param=="today") { + return year + "-" + add0(month) + "-" + add0(day); // 返回今日日期,yyyy-MM-dd + } + // 返回当日所属星期(1=周一,2=周二...7=周日) + if (param=="week") { + var week = date.getDay(); + if (week==0) { + week = 7; + } + return week; + } + } + + /** + * 格式化 + */ + function add0(num) { + if (num>=1 && num<=9) { + num = "0" + num; + } + return num; + } + }, + + /* + * 获得时间差 + * startTime : 开始时间(时间格式为 yyyy-MM-dd HH:mm:ss 例如:2018-06-21 00:00:00) + * endTime : 结束时间(时间格式为 yyyy-MM-dd HH:mm:ss 例如:2018-06-21 00:00:00) + * type : 返回精度(second,minute,hour,day) + */ + getTimeDiff : function(startTime, endTime, type) { + //将xxxx-xx-xx的时间格式,转换为 xxxx/xx/xx的格式 + startTime = startTime.replace(/\-/g, "/"); + endTime = endTime.replace(/\-/g, "/"); + //将计算间隔类性字符转换为小写 + type = type.toLowerCase(); + var sTime = new Date(startTime);//开始时间 + var eTime = new Date(endTime); //结束时间 + + // 作为除数的数字 + var divNum = 1; + switch (type) { + case "second": + divNum = 1000; + break; + case "minute": + divNum = 1000 * 60; + break; + case "hour": + divNum = 1000 * 3600; + break; + case "day": + divNum = 1000 * 3600 * 24; + break; + default: + break; + } + return parseInt((eTime.getTime() - sTime.getTime()) / parseInt(divNum)); + }, + + // 普通弹出层 + alert : function(args) { + var settings = defaults(args); + + // 生成随机id + var UUID = info.getUUID(); + + // 弹出层代码 + var alertHtml = '
    '; + alertHtml += '
    '; + alertHtml += '
    '; + alertHtml += '
    '; + alertHtml += settings.content; + alertHtml += '
    '; + alertHtml += '
    '; + alertHtml += ''; + alertHtml += '
    '; + alertHtml += '
    '; + alertHtml += '
    '; + alertHtml += '
    '; + $(document.body).append(alertHtml); + }, + + // 确认选择弹出层 + confirm : function(args) { + var settings = defaults(args); + + // 生成随机id + var UUID = info.getUUID(); + + // 弹出层代码 + var confirmHtml = '
    '; + confirmHtml += '
    '; + confirmHtml += '
    '; + confirmHtml += '
    '; + confirmHtml += settings.content; + confirmHtml += '
    '; + confirmHtml += '
    '; + confirmHtml += ''; + confirmHtml += ''; + confirmHtml += '
    '; + confirmHtml += '
    '; + confirmHtml += '
    '; + confirmHtml += '
    '; + $(document.body).append(confirmHtml); + }, + + // 提示层 + tip : function(args) { + var settings = defaults(args); + var type = settings.type; + + // 生成随机id + var UUID = info.getUUID(); + + // 弹出层代码 + var tipHtml = ''; + if (type=="loading") { + tipHtml += '
    '; + tipHtml += '
    '; + tipHtml += '
    '; + tipHtml += ''; + tipHtml += '

    ' + settings.content + '

    '; + tipHtml += '
    '; + tipHtml += '
    '; + } else { + if (settings.mask) { + tipHtml += '
    '; + } else { + tipHtml += '
    '; + } + if (!!settings.marginTop) { + tipHtml += '
    '; + } else if (!!settings.marginBottom) { + tipHtml += '
    '; + } else { + tipHtml += '
    '; + } + tipHtml += '
    '; + tipHtml += settings.content; + tipHtml += '
    '; + tipHtml += '
    '; + tipHtml += '
    '; + } + + $(".tip-mask").remove(); + $(".tip").remove(); + $(document.body).append(tipHtml); + + setTimeout(function() { + $("#"+UUID).remove(); + }, settings.live); + }, + + // 加载层 + loading : function(args) { + var settings = defaults(args); + $(document.body).append('
    '); + + // 判断页面是否加载完毕 + document.onreadystatechange = subSomething; + function subSomething() { + if (document.readyState=="complete") { + var oLoading = document.getElementById("javaex-loading"); + if (oLoading!=null) { + oLoading.remove(); + settings.callback({ + "code": "000000" + }); + } + } + } + }, + + // 高级弹出层 + dialog : function(args) { + var settings = defaults(args); + var type = settings.type; + + // 生成随机id + var UUID = info.getUUID(); + var dialogHtml = ''; + + if (type=="menu") { + // 生成菜单html代码 + var json = settings.menu; + var menuHtml = ''; + for (var key in json) { + menuHtml += '
  • '; + } + menuHtml += '
  • '; + + // 弹出层代码 + dialogHtml = ''; + } else if (type=="html") { + var fill = settings.fill; + var title = settings.title; + var scriptArr = settings.scriptArr; + + // 弹出层代码 + dialogHtml += ''; + if (scriptArr.length>0) { + for (var i=0; i'; + } + } + } + + $(document.body).append(dialogHtml); + + if (type=="html") { + // 设置高度 + if (fill=="auto") { + + } else if (fill=="100%") { + if (title=="") { + $(".popup .operation").css("height", $(document).height()-$(".button-cancel").height()-32 + "px"); + } else { + $(".popup .operation").css("height", $(document).height()-$(".dialog-title").height()-$(".button-cancel").height()-32 + "px"); + } + } else { + if (title=="") { + $(".popup .operation").css("height", $(document).height()-$(document).height()*parseInt(fill)/100-$(".button-cancel").height()-32 + "px"); + } else { + $(".popup .operation").css("height", $(document).height()-$(document).height()*parseInt(fill)/100-$(".dialog-title").height()-$(".button-cancel").height()-32 + "px"); + } + } + } + + // 添加遮罩 + $("#"+UUID).before('
    '); + // 显示弹出层 + $("#"+UUID).show(); + $("#"+UUID).addClass("modal-in"); + + // 点击遮罩隐藏 + $(".mask").click(function() { + $(".mask").remove(); + $("#"+UUID).css("transform", "translateY(100%)"); + setTimeout(function() { + info.close(UUID); + }, 300); + }); + }, + closeTranslate : function(UUID) { + $(".mask").remove(); + $("#"+UUID).css("transform", "translateY(100%)"); + setTimeout(function() { + info.close(UUID); + }, 300); + }, + + // 关闭弹出层 + close : function(UUID) { + if (!UUID) { + $(".mask").remove(); + } else { + $("#"+UUID).remove(); + $(".mask").remove(); + } + }, + + // 重新渲染 + render : function(args) { + var settings = defaults(args); + var id = settings.id; + var type = settings.type; + + if (!!id) { + if (!!type) { + // 等分系统 + if (type=="equal") { + // 判断含有多少个属性 + var classArr = $('#'+id).attr("class").split(" "); + + for (var i=0; i=0) { + // 获取等分布局的等分数 + var num = classArr[i].split("-")[1]; + // 为子级div设置宽度 + $('#'+id).children("li").css("width", (100/num) + "%"); + } + } + return; + } + + // 栅格系统 + if (type=="grid") { + // 判断含有多少个属性 + var classArr = $('#'+id).attr("class").split(" "); + + for (var i=0; i=0) { + // 获取栅格布局 + var arr = classArr[i].split("-"); + // 计算一共需要分成多少份 + var sum = 0; + for (var j in arr) { + if (j>0) { + sum = parseInt(sum) + parseInt(arr[j]); + } + } + // 为子级div设置宽度 + $('#'+id).children("div").each(function(k) { + $(this).css("width", (100/sum) * arr[k+1] + "%"); + }); + } else if (classArr[i].indexOf("spacing-")>=0) { + // 获取栅格间距 + var spacing = classArr[i].split("-")[1]; + + // 为子级div设置间距 + var width = "calc(100% + "+parseInt(spacing)+"px)"; + $('#'+id).css("width", width); + $('#'+id).children("div").each(function(k) { + $(this).css("margin-right", parseInt(spacing) + "px"); + }); + } + } + return; + } + } + } else { + $("script").each(function() { + if (!!$(this).attr("src")) { + if ($(this).attr("src").indexOf("common.js")>-1) { + var jsSrc = $(this).attr("src"); + var script = document.createElement("script"); + script.src = jsSrc; + $(document.body).append(script); + } + if ($(this).attr("src").indexOf("javaex-formVerify.js")>-1) { + var jsSrc = $(this).attr("src"); + var script = document.createElement("script"); + script.src = jsSrc; + $(document.body).append(script); + } + } + }); + } + }, + + // 导航 + nav : function(args) { + var settings = defaults(args); + + // 左侧滑动菜单 + if (settings.type=="slide") { + // 判断是否存在底部功能栏 + if ($("#slide-bottom")!=null) { + var height = $("#slide-bottom").height(); + // 重新设置导航菜单的高度 + $("#slide-list").css("height", "calc(100% - " + (160+height) + "px)"); + } + + // 添加遮罩 + $("#slide-nav").before('
    '); + // 显示导航 + $("#slide-nav").css("transform", "translateX(" + $("#slide-nav").width() + "px)"); + + // 点击遮罩隐藏导航 + $(".mask").click(function() { + $(".mask").remove(); + $("#slide-nav").css("transform", "translateX(0px)"); + }); + } else if (settings.type=="guide") { + // 为子级 ul 添加和去除 active 属性 + if ($("#guide-nav > ul").hasClass("active")) { + $("#guide-nav > ul").removeClass("active"); + $("#guide-nav ul").css("height", "1rem"); + } else { + // 查询 li 的个数 + var liCount = $("#guide-nav > ul > li").length; + // 判断可以分成几行 2.1表示视为3 + var row = Math.ceil((liCount+1)/5); + $("#guide-nav > ul").addClass("active"); + // 设置高度 + $("#guide-nav ul.active").css("height", (row+0.2) + "rem"); + } + } + }, + + // 滚动公告 + roll : function(args) { + var settings = defaults(args); + + var fn = function() { + $("#" + settings.id).find("ul:first").animate({ + "margin-top": "-0.5rem" + }, 2000, function() { + $(this).css("margin-top", 0).find("li:first").appendTo(this); + }); + }; + + // setInterval() 方法可按照指定的周期(以毫秒计)来调用函数或计算表达式。 + setInterval(fn, settings.delay); + }, + + // 以下这些属性相当于全局变量,用于重复赋值与使用 + loadDataFunction : "", // 请求数据的函数 + isDataLoaded : false, // 是否已滚动加载 + isOver : "", // 哪一块内容区域已经没有更多数据了 + documentHeight : "", // 文档高度 + loadDistance : 0, // 滑到哪里开始触发加载 + windowHeight : "", // 屏幕高度 + loadData : "", + noData : "", + setPageInit : function() { + info.loadDataFunction = ""; + info.isDataLoaded = false; + info.isOver = ""; + info.documentHeight = ""; + info.loadDistance = 0; + info.windowHeight = ""; + info.loadData = ""; + info.noData = ""; + }, + // 上拉加载,相当于分页 + page : function(args) { + var settings = defaults(args); + var pageId = settings.id; + + info.loadDataFunction = settings.loadDataFunction; + info.documentHeight = $(document).height(); + info.windowHeight = document.documentElement.clientHeight; + info.loadData = settings.loadData; + info.noData = settings.noData; + + init(); + + function init() { + // 事先在下方插入加载占位div + var obj = document.getElementById("infinite-scroll-preloader-"+pageId); + if (obj==null) { + $("#"+pageId).after('
    '); + } + + // 判断是否存在固定底部的footer + var oFooter = document.getElementById("footer"); + if (oFooter!=null) { + // 判断底部固定是否是可见的 + if ($("#footer").is(":visible")==true) { + // 为站位加载区域添加下边距 + $("#infinite-scroll-preloader-"+pageId).css("margin-bottom", oFooter.offsetHeight + "px"); + } + } + + // 滑到站位加载区2/3处时加载数据 + info.loadDistance = Math.floor($("#infinite-scroll-preloader-"+pageId).height()*(1/3)); + if (info.loadDistance==0) { + info.loadDistance = 90; + } + // 加载下方数据 + $(window).on('scroll',function() { + // 滚动页面触发加载数据 + if (!info.isDataLoaded + && info.isOver!=pageId + && (info.documentHeight-info.loadDistance) <= (info.windowHeight+$(window).scrollTop())) { + info.loadDown(pageId); + } + }); + + // 自动向下方加载数据,直至充满整个屏幕 + info.autoLoad(pageId); + } + }, + // 设置上滑加载已无数据 + over : function(pageId) { + info.isOver = pageId; + }, + // 如果文档高度不大于窗口高度,数据较少,自动向下方加载数据 + autoLoad : function(pageId) { + if ((info.documentHeight-info.loadDistance) <= info.windowHeight) { + info.loadDown(pageId); + } + }, + // 向下方加载数据 + loadDown : function(pageId) { + $("#infinite-scroll-preloader-"+pageId).html(info.loadData); + info.isDataLoaded = true; + info.loadDataFunction(); + }, + // 重置上滑加载的一些属性 + resetLoad : function(pageId) { + // 重新设置文档的高度 + info.documentHeight = $(document).height(); + + info.isDataLoaded = false; + if (info.isOver==pageId) { + $("#infinite-scroll-preloader-"+pageId).html(info.noData); + } else { + info.autoLoad(); + } + }, + + // tab选项卡切换 + tab : function(args) { + var settings = defaults(args); + var tabId = settings.id; + var current = settings.current; + var type = settings.type; + var hasUnderline = settings.hasUnderline; + + // 水平 + if (type=="" || type=="level") { + // 添加下划线样式 + if (hasUnderline) { + $("#" + tabId + " > ul").append(''); + } + + // 判断当前有多少个选项卡 + var tabNum = $("#" + tabId + " > ul li").length; + // 为每个选项卡设置宽度 + $("#" + tabId + " > ul li").css("width", (100/tabNum) + "%"); + // 为下划线设置宽度 + if (hasUnderline) { + $("#" + tabId + " > ul .border").css("width", (100/tabNum) + "%"); + } + + // 为当前选中的选项卡添加选中属性 + $("#" + tabId + " > ul li").each(function(i) { + if (i==(current-1)) { + $(this).addClass("current"); + if (hasUnderline) { + $("#" + tabId + " > ul .border").css("left", $(this).offset().left + "px"); + } + } + }); + } else { + // 垂直 + // 为当前选中的选项卡添加选中属性 + $("#" + tabId + " > ul li").each(function(i) { + if (i==(current-1)) { + $(this).addClass("current"); + } + }); + } + + // 显示当前选中的选项卡的内容,隐藏其他选项卡的内容 + $("#" + tabId).siblings(".tab-content").children("div").each(function(i) { + if (i==(current-1)) { + $(this).css("display", "block"); + } else { + $(this).css("display", "none"); + } + }); + + // 初始化返回回调函数,返回选项卡的索引,从1开始计 + if (settings.isInit) { + settings.callback({ + "index": current + }); + } + + // tab切换事件 + $("#" + tabId + " > ul li").click(function() { + // 给标题添加样式 + $(this).addClass("current").siblings().removeClass("current"); + if (hasUnderline) { + $("#" + tabId + " > ul .border").css("left", $(this).offset().left + "px"); + } + $("#" + tabId).siblings(".tab-content").children("div:eq(" + $(this).index() + ")").show().siblings().hide(); + // 触发图片懒加载机制 + $(settings.container).trigger(settings.event); + // 设置回调函数,返回选项卡的索引,从1开始计 + settings.callback({ + "index": $(this).index()+1 + }); + }); + }, + + // 日期时间 + date : function(args) { + var settings = defaults(args); + var dateId = settings.id; + + // 创建数据 + var now = new Date(); + // 年 + var yearList = ''; + for (var i=1900; i<=parseInt(now.getFullYear()+50); i++) { + yearList += '
  • '+i+'
  • '; + } + // 月 + var monthList = ''; + for (var i=1; i<=12; i++) { + if (i<10) { + i = "0" + i; + } + monthList += '
  • '+i+'
  • '; + } + // 日 + var dayList = ''; + for (var i=1; i<=31; i++) { + if (i<10) { + i = "0" + i; + } + dayList += '
  • '+i+'
  • '; + } + + // 日期选择器面板代码 + var dateHtml = ''; + + $(document.body).append(dateHtml); + // 添加遮罩 + $("#date-box-"+dateId+" table ul").after('
    '); + + var isStart = true; + var isMove = false; + var isEnd = false; + var startY = 0; // 当前触摸时的Y坐标 + var lastY = 0; // 上一次触摸时的Y坐标 + var nowElement = null; // 当前滚动的ul + var liLength = 0; // 当前滚动的ul下的li数量 + var nY = 0; + var mY = 0; + var endY = 0; + var maxY = 0; + var minY = 0; + var nowY = 0; + var liHeight = $(".mask-mid").height(); + + var year = ""; + var month = ""; + var day = ""; + + // 用于缓动的变量 + var lastMoveTime = 0; + var lastMoveStart = 0; + var totalDistance = 0; // 移动总距离 + var stopInertiaMove = false;// 是否停止缓动 + + init(); + if (settings.date=="" || settings.date==null || settings.date==undefined) { + + } else { + // 关闭日期选择框,并把结果回显到输入框 + close(true); + } + + // 绑定日期框的点击事件 + $("#"+dateId).bind("click", function() { + init(); + // 显示日历 + $("#date-box-"+dateId).show(); + return; + }); + + // 日期选择确定按钮的点击事件 + $("#date-ok-"+dateId).bind("click", function() { + close(true); + // 设置回调函数,返回一个时间对象,包含所选日期 + settings.callback({ + "date": $("#final-date-text-"+dateId).text() + }); + return; + }); + // 日期选择关闭按钮的点击事件 + $("#date-cancel-"+dateId).bind("click", function() { + close(); + return; + }); + + /** + * 日期选择初始化 + */ + function init() { + // 清空列表的内容 + $("#year-"+dateId+" ul").empty(); + $("#month-"+dateId+" ul").empty(); + $("#day-"+dateId+" ul").empty(); + // 为列表添加内容 + $("#year-"+dateId+" ul").html(yearList); + $("#month-"+dateId+" ul").html(monthList); + $("#day-"+dateId+" ul").html(dayList); + + // 判断是否已经选择过日期了 + var date = $("#final-date-value-"+dateId).val(); + if (date=="" || date==null || date==undefined) { + // 判断用户是否自定义了日期 + if (settings.date=="" || settings.date==null || settings.date==undefined) { + // 不变,默认显示系统日期 + } else { + // 分割年月日 + var arr = settings.date.split("-"); + // 返回日期格式 + now = new Date(arr[0], arr[1]-1, arr[2]); + } + } else { + // 分割年月日 + var arr = date.split("-"); + // 返回日期格式 + now = new Date(arr[0], arr[1]-1, arr[2]); + } + + year = now.getFullYear(); + month = ((now.getMonth()+1)<10?"0":"")+(now.getMonth()+1); + day = (now.getDate()<10?"0":"")+now.getDate(); + + // 获取当前月应该有多少天 + var curMonthDays = new Date(year, month, 0).getDate(); + var dif = curMonthDays-31; + // 隐藏多余的天数 + if (dif<0) { + var moveY = getTranslateY($("#day-"+dateId+" .date-ul")); + for (var i=0; i>dif; i--) { + $("#day-"+dateId+" .date-ul > li:eq("+[31-1+i]+")").removeClass("date-show").addClass("date-hide"); + } + } + + // 默认选择年月日 + $("#year-"+dateId+" .date-ul .date-li").each(function() { + if (parseInt($(this).text())==parseInt(year)) { + var positionY = -($(this).index()-2)*liHeight; + $(this).parent().css("transform", "translate(0, "+positionY+"px)"); + } + }); + $("#month-"+dateId+" .date-ul .date-li").each(function() { + if (parseInt($(this).text())==parseInt(month)) { + var positionY = -($(this).index()-2)*liHeight; + $(this).parent().css("transform", "translate(0, "+positionY+"px)"); + } + }); + $("#day-"+dateId+" .date-ul .date-li").each(function() { + if (parseInt($(this).text())==parseInt(day)) { + var positionY = -($(this).index()-2)*liHeight; + $(this).parent().css("transform", "translate(0, "+positionY+"px)"); + } + }); + // 填充日期 + $("#final-date-text-"+dateId).html(year+"-"+month+"-"+day); + } + + // 绑定滚动事件 + var oScrollList = document.querySelectorAll("#date-box-"+dateId+" .mask-data"); + for (var i=0; i300) { + lastMoveTime = nowTime; + lastMoveStart = mY; + } + }, false); + + // 当手指从屏幕上离开的时候触发 + oScrollList[i].addEventListener("touchend", function (event) { + event.preventDefault(); + + endY = event.changedTouches[0].clientY; + maxY = liHeight*2; + minY = -(liLength-3)*liHeight; + if (isEnd) { + isMove = false; + isEnd = false; + isStart = true; + nY = -(nY-(mY-startY)); + nowY = endY; + + // 修正位置 + if (nY>maxY) { + nowElement.css("transition", "all .5s"); + nowElement.css("transform", "translate(0, "+maxY+"px)"); + } else if (nY 0 ? -1 : 1; + // 减速率 0.0006 为减速时间 + var deceleration = dir*0.0006; + function inertiaMove() { + if (stopInertiaMove) { + return; + } + var nowTime = new Date().getTime(); + var t = nowTime - lastMoveTime; + // 当前速度 + var nowV = v + t * deceleration; + var moveY = (v + nowV) / 2 * t; + // 减速停止过程 + if (dir*nowV>0) { + // 移动总距离大于最大值时,修正回弹 + if (totalDistance>maxY) { + nowElement.css("transition", "all .5s"); + nowElement.css("transform", "translate(0, "+maxY+"px)"); + } else if (totalDistance(maxY+(liHeight*2))) { + nowElement.css("transition", "all .5s"); + nowElement.css("transform", "translate(0, "+maxY+"px)"); + return; + } else if (totalDistance<(minY-(liHeight*2))) { + nowElement.css("transition", "all .5s"); + nowElement.css("transform", "translate(0, "+minY+"px)"); + return; + } + nowElement.css("transform", "translate(0, "+totalDistance+"px)"); + // 获取并填充日期 + setTimeout(function() { + fillDate(); + }, 500); + setTimeout(inertiaMove, 10); + } + inertiaMove(); + })(v, endTime, nY); + } + + // 获取并填充日期 + setTimeout(function() { + fillDate(); + }, 500); + } + }, false); + } + + /** + * 获取并填充日期 + */ + function fillDate(id) { + var currentY = 0; + $("#date-box-"+dateId+" .date-ul").each(function(index) { + currentY = getTranslateY(this); + var value = ""; + if (currentY==0) { + value = $($(this).find(".date-li")[2]).text(); + } else { + value = $($(this).find(".date-li")[Math.round(currentY/liHeight)+2]).text(); + } + if (index==0) { + year = value; + } else if (index==1) { + month = value; + } else if (index==2) { + day = value; + } + }); + + // 修改天数 + if (id!=undefined && id!=null) { + if (id=="year-"+dateId || id=="month-"+dateId) { + // 获取当前月应该有多少天 + var curMonthDays = new Date(year, month, 0).getDate(); + // 获取目前列表中的天数 + var curDays = $("#day-"+dateId+" .date-ul .date-show").length; + var dif = curMonthDays-curDays; + if (dif>0) { + // 显示被隐藏的天数 + for (var i=0; i li:eq("+[curDays+i]+")").removeClass("date-hide").addClass("date-show"); + } + } else if (dif<0) { + var moveY = getTranslateY($("#day-"+dateId+" .date-ul")); + // 隐藏多余的天数 + for (var i=0; i>dif; i--) { + $("#day-"+dateId+" .date-ul > li:eq("+[curDays-1+i]+")").removeClass("date-show").addClass("date-hide"); + } + + // 自动重新滚动天数 + if (moveY>(curMonthDays-1-2)*liHeight) { + $("#day-"+dateId+" .date-ul").css("transition", "all 0s"); + $("#day-"+dateId+" .date-ul").css("transform", "translate(0, "+-(curMonthDays-1-2)*liHeight+"px)"); + + // 重新对日期赋值 + day = curMonthDays; + } + } + } + } + + // 将最终日期显示在头部 + $("#final-date-text-"+dateId).html(year+"-"+month+"-"+day); + $("#final-date-value-"+dateId).val(year+"-"+month+"-"+day); + } + + function getTranslateY(element) { + var matrix = $(element).css("transform"); + var translateY = 0; + if (matrix!="none") { + var arr = matrix.split(","); + translateY = -(arr[5].split(")")[0]); + } + return translateY; + } + + /** + * 关闭日期选择框 + * isOk : 判断是否是点击确定按钮关闭的 + */ + function close(isOk) { + if (isOk) { + $("#final-date-value-"+dateId).val(year+"-"+month+"-"+day); + + // 把时间显示到页面 + var obj = document.getElementById(dateId); + if (obj && obj.tagName=="INPUT") { + $("#"+dateId).val($("#final-date-text-"+dateId).text()); + } else { + $("#"+dateId).html($("#final-date-text-"+dateId).text()); + } + } + // 隐藏日历框 + $("#date-box-"+dateId).css("display", "none"); + } + }, + + // select选择框 + firstIndex : 0, // 第一个可见项的索引 + lastIndex : 0, // 最后一个可见项的索引 + isSearchInit : false, // 是否搜索过后就没再次滚动 + select : function(args) { + var settings = defaults(args); + var selectId = settings.id; + + // 判断是否已经存在input元素 + var obj = document.getElementById("input-"+selectId); + if (obj==null) { + $("#"+selectId).before(''); + } + // 将select框隐藏起来 + $("#"+selectId).hide(); + + // select选择框面板代码 + var selectHtml = ''; + + $(document.body).append(selectHtml); + $("#select-box-"+selectId+" ul").after('
    '); + + var isStart = true; + var isMove = false; + var isEnd = false; + var startY = 0; // 当前触摸时的Y坐标 + var lastY = 0; // 上一次触摸时的Y坐标 + var nowElement = null; // 当前滚动的ul + var liLength = 0; // 当前滚动的ul下的li数量 + var nY = 0; + var mY = 0; + var endY = 0; + var maxY = 0; + var minY = 0; + var nowY = 0; + var liHeight = $(".mask-mid").height(); + + // 用于缓动的变量 + var lastMoveTime = 0; + var lastMoveStart = 0; + var totalDistance = 0; // 移动总距离 + var stopInertiaMove = false;// 是否停止缓动 + + // 判断select是否已有默认值 + var selectValue = $("#"+selectId).val(); + var selectName = ""; + + init(); + close(true); + + // 绑定select选择框的点击事件 + $("#input-"+selectId).bind("click", function() { + init(); + // 显示select选择框 + $("#select-box-"+selectId).show(); + return; + }); + + // select选择确定按钮的点击事件 + $("#select-ok-"+selectId).bind("click", function() { + close(true); + return; + }); + // select选择关闭按钮的点击事件 + $("#select-cancel-"+selectId).bind("click", function() { + close(); + return; + }); + + /** + * select选择初始化 + */ + function init() { + // 清空列表的内容 + $("#opt-select-"+selectId+" ul").empty(); + // 为列表添加内容 + $("#opt-select-"+selectId+" ul").html($("#"+selectId).html()); + // 添加属性 + $("#opt-select-"+selectId+" option").addClass("select-option option-show"); + // 选中默认值 + $("#opt-select-"+selectId+" option").each(function() { + if ($(this).attr("value")==selectValue) { + var positionY = -($(this).index()-2)*liHeight; + $(this).parent().css("transform", "translate(0, "+positionY+"px)"); + } + }); + // 关闭select选择框,并把结果回显到页面 + selectName =$("#"+selectId).find("option:selected").text(); + + // 初始化第一个索引和最后一个索引 + info.firstIndex = 0; + info.lastIndex = $("#opt-select-"+selectId+" ul option").length - 1; + } + + // 绑定滚动事件 + var oScroll = document.getElementById("mask-data-"+selectId); + // 当手指触摸屏幕时候触发,即使已经有一个手指放在屏幕上也会触发 + oScroll.addEventListener("touchstart", function (event) { + event.preventDefault(); + + // 记录当前触摸时的Y坐标 + startY = event.touches[0].clientY; + // 记录上一次触摸时的Y坐标 + lastY = startY; + nowElement = $(this).prev(".select-ul"); + liLength = nowElement.find(".option-show").length; + nY = getTranslateY(nowElement); + if (!isMove&&isEnd) { + return false; + } + isStart = false; + isMove = false; + + // 缓动代码 + lastMoveStart = lastY; + lastMoveTime = new Date().getTime(); + stopInertiaMove = true; + }, false); + + // 当手指在屏幕上滑动的时候连续地触发。在这个事件发生期间,调用preventDefault()事件可以阻止滚动 + oScroll.addEventListener("touchmove", function (event) { + event.preventDefault(); + + mY = event.touches[0].clientY; + if (!isStart) { + isMove = true; + isEnd = true; + } + if (isMove) { + nowElement.css("transition", "none"); + nowElement.css("transform", "translate(0, "+-(nY-(mY-startY))+"px)"); + } + + // 缓动代码 + var nowTime = new Date().getTime(); + stopInertiaMove = true; + if ((nowTime - lastMoveTime)>300) { + lastMoveTime = nowTime; + lastMoveStart = mY; + } + }, false); + + // 当手指从屏幕上离开的时候触发 + oScroll.addEventListener("touchend", function (event) { + event.preventDefault(); + + endY = event.changedTouches[0].clientY; + maxY = -(info.firstIndex-2)*liHeight; + minY = -(info.lastIndex-2)*liHeight; + if (isEnd) { + isMove = false; + isEnd = false; + isStart = true; + nY = -(nY-(mY-startY)); + nowY = endY; + + // 修正位置 + if (nY>maxY) { + nowElement.css("transition", "all .5s"); + nowElement.css("transform", "translate(0, "+maxY+"px)"); + } else if (nY 0 ? -1 : 1; + // 减速率 0.0006 为减速时间 + var deceleration = dir*0.0006; + function inertiaMove() { + if (stopInertiaMove) { + return; + } + var nowTime = new Date().getTime(); + var t = nowTime - lastMoveTime; + // 当前速度 + var nowV = v + t * deceleration; + var moveY = (v + nowV) / 2 * t; + // 减速停止过程 + if (dir*nowV>0) { + // 移动总距离大于最大值时,修正回弹 + if (totalDistance>maxY) { + nowElement.css("transition", "all .5s"); + nowElement.css("transform", "translate(0, "+maxY+"px)"); + } else if (totalDistance(maxY+(liHeight*2))) { + nowElement.css("transition", "all .5s"); + nowElement.css("transform", "translate(0, "+maxY+"px)"); + return; + } else if (totalDistance<(minY-(liHeight*2))) { + nowElement.css("transition", "all .5s"); + nowElement.css("transform", "translate(0, "+minY+"px)"); + return; + } + nowElement.css("transform", "translate(0, "+totalDistance+"px)"); + // 获取值 + setTimeout(function() { + setSelectValue(); + }, 500); + setTimeout(inertiaMove, 10); + } + inertiaMove(); + })(v, endTime, nY); + } + + // 获取值 + setTimeout(function() { + setSelectValue(); + }, 500); + } + }, false); + + function getTranslateY(element) { + var matrix = $(element).css("transform"); + var translateY = 0; + if (matrix!="none") { + var arr = matrix.split(","); + translateY = -(arr[5].split(")")[0]); + } + return translateY; + } + + /** + * 获取值 + */ + function setSelectValue() { + var currentY = 0; + $("#opt-select-"+selectId+" .select-ul").each(function(index) { + currentY = getTranslateY(this); + var value = ""; + var name = ""; + if (currentY==0) { + value = $($(this).find(".select-option")[2]).attr("value"); + name = $($(this).find(".select-option")[2]).text(); + } else { + value = $($(this).find(".select-option")[Math.round(currentY/liHeight)+2]).attr("value"); + name = $($(this).find(".select-option")[Math.round(currentY/liHeight)+2]).text(); + } + if (index==0) { + selectValue = value; + selectName = name; + } + info.isSearchInit = false; + }); + } + + /** + * 关闭select选择框 + * isOk : 判断是否是点击确定按钮关闭的 + */ + function close(isOk) { + if (isOk) { + // 如果是检索过后就没再次滚动选择,就默认取第一条数据 + if (info.isSearchInit) { + selectValue = $($("#opt-select-"+selectId+" .select-ul").find(".select-option")[info.firstIndex]).attr("value"); + selectName = $($("#opt-select-"+selectId+" .select-ul").find(".select-option")[info.firstIndex]).text(); + } + // 把值显示到页面 + $("#"+selectId).val(selectValue); + if (selectValue=="") { + $("#input-"+selectId).val(""); + } else { + $("#input-"+selectId).val(selectName); + } + + // 回调函数 + settings.callback({ + "selectValue": selectValue, + "selectName" : selectName + }); + } + // 隐藏select框 + $("#select-box-"+selectId).css("display", "none"); + } + }, + selectSearch : function(selectId) { + var keyword = $("#search-"+selectId).val(); + var count = 0; + var indexArr = new Array(); // 记录符合检索条件的索引 + + // 如果检索内容为空 + keyword = keyword.replace(/(^\s*)|(\s*$)/g, ""); + if (keyword=="") { + // 则显示所有选项 + $("#opt-select-"+selectId+" ul option").removeClass("option-hide").addClass("option-show"); + } else { + // 遍历匹配每一个选项 + $("#opt-select-"+selectId+" ul option").each(function(i) { + // 因为indexOf()方法对大小写敏感,所以这里强制转化为小写后再匹配 + // 如果当前选项不匹配 + if ($(this).text().toLowerCase().indexOf(keyword.toLowerCase())==-1) { + $(this).removeClass("option-show").addClass("option-hide"); + count++; + } else { + $(this).removeClass("option-hide").addClass("option-show"); + // 记录下当前的索引 + indexArr.push(i); + } + }); + + // 重新滚动 + if (indexArr!="" && indexArr!=null) { + $("#opt-select-"+selectId+" .select-ul").css("transition", "all 0s"); + var positionY = 0; + var liHeight = $(".mask-mid").height(); + info.firstIndex = indexArr[0]; // 第一条被检索到的索引 + info.lastIndex = indexArr[indexArr.length-1]; // 最后一条被检索到的索引 + $("#opt-select-"+selectId+" .select-ul").css("transform", "translate(0, "+-(info.firstIndex-2)*liHeight+"px)"); + info.isSearchInit = true; + } + } + } + }; + + return info; + }; + + // 在窗口下方 + $.belowthefold = function(element, settings) { + var fold; + + if (settings.container === undefined || settings.container === window) { + fold = (window.innerHeight ? window.innerHeight : $(window).height()) + $(window).scrollTop(); + } else { + fold = $(settings.container).offset().top + $(settings.container).height(); + } + + return fold <= $(element).offset().top - settings.threshold; + }; + // 在窗口右方 + $.rightoffold = function(element, settings) { + var fold; + + if (settings.container === undefined || settings.container === window) { + fold = $(window).width() + $(window).scrollLeft(); + } else { + fold = $(settings.container).offset().left + $(settings.container).width(); + } + + return fold <= $(element).offset().left - settings.threshold; + }; + // 在窗口上方 + $.abovethetop = function(element, settings) { + var fold; + + if (settings.container === undefined || settings.container === window) { + fold = $(window).scrollTop(); + } else { + fold = $(settings.container).offset().top; + } + + return fold >= $(element).offset().top + settings.threshold + $(element).height(); + }; + // 在窗口左方 + $.leftofbegin = function(element, settings) { + var fold; + + if (settings.container === undefined || settings.container === window) { + fold = $(window).scrollLeft(); + } else { + fold = $(settings.container).offset().left; + } + + return fold >= $(element).offset().left + settings.threshold + $(element).width(); + }; + + window.javaex = javaex(); +})(); \ No newline at end of file diff --git a/src/main/resources/static/javaex/m/js/javaex.min.js b/src/main/resources/static/javaex/m/js/javaex.min.js new file mode 100644 index 0000000000000000000000000000000000000000..ec1770ea0309f089426a71633ed294d23de1b22b --- /dev/null +++ b/src/main/resources/static/javaex/m/js/javaex.min.js @@ -0,0 +1,5 @@ +/** + * 作者:陈霓清 + * 官网:http://www.javaex.cn + */ +;(function(){var javaex=function(){function defaults(args){var defaults={id:"",isInit:false,type:"",name:"",uncheckClass:"",checkedClass:"",second:45,text:"获取验证码",color:"unset",backgroundColor:"transparent",downColor:"unset",downBackgroundColor:"transparent",mask:true,content:"",confirmName:"确定",cancelName:"取消",callback:function(){return true},menu:"",live:2000,marginTop:"",marginBottom:"",delay:2000,title:"",fill:"auto",isShowCloseBtn:true,scriptArr:[],isAutoPlay:true,focusCenter:false,startSlide:1,effect:null,threshold:100,event:"scroll",container:window,dataOriginal:"data-original",appear:null,load:null,placeholder:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsQAAA7EAZUrDhsAAAANSURBVBhXYzh8+PB/AAffA0nNPuCLAAAAAElFTkSuQmCC",loadDataFunction:"",loadData:"
    ",noData:"
    没有更多内容了,亲~
    ",hasUnderline:true,current:1,date:""};return $.extend(defaults,args)}var info={getUUID:function(){return Date.now().toString(36)+Math.random().toString(36).substr(3,3)},changeTimeText:function(time){var timeText=time;var now=info.getTime();var day=info.getTimeDiff(time,now,"day");if(day>6){}else if(day>0){if(day==1){timeText="昨天 "+time.split(" ")[1]}else if(day==2){timeText="前天 "+time.split(" ")[1]}else{timeText=day+" 天前"}}else if(day==0){var hour=info.getTimeDiff(time,now,"hour");if(hour>0){timeText=hour+" 小时前"}else if(hour==0){var minute=info.getTimeDiff(time,now,"minute");if(minute>0){timeText=minute+" 分钟前"}else if(minute==0){var second=info.getTimeDiff(time,now,"second");timeText=second+" 秒前"}}}return timeText},changeTimeTexts:function(selector){var now=info.getTime();$(selector).each(function(){var day=info.getTimeDiff($(this).text(),now,"day");if(day>6){}else if(day>0){if(day==1){$(this).text("昨天 "+$(this).text().split(" ")[1])}else if(day==2){$(this).text("前天 "+$(this).text().split(" ")[1])}else{$(this).text(day+" 天前")}}else if(day==0){var hour=info.getTimeDiff($(this).text(),now,"hour");if(hour>0){$(this).text(hour+" 小时前");$(this).addClass("highlight-color")}else if(hour==0){var minute=info.getTimeDiff($(this).text(),now,"minute");if(minute>0){$(this).text(minute+" 分钟前");$(this).addClass("highlight-color")}else if(minute==0){var second=info.getTimeDiff($(this).text(),now,"second");$(this).text(second+" 秒前");$(this).addClass("highlight-color")}}}})},fakeRadio:function(args){var settings=defaults(args);var name=settings.name;var uncheckClass=settings.uncheckClass;var checkedClass=settings.checkedClass;$(':radio[name="'+name+'"]').each(function(){if($(this).is(":checked")){$(this).closest("label").addClass(checkedClass);if(settings.isInit){settings.callback({"val":$(this).val()})}}else{$(this).closest("label").addClass(uncheckClass)}});$(':radio[name="'+name+'"]').change(function(){$(':radio[name="'+name+'"]').each(function(){$(this).closest("label").removeClass(checkedClass).addClass(uncheckClass)});$(this).closest("label").removeClass(uncheckClass).addClass(checkedClass);settings.callback({"val":$(this).val()})})},fakeCheckbox:function(args){var settings=defaults(args);var name=settings.name;var uncheckClass=settings.uncheckClass;var checkedClass=settings.checkedClass;$(':checkbox[name="'+name+'"]').each(function(){if($(this).is(":checked")){$(this).parent("label").addClass(checkedClass);if(settings.isInit){settings.callback({"val":$(this).val()})}}else{$(this).parent("label").addClass(uncheckClass)}});$(':checkbox[name="'+name+'"]').change(function(){if($(this).is(":checked")){$(this).closest("label").removeClass(uncheckClass).addClass(checkedClass)}else{$(this).closest("label").removeClass(checkedClass).addClass(uncheckClass)}})},timerId:null,code:function(args){var settings=defaults(args);var id=settings.id;var second=parseInt(settings.second);if(settings.type=="reset"){clearInterval(info.timerId);$("#"+id).css({"pointer-events":"unset","color":settings.color,"background-color":settings.backgroundColor});$("#"+id).text(settings.text);second=parseInt(settings.second)}else{setTimer();function setTimer(){$("#"+id).css({"pointer-events":"none","color":settings.downColor,"background-color":settings.downBackgroundColor});info.timerId=setInterval(function(){second=second-1;if(second>0){$("#"+id).text(second+"秒后重试")}else{clearInterval(info.timerId);$("#"+id).css({"pointer-events":"unset","color":settings.color,"background-color":settings.backgroundColor});$("#"+id).text(settings.text);second=parseInt(settings.second)}},1000)}}},goTopBtn:function(args){var settings=defaults(args);var id=settings.id;$("#"+id).css("display","none");$("#"+id).click(function(){$("body, html").animate({scrollTop:0},500)});$(window).scroll(function(){var sc=$(window).scrollTop();if(sc>300){$("#"+id).css("display","block")}else{$("#"+id).css("display","none")}})},slide:function(args){var settings=defaults(args);var id=settings.id;var isAutoPlay=settings.isAutoPlay;var startSlide=parseInt(settings.startSlide);var index=startSlide-1;var diffLeftX=0;var slide=document.getElementById(id);var focusBg=document.querySelector("#"+id+" .focus-bg");var imgLi=document.querySelectorAll("#"+id+" .focus-bg li");var imgLiWidth=focusBg.offsetWidth;slide.style.height=imgLi[0].offsetHeight+"px";focusBg.style.width=imgLi.length*100+"%";for(var i=0;i0){$slide.find(".focus-title li").each(function(i){if(i==index){$(this).show()}else{$(this).hide()}})}if(settings.focusCenter){var box=$slide.find(".focus-box");box.css("margin-left",-(box.width()/2)+"px")}if($slide.find(".focus-box").length>0){if($slide.find(".focus-box ul").length==0){var html='
      ';for(var i=0;i'}html+='
    ';$slide.find(".focus-box").empty();$slide.find(".focus-box").append(html)}$slide.find(".focus-box li").eq(index).addClass("on")}$slide.find(".slide-next").on("click",function(){var old=index;if(index>=(count-1)){index=0}else{index++}change.call(slide,index,old)});$slide.find(".slide-prev").on("click",function(){var old=index;if(index<=0){index=count-1}else{index--}change.call(slide,index,old)});autoPlay();function autoPlay(){if(isAutoPlay){time=setInterval(function(){var old=index;if(index>=(count-1)){index=0}else{index++}change.call(slide,index,old)},delay)}}function change(show,hide){diffLeftX=-show*slide.offsetWidth;var leftX=-show*slide.offsetWidth+"px";$("#"+id+" .focus-bg").css("transition","all .5s");$("#"+id+" .focus-bg").css("transform","translate("+leftX+", 0)");$slide.find(".focus-title li").eq(hide).hide();$slide.find(".focus-title li").eq(show).show();$slide.find(".focus-box li").removeClass("on");$slide.find(".focus-box li").eq(show).addClass("on");var $self=$slide.find(".focus-bg li").eq(show).find("img");if($self.length==0){$self=$slide.find(".focus-bg li").eq(show).find("a")}var original=$self.attr(settings.dataOriginal);if(!!original){if($self.is("img")){$self.attr("src",original)}else{$self.css("background-image","url('"+original+"')")}$self.removeAttr(settings.dataOriginal)}settings.callback({"index":show})}var startPointX=0;var startEle=0;slide.addEventListener("touchstart",function(e){if(isAutoPlay){clearInterval(time)}startPointX=e.changedTouches[0].pageX;startEle=diffLeftX});slide.addEventListener("touchmove",function(e){if(isAutoPlay){clearInterval(time)}e.preventDefault();var curPointX=e.changedTouches[0].pageX;var diffX=curPointX-startPointX;var left=startEle+diffX;diffLeftX=left;var leftX=left+"px";$("#"+id+" .focus-bg").css("transition","all .5s");$("#"+id+" .focus-bg").css("transform","translate("+leftX+", 0)")});slide.addEventListener("touchend",function(e){if(isAutoPlay){autoPlay()}var left=diffLeftX;var curNum=Math.round(-left/imgLiWidth);curNum=curNum>=(imgLi.length-1)?imgLi.length-1:curNum;curNum=curNum<=0?0:curNum;var old=index;if(index==curNum){change.call(slide,index,index)}else{if(index=(count-1)){index=0}else{index++}}else{if(index<=0){index=count-1}else{index--}}change.call(slide,index,old)}})},tabbar:function(args){var settings=defaults(args);var tabId=settings.id;$("#"+tabId+">a").click(function(){$(this).addClass("activate").siblings().removeClass("activate")})},lazyload:function(args){var settings=defaults(args);var selector=settings.selector;var elements=$(selector);var effect=settings.effect;if(!effect){effect="fadeIn"}$(document).ready(function(){$(settings.container).trigger(settings.event);checkImage()});$(window).bind("resize",function(){checkImage()});$container=(settings.container===undefined||settings.container===window)?$(window):$(settings.container);if(0===settings.event.indexOf("scroll")){$container.bind(settings.event,function(){return checkImage()})}elements.each(function(){var self=this;var $self=$(self);self.loaded=false;if(!$self.attr("src")){if($self.is("img")){$self.attr("src",settings.placeholder)}}$self.one("appear",function(){if(!this.loaded){if(settings.appear){var elements_left=elements.length;settings.appear.call(self,elements_left,settings)}$("").bind("load",function(){var original=$self.attr(settings.dataOriginal);$self.hide();if($self.is("img")){$self.attr("src",original)}else{$self.css("background-image","url('"+original+"')")}$self[effect](400);self.loaded=true;$self.removeAttr(settings.dataOriginal);var temp=$.grep(elements,function(element){return!element.loaded});elements=$(temp);if(settings.load){var elements_left=elements.length;settings.load.call(self,elements_left,settings)}}).attr("src",$self.attr(settings.dataOriginal))}})});function checkImage(){var counter=0;elements.each(function(){var $this=$(this);if(!$this.is(":visible")){return}if($.abovethetop(this,settings)||$.leftofbegin(this,settings)){}else if(!$.belowthefold(this,settings)&&!$.rightoffold(this,settings)){$this.trigger("appear");counter=0}else{if(++counter>0){return false}}})}},getTime:function(param){var date=new Date();var year=date.getFullYear();var month=date.getMonth()+1;var day=date.getDate();if(!param){return year+"-"+add0(month)+"-"+add0(day)+" "+add0(date.getHours())+":"+add0(date.getMinutes())+":"+add0(date.getSeconds())}else{param=param.toLowerCase();if(param=="year"){return year}if(param=="month"){return month}if(param=="day"){return day}if(param=="today"){return year+"-"+add0(month)+"-"+add0(day)}if(param=="week"){var week=date.getDay();if(week==0){week=7}return week}}function add0(num){if(num>=1&&num<=9){num="0"+num}return num}},getTimeDiff:function(startTime,endTime,type){startTime=startTime.replace(/\-/g,"/");endTime=endTime.replace(/\-/g,"/");type=type.toLowerCase();var sTime=new Date(startTime);var eTime=new Date(endTime);var divNum=1;switch(type){case"second":divNum=1000;break;case"minute":divNum=1000*60;break;case"hour":divNum=1000*3600;break;case"day":divNum=1000*3600*24;break;default:break}return parseInt((eTime.getTime()-sTime.getTime())/parseInt(divNum))},alert:function(args){var settings=defaults(args);var UUID=info.getUUID();var alertHtml='
    ';alertHtml+='
    ';alertHtml+='
    ';alertHtml+='
    ';alertHtml+=settings.content;alertHtml+='
    ';alertHtml+='
    ';alertHtml+='';alertHtml+='
    ';alertHtml+='
    ';alertHtml+='
    ';alertHtml+='
    ';$(document.body).append(alertHtml)},confirm:function(args){var settings=defaults(args);var UUID=info.getUUID();var confirmHtml='
    ';confirmHtml+='
    ';confirmHtml+='
    ';confirmHtml+='
    ';confirmHtml+=settings.content;confirmHtml+='
    ';confirmHtml+='
    ';confirmHtml+='';confirmHtml+='';confirmHtml+='
    ';confirmHtml+='
    ';confirmHtml+='
    ';confirmHtml+='
    ';$(document.body).append(confirmHtml)},tip:function(args){var settings=defaults(args);var type=settings.type;var UUID=info.getUUID();var tipHtml='';if(type=="loading"){tipHtml+='
    ';tipHtml+='
    ';tipHtml+='
    ';tipHtml+='';tipHtml+='

    '+settings.content+'

    ';tipHtml+='
    ';tipHtml+='
    '}else{if(settings.mask){tipHtml+='
    '}else{tipHtml+='
    '}if(!!settings.marginTop){tipHtml+='
    '}else if(!!settings.marginBottom){tipHtml+='
    '}else{tipHtml+='
    '}tipHtml+='
    ';tipHtml+=settings.content;tipHtml+='
    ';tipHtml+='
    ';tipHtml+='
    '}$(".tip-mask").remove();$(".tip").remove();$(document.body).append(tipHtml);setTimeout(function(){$("#"+UUID).remove()},settings.live)},loading:function(args){var settings=defaults(args);$(document.body).append('
    ');document.onreadystatechange=subSomething;function subSomething(){if(document.readyState=="complete"){var oLoading=document.getElementById("javaex-loading");if(oLoading!=null){oLoading.remove();settings.callback({"code":"000000"})}}}},dialog:function(args){var settings=defaults(args);var type=settings.type;var UUID=info.getUUID();var dialogHtml='';if(type=="menu"){var json=settings.menu;var menuHtml='';for(var key in json){menuHtml+='
  • '}menuHtml+='
  • ';dialogHtml=''}else if(type=="html"){var fill=settings.fill;var title=settings.title;var scriptArr=settings.scriptArr;dialogHtml+='';if(scriptArr.length>0){for(var i=0;i'}}}$(document.body).append(dialogHtml);if(type=="html"){if(fill=="auto"){}else if(fill=="100%"){if(title==""){$(".popup .operation").css("height",$(document).height()-$(".button-cancel").height()-32+"px")}else{$(".popup .operation").css("height",$(document).height()-$(".dialog-title").height()-$(".button-cancel").height()-32+"px")}}else{if(title==""){$(".popup .operation").css("height",$(document).height()-$(document).height()*parseInt(fill)/100-$(".button-cancel").height()-32+"px")}else{$(".popup .operation").css("height",$(document).height()-$(document).height()*parseInt(fill)/100-$(".dialog-title").height()-$(".button-cancel").height()-32+"px")}}}$("#"+UUID).before('
    ');$("#"+UUID).show();$("#"+UUID).addClass("modal-in");$(".mask").click(function(){$(".mask").remove();$("#"+UUID).css("transform","translateY(100%)");setTimeout(function(){info.close(UUID)},300)})},closeTranslate:function(UUID){$(".mask").remove();$("#"+UUID).css("transform","translateY(100%)");setTimeout(function(){info.close(UUID)},300)},close:function(UUID){if(!UUID){$(".mask").remove()}else{$("#"+UUID).remove();$(".mask").remove()}},render:function(args){var settings=defaults(args);var id=settings.id;var type=settings.type;if(!!id){if(!!type){if(type=="equal"){var classArr=$('#'+id).attr("class").split(" ");for(var i=0;i=0){var num=classArr[i].split("-")[1];$('#'+id).children("li").css("width",(100/num)+"%")}}return}if(type=="grid"){var classArr=$('#'+id).attr("class").split(" ");for(var i=0;i=0){var arr=classArr[i].split("-");var sum=0;for(var j in arr){if(j>0){sum=parseInt(sum)+parseInt(arr[j])}}$('#'+id).children("div").each(function(k){$(this).css("width",(100/sum)*arr[k+1]+"%")})}else if(classArr[i].indexOf("spacing-")>=0){var spacing=classArr[i].split("-")[1];var width="calc(100% + "+parseInt(spacing)+"px)";$('#'+id).css("width",width);$('#'+id).children("div").each(function(k){$(this).css("margin-right",parseInt(spacing)+"px")})}}return}}}else{$("script").each(function(){if(!!$(this).attr("src")){if($(this).attr("src").indexOf("common.js")>-1){var jsSrc=$(this).attr("src");var script=document.createElement("script");script.src=jsSrc;$(document.body).append(script)}if($(this).attr("src").indexOf("javaex-formVerify.js")>-1){var jsSrc=$(this).attr("src");var script=document.createElement("script");script.src=jsSrc;$(document.body).append(script)}}})}},nav:function(args){var settings=defaults(args);if(settings.type=="slide"){if($("#slide-bottom")!=null){var height=$("#slide-bottom").height();$("#slide-list").css("height","calc(100% - "+(160+height)+"px)")}$("#slide-nav").before('
    ');$("#slide-nav").css("transform","translateX("+$("#slide-nav").width()+"px)");$(".mask").click(function(){$(".mask").remove();$("#slide-nav").css("transform","translateX(0px)")})}else if(settings.type=="guide"){if($("#guide-nav > ul").hasClass("active")){$("#guide-nav > ul").removeClass("active");$("#guide-nav ul").css("height","1rem")}else{var liCount=$("#guide-nav > ul > li").length;var row=Math.ceil((liCount+1)/5);$("#guide-nav > ul").addClass("active");$("#guide-nav ul.active").css("height",(row+0.2)+"rem")}}},roll:function(args){var settings=defaults(args);var fn=function(){$("#"+settings.id).find("ul:first").animate({"margin-top":"-0.5rem"},2000,function(){$(this).css("margin-top",0).find("li:first").appendTo(this)})};setInterval(fn,settings.delay)},loadDataFunction:"",isDataLoaded:false,isOver:"",documentHeight:"",loadDistance:0,windowHeight:"",loadData:"",noData:"",setPageInit:function(){info.loadDataFunction="";info.isDataLoaded=false;info.isOver="";info.documentHeight="";info.loadDistance=0;info.windowHeight="";info.loadData="";info.noData=""},page:function(args){var settings=defaults(args);var pageId=settings.id;info.loadDataFunction=settings.loadDataFunction;info.documentHeight=$(document).height();info.windowHeight=document.documentElement.clientHeight;info.loadData=settings.loadData;info.noData=settings.noData;init();function init(){var obj=document.getElementById("infinite-scroll-preloader-"+pageId);if(obj==null){$("#"+pageId).after('
    ')}var oFooter=document.getElementById("footer");if(oFooter!=null){if($("#footer").is(":visible")==true){$("#infinite-scroll-preloader-"+pageId).css("margin-bottom",oFooter.offsetHeight+"px")}}info.loadDistance=Math.floor($("#infinite-scroll-preloader-"+pageId).height()*(1/3));if(info.loadDistance==0){info.loadDistance=90}$(window).on('scroll',function(){if(!info.isDataLoaded&&info.isOver!=pageId&&(info.documentHeight-info.loadDistance)<=(info.windowHeight+$(window).scrollTop())){info.loadDown(pageId)}});info.autoLoad(pageId)}},over:function(pageId){info.isOver=pageId},autoLoad:function(pageId){if((info.documentHeight-info.loadDistance)<=info.windowHeight){info.loadDown(pageId)}},loadDown:function(pageId){$("#infinite-scroll-preloader-"+pageId).html(info.loadData);info.isDataLoaded=true;info.loadDataFunction()},resetLoad:function(pageId){info.documentHeight=$(document).height();info.isDataLoaded=false;if(info.isOver==pageId){$("#infinite-scroll-preloader-"+pageId).html(info.noData)}else{info.autoLoad()}},tab:function(args){var settings=defaults(args);var tabId=settings.id;var current=settings.current;var type=settings.type;var hasUnderline=settings.hasUnderline;if(type==""||type=="level"){if(hasUnderline){$("#"+tabId+" > ul").append('')}var tabNum=$("#"+tabId+" > ul li").length;$("#"+tabId+" > ul li").css("width",(100/tabNum)+"%");if(hasUnderline){$("#"+tabId+" > ul .border").css("width",(100/tabNum)+"%")}$("#"+tabId+" > ul li").each(function(i){if(i==(current-1)){$(this).addClass("current");if(hasUnderline){$("#"+tabId+" > ul .border").css("left",$(this).offset().left+"px")}}})}else{$("#"+tabId+" > ul li").each(function(i){if(i==(current-1)){$(this).addClass("current")}})}$("#"+tabId).siblings(".tab-content").children("div").each(function(i){if(i==(current-1)){$(this).css("display","block")}else{$(this).css("display","none")}});if(settings.isInit){settings.callback({"index":current})}$("#"+tabId+" > ul li").click(function(){$(this).addClass("current").siblings().removeClass("current");if(hasUnderline){$("#"+tabId+" > ul .border").css("left",$(this).offset().left+"px")}$("#"+tabId).siblings(".tab-content").children("div:eq("+$(this).index()+")").show().siblings().hide();$(settings.container).trigger(settings.event);settings.callback({"index":$(this).index()+1})})},date:function(args){var settings=defaults(args);var dateId=settings.id;var now=new Date();var yearList='';for(var i=1900;i<=parseInt(now.getFullYear()+50);i++){yearList+='
  • '+i+'
  • '}var monthList='';for(var i=1;i<=12;i++){if(i<10){i="0"+i}monthList+='
  • '+i+'
  • '}var dayList='';for(var i=1;i<=31;i++){if(i<10){i="0"+i}dayList+='
  • '+i+'
  • '}var dateHtml='';$(document.body).append(dateHtml);$("#date-box-"+dateId+" table ul").after('
    ');var isStart=true;var isMove=false;var isEnd=false;var startY=0;var lastY=0;var nowElement=null;var liLength=0;var nY=0;var mY=0;var endY=0;var maxY=0;var minY=0;var nowY=0;var liHeight=$(".mask-mid").height();var year="";var month="";var day="";var lastMoveTime=0;var lastMoveStart=0;var totalDistance=0;var stopInertiaMove=false;init();if(settings.date==""||settings.date==null||settings.date==undefined){}else{close(true)}$("#"+dateId).bind("click",function(){init();$("#date-box-"+dateId).show();return});$("#date-ok-"+dateId).bind("click",function(){close(true);settings.callback({"date":$("#final-date-text-"+dateId).text()});return});$("#date-cancel-"+dateId).bind("click",function(){close();return});function init(){$("#year-"+dateId+" ul").empty();$("#month-"+dateId+" ul").empty();$("#day-"+dateId+" ul").empty();$("#year-"+dateId+" ul").html(yearList);$("#month-"+dateId+" ul").html(monthList);$("#day-"+dateId+" ul").html(dayList);var date=$("#final-date-value-"+dateId).val();if(date==""||date==null||date==undefined){if(settings.date==""||settings.date==null||settings.date==undefined){}else{var arr=settings.date.split("-");now=new Date(arr[0],arr[1]-1,arr[2])}}else{var arr=date.split("-");now=new Date(arr[0],arr[1]-1,arr[2])}year=now.getFullYear();month=((now.getMonth()+1)<10?"0":"")+(now.getMonth()+1);day=(now.getDate()<10?"0":"")+now.getDate();var curMonthDays=new Date(year,month,0).getDate();var dif=curMonthDays-31;if(dif<0){var moveY=getTranslateY($("#day-"+dateId+" .date-ul"));for(var i=0;i>dif;i--){$("#day-"+dateId+" .date-ul > li:eq("+[31-1+i]+")").removeClass("date-show").addClass("date-hide")}}$("#year-"+dateId+" .date-ul .date-li").each(function(){if(parseInt($(this).text())==parseInt(year)){var positionY=-($(this).index()-2)*liHeight;$(this).parent().css("transform","translate(0, "+positionY+"px)")}});$("#month-"+dateId+" .date-ul .date-li").each(function(){if(parseInt($(this).text())==parseInt(month)){var positionY=-($(this).index()-2)*liHeight;$(this).parent().css("transform","translate(0, "+positionY+"px)")}});$("#day-"+dateId+" .date-ul .date-li").each(function(){if(parseInt($(this).text())==parseInt(day)){var positionY=-($(this).index()-2)*liHeight;$(this).parent().css("transform","translate(0, "+positionY+"px)")}});$("#final-date-text-"+dateId).html(year+"-"+month+"-"+day)}var oScrollList=document.querySelectorAll("#date-box-"+dateId+" .mask-data");for(var i=0;i300){lastMoveTime=nowTime;lastMoveStart=mY}},false);oScrollList[i].addEventListener("touchend",function(event){event.preventDefault();endY=event.changedTouches[0].clientY;maxY=liHeight*2;minY=-(liLength-3)*liHeight;if(isEnd){isMove=false;isEnd=false;isStart=true;nY=-(nY-(mY-startY));nowY=endY;if(nY>maxY){nowElement.css("transition","all .5s");nowElement.css("transform","translate(0, "+maxY+"px)")}else if(nY0?-1:1;var deceleration=dir*0.0006;function inertiaMove(){if(stopInertiaMove){return}var nowTime=new Date().getTime();var t=nowTime-lastMoveTime;var nowV=v+t*deceleration;var moveY=(v+nowV)/2*t;if(dir*nowV>0){if(totalDistance>maxY){nowElement.css("transition","all .5s");nowElement.css("transform","translate(0, "+maxY+"px)")}else if(totalDistance(maxY+(liHeight*2))){nowElement.css("transition","all .5s");nowElement.css("transform","translate(0, "+maxY+"px)");return}else if(totalDistance<(minY-(liHeight*2))){nowElement.css("transition","all .5s");nowElement.css("transform","translate(0, "+minY+"px)");return}nowElement.css("transform","translate(0, "+totalDistance+"px)");setTimeout(function(){fillDate()},500);setTimeout(inertiaMove,10)}inertiaMove()})(v,endTime,nY)}setTimeout(function(){fillDate()},500)}},false)}function fillDate(id){var currentY=0;$("#date-box-"+dateId+" .date-ul").each(function(index){currentY=getTranslateY(this);var value="";if(currentY==0){value=$($(this).find(".date-li")[2]).text()}else{value=$($(this).find(".date-li")[Math.round(currentY/liHeight)+2]).text()}if(index==0){year=value}else if(index==1){month=value}else if(index==2){day=value}});if(id!=undefined&&id!=null){if(id=="year-"+dateId||id=="month-"+dateId){var curMonthDays=new Date(year,month,0).getDate();var curDays=$("#day-"+dateId+" .date-ul .date-show").length;var dif=curMonthDays-curDays;if(dif>0){for(var i=0;i li:eq("+[curDays+i]+")").removeClass("date-hide").addClass("date-show")}}else if(dif<0){var moveY=getTranslateY($("#day-"+dateId+" .date-ul"));for(var i=0;i>dif;i--){$("#day-"+dateId+" .date-ul > li:eq("+[curDays-1+i]+")").removeClass("date-show").addClass("date-hide")}if(moveY>(curMonthDays-1-2)*liHeight){$("#day-"+dateId+" .date-ul").css("transition","all 0s");$("#day-"+dateId+" .date-ul").css("transform","translate(0, "+-(curMonthDays-1-2)*liHeight+"px)");day=curMonthDays}}}}$("#final-date-text-"+dateId).html(year+"-"+month+"-"+day);$("#final-date-value-"+dateId).val(year+"-"+month+"-"+day)}function getTranslateY(element){var matrix=$(element).css("transform");var translateY=0;if(matrix!="none"){var arr=matrix.split(",");translateY=-(arr[5].split(")")[0])}return translateY}function close(isOk){if(isOk){$("#final-date-value-"+dateId).val(year+"-"+month+"-"+day);var obj=document.getElementById(dateId);if(obj&&obj.tagName=="INPUT"){$("#"+dateId).val($("#final-date-text-"+dateId).text())}else{$("#"+dateId).html($("#final-date-text-"+dateId).text())}}$("#date-box-"+dateId).css("display","none")}},firstIndex:0,lastIndex:0,isSearchInit:false,select:function(args){var settings=defaults(args);var selectId=settings.id;var obj=document.getElementById("input-"+selectId);if(obj==null){$("#"+selectId).before('')}$("#"+selectId).hide();var selectHtml='';$(document.body).append(selectHtml);$("#select-box-"+selectId+" ul").after('
    ');var isStart=true;var isMove=false;var isEnd=false;var startY=0;var lastY=0;var nowElement=null;var liLength=0;var nY=0;var mY=0;var endY=0;var maxY=0;var minY=0;var nowY=0;var liHeight=$(".mask-mid").height();var lastMoveTime=0;var lastMoveStart=0;var totalDistance=0;var stopInertiaMove=false;var selectValue=$("#"+selectId).val();var selectName="";init();close(true);$("#input-"+selectId).bind("click",function(){init();$("#select-box-"+selectId).show();return});$("#select-ok-"+selectId).bind("click",function(){close(true);return});$("#select-cancel-"+selectId).bind("click",function(){close();return});function init(){$("#opt-select-"+selectId+" ul").empty();$("#opt-select-"+selectId+" ul").html($("#"+selectId).html());$("#opt-select-"+selectId+" option").addClass("select-option option-show");$("#opt-select-"+selectId+" option").each(function(){if($(this).attr("value")==selectValue){var positionY=-($(this).index()-2)*liHeight;$(this).parent().css("transform","translate(0, "+positionY+"px)")}});selectName=$("#"+selectId).find("option:selected").text();info.firstIndex=0;info.lastIndex=$("#opt-select-"+selectId+" ul option").length-1}var oScroll=document.getElementById("mask-data-"+selectId);oScroll.addEventListener("touchstart",function(event){event.preventDefault();startY=event.touches[0].clientY;lastY=startY;nowElement=$(this).prev(".select-ul");liLength=nowElement.find(".option-show").length;nY=getTranslateY(nowElement);if(!isMove&&isEnd){return false}isStart=false;isMove=false;lastMoveStart=lastY;lastMoveTime=new Date().getTime();stopInertiaMove=true},false);oScroll.addEventListener("touchmove",function(event){event.preventDefault();mY=event.touches[0].clientY;if(!isStart){isMove=true;isEnd=true}if(isMove){nowElement.css("transition","none");nowElement.css("transform","translate(0, "+-(nY-(mY-startY))+"px)")}var nowTime=new Date().getTime();stopInertiaMove=true;if((nowTime-lastMoveTime)>300){lastMoveTime=nowTime;lastMoveStart=mY}},false);oScroll.addEventListener("touchend",function(event){event.preventDefault();endY=event.changedTouches[0].clientY;maxY=-(info.firstIndex-2)*liHeight;minY=-(info.lastIndex-2)*liHeight;if(isEnd){isMove=false;isEnd=false;isStart=true;nY=-(nY-(mY-startY));nowY=endY;if(nY>maxY){nowElement.css("transition","all .5s");nowElement.css("transform","translate(0, "+maxY+"px)")}else if(nY0?-1:1;var deceleration=dir*0.0006;function inertiaMove(){if(stopInertiaMove){return}var nowTime=new Date().getTime();var t=nowTime-lastMoveTime;var nowV=v+t*deceleration;var moveY=(v+nowV)/2*t;if(dir*nowV>0){if(totalDistance>maxY){nowElement.css("transition","all .5s");nowElement.css("transform","translate(0, "+maxY+"px)")}else if(totalDistance(maxY+(liHeight*2))){nowElement.css("transition","all .5s");nowElement.css("transform","translate(0, "+maxY+"px)");return}else if(totalDistance<(minY-(liHeight*2))){nowElement.css("transition","all .5s");nowElement.css("transform","translate(0, "+minY+"px)");return}nowElement.css("transform","translate(0, "+totalDistance+"px)");setTimeout(function(){setSelectValue()},500);setTimeout(inertiaMove,10)}inertiaMove()})(v,endTime,nY)}setTimeout(function(){setSelectValue()},500)}},false);function getTranslateY(element){var matrix=$(element).css("transform");var translateY=0;if(matrix!="none"){var arr=matrix.split(",");translateY=-(arr[5].split(")")[0])}return translateY}function setSelectValue(){var currentY=0;$("#opt-select-"+selectId+" .select-ul").each(function(index){currentY=getTranslateY(this);var value="";var name="";if(currentY==0){value=$($(this).find(".select-option")[2]).attr("value");name=$($(this).find(".select-option")[2]).text()}else{value=$($(this).find(".select-option")[Math.round(currentY/liHeight)+2]).attr("value");name=$($(this).find(".select-option")[Math.round(currentY/liHeight)+2]).text()}if(index==0){selectValue=value;selectName=name}info.isSearchInit=false})}function close(isOk){if(isOk){if(info.isSearchInit){selectValue=$($("#opt-select-"+selectId+" .select-ul").find(".select-option")[info.firstIndex]).attr("value");selectName=$($("#opt-select-"+selectId+" .select-ul").find(".select-option")[info.firstIndex]).text()}$("#"+selectId).val(selectValue);if(selectValue==""){$("#input-"+selectId).val("")}else{$("#input-"+selectId).val(selectName)}settings.callback({"selectValue":selectValue,"selectName":selectName})}$("#select-box-"+selectId).css("display","none")}},selectSearch:function(selectId){var keyword=$("#search-"+selectId).val();var count=0;var indexArr=new Array();keyword=keyword.replace(/(^\s*)|(\s*$)/g,"");if(keyword==""){$("#opt-select-"+selectId+" ul option").removeClass("option-hide").addClass("option-show")}else{$("#opt-select-"+selectId+" ul option").each(function(i){if($(this).text().toLowerCase().indexOf(keyword.toLowerCase())==-1){$(this).removeClass("option-show").addClass("option-hide");count++}else{$(this).removeClass("option-hide").addClass("option-show");indexArr.push(i)}});if(indexArr!=""&&indexArr!=null){$("#opt-select-"+selectId+" .select-ul").css("transition","all 0s");var positionY=0;var liHeight=$(".mask-mid").height();info.firstIndex=indexArr[0];info.lastIndex=indexArr[indexArr.length-1];$("#opt-select-"+selectId+" .select-ul").css("transform","translate(0, "+-(info.firstIndex-2)*liHeight+"px)");info.isSearchInit=true}}}};return info};$.belowthefold=function(element,settings){var fold;if(settings.container===undefined||settings.container===window){fold=(window.innerHeight?window.innerHeight:$(window).height())+$(window).scrollTop()}else{fold=$(settings.container).offset().top+$(settings.container).height()}return fold<=$(element).offset().top-settings.threshold};$.rightoffold=function(element,settings){var fold;if(settings.container===undefined||settings.container===window){fold=$(window).width()+$(window).scrollLeft()}else{fold=$(settings.container).offset().left+$(settings.container).width()}return fold<=$(element).offset().left-settings.threshold};$.abovethetop=function(element,settings){var fold;if(settings.container===undefined||settings.container===window){fold=$(window).scrollTop()}else{fold=$(settings.container).offset().top}return fold>=$(element).offset().top+settings.threshold+$(element).height()};$.leftofbegin=function(element,settings){var fold;if(settings.container===undefined||settings.container===window){fold=$(window).scrollLeft()}else{fold=$(settings.container).offset().left}return fold>=$(element).offset().left+settings.threshold+$(element).width()};window.javaex=javaex()})(); diff --git a/src/main/resources/static/javaex/m/lib/jquery-3.3.1.min.js b/src/main/resources/static/javaex/m/lib/jquery-3.3.1.min.js new file mode 100644 index 0000000000000000000000000000000000000000..4d9b3a258759c53e7bc66b6fc554c51e2434437c --- /dev/null +++ b/src/main/resources/static/javaex/m/lib/jquery-3.3.1.min.js @@ -0,0 +1,2 @@ +/*! jQuery v3.3.1 | (c) JS Foundation and other contributors | jquery.org/license */ +!function(e,t){"use strict";"object"==typeof module&&"object"==typeof module.exports?module.exports=e.document?t(e,!0):function(e){if(!e.document)throw new Error("jQuery requires a window with a document");return t(e)}:t(e)}("undefined"!=typeof window?window:this,function(e,t){"use strict";var n=[],r=e.document,i=Object.getPrototypeOf,o=n.slice,a=n.concat,s=n.push,u=n.indexOf,l={},c=l.toString,f=l.hasOwnProperty,p=f.toString,d=p.call(Object),h={},g=function e(t){return"function"==typeof t&&"number"!=typeof t.nodeType},y=function e(t){return null!=t&&t===t.window},v={type:!0,src:!0,noModule:!0};function m(e,t,n){var i,o=(t=t||r).createElement("script");if(o.text=e,n)for(i in v)n[i]&&(o[i]=n[i]);t.head.appendChild(o).parentNode.removeChild(o)}function x(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?l[c.call(e)]||"object":typeof e}var b="3.3.1",w=function(e,t){return new w.fn.init(e,t)},T=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g;w.fn=w.prototype={jquery:"3.3.1",constructor:w,length:0,toArray:function(){return o.call(this)},get:function(e){return null==e?o.call(this):e<0?this[e+this.length]:this[e]},pushStack:function(e){var t=w.merge(this.constructor(),e);return t.prevObject=this,t},each:function(e){return w.each(this,e)},map:function(e){return this.pushStack(w.map(this,function(t,n){return e.call(t,n,t)}))},slice:function(){return this.pushStack(o.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(e){var t=this.length,n=+e+(e<0?t:0);return this.pushStack(n>=0&&n0&&t-1 in e)}var E=function(e){var t,n,r,i,o,a,s,u,l,c,f,p,d,h,g,y,v,m,x,b="sizzle"+1*new Date,w=e.document,T=0,C=0,E=ae(),k=ae(),S=ae(),D=function(e,t){return e===t&&(f=!0),0},N={}.hasOwnProperty,A=[],j=A.pop,q=A.push,L=A.push,H=A.slice,O=function(e,t){for(var n=0,r=e.length;n+~]|"+M+")"+M+"*"),z=new RegExp("="+M+"*([^\\]'\"]*?)"+M+"*\\]","g"),X=new RegExp(W),U=new RegExp("^"+R+"$"),V={ID:new RegExp("^#("+R+")"),CLASS:new RegExp("^\\.("+R+")"),TAG:new RegExp("^("+R+"|[*])"),ATTR:new RegExp("^"+I),PSEUDO:new RegExp("^"+W),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+M+"*(even|odd|(([+-]|)(\\d*)n|)"+M+"*(?:([+-]|)"+M+"*(\\d+)|))"+M+"*\\)|)","i"),bool:new RegExp("^(?:"+P+")$","i"),needsContext:new RegExp("^"+M+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+M+"*((?:-\\d)?\\d*)"+M+"*\\)|)(?=[^-]|$)","i")},G=/^(?:input|select|textarea|button)$/i,Y=/^h\d$/i,Q=/^[^{]+\{\s*\[native \w/,J=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,K=/[+~]/,Z=new RegExp("\\\\([\\da-f]{1,6}"+M+"?|("+M+")|.)","ig"),ee=function(e,t,n){var r="0x"+t-65536;return r!==r||n?t:r<0?String.fromCharCode(r+65536):String.fromCharCode(r>>10|55296,1023&r|56320)},te=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g,ne=function(e,t){return t?"\0"===e?"\ufffd":e.slice(0,-1)+"\\"+e.charCodeAt(e.length-1).toString(16)+" ":"\\"+e},re=function(){p()},ie=me(function(e){return!0===e.disabled&&("form"in e||"label"in e)},{dir:"parentNode",next:"legend"});try{L.apply(A=H.call(w.childNodes),w.childNodes),A[w.childNodes.length].nodeType}catch(e){L={apply:A.length?function(e,t){q.apply(e,H.call(t))}:function(e,t){var n=e.length,r=0;while(e[n++]=t[r++]);e.length=n-1}}}function oe(e,t,r,i){var o,s,l,c,f,h,v,m=t&&t.ownerDocument,T=t?t.nodeType:9;if(r=r||[],"string"!=typeof e||!e||1!==T&&9!==T&&11!==T)return r;if(!i&&((t?t.ownerDocument||t:w)!==d&&p(t),t=t||d,g)){if(11!==T&&(f=J.exec(e)))if(o=f[1]){if(9===T){if(!(l=t.getElementById(o)))return r;if(l.id===o)return r.push(l),r}else if(m&&(l=m.getElementById(o))&&x(t,l)&&l.id===o)return r.push(l),r}else{if(f[2])return L.apply(r,t.getElementsByTagName(e)),r;if((o=f[3])&&n.getElementsByClassName&&t.getElementsByClassName)return L.apply(r,t.getElementsByClassName(o)),r}if(n.qsa&&!S[e+" "]&&(!y||!y.test(e))){if(1!==T)m=t,v=e;else if("object"!==t.nodeName.toLowerCase()){(c=t.getAttribute("id"))?c=c.replace(te,ne):t.setAttribute("id",c=b),s=(h=a(e)).length;while(s--)h[s]="#"+c+" "+ve(h[s]);v=h.join(","),m=K.test(e)&&ge(t.parentNode)||t}if(v)try{return L.apply(r,m.querySelectorAll(v)),r}catch(e){}finally{c===b&&t.removeAttribute("id")}}}return u(e.replace(B,"$1"),t,r,i)}function ae(){var e=[];function t(n,i){return e.push(n+" ")>r.cacheLength&&delete t[e.shift()],t[n+" "]=i}return t}function se(e){return e[b]=!0,e}function ue(e){var t=d.createElement("fieldset");try{return!!e(t)}catch(e){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function le(e,t){var n=e.split("|"),i=n.length;while(i--)r.attrHandle[n[i]]=t}function ce(e,t){var n=t&&e,r=n&&1===e.nodeType&&1===t.nodeType&&e.sourceIndex-t.sourceIndex;if(r)return r;if(n)while(n=n.nextSibling)if(n===t)return-1;return e?1:-1}function fe(e){return function(t){return"input"===t.nodeName.toLowerCase()&&t.type===e}}function pe(e){return function(t){var n=t.nodeName.toLowerCase();return("input"===n||"button"===n)&&t.type===e}}function de(e){return function(t){return"form"in t?t.parentNode&&!1===t.disabled?"label"in t?"label"in t.parentNode?t.parentNode.disabled===e:t.disabled===e:t.isDisabled===e||t.isDisabled!==!e&&ie(t)===e:t.disabled===e:"label"in t&&t.disabled===e}}function he(e){return se(function(t){return t=+t,se(function(n,r){var i,o=e([],n.length,t),a=o.length;while(a--)n[i=o[a]]&&(n[i]=!(r[i]=n[i]))})})}function ge(e){return e&&"undefined"!=typeof e.getElementsByTagName&&e}n=oe.support={},o=oe.isXML=function(e){var t=e&&(e.ownerDocument||e).documentElement;return!!t&&"HTML"!==t.nodeName},p=oe.setDocument=function(e){var t,i,a=e?e.ownerDocument||e:w;return a!==d&&9===a.nodeType&&a.documentElement?(d=a,h=d.documentElement,g=!o(d),w!==d&&(i=d.defaultView)&&i.top!==i&&(i.addEventListener?i.addEventListener("unload",re,!1):i.attachEvent&&i.attachEvent("onunload",re)),n.attributes=ue(function(e){return e.className="i",!e.getAttribute("className")}),n.getElementsByTagName=ue(function(e){return e.appendChild(d.createComment("")),!e.getElementsByTagName("*").length}),n.getElementsByClassName=Q.test(d.getElementsByClassName),n.getById=ue(function(e){return h.appendChild(e).id=b,!d.getElementsByName||!d.getElementsByName(b).length}),n.getById?(r.filter.ID=function(e){var t=e.replace(Z,ee);return function(e){return e.getAttribute("id")===t}},r.find.ID=function(e,t){if("undefined"!=typeof t.getElementById&&g){var n=t.getElementById(e);return n?[n]:[]}}):(r.filter.ID=function(e){var t=e.replace(Z,ee);return function(e){var n="undefined"!=typeof e.getAttributeNode&&e.getAttributeNode("id");return n&&n.value===t}},r.find.ID=function(e,t){if("undefined"!=typeof t.getElementById&&g){var n,r,i,o=t.getElementById(e);if(o){if((n=o.getAttributeNode("id"))&&n.value===e)return[o];i=t.getElementsByName(e),r=0;while(o=i[r++])if((n=o.getAttributeNode("id"))&&n.value===e)return[o]}return[]}}),r.find.TAG=n.getElementsByTagName?function(e,t){return"undefined"!=typeof t.getElementsByTagName?t.getElementsByTagName(e):n.qsa?t.querySelectorAll(e):void 0}:function(e,t){var n,r=[],i=0,o=t.getElementsByTagName(e);if("*"===e){while(n=o[i++])1===n.nodeType&&r.push(n);return r}return o},r.find.CLASS=n.getElementsByClassName&&function(e,t){if("undefined"!=typeof t.getElementsByClassName&&g)return t.getElementsByClassName(e)},v=[],y=[],(n.qsa=Q.test(d.querySelectorAll))&&(ue(function(e){h.appendChild(e).innerHTML="",e.querySelectorAll("[msallowcapture^='']").length&&y.push("[*^$]="+M+"*(?:''|\"\")"),e.querySelectorAll("[selected]").length||y.push("\\["+M+"*(?:value|"+P+")"),e.querySelectorAll("[id~="+b+"-]").length||y.push("~="),e.querySelectorAll(":checked").length||y.push(":checked"),e.querySelectorAll("a#"+b+"+*").length||y.push(".#.+[+~]")}),ue(function(e){e.innerHTML="";var t=d.createElement("input");t.setAttribute("type","hidden"),e.appendChild(t).setAttribute("name","D"),e.querySelectorAll("[name=d]").length&&y.push("name"+M+"*[*^$|!~]?="),2!==e.querySelectorAll(":enabled").length&&y.push(":enabled",":disabled"),h.appendChild(e).disabled=!0,2!==e.querySelectorAll(":disabled").length&&y.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),y.push(",.*:")})),(n.matchesSelector=Q.test(m=h.matches||h.webkitMatchesSelector||h.mozMatchesSelector||h.oMatchesSelector||h.msMatchesSelector))&&ue(function(e){n.disconnectedMatch=m.call(e,"*"),m.call(e,"[s!='']:x"),v.push("!=",W)}),y=y.length&&new RegExp(y.join("|")),v=v.length&&new RegExp(v.join("|")),t=Q.test(h.compareDocumentPosition),x=t||Q.test(h.contains)?function(e,t){var n=9===e.nodeType?e.documentElement:e,r=t&&t.parentNode;return e===r||!(!r||1!==r.nodeType||!(n.contains?n.contains(r):e.compareDocumentPosition&&16&e.compareDocumentPosition(r)))}:function(e,t){if(t)while(t=t.parentNode)if(t===e)return!0;return!1},D=t?function(e,t){if(e===t)return f=!0,0;var r=!e.compareDocumentPosition-!t.compareDocumentPosition;return r||(1&(r=(e.ownerDocument||e)===(t.ownerDocument||t)?e.compareDocumentPosition(t):1)||!n.sortDetached&&t.compareDocumentPosition(e)===r?e===d||e.ownerDocument===w&&x(w,e)?-1:t===d||t.ownerDocument===w&&x(w,t)?1:c?O(c,e)-O(c,t):0:4&r?-1:1)}:function(e,t){if(e===t)return f=!0,0;var n,r=0,i=e.parentNode,o=t.parentNode,a=[e],s=[t];if(!i||!o)return e===d?-1:t===d?1:i?-1:o?1:c?O(c,e)-O(c,t):0;if(i===o)return ce(e,t);n=e;while(n=n.parentNode)a.unshift(n);n=t;while(n=n.parentNode)s.unshift(n);while(a[r]===s[r])r++;return r?ce(a[r],s[r]):a[r]===w?-1:s[r]===w?1:0},d):d},oe.matches=function(e,t){return oe(e,null,null,t)},oe.matchesSelector=function(e,t){if((e.ownerDocument||e)!==d&&p(e),t=t.replace(z,"='$1']"),n.matchesSelector&&g&&!S[t+" "]&&(!v||!v.test(t))&&(!y||!y.test(t)))try{var r=m.call(e,t);if(r||n.disconnectedMatch||e.document&&11!==e.document.nodeType)return r}catch(e){}return oe(t,d,null,[e]).length>0},oe.contains=function(e,t){return(e.ownerDocument||e)!==d&&p(e),x(e,t)},oe.attr=function(e,t){(e.ownerDocument||e)!==d&&p(e);var i=r.attrHandle[t.toLowerCase()],o=i&&N.call(r.attrHandle,t.toLowerCase())?i(e,t,!g):void 0;return void 0!==o?o:n.attributes||!g?e.getAttribute(t):(o=e.getAttributeNode(t))&&o.specified?o.value:null},oe.escape=function(e){return(e+"").replace(te,ne)},oe.error=function(e){throw new Error("Syntax error, unrecognized expression: "+e)},oe.uniqueSort=function(e){var t,r=[],i=0,o=0;if(f=!n.detectDuplicates,c=!n.sortStable&&e.slice(0),e.sort(D),f){while(t=e[o++])t===e[o]&&(i=r.push(o));while(i--)e.splice(r[i],1)}return c=null,e},i=oe.getText=function(e){var t,n="",r=0,o=e.nodeType;if(o){if(1===o||9===o||11===o){if("string"==typeof e.textContent)return e.textContent;for(e=e.firstChild;e;e=e.nextSibling)n+=i(e)}else if(3===o||4===o)return e.nodeValue}else while(t=e[r++])n+=i(t);return n},(r=oe.selectors={cacheLength:50,createPseudo:se,match:V,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(Z,ee),e[3]=(e[3]||e[4]||e[5]||"").replace(Z,ee),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||oe.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&oe.error(e[0]),e},PSEUDO:function(e){var t,n=!e[6]&&e[2];return V.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":n&&X.test(n)&&(t=a(n,!0))&&(t=n.indexOf(")",n.length-t)-n.length)&&(e[0]=e[0].slice(0,t),e[2]=n.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(Z,ee).toLowerCase();return"*"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=E[e+" "];return t||(t=new RegExp("(^|"+M+")"+e+"("+M+"|$)"))&&E(e,function(e){return t.test("string"==typeof e.className&&e.className||"undefined"!=typeof e.getAttribute&&e.getAttribute("class")||"")})},ATTR:function(e,t,n){return function(r){var i=oe.attr(r,e);return null==i?"!="===t:!t||(i+="","="===t?i===n:"!="===t?i!==n:"^="===t?n&&0===i.indexOf(n):"*="===t?n&&i.indexOf(n)>-1:"$="===t?n&&i.slice(-n.length)===n:"~="===t?(" "+i.replace($," ")+" ").indexOf(n)>-1:"|="===t&&(i===n||i.slice(0,n.length+1)===n+"-"))}},CHILD:function(e,t,n,r,i){var o="nth"!==e.slice(0,3),a="last"!==e.slice(-4),s="of-type"===t;return 1===r&&0===i?function(e){return!!e.parentNode}:function(t,n,u){var l,c,f,p,d,h,g=o!==a?"nextSibling":"previousSibling",y=t.parentNode,v=s&&t.nodeName.toLowerCase(),m=!u&&!s,x=!1;if(y){if(o){while(g){p=t;while(p=p[g])if(s?p.nodeName.toLowerCase()===v:1===p.nodeType)return!1;h=g="only"===e&&!h&&"nextSibling"}return!0}if(h=[a?y.firstChild:y.lastChild],a&&m){x=(d=(l=(c=(f=(p=y)[b]||(p[b]={}))[p.uniqueID]||(f[p.uniqueID]={}))[e]||[])[0]===T&&l[1])&&l[2],p=d&&y.childNodes[d];while(p=++d&&p&&p[g]||(x=d=0)||h.pop())if(1===p.nodeType&&++x&&p===t){c[e]=[T,d,x];break}}else if(m&&(x=d=(l=(c=(f=(p=t)[b]||(p[b]={}))[p.uniqueID]||(f[p.uniqueID]={}))[e]||[])[0]===T&&l[1]),!1===x)while(p=++d&&p&&p[g]||(x=d=0)||h.pop())if((s?p.nodeName.toLowerCase()===v:1===p.nodeType)&&++x&&(m&&((c=(f=p[b]||(p[b]={}))[p.uniqueID]||(f[p.uniqueID]={}))[e]=[T,x]),p===t))break;return(x-=i)===r||x%r==0&&x/r>=0}}},PSEUDO:function(e,t){var n,i=r.pseudos[e]||r.setFilters[e.toLowerCase()]||oe.error("unsupported pseudo: "+e);return i[b]?i(t):i.length>1?(n=[e,e,"",t],r.setFilters.hasOwnProperty(e.toLowerCase())?se(function(e,n){var r,o=i(e,t),a=o.length;while(a--)e[r=O(e,o[a])]=!(n[r]=o[a])}):function(e){return i(e,0,n)}):i}},pseudos:{not:se(function(e){var t=[],n=[],r=s(e.replace(B,"$1"));return r[b]?se(function(e,t,n,i){var o,a=r(e,null,i,[]),s=e.length;while(s--)(o=a[s])&&(e[s]=!(t[s]=o))}):function(e,i,o){return t[0]=e,r(t,null,o,n),t[0]=null,!n.pop()}}),has:se(function(e){return function(t){return oe(e,t).length>0}}),contains:se(function(e){return e=e.replace(Z,ee),function(t){return(t.textContent||t.innerText||i(t)).indexOf(e)>-1}}),lang:se(function(e){return U.test(e||"")||oe.error("unsupported lang: "+e),e=e.replace(Z,ee).toLowerCase(),function(t){var n;do{if(n=g?t.lang:t.getAttribute("xml:lang")||t.getAttribute("lang"))return(n=n.toLowerCase())===e||0===n.indexOf(e+"-")}while((t=t.parentNode)&&1===t.nodeType);return!1}}),target:function(t){var n=e.location&&e.location.hash;return n&&n.slice(1)===t.id},root:function(e){return e===h},focus:function(e){return e===d.activeElement&&(!d.hasFocus||d.hasFocus())&&!!(e.type||e.href||~e.tabIndex)},enabled:de(!1),disabled:de(!0),checked:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&!!e.checked||"option"===t&&!!e.selected},selected:function(e){return e.parentNode&&e.parentNode.selectedIndex,!0===e.selected},empty:function(e){for(e=e.firstChild;e;e=e.nextSibling)if(e.nodeType<6)return!1;return!0},parent:function(e){return!r.pseudos.empty(e)},header:function(e){return Y.test(e.nodeName)},input:function(e){return G.test(e.nodeName)},button:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&"button"===e.type||"button"===t},text:function(e){var t;return"input"===e.nodeName.toLowerCase()&&"text"===e.type&&(null==(t=e.getAttribute("type"))||"text"===t.toLowerCase())},first:he(function(){return[0]}),last:he(function(e,t){return[t-1]}),eq:he(function(e,t,n){return[n<0?n+t:n]}),even:he(function(e,t){for(var n=0;n=0;)e.push(r);return e}),gt:he(function(e,t,n){for(var r=n<0?n+t:n;++r1?function(t,n,r){var i=e.length;while(i--)if(!e[i](t,n,r))return!1;return!0}:e[0]}function be(e,t,n){for(var r=0,i=t.length;r-1&&(o[l]=!(a[l]=f))}}else v=we(v===a?v.splice(h,v.length):v),i?i(null,a,v,u):L.apply(a,v)})}function Ce(e){for(var t,n,i,o=e.length,a=r.relative[e[0].type],s=a||r.relative[" "],u=a?1:0,c=me(function(e){return e===t},s,!0),f=me(function(e){return O(t,e)>-1},s,!0),p=[function(e,n,r){var i=!a&&(r||n!==l)||((t=n).nodeType?c(e,n,r):f(e,n,r));return t=null,i}];u1&&xe(p),u>1&&ve(e.slice(0,u-1).concat({value:" "===e[u-2].type?"*":""})).replace(B,"$1"),n,u0,i=e.length>0,o=function(o,a,s,u,c){var f,h,y,v=0,m="0",x=o&&[],b=[],w=l,C=o||i&&r.find.TAG("*",c),E=T+=null==w?1:Math.random()||.1,k=C.length;for(c&&(l=a===d||a||c);m!==k&&null!=(f=C[m]);m++){if(i&&f){h=0,a||f.ownerDocument===d||(p(f),s=!g);while(y=e[h++])if(y(f,a||d,s)){u.push(f);break}c&&(T=E)}n&&((f=!y&&f)&&v--,o&&x.push(f))}if(v+=m,n&&m!==v){h=0;while(y=t[h++])y(x,b,a,s);if(o){if(v>0)while(m--)x[m]||b[m]||(b[m]=j.call(u));b=we(b)}L.apply(u,b),c&&!o&&b.length>0&&v+t.length>1&&oe.uniqueSort(u)}return c&&(T=E,l=w),x};return n?se(o):o}return s=oe.compile=function(e,t){var n,r=[],i=[],o=S[e+" "];if(!o){t||(t=a(e)),n=t.length;while(n--)(o=Ce(t[n]))[b]?r.push(o):i.push(o);(o=S(e,Ee(i,r))).selector=e}return o},u=oe.select=function(e,t,n,i){var o,u,l,c,f,p="function"==typeof e&&e,d=!i&&a(e=p.selector||e);if(n=n||[],1===d.length){if((u=d[0]=d[0].slice(0)).length>2&&"ID"===(l=u[0]).type&&9===t.nodeType&&g&&r.relative[u[1].type]){if(!(t=(r.find.ID(l.matches[0].replace(Z,ee),t)||[])[0]))return n;p&&(t=t.parentNode),e=e.slice(u.shift().value.length)}o=V.needsContext.test(e)?0:u.length;while(o--){if(l=u[o],r.relative[c=l.type])break;if((f=r.find[c])&&(i=f(l.matches[0].replace(Z,ee),K.test(u[0].type)&&ge(t.parentNode)||t))){if(u.splice(o,1),!(e=i.length&&ve(u)))return L.apply(n,i),n;break}}}return(p||s(e,d))(i,t,!g,n,!t||K.test(e)&&ge(t.parentNode)||t),n},n.sortStable=b.split("").sort(D).join("")===b,n.detectDuplicates=!!f,p(),n.sortDetached=ue(function(e){return 1&e.compareDocumentPosition(d.createElement("fieldset"))}),ue(function(e){return e.innerHTML="","#"===e.firstChild.getAttribute("href")})||le("type|href|height|width",function(e,t,n){if(!n)return e.getAttribute(t,"type"===t.toLowerCase()?1:2)}),n.attributes&&ue(function(e){return e.innerHTML="",e.firstChild.setAttribute("value",""),""===e.firstChild.getAttribute("value")})||le("value",function(e,t,n){if(!n&&"input"===e.nodeName.toLowerCase())return e.defaultValue}),ue(function(e){return null==e.getAttribute("disabled")})||le(P,function(e,t,n){var r;if(!n)return!0===e[t]?t.toLowerCase():(r=e.getAttributeNode(t))&&r.specified?r.value:null}),oe}(e);w.find=E,w.expr=E.selectors,w.expr[":"]=w.expr.pseudos,w.uniqueSort=w.unique=E.uniqueSort,w.text=E.getText,w.isXMLDoc=E.isXML,w.contains=E.contains,w.escapeSelector=E.escape;var k=function(e,t,n){var r=[],i=void 0!==n;while((e=e[t])&&9!==e.nodeType)if(1===e.nodeType){if(i&&w(e).is(n))break;r.push(e)}return r},S=function(e,t){for(var n=[];e;e=e.nextSibling)1===e.nodeType&&e!==t&&n.push(e);return n},D=w.expr.match.needsContext;function N(e,t){return e.nodeName&&e.nodeName.toLowerCase()===t.toLowerCase()}var A=/^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i;function j(e,t,n){return g(t)?w.grep(e,function(e,r){return!!t.call(e,r,e)!==n}):t.nodeType?w.grep(e,function(e){return e===t!==n}):"string"!=typeof t?w.grep(e,function(e){return u.call(t,e)>-1!==n}):w.filter(t,e,n)}w.filter=function(e,t,n){var r=t[0];return n&&(e=":not("+e+")"),1===t.length&&1===r.nodeType?w.find.matchesSelector(r,e)?[r]:[]:w.find.matches(e,w.grep(t,function(e){return 1===e.nodeType}))},w.fn.extend({find:function(e){var t,n,r=this.length,i=this;if("string"!=typeof e)return this.pushStack(w(e).filter(function(){for(t=0;t1?w.uniqueSort(n):n},filter:function(e){return this.pushStack(j(this,e||[],!1))},not:function(e){return this.pushStack(j(this,e||[],!0))},is:function(e){return!!j(this,"string"==typeof e&&D.test(e)?w(e):e||[],!1).length}});var q,L=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]+))$/;(w.fn.init=function(e,t,n){var i,o;if(!e)return this;if(n=n||q,"string"==typeof e){if(!(i="<"===e[0]&&">"===e[e.length-1]&&e.length>=3?[null,e,null]:L.exec(e))||!i[1]&&t)return!t||t.jquery?(t||n).find(e):this.constructor(t).find(e);if(i[1]){if(t=t instanceof w?t[0]:t,w.merge(this,w.parseHTML(i[1],t&&t.nodeType?t.ownerDocument||t:r,!0)),A.test(i[1])&&w.isPlainObject(t))for(i in t)g(this[i])?this[i](t[i]):this.attr(i,t[i]);return this}return(o=r.getElementById(i[2]))&&(this[0]=o,this.length=1),this}return e.nodeType?(this[0]=e,this.length=1,this):g(e)?void 0!==n.ready?n.ready(e):e(w):w.makeArray(e,this)}).prototype=w.fn,q=w(r);var H=/^(?:parents|prev(?:Until|All))/,O={children:!0,contents:!0,next:!0,prev:!0};w.fn.extend({has:function(e){var t=w(e,this),n=t.length;return this.filter(function(){for(var e=0;e-1:1===n.nodeType&&w.find.matchesSelector(n,e))){o.push(n);break}return this.pushStack(o.length>1?w.uniqueSort(o):o)},index:function(e){return e?"string"==typeof e?u.call(w(e),this[0]):u.call(this,e.jquery?e[0]:e):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(e,t){return this.pushStack(w.uniqueSort(w.merge(this.get(),w(e,t))))},addBack:function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}});function P(e,t){while((e=e[t])&&1!==e.nodeType);return e}w.each({parent:function(e){var t=e.parentNode;return t&&11!==t.nodeType?t:null},parents:function(e){return k(e,"parentNode")},parentsUntil:function(e,t,n){return k(e,"parentNode",n)},next:function(e){return P(e,"nextSibling")},prev:function(e){return P(e,"previousSibling")},nextAll:function(e){return k(e,"nextSibling")},prevAll:function(e){return k(e,"previousSibling")},nextUntil:function(e,t,n){return k(e,"nextSibling",n)},prevUntil:function(e,t,n){return k(e,"previousSibling",n)},siblings:function(e){return S((e.parentNode||{}).firstChild,e)},children:function(e){return S(e.firstChild)},contents:function(e){return N(e,"iframe")?e.contentDocument:(N(e,"template")&&(e=e.content||e),w.merge([],e.childNodes))}},function(e,t){w.fn[e]=function(n,r){var i=w.map(this,t,n);return"Until"!==e.slice(-5)&&(r=n),r&&"string"==typeof r&&(i=w.filter(r,i)),this.length>1&&(O[e]||w.uniqueSort(i),H.test(e)&&i.reverse()),this.pushStack(i)}});var M=/[^\x20\t\r\n\f]+/g;function R(e){var t={};return w.each(e.match(M)||[],function(e,n){t[n]=!0}),t}w.Callbacks=function(e){e="string"==typeof e?R(e):w.extend({},e);var t,n,r,i,o=[],a=[],s=-1,u=function(){for(i=i||e.once,r=t=!0;a.length;s=-1){n=a.shift();while(++s-1)o.splice(n,1),n<=s&&s--}),this},has:function(e){return e?w.inArray(e,o)>-1:o.length>0},empty:function(){return o&&(o=[]),this},disable:function(){return i=a=[],o=n="",this},disabled:function(){return!o},lock:function(){return i=a=[],n||t||(o=n=""),this},locked:function(){return!!i},fireWith:function(e,n){return i||(n=[e,(n=n||[]).slice?n.slice():n],a.push(n),t||u()),this},fire:function(){return l.fireWith(this,arguments),this},fired:function(){return!!r}};return l};function I(e){return e}function W(e){throw e}function $(e,t,n,r){var i;try{e&&g(i=e.promise)?i.call(e).done(t).fail(n):e&&g(i=e.then)?i.call(e,t,n):t.apply(void 0,[e].slice(r))}catch(e){n.apply(void 0,[e])}}w.extend({Deferred:function(t){var n=[["notify","progress",w.Callbacks("memory"),w.Callbacks("memory"),2],["resolve","done",w.Callbacks("once memory"),w.Callbacks("once memory"),0,"resolved"],["reject","fail",w.Callbacks("once memory"),w.Callbacks("once memory"),1,"rejected"]],r="pending",i={state:function(){return r},always:function(){return o.done(arguments).fail(arguments),this},"catch":function(e){return i.then(null,e)},pipe:function(){var e=arguments;return w.Deferred(function(t){w.each(n,function(n,r){var i=g(e[r[4]])&&e[r[4]];o[r[1]](function(){var e=i&&i.apply(this,arguments);e&&g(e.promise)?e.promise().progress(t.notify).done(t.resolve).fail(t.reject):t[r[0]+"With"](this,i?[e]:arguments)})}),e=null}).promise()},then:function(t,r,i){var o=0;function a(t,n,r,i){return function(){var s=this,u=arguments,l=function(){var e,l;if(!(t=o&&(r!==W&&(s=void 0,u=[e]),n.rejectWith(s,u))}};t?c():(w.Deferred.getStackHook&&(c.stackTrace=w.Deferred.getStackHook()),e.setTimeout(c))}}return w.Deferred(function(e){n[0][3].add(a(0,e,g(i)?i:I,e.notifyWith)),n[1][3].add(a(0,e,g(t)?t:I)),n[2][3].add(a(0,e,g(r)?r:W))}).promise()},promise:function(e){return null!=e?w.extend(e,i):i}},o={};return w.each(n,function(e,t){var a=t[2],s=t[5];i[t[1]]=a.add,s&&a.add(function(){r=s},n[3-e][2].disable,n[3-e][3].disable,n[0][2].lock,n[0][3].lock),a.add(t[3].fire),o[t[0]]=function(){return o[t[0]+"With"](this===o?void 0:this,arguments),this},o[t[0]+"With"]=a.fireWith}),i.promise(o),t&&t.call(o,o),o},when:function(e){var t=arguments.length,n=t,r=Array(n),i=o.call(arguments),a=w.Deferred(),s=function(e){return function(n){r[e]=this,i[e]=arguments.length>1?o.call(arguments):n,--t||a.resolveWith(r,i)}};if(t<=1&&($(e,a.done(s(n)).resolve,a.reject,!t),"pending"===a.state()||g(i[n]&&i[n].then)))return a.then();while(n--)$(i[n],s(n),a.reject);return a.promise()}});var B=/^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/;w.Deferred.exceptionHook=function(t,n){e.console&&e.console.warn&&t&&B.test(t.name)&&e.console.warn("jQuery.Deferred exception: "+t.message,t.stack,n)},w.readyException=function(t){e.setTimeout(function(){throw t})};var F=w.Deferred();w.fn.ready=function(e){return F.then(e)["catch"](function(e){w.readyException(e)}),this},w.extend({isReady:!1,readyWait:1,ready:function(e){(!0===e?--w.readyWait:w.isReady)||(w.isReady=!0,!0!==e&&--w.readyWait>0||F.resolveWith(r,[w]))}}),w.ready.then=F.then;function _(){r.removeEventListener("DOMContentLoaded",_),e.removeEventListener("load",_),w.ready()}"complete"===r.readyState||"loading"!==r.readyState&&!r.documentElement.doScroll?e.setTimeout(w.ready):(r.addEventListener("DOMContentLoaded",_),e.addEventListener("load",_));var z=function(e,t,n,r,i,o,a){var s=0,u=e.length,l=null==n;if("object"===x(n)){i=!0;for(s in n)z(e,t,s,n[s],!0,o,a)}else if(void 0!==r&&(i=!0,g(r)||(a=!0),l&&(a?(t.call(e,r),t=null):(l=t,t=function(e,t,n){return l.call(w(e),n)})),t))for(;s1,null,!0)},removeData:function(e){return this.each(function(){K.remove(this,e)})}}),w.extend({queue:function(e,t,n){var r;if(e)return t=(t||"fx")+"queue",r=J.get(e,t),n&&(!r||Array.isArray(n)?r=J.access(e,t,w.makeArray(n)):r.push(n)),r||[]},dequeue:function(e,t){t=t||"fx";var n=w.queue(e,t),r=n.length,i=n.shift(),o=w._queueHooks(e,t),a=function(){w.dequeue(e,t)};"inprogress"===i&&(i=n.shift(),r--),i&&("fx"===t&&n.unshift("inprogress"),delete o.stop,i.call(e,a,o)),!r&&o&&o.empty.fire()},_queueHooks:function(e,t){var n=t+"queueHooks";return J.get(e,n)||J.access(e,n,{empty:w.Callbacks("once memory").add(function(){J.remove(e,[t+"queue",n])})})}}),w.fn.extend({queue:function(e,t){var n=2;return"string"!=typeof e&&(t=e,e="fx",n--),arguments.length\x20\t\r\n\f]+)/i,he=/^$|^module$|\/(?:java|ecma)script/i,ge={option:[1,""],thead:[1,"","
    "],col:[2,"","
    "],tr:[2,"","
    "],td:[3,"","
    "],_default:[0,"",""]};ge.optgroup=ge.option,ge.tbody=ge.tfoot=ge.colgroup=ge.caption=ge.thead,ge.th=ge.td;function ye(e,t){var n;return n="undefined"!=typeof e.getElementsByTagName?e.getElementsByTagName(t||"*"):"undefined"!=typeof e.querySelectorAll?e.querySelectorAll(t||"*"):[],void 0===t||t&&N(e,t)?w.merge([e],n):n}function ve(e,t){for(var n=0,r=e.length;n-1)i&&i.push(o);else if(l=w.contains(o.ownerDocument,o),a=ye(f.appendChild(o),"script"),l&&ve(a),n){c=0;while(o=a[c++])he.test(o.type||"")&&n.push(o)}return f}!function(){var e=r.createDocumentFragment().appendChild(r.createElement("div")),t=r.createElement("input");t.setAttribute("type","radio"),t.setAttribute("checked","checked"),t.setAttribute("name","t"),e.appendChild(t),h.checkClone=e.cloneNode(!0).cloneNode(!0).lastChild.checked,e.innerHTML="",h.noCloneChecked=!!e.cloneNode(!0).lastChild.defaultValue}();var be=r.documentElement,we=/^key/,Te=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,Ce=/^([^.]*)(?:\.(.+)|)/;function Ee(){return!0}function ke(){return!1}function Se(){try{return r.activeElement}catch(e){}}function De(e,t,n,r,i,o){var a,s;if("object"==typeof t){"string"!=typeof n&&(r=r||n,n=void 0);for(s in t)De(e,s,n,r,t[s],o);return e}if(null==r&&null==i?(i=n,r=n=void 0):null==i&&("string"==typeof n?(i=r,r=void 0):(i=r,r=n,n=void 0)),!1===i)i=ke;else if(!i)return e;return 1===o&&(a=i,(i=function(e){return w().off(e),a.apply(this,arguments)}).guid=a.guid||(a.guid=w.guid++)),e.each(function(){w.event.add(this,t,i,r,n)})}w.event={global:{},add:function(e,t,n,r,i){var o,a,s,u,l,c,f,p,d,h,g,y=J.get(e);if(y){n.handler&&(n=(o=n).handler,i=o.selector),i&&w.find.matchesSelector(be,i),n.guid||(n.guid=w.guid++),(u=y.events)||(u=y.events={}),(a=y.handle)||(a=y.handle=function(t){return"undefined"!=typeof w&&w.event.triggered!==t.type?w.event.dispatch.apply(e,arguments):void 0}),l=(t=(t||"").match(M)||[""]).length;while(l--)d=g=(s=Ce.exec(t[l])||[])[1],h=(s[2]||"").split(".").sort(),d&&(f=w.event.special[d]||{},d=(i?f.delegateType:f.bindType)||d,f=w.event.special[d]||{},c=w.extend({type:d,origType:g,data:r,handler:n,guid:n.guid,selector:i,needsContext:i&&w.expr.match.needsContext.test(i),namespace:h.join(".")},o),(p=u[d])||((p=u[d]=[]).delegateCount=0,f.setup&&!1!==f.setup.call(e,r,h,a)||e.addEventListener&&e.addEventListener(d,a)),f.add&&(f.add.call(e,c),c.handler.guid||(c.handler.guid=n.guid)),i?p.splice(p.delegateCount++,0,c):p.push(c),w.event.global[d]=!0)}},remove:function(e,t,n,r,i){var o,a,s,u,l,c,f,p,d,h,g,y=J.hasData(e)&&J.get(e);if(y&&(u=y.events)){l=(t=(t||"").match(M)||[""]).length;while(l--)if(s=Ce.exec(t[l])||[],d=g=s[1],h=(s[2]||"").split(".").sort(),d){f=w.event.special[d]||{},p=u[d=(r?f.delegateType:f.bindType)||d]||[],s=s[2]&&new RegExp("(^|\\.)"+h.join("\\.(?:.*\\.|)")+"(\\.|$)"),a=o=p.length;while(o--)c=p[o],!i&&g!==c.origType||n&&n.guid!==c.guid||s&&!s.test(c.namespace)||r&&r!==c.selector&&("**"!==r||!c.selector)||(p.splice(o,1),c.selector&&p.delegateCount--,f.remove&&f.remove.call(e,c));a&&!p.length&&(f.teardown&&!1!==f.teardown.call(e,h,y.handle)||w.removeEvent(e,d,y.handle),delete u[d])}else for(d in u)w.event.remove(e,d+t[l],n,r,!0);w.isEmptyObject(u)&&J.remove(e,"handle events")}},dispatch:function(e){var t=w.event.fix(e),n,r,i,o,a,s,u=new Array(arguments.length),l=(J.get(this,"events")||{})[t.type]||[],c=w.event.special[t.type]||{};for(u[0]=t,n=1;n=1))for(;l!==this;l=l.parentNode||this)if(1===l.nodeType&&("click"!==e.type||!0!==l.disabled)){for(o=[],a={},n=0;n-1:w.find(i,this,null,[l]).length),a[i]&&o.push(r);o.length&&s.push({elem:l,handlers:o})}return l=this,u\x20\t\r\n\f]*)[^>]*)\/>/gi,Ae=/\s*$/g;function Le(e,t){return N(e,"table")&&N(11!==t.nodeType?t:t.firstChild,"tr")?w(e).children("tbody")[0]||e:e}function He(e){return e.type=(null!==e.getAttribute("type"))+"/"+e.type,e}function Oe(e){return"true/"===(e.type||"").slice(0,5)?e.type=e.type.slice(5):e.removeAttribute("type"),e}function Pe(e,t){var n,r,i,o,a,s,u,l;if(1===t.nodeType){if(J.hasData(e)&&(o=J.access(e),a=J.set(t,o),l=o.events)){delete a.handle,a.events={};for(i in l)for(n=0,r=l[i].length;n1&&"string"==typeof y&&!h.checkClone&&je.test(y))return e.each(function(i){var o=e.eq(i);v&&(t[0]=y.call(this,i,o.html())),Re(o,t,n,r)});if(p&&(i=xe(t,e[0].ownerDocument,!1,e,r),o=i.firstChild,1===i.childNodes.length&&(i=o),o||r)){for(u=(s=w.map(ye(i,"script"),He)).length;f")},clone:function(e,t,n){var r,i,o,a,s=e.cloneNode(!0),u=w.contains(e.ownerDocument,e);if(!(h.noCloneChecked||1!==e.nodeType&&11!==e.nodeType||w.isXMLDoc(e)))for(a=ye(s),r=0,i=(o=ye(e)).length;r0&&ve(a,!u&&ye(e,"script")),s},cleanData:function(e){for(var t,n,r,i=w.event.special,o=0;void 0!==(n=e[o]);o++)if(Y(n)){if(t=n[J.expando]){if(t.events)for(r in t.events)i[r]?w.event.remove(n,r):w.removeEvent(n,r,t.handle);n[J.expando]=void 0}n[K.expando]&&(n[K.expando]=void 0)}}}),w.fn.extend({detach:function(e){return Ie(this,e,!0)},remove:function(e){return Ie(this,e)},text:function(e){return z(this,function(e){return void 0===e?w.text(this):this.empty().each(function(){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||(this.textContent=e)})},null,e,arguments.length)},append:function(){return Re(this,arguments,function(e){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||Le(this,e).appendChild(e)})},prepend:function(){return Re(this,arguments,function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=Le(this,e);t.insertBefore(e,t.firstChild)}})},before:function(){return Re(this,arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this)})},after:function(){return Re(this,arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this.nextSibling)})},empty:function(){for(var e,t=0;null!=(e=this[t]);t++)1===e.nodeType&&(w.cleanData(ye(e,!1)),e.textContent="");return this},clone:function(e,t){return e=null!=e&&e,t=null==t?e:t,this.map(function(){return w.clone(this,e,t)})},html:function(e){return z(this,function(e){var t=this[0]||{},n=0,r=this.length;if(void 0===e&&1===t.nodeType)return t.innerHTML;if("string"==typeof e&&!Ae.test(e)&&!ge[(de.exec(e)||["",""])[1].toLowerCase()]){e=w.htmlPrefilter(e);try{for(;n=0&&(u+=Math.max(0,Math.ceil(e["offset"+t[0].toUpperCase()+t.slice(1)]-o-u-s-.5))),u}function et(e,t,n){var r=$e(e),i=Fe(e,t,r),o="border-box"===w.css(e,"boxSizing",!1,r),a=o;if(We.test(i)){if(!n)return i;i="auto"}return a=a&&(h.boxSizingReliable()||i===e.style[t]),("auto"===i||!parseFloat(i)&&"inline"===w.css(e,"display",!1,r))&&(i=e["offset"+t[0].toUpperCase()+t.slice(1)],a=!0),(i=parseFloat(i)||0)+Ze(e,t,n||(o?"border":"content"),a,r,i)+"px"}w.extend({cssHooks:{opacity:{get:function(e,t){if(t){var n=Fe(e,"opacity");return""===n?"1":n}}}},cssNumber:{animationIterationCount:!0,columnCount:!0,fillOpacity:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{},style:function(e,t,n,r){if(e&&3!==e.nodeType&&8!==e.nodeType&&e.style){var i,o,a,s=G(t),u=Xe.test(t),l=e.style;if(u||(t=Je(s)),a=w.cssHooks[t]||w.cssHooks[s],void 0===n)return a&&"get"in a&&void 0!==(i=a.get(e,!1,r))?i:l[t];"string"==(o=typeof n)&&(i=ie.exec(n))&&i[1]&&(n=ue(e,t,i),o="number"),null!=n&&n===n&&("number"===o&&(n+=i&&i[3]||(w.cssNumber[s]?"":"px")),h.clearCloneStyle||""!==n||0!==t.indexOf("background")||(l[t]="inherit"),a&&"set"in a&&void 0===(n=a.set(e,n,r))||(u?l.setProperty(t,n):l[t]=n))}},css:function(e,t,n,r){var i,o,a,s=G(t);return Xe.test(t)||(t=Je(s)),(a=w.cssHooks[t]||w.cssHooks[s])&&"get"in a&&(i=a.get(e,!0,n)),void 0===i&&(i=Fe(e,t,r)),"normal"===i&&t in Ve&&(i=Ve[t]),""===n||n?(o=parseFloat(i),!0===n||isFinite(o)?o||0:i):i}}),w.each(["height","width"],function(e,t){w.cssHooks[t]={get:function(e,n,r){if(n)return!ze.test(w.css(e,"display"))||e.getClientRects().length&&e.getBoundingClientRect().width?et(e,t,r):se(e,Ue,function(){return et(e,t,r)})},set:function(e,n,r){var i,o=$e(e),a="border-box"===w.css(e,"boxSizing",!1,o),s=r&&Ze(e,t,r,a,o);return a&&h.scrollboxSize()===o.position&&(s-=Math.ceil(e["offset"+t[0].toUpperCase()+t.slice(1)]-parseFloat(o[t])-Ze(e,t,"border",!1,o)-.5)),s&&(i=ie.exec(n))&&"px"!==(i[3]||"px")&&(e.style[t]=n,n=w.css(e,t)),Ke(e,n,s)}}}),w.cssHooks.marginLeft=_e(h.reliableMarginLeft,function(e,t){if(t)return(parseFloat(Fe(e,"marginLeft"))||e.getBoundingClientRect().left-se(e,{marginLeft:0},function(){return e.getBoundingClientRect().left}))+"px"}),w.each({margin:"",padding:"",border:"Width"},function(e,t){w.cssHooks[e+t]={expand:function(n){for(var r=0,i={},o="string"==typeof n?n.split(" "):[n];r<4;r++)i[e+oe[r]+t]=o[r]||o[r-2]||o[0];return i}},"margin"!==e&&(w.cssHooks[e+t].set=Ke)}),w.fn.extend({css:function(e,t){return z(this,function(e,t,n){var r,i,o={},a=0;if(Array.isArray(t)){for(r=$e(e),i=t.length;a1)}});function tt(e,t,n,r,i){return new tt.prototype.init(e,t,n,r,i)}w.Tween=tt,tt.prototype={constructor:tt,init:function(e,t,n,r,i,o){this.elem=e,this.prop=n,this.easing=i||w.easing._default,this.options=t,this.start=this.now=this.cur(),this.end=r,this.unit=o||(w.cssNumber[n]?"":"px")},cur:function(){var e=tt.propHooks[this.prop];return e&&e.get?e.get(this):tt.propHooks._default.get(this)},run:function(e){var t,n=tt.propHooks[this.prop];return this.options.duration?this.pos=t=w.easing[this.easing](e,this.options.duration*e,0,1,this.options.duration):this.pos=t=e,this.now=(this.end-this.start)*t+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),n&&n.set?n.set(this):tt.propHooks._default.set(this),this}},tt.prototype.init.prototype=tt.prototype,tt.propHooks={_default:{get:function(e){var t;return 1!==e.elem.nodeType||null!=e.elem[e.prop]&&null==e.elem.style[e.prop]?e.elem[e.prop]:(t=w.css(e.elem,e.prop,""))&&"auto"!==t?t:0},set:function(e){w.fx.step[e.prop]?w.fx.step[e.prop](e):1!==e.elem.nodeType||null==e.elem.style[w.cssProps[e.prop]]&&!w.cssHooks[e.prop]?e.elem[e.prop]=e.now:w.style(e.elem,e.prop,e.now+e.unit)}}},tt.propHooks.scrollTop=tt.propHooks.scrollLeft={set:function(e){e.elem.nodeType&&e.elem.parentNode&&(e.elem[e.prop]=e.now)}},w.easing={linear:function(e){return e},swing:function(e){return.5-Math.cos(e*Math.PI)/2},_default:"swing"},w.fx=tt.prototype.init,w.fx.step={};var nt,rt,it=/^(?:toggle|show|hide)$/,ot=/queueHooks$/;function at(){rt&&(!1===r.hidden&&e.requestAnimationFrame?e.requestAnimationFrame(at):e.setTimeout(at,w.fx.interval),w.fx.tick())}function st(){return e.setTimeout(function(){nt=void 0}),nt=Date.now()}function ut(e,t){var n,r=0,i={height:e};for(t=t?1:0;r<4;r+=2-t)i["margin"+(n=oe[r])]=i["padding"+n]=e;return t&&(i.opacity=i.width=e),i}function lt(e,t,n){for(var r,i=(pt.tweeners[t]||[]).concat(pt.tweeners["*"]),o=0,a=i.length;o1)},removeAttr:function(e){return this.each(function(){w.removeAttr(this,e)})}}),w.extend({attr:function(e,t,n){var r,i,o=e.nodeType;if(3!==o&&8!==o&&2!==o)return"undefined"==typeof e.getAttribute?w.prop(e,t,n):(1===o&&w.isXMLDoc(e)||(i=w.attrHooks[t.toLowerCase()]||(w.expr.match.bool.test(t)?dt:void 0)),void 0!==n?null===n?void w.removeAttr(e,t):i&&"set"in i&&void 0!==(r=i.set(e,n,t))?r:(e.setAttribute(t,n+""),n):i&&"get"in i&&null!==(r=i.get(e,t))?r:null==(r=w.find.attr(e,t))?void 0:r)},attrHooks:{type:{set:function(e,t){if(!h.radioValue&&"radio"===t&&N(e,"input")){var n=e.value;return e.setAttribute("type",t),n&&(e.value=n),t}}}},removeAttr:function(e,t){var n,r=0,i=t&&t.match(M);if(i&&1===e.nodeType)while(n=i[r++])e.removeAttribute(n)}}),dt={set:function(e,t,n){return!1===t?w.removeAttr(e,n):e.setAttribute(n,n),n}},w.each(w.expr.match.bool.source.match(/\w+/g),function(e,t){var n=ht[t]||w.find.attr;ht[t]=function(e,t,r){var i,o,a=t.toLowerCase();return r||(o=ht[a],ht[a]=i,i=null!=n(e,t,r)?a:null,ht[a]=o),i}});var gt=/^(?:input|select|textarea|button)$/i,yt=/^(?:a|area)$/i;w.fn.extend({prop:function(e,t){return z(this,w.prop,e,t,arguments.length>1)},removeProp:function(e){return this.each(function(){delete this[w.propFix[e]||e]})}}),w.extend({prop:function(e,t,n){var r,i,o=e.nodeType;if(3!==o&&8!==o&&2!==o)return 1===o&&w.isXMLDoc(e)||(t=w.propFix[t]||t,i=w.propHooks[t]),void 0!==n?i&&"set"in i&&void 0!==(r=i.set(e,n,t))?r:e[t]=n:i&&"get"in i&&null!==(r=i.get(e,t))?r:e[t]},propHooks:{tabIndex:{get:function(e){var t=w.find.attr(e,"tabindex");return t?parseInt(t,10):gt.test(e.nodeName)||yt.test(e.nodeName)&&e.href?0:-1}}},propFix:{"for":"htmlFor","class":"className"}}),h.optSelected||(w.propHooks.selected={get:function(e){var t=e.parentNode;return t&&t.parentNode&&t.parentNode.selectedIndex,null},set:function(e){var t=e.parentNode;t&&(t.selectedIndex,t.parentNode&&t.parentNode.selectedIndex)}}),w.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){w.propFix[this.toLowerCase()]=this});function vt(e){return(e.match(M)||[]).join(" ")}function mt(e){return e.getAttribute&&e.getAttribute("class")||""}function xt(e){return Array.isArray(e)?e:"string"==typeof e?e.match(M)||[]:[]}w.fn.extend({addClass:function(e){var t,n,r,i,o,a,s,u=0;if(g(e))return this.each(function(t){w(this).addClass(e.call(this,t,mt(this)))});if((t=xt(e)).length)while(n=this[u++])if(i=mt(n),r=1===n.nodeType&&" "+vt(i)+" "){a=0;while(o=t[a++])r.indexOf(" "+o+" ")<0&&(r+=o+" ");i!==(s=vt(r))&&n.setAttribute("class",s)}return this},removeClass:function(e){var t,n,r,i,o,a,s,u=0;if(g(e))return this.each(function(t){w(this).removeClass(e.call(this,t,mt(this)))});if(!arguments.length)return this.attr("class","");if((t=xt(e)).length)while(n=this[u++])if(i=mt(n),r=1===n.nodeType&&" "+vt(i)+" "){a=0;while(o=t[a++])while(r.indexOf(" "+o+" ")>-1)r=r.replace(" "+o+" "," ");i!==(s=vt(r))&&n.setAttribute("class",s)}return this},toggleClass:function(e,t){var n=typeof e,r="string"===n||Array.isArray(e);return"boolean"==typeof t&&r?t?this.addClass(e):this.removeClass(e):g(e)?this.each(function(n){w(this).toggleClass(e.call(this,n,mt(this),t),t)}):this.each(function(){var t,i,o,a;if(r){i=0,o=w(this),a=xt(e);while(t=a[i++])o.hasClass(t)?o.removeClass(t):o.addClass(t)}else void 0!==e&&"boolean"!==n||((t=mt(this))&&J.set(this,"__className__",t),this.setAttribute&&this.setAttribute("class",t||!1===e?"":J.get(this,"__className__")||""))})},hasClass:function(e){var t,n,r=0;t=" "+e+" ";while(n=this[r++])if(1===n.nodeType&&(" "+vt(mt(n))+" ").indexOf(t)>-1)return!0;return!1}});var bt=/\r/g;w.fn.extend({val:function(e){var t,n,r,i=this[0];{if(arguments.length)return r=g(e),this.each(function(n){var i;1===this.nodeType&&(null==(i=r?e.call(this,n,w(this).val()):e)?i="":"number"==typeof i?i+="":Array.isArray(i)&&(i=w.map(i,function(e){return null==e?"":e+""})),(t=w.valHooks[this.type]||w.valHooks[this.nodeName.toLowerCase()])&&"set"in t&&void 0!==t.set(this,i,"value")||(this.value=i))});if(i)return(t=w.valHooks[i.type]||w.valHooks[i.nodeName.toLowerCase()])&&"get"in t&&void 0!==(n=t.get(i,"value"))?n:"string"==typeof(n=i.value)?n.replace(bt,""):null==n?"":n}}}),w.extend({valHooks:{option:{get:function(e){var t=w.find.attr(e,"value");return null!=t?t:vt(w.text(e))}},select:{get:function(e){var t,n,r,i=e.options,o=e.selectedIndex,a="select-one"===e.type,s=a?null:[],u=a?o+1:i.length;for(r=o<0?u:a?o:0;r-1)&&(n=!0);return n||(e.selectedIndex=-1),o}}}}),w.each(["radio","checkbox"],function(){w.valHooks[this]={set:function(e,t){if(Array.isArray(t))return e.checked=w.inArray(w(e).val(),t)>-1}},h.checkOn||(w.valHooks[this].get=function(e){return null===e.getAttribute("value")?"on":e.value})}),h.focusin="onfocusin"in e;var wt=/^(?:focusinfocus|focusoutblur)$/,Tt=function(e){e.stopPropagation()};w.extend(w.event,{trigger:function(t,n,i,o){var a,s,u,l,c,p,d,h,v=[i||r],m=f.call(t,"type")?t.type:t,x=f.call(t,"namespace")?t.namespace.split("."):[];if(s=h=u=i=i||r,3!==i.nodeType&&8!==i.nodeType&&!wt.test(m+w.event.triggered)&&(m.indexOf(".")>-1&&(m=(x=m.split(".")).shift(),x.sort()),c=m.indexOf(":")<0&&"on"+m,t=t[w.expando]?t:new w.Event(m,"object"==typeof t&&t),t.isTrigger=o?2:3,t.namespace=x.join("."),t.rnamespace=t.namespace?new RegExp("(^|\\.)"+x.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,t.result=void 0,t.target||(t.target=i),n=null==n?[t]:w.makeArray(n,[t]),d=w.event.special[m]||{},o||!d.trigger||!1!==d.trigger.apply(i,n))){if(!o&&!d.noBubble&&!y(i)){for(l=d.delegateType||m,wt.test(l+m)||(s=s.parentNode);s;s=s.parentNode)v.push(s),u=s;u===(i.ownerDocument||r)&&v.push(u.defaultView||u.parentWindow||e)}a=0;while((s=v[a++])&&!t.isPropagationStopped())h=s,t.type=a>1?l:d.bindType||m,(p=(J.get(s,"events")||{})[t.type]&&J.get(s,"handle"))&&p.apply(s,n),(p=c&&s[c])&&p.apply&&Y(s)&&(t.result=p.apply(s,n),!1===t.result&&t.preventDefault());return t.type=m,o||t.isDefaultPrevented()||d._default&&!1!==d._default.apply(v.pop(),n)||!Y(i)||c&&g(i[m])&&!y(i)&&((u=i[c])&&(i[c]=null),w.event.triggered=m,t.isPropagationStopped()&&h.addEventListener(m,Tt),i[m](),t.isPropagationStopped()&&h.removeEventListener(m,Tt),w.event.triggered=void 0,u&&(i[c]=u)),t.result}},simulate:function(e,t,n){var r=w.extend(new w.Event,n,{type:e,isSimulated:!0});w.event.trigger(r,null,t)}}),w.fn.extend({trigger:function(e,t){return this.each(function(){w.event.trigger(e,t,this)})},triggerHandler:function(e,t){var n=this[0];if(n)return w.event.trigger(e,t,n,!0)}}),h.focusin||w.each({focus:"focusin",blur:"focusout"},function(e,t){var n=function(e){w.event.simulate(t,e.target,w.event.fix(e))};w.event.special[t]={setup:function(){var r=this.ownerDocument||this,i=J.access(r,t);i||r.addEventListener(e,n,!0),J.access(r,t,(i||0)+1)},teardown:function(){var r=this.ownerDocument||this,i=J.access(r,t)-1;i?J.access(r,t,i):(r.removeEventListener(e,n,!0),J.remove(r,t))}}});var Ct=e.location,Et=Date.now(),kt=/\?/;w.parseXML=function(t){var n;if(!t||"string"!=typeof t)return null;try{n=(new e.DOMParser).parseFromString(t,"text/xml")}catch(e){n=void 0}return n&&!n.getElementsByTagName("parsererror").length||w.error("Invalid XML: "+t),n};var St=/\[\]$/,Dt=/\r?\n/g,Nt=/^(?:submit|button|image|reset|file)$/i,At=/^(?:input|select|textarea|keygen)/i;function jt(e,t,n,r){var i;if(Array.isArray(t))w.each(t,function(t,i){n||St.test(e)?r(e,i):jt(e+"["+("object"==typeof i&&null!=i?t:"")+"]",i,n,r)});else if(n||"object"!==x(t))r(e,t);else for(i in t)jt(e+"["+i+"]",t[i],n,r)}w.param=function(e,t){var n,r=[],i=function(e,t){var n=g(t)?t():t;r[r.length]=encodeURIComponent(e)+"="+encodeURIComponent(null==n?"":n)};if(Array.isArray(e)||e.jquery&&!w.isPlainObject(e))w.each(e,function(){i(this.name,this.value)});else for(n in e)jt(n,e[n],t,i);return r.join("&")},w.fn.extend({serialize:function(){return w.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var e=w.prop(this,"elements");return e?w.makeArray(e):this}).filter(function(){var e=this.type;return this.name&&!w(this).is(":disabled")&&At.test(this.nodeName)&&!Nt.test(e)&&(this.checked||!pe.test(e))}).map(function(e,t){var n=w(this).val();return null==n?null:Array.isArray(n)?w.map(n,function(e){return{name:t.name,value:e.replace(Dt,"\r\n")}}):{name:t.name,value:n.replace(Dt,"\r\n")}}).get()}});var qt=/%20/g,Lt=/#.*$/,Ht=/([?&])_=[^&]*/,Ot=/^(.*?):[ \t]*([^\r\n]*)$/gm,Pt=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,Mt=/^(?:GET|HEAD)$/,Rt=/^\/\//,It={},Wt={},$t="*/".concat("*"),Bt=r.createElement("a");Bt.href=Ct.href;function Ft(e){return function(t,n){"string"!=typeof t&&(n=t,t="*");var r,i=0,o=t.toLowerCase().match(M)||[];if(g(n))while(r=o[i++])"+"===r[0]?(r=r.slice(1)||"*",(e[r]=e[r]||[]).unshift(n)):(e[r]=e[r]||[]).push(n)}}function _t(e,t,n,r){var i={},o=e===Wt;function a(s){var u;return i[s]=!0,w.each(e[s]||[],function(e,s){var l=s(t,n,r);return"string"!=typeof l||o||i[l]?o?!(u=l):void 0:(t.dataTypes.unshift(l),a(l),!1)}),u}return a(t.dataTypes[0])||!i["*"]&&a("*")}function zt(e,t){var n,r,i=w.ajaxSettings.flatOptions||{};for(n in t)void 0!==t[n]&&((i[n]?e:r||(r={}))[n]=t[n]);return r&&w.extend(!0,e,r),e}function Xt(e,t,n){var r,i,o,a,s=e.contents,u=e.dataTypes;while("*"===u[0])u.shift(),void 0===r&&(r=e.mimeType||t.getResponseHeader("Content-Type"));if(r)for(i in s)if(s[i]&&s[i].test(r)){u.unshift(i);break}if(u[0]in n)o=u[0];else{for(i in n){if(!u[0]||e.converters[i+" "+u[0]]){o=i;break}a||(a=i)}o=o||a}if(o)return o!==u[0]&&u.unshift(o),n[o]}function Ut(e,t,n,r){var i,o,a,s,u,l={},c=e.dataTypes.slice();if(c[1])for(a in e.converters)l[a.toLowerCase()]=e.converters[a];o=c.shift();while(o)if(e.responseFields[o]&&(n[e.responseFields[o]]=t),!u&&r&&e.dataFilter&&(t=e.dataFilter(t,e.dataType)),u=o,o=c.shift())if("*"===o)o=u;else if("*"!==u&&u!==o){if(!(a=l[u+" "+o]||l["* "+o]))for(i in l)if((s=i.split(" "))[1]===o&&(a=l[u+" "+s[0]]||l["* "+s[0]])){!0===a?a=l[i]:!0!==l[i]&&(o=s[0],c.unshift(s[1]));break}if(!0!==a)if(a&&e["throws"])t=a(t);else try{t=a(t)}catch(e){return{state:"parsererror",error:a?e:"No conversion from "+u+" to "+o}}}return{state:"success",data:t}}w.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:Ct.href,type:"GET",isLocal:Pt.test(Ct.protocol),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":$t,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/\bxml\b/,html:/\bhtml/,json:/\bjson\b/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":JSON.parse,"text xml":w.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(e,t){return t?zt(zt(e,w.ajaxSettings),t):zt(w.ajaxSettings,e)},ajaxPrefilter:Ft(It),ajaxTransport:Ft(Wt),ajax:function(t,n){"object"==typeof t&&(n=t,t=void 0),n=n||{};var i,o,a,s,u,l,c,f,p,d,h=w.ajaxSetup({},n),g=h.context||h,y=h.context&&(g.nodeType||g.jquery)?w(g):w.event,v=w.Deferred(),m=w.Callbacks("once memory"),x=h.statusCode||{},b={},T={},C="canceled",E={readyState:0,getResponseHeader:function(e){var t;if(c){if(!s){s={};while(t=Ot.exec(a))s[t[1].toLowerCase()]=t[2]}t=s[e.toLowerCase()]}return null==t?null:t},getAllResponseHeaders:function(){return c?a:null},setRequestHeader:function(e,t){return null==c&&(e=T[e.toLowerCase()]=T[e.toLowerCase()]||e,b[e]=t),this},overrideMimeType:function(e){return null==c&&(h.mimeType=e),this},statusCode:function(e){var t;if(e)if(c)E.always(e[E.status]);else for(t in e)x[t]=[x[t],e[t]];return this},abort:function(e){var t=e||C;return i&&i.abort(t),k(0,t),this}};if(v.promise(E),h.url=((t||h.url||Ct.href)+"").replace(Rt,Ct.protocol+"//"),h.type=n.method||n.type||h.method||h.type,h.dataTypes=(h.dataType||"*").toLowerCase().match(M)||[""],null==h.crossDomain){l=r.createElement("a");try{l.href=h.url,l.href=l.href,h.crossDomain=Bt.protocol+"//"+Bt.host!=l.protocol+"//"+l.host}catch(e){h.crossDomain=!0}}if(h.data&&h.processData&&"string"!=typeof h.data&&(h.data=w.param(h.data,h.traditional)),_t(It,h,n,E),c)return E;(f=w.event&&h.global)&&0==w.active++&&w.event.trigger("ajaxStart"),h.type=h.type.toUpperCase(),h.hasContent=!Mt.test(h.type),o=h.url.replace(Lt,""),h.hasContent?h.data&&h.processData&&0===(h.contentType||"").indexOf("application/x-www-form-urlencoded")&&(h.data=h.data.replace(qt,"+")):(d=h.url.slice(o.length),h.data&&(h.processData||"string"==typeof h.data)&&(o+=(kt.test(o)?"&":"?")+h.data,delete h.data),!1===h.cache&&(o=o.replace(Ht,"$1"),d=(kt.test(o)?"&":"?")+"_="+Et+++d),h.url=o+d),h.ifModified&&(w.lastModified[o]&&E.setRequestHeader("If-Modified-Since",w.lastModified[o]),w.etag[o]&&E.setRequestHeader("If-None-Match",w.etag[o])),(h.data&&h.hasContent&&!1!==h.contentType||n.contentType)&&E.setRequestHeader("Content-Type",h.contentType),E.setRequestHeader("Accept",h.dataTypes[0]&&h.accepts[h.dataTypes[0]]?h.accepts[h.dataTypes[0]]+("*"!==h.dataTypes[0]?", "+$t+"; q=0.01":""):h.accepts["*"]);for(p in h.headers)E.setRequestHeader(p,h.headers[p]);if(h.beforeSend&&(!1===h.beforeSend.call(g,E,h)||c))return E.abort();if(C="abort",m.add(h.complete),E.done(h.success),E.fail(h.error),i=_t(Wt,h,n,E)){if(E.readyState=1,f&&y.trigger("ajaxSend",[E,h]),c)return E;h.async&&h.timeout>0&&(u=e.setTimeout(function(){E.abort("timeout")},h.timeout));try{c=!1,i.send(b,k)}catch(e){if(c)throw e;k(-1,e)}}else k(-1,"No Transport");function k(t,n,r,s){var l,p,d,b,T,C=n;c||(c=!0,u&&e.clearTimeout(u),i=void 0,a=s||"",E.readyState=t>0?4:0,l=t>=200&&t<300||304===t,r&&(b=Xt(h,E,r)),b=Ut(h,b,E,l),l?(h.ifModified&&((T=E.getResponseHeader("Last-Modified"))&&(w.lastModified[o]=T),(T=E.getResponseHeader("etag"))&&(w.etag[o]=T)),204===t||"HEAD"===h.type?C="nocontent":304===t?C="notmodified":(C=b.state,p=b.data,l=!(d=b.error))):(d=C,!t&&C||(C="error",t<0&&(t=0))),E.status=t,E.statusText=(n||C)+"",l?v.resolveWith(g,[p,C,E]):v.rejectWith(g,[E,C,d]),E.statusCode(x),x=void 0,f&&y.trigger(l?"ajaxSuccess":"ajaxError",[E,h,l?p:d]),m.fireWith(g,[E,C]),f&&(y.trigger("ajaxComplete",[E,h]),--w.active||w.event.trigger("ajaxStop")))}return E},getJSON:function(e,t,n){return w.get(e,t,n,"json")},getScript:function(e,t){return w.get(e,void 0,t,"script")}}),w.each(["get","post"],function(e,t){w[t]=function(e,n,r,i){return g(n)&&(i=i||r,r=n,n=void 0),w.ajax(w.extend({url:e,type:t,dataType:i,data:n,success:r},w.isPlainObject(e)&&e))}}),w._evalUrl=function(e){return w.ajax({url:e,type:"GET",dataType:"script",cache:!0,async:!1,global:!1,"throws":!0})},w.fn.extend({wrapAll:function(e){var t;return this[0]&&(g(e)&&(e=e.call(this[0])),t=w(e,this[0].ownerDocument).eq(0).clone(!0),this[0].parentNode&&t.insertBefore(this[0]),t.map(function(){var e=this;while(e.firstElementChild)e=e.firstElementChild;return e}).append(this)),this},wrapInner:function(e){return g(e)?this.each(function(t){w(this).wrapInner(e.call(this,t))}):this.each(function(){var t=w(this),n=t.contents();n.length?n.wrapAll(e):t.append(e)})},wrap:function(e){var t=g(e);return this.each(function(n){w(this).wrapAll(t?e.call(this,n):e)})},unwrap:function(e){return this.parent(e).not("body").each(function(){w(this).replaceWith(this.childNodes)}),this}}),w.expr.pseudos.hidden=function(e){return!w.expr.pseudos.visible(e)},w.expr.pseudos.visible=function(e){return!!(e.offsetWidth||e.offsetHeight||e.getClientRects().length)},w.ajaxSettings.xhr=function(){try{return new e.XMLHttpRequest}catch(e){}};var Vt={0:200,1223:204},Gt=w.ajaxSettings.xhr();h.cors=!!Gt&&"withCredentials"in Gt,h.ajax=Gt=!!Gt,w.ajaxTransport(function(t){var n,r;if(h.cors||Gt&&!t.crossDomain)return{send:function(i,o){var a,s=t.xhr();if(s.open(t.type,t.url,t.async,t.username,t.password),t.xhrFields)for(a in t.xhrFields)s[a]=t.xhrFields[a];t.mimeType&&s.overrideMimeType&&s.overrideMimeType(t.mimeType),t.crossDomain||i["X-Requested-With"]||(i["X-Requested-With"]="XMLHttpRequest");for(a in i)s.setRequestHeader(a,i[a]);n=function(e){return function(){n&&(n=r=s.onload=s.onerror=s.onabort=s.ontimeout=s.onreadystatechange=null,"abort"===e?s.abort():"error"===e?"number"!=typeof s.status?o(0,"error"):o(s.status,s.statusText):o(Vt[s.status]||s.status,s.statusText,"text"!==(s.responseType||"text")||"string"!=typeof s.responseText?{binary:s.response}:{text:s.responseText},s.getAllResponseHeaders()))}},s.onload=n(),r=s.onerror=s.ontimeout=n("error"),void 0!==s.onabort?s.onabort=r:s.onreadystatechange=function(){4===s.readyState&&e.setTimeout(function(){n&&r()})},n=n("abort");try{s.send(t.hasContent&&t.data||null)}catch(e){if(n)throw e}},abort:function(){n&&n()}}}),w.ajaxPrefilter(function(e){e.crossDomain&&(e.contents.script=!1)}),w.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/\b(?:java|ecma)script\b/},converters:{"text script":function(e){return w.globalEval(e),e}}}),w.ajaxPrefilter("script",function(e){void 0===e.cache&&(e.cache=!1),e.crossDomain&&(e.type="GET")}),w.ajaxTransport("script",function(e){if(e.crossDomain){var t,n;return{send:function(i,o){t=w(" + + + + + + +后台管理 + + + + + +
    + +
    + + + + +
    +
    + +
    +
    *

    登录账号

    +
    + +
    +
    + + +
    +

    性别

    +
    +
      +
    • +
    • +
    +
    +
    + + +
    +

    兴趣

    +
    +
      +
    • 吃饭
    • +
    • 睡觉
    • +
    • 打豆豆
    • +
    +
    +
    + + +
    +

    学历

    +
    + +
    +
    + + +
    +

    注册时间

    +
    + +
    +
    + + +
    +

    简介

    +
    + + +

    请填写个人简介。简介中不得包含令人反感的信息,且长度应在10到255个字符之间。

    +
    +
    + + +
    +

    标签

    +
    +
    + +
    +
    + + +
    +
    + + + +
    +
    +
    +
    +
    +
    + + + + \ No newline at end of file diff --git a/src/main/resources/templates/book/book-list.html b/src/main/resources/templates/book/book-list.html new file mode 100644 index 0000000000000000000000000000000000000000..d78424c757b2243f2386263c4c134e5f23953e84 --- /dev/null +++ b/src/main/resources/templates/book/book-list.html @@ -0,0 +1,129 @@ + + + + + + + + + + + + + + + + + + + + +后台管理 + + + + +
    + +
    + +

    图书列表

    + + + + + + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    序号市区省区国别国别操作
    1苏州江苏省中国中国 + + +
    2无锡江苏省中国中国 + + +
    3常州江苏省中国中国 + + +
    + +
    +
      +
      +
      +
      +
      + + + + + \ No newline at end of file diff --git a/src/main/resources/templates/borrow/back.html b/src/main/resources/templates/borrow/back.html new file mode 100644 index 0000000000000000000000000000000000000000..340dbedbb85475eda51e1dfc38675fc18b40a81b --- /dev/null +++ b/src/main/resources/templates/borrow/back.html @@ -0,0 +1,165 @@ + + + + + + + + + + + + + + + + + + + + +图书归还 + + + + + +
      + +
      + + + + +
      +
      + +
      +
      *

      登录账号

      +
      + +
      +
      + + +
      +

      性别

      +
      +
        +
      • +
      • +
      +
      +
      + + +
      +

      兴趣

      +
      +
        +
      • 吃饭
      • +
      • 睡觉
      • +
      • 打豆豆
      • +
      +
      +
      + + +
      +

      学历

      +
      + +
      +
      + + +
      +

      注册时间

      +
      + +
      +
      + + +
      +

      简介

      +
      + + +

      请填写个人简介。简介中不得包含令人反感的信息,且长度应在10到255个字符之间。

      +
      +
      + + +
      +

      标签

      +
      +
      + +
      +
      + + +
      +
      + + + +
      +
      +
      +
      +
      +
      + + + + \ No newline at end of file diff --git a/src/main/resources/templates/borrow/book-search.html b/src/main/resources/templates/borrow/book-search.html new file mode 100644 index 0000000000000000000000000000000000000000..3f21672929904c18f22dc4e3c15890b967387343 --- /dev/null +++ b/src/main/resources/templates/borrow/book-search.html @@ -0,0 +1,119 @@ + + + + + + + + + + + + + + + + + + + + +后台管理 + + + + +
      + +
      + +

      图书搜索

      + + + + + + +
      + + +
      + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
      序号市区省区国别国别
      1苏州江苏省中国中国
      2无锡江苏省中国中国
      3常州江苏省中国中国
      + +
      +
        +
        +
        +
        +
        + + + + + \ No newline at end of file diff --git a/src/main/resources/templates/borrow/borrow.html b/src/main/resources/templates/borrow/borrow.html new file mode 100644 index 0000000000000000000000000000000000000000..695f0811ea590797aa791bac3ad977b398b23c06 --- /dev/null +++ b/src/main/resources/templates/borrow/borrow.html @@ -0,0 +1,165 @@ + + + + + + + + + + + + + + + + + + + + +图书借阅 + + + + + +
        + +
        + + + + +
        +
        + +
        +
        *

        登录账号

        +
        + +
        +
        + + +
        +

        性别

        +
        +
          +
        • +
        • +
        +
        +
        + + +
        +

        兴趣

        +
        +
          +
        • 吃饭
        • +
        • 睡觉
        • +
        • 打豆豆
        • +
        +
        +
        + + +
        +

        学历

        +
        + +
        +
        + + +
        +

        注册时间

        +
        + +
        +
        + + +
        +

        简介

        +
        + + +

        请填写个人简介。简介中不得包含令人反感的信息,且长度应在10到255个字符之间。

        +
        +
        + + +
        +

        标签

        +
        +
        + +
        +
        + + +
        +
        + + + +
        +
        +
        +
        +
        +
        + + + + \ No newline at end of file diff --git a/src/main/resources/templates/empty.html b/src/main/resources/templates/empty.html new file mode 100644 index 0000000000000000000000000000000000000000..ec698b57dc1c1d295dcf1536f4a7d8cf55c605ee --- /dev/null +++ b/src/main/resources/templates/empty.html @@ -0,0 +1,30 @@ + + + + + + + + + + + + + + + + + + + + +后台管理 + + + + + + + \ No newline at end of file diff --git a/src/main/resources/templates/index.html b/src/main/resources/templates/index.html new file mode 100644 index 0000000000000000000000000000000000000000..133995b80c0a2caf1c6a2ee02835213a825c9e50 --- /dev/null +++ b/src/main/resources/templates/index.html @@ -0,0 +1,129 @@ + + + + + + + + + + + + + + + + + + + + +后台管理 + + + + +
        +
        + + + + + +
        +
        + + +
        + + + + +
        + +
        +
        + + + \ No newline at end of file diff --git a/src/main/resources/templates/login.html b/src/main/resources/templates/login.html new file mode 100644 index 0000000000000000000000000000000000000000..6c1c63c34720dd8bb543bae961432d2e04ecb264 --- /dev/null +++ b/src/main/resources/templates/login.html @@ -0,0 +1,61 @@ + + + + + + + + + + + + + + + + + + + + +后台管理 + + + +
        + +
        + + \ No newline at end of file diff --git a/src/main/resources/templates/reader/reader-add.html b/src/main/resources/templates/reader/reader-add.html new file mode 100644 index 0000000000000000000000000000000000000000..fb2a7f2af3e7d787d5652a49ffd93d2781a0a077 --- /dev/null +++ b/src/main/resources/templates/reader/reader-add.html @@ -0,0 +1,165 @@ + + + + + + + + + + + + + + + + + + + + +后台管理 + + + + + +
        + +
        + + + + +
        +
        + +
        +
        *

        登录账号

        +
        + +
        +
        + + +
        +

        性别

        +
        +
          +
        • +
        • +
        +
        +
        + + +
        +

        兴趣

        +
        +
          +
        • 吃饭
        • +
        • 睡觉
        • +
        • 打豆豆
        • +
        +
        +
        + + +
        +

        学历

        +
        + +
        +
        + + +
        +

        注册时间

        +
        + +
        +
        + + +
        +

        简介

        +
        + + +

        请填写个人简介。简介中不得包含令人反感的信息,且长度应在10到255个字符之间。

        +
        +
        + + +
        +

        标签

        +
        +
        + +
        +
        + + +
        +
        + + + +
        +
        +
        +
        +
        +
        + + + + \ No newline at end of file diff --git a/src/main/resources/templates/reader/reader-list.html b/src/main/resources/templates/reader/reader-list.html new file mode 100644 index 0000000000000000000000000000000000000000..d78424c757b2243f2386263c4c134e5f23953e84 --- /dev/null +++ b/src/main/resources/templates/reader/reader-list.html @@ -0,0 +1,129 @@ + + + + + + + + + + + + + + + + + + + + +后台管理 + + + + +
        + +
        + +

        图书列表

        + + + + + + +
        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        序号市区省区国别国别操作
        1苏州江苏省中国中国 + + +
        2无锡江苏省中国中国 + + +
        3常州江苏省中国中国 + + +
        + +
        +
          +
          +
          +
          +
          + + + + + \ No newline at end of file diff --git a/src/main/resources/templates/user/user-info.html b/src/main/resources/templates/user/user-info.html new file mode 100644 index 0000000000000000000000000000000000000000..26016bffd9f1958884ac3ca3dccc0dfc6cf8dbab --- /dev/null +++ b/src/main/resources/templates/user/user-info.html @@ -0,0 +1,165 @@ + + + + + + + + + + + + + + + + + + + + +后台管理 + + + + + +
          + +
          + + + + +
          +
          + +
          +
          *

          登录账号

          +
          + 1559832989 +
          +
          + + +
          +

          性别

          +
          +
            +
          • +
          • +
          +
          +
          + + +
          +

          兴趣

          +
          +
            +
          • 吃饭
          • +
          • 睡觉
          • +
          • 打豆豆
          • +
          +
          +
          + + +
          +

          学历

          +
          + +
          +
          + + +
          +

          注册时间

          +
          + +
          +
          + + +
          +

          简介

          +
          + + +

          请填写个人简介。简介中不得包含令人反感的信息,且长度应在10到255个字符之间。

          +
          +
          + + +
          +

          标签

          +
          +
          + +
          +
          + + +
          +
          + + + +
          +
          +
          +
          +
          +
          + + + + \ No newline at end of file diff --git a/src/main/resources/templates/user/user-list.html b/src/main/resources/templates/user/user-list.html new file mode 100644 index 0000000000000000000000000000000000000000..0d7c6519293564a132af9fbabe82e08a8280ef41 --- /dev/null +++ b/src/main/resources/templates/user/user-list.html @@ -0,0 +1,129 @@ + + + + + + + + + + + + + + + + + + + + +后台管理 + + + + +
          + +
          + +

          用户管理

          + + + + + + +
          + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
          序号市区省区国别国别操作
          1苏州江苏省中国中国 + + +
          2无锡江苏省中国中国 + + +
          3常州江苏省中国中国 + + +
          + +
          +
            +
            +
            +
            +
            + + + + + \ No newline at end of file diff --git a/src/main/resources/templates/welcome.html b/src/main/resources/templates/welcome.html new file mode 100644 index 0000000000000000000000000000000000000000..e8e18aca7f5b45b50da1c276b3568b67cb2493e6 --- /dev/null +++ b/src/main/resources/templates/welcome.html @@ -0,0 +1,130 @@ + + + + + + + + + + + + + + + + + + + + +后台管理 + + + + + + +
            + +
            + + + +
            + +
            +
              +
            • + +
            • +
            • + +
            • +
            • + +
            • +
            • + +
            • +
            • + +
            • +
            • + +
            • +
            • + +
            • +
            • + +
            • +
            • + +
            • +
            +
            +
            +
            +
            + + + + \ No newline at end of file diff --git a/src/test/java/com/book/manager/ManagerApplicationTests.java b/src/test/java/com/book/manager/ManagerApplicationTests.java new file mode 100644 index 0000000000000000000000000000000000000000..978cba9dc20c7defb22bb08783b7240b082b1b6b --- /dev/null +++ b/src/test/java/com/book/manager/ManagerApplicationTests.java @@ -0,0 +1,13 @@ +package com.book.manager; + +import org.junit.jupiter.api.Test; +import org.springframework.boot.test.context.SpringBootTest; + +@SpringBootTest +class ManagerApplicationTests { + + @Test + void contextLoads() { + } + +}