Commit 4f65f977 by 侯昆

初始化

1 parent de7728ce
Showing 53 changed files with 2177 additions and 0 deletions
/.idea/
/serverside/.idea/
/serverside/cihai.iml
/serverside/cihai-jsp/cihai-jsp.iml
/serverside/cihai-core/cihai-core.iml
/serverside/cihai-app/cihai-app.iml
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<parent>
<artifactId>cihai</artifactId>
<groupId>com.dookay</groupId>
<version>1.0-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>cihai-app</artifactId>
<packaging>war</packaging>
<properties>
<maven.test.skip>true</maven.test.skip>
<jetty.scope>compile</jetty.scope>
</properties>
<dependencies>
<dependency>
<groupId>com.dookay</groupId>
<artifactId>coral-common-web</artifactId>
</dependency>
<dependency>
<groupId>com.dookay</groupId>
<artifactId>cihai-core</artifactId>
</dependency>
<!--开发工具-->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-devtools</artifactId>
<scope>runtime</scope>
<optional>true</optional>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<optional>true</optional>
</dependency>
<!--表现层-->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
<exclusions>
<exclusion>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-tomcat</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>jstl</artifactId>
<scope>${jetty.scope}</scope>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-jetty</artifactId>
<scope>${jetty.scope}</scope>
</dependency>
<dependency>
<groupId>org.eclipse.jetty</groupId>
<artifactId>apache-jsp</artifactId>
<scope>${jetty.scope}</scope>
</dependency>
<!--表现层-->
<!--工具-->
<dependency>
<groupId>com.fasterxml.jackson.datatype</groupId>
<artifactId>jackson-datatype-jsr310</artifactId>
</dependency>
<!--接口文档-->
<dependency>
<groupId>io.springfox</groupId>
<artifactId>springfox-swagger2</artifactId>
</dependency>
<dependency>
<groupId>io.springfox</groupId>
<artifactId>springfox-swagger-ui</artifactId>
</dependency>
<!--接口文档-->
</dependencies>
</project>
package com.dookay.cihai.app;
import com.dookay.coral.common.core.CoralCommonCoreMarker;
import com.dookay.coral.common.web.CoralCommonWebMarker;
import com.dookay.cihai.core.CihaiCoreMarker;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.builder.SpringApplicationBuilder;
import org.springframework.boot.web.servlet.ServletComponentScan;
import org.springframework.boot.web.support.SpringBootServletInitializer;
import org.springframework.cache.annotation.EnableCaching;
/**
* 项目运行入口
*
* @author houkun
*/
@SpringBootApplication(
// 加载不同模块的配置与待注入的Bean
scanBasePackageClasses = {
CoralCommonCoreMarker.class,
CoralCommonWebMarker.class,
CihaiCoreMarker.class,
CihaiAppApplication.class,
})
@ServletComponentScan(basePackageClasses = {
CoralCommonWebMarker.class,
CihaiAppApplication.class
})
@MapperScan(basePackageClasses = CihaiCoreMarker.class)
@EnableCaching
public class CihaiAppApplication extends SpringBootServletInitializer {
@Override
protected SpringApplicationBuilder configure(SpringApplicationBuilder builder) {
return builder.sources(CihaiAppApplication.class);
}
public static void main(String[] args) {
SpringApplication.run(CihaiAppApplication.class, args);
}
}
package com.dookay.cihai.app.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;
/**
* 接口文档配置
*
* @author houkun
*/
@Configuration
@EnableSwagger2
public class SwaggerConfig {
@Bean
public Docket demoApi() {
return new Docket(DocumentationType.SWAGGER_2)
.apiInfo(apiInfo())
.select()
.apis(RequestHandlerSelectors.any())
.paths(PathSelectors.any())
.build();
}
private ApiInfo apiInfo() {
return new ApiInfoBuilder()
.title("Coral Demo 示例接口文档")
.description("示例描述")
.version("0.1")
.build();
}
}
package com.dookay.cihai.app.config;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter;
/**
* Web config
*
* @author houkun
*/
@Configuration
public class WebMvcConfig extends WebMvcConfigurerAdapter {
@Override
public void addResourceHandlers(ResourceHandlerRegistry registry) {
registry.addResourceHandler("swagger-ui.html")
.addResourceLocations("classpath:/META-INF/resources/");
registry.addResourceHandler("/webjars/**")
.addResourceLocations("classpath:/META-INF/resources/webjars/");
}
}
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<parent>
<artifactId>cihai</artifactId>
<groupId>com.dookay</groupId>
<version>1.0-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>cihai-core</artifactId>
<dependencies>
<!--稻壳基础类库核心部分 不包含web -->
<dependency>
<groupId>com.dookay</groupId>
<artifactId>coral-common-core</artifactId>
</dependency>
<!--稻壳基础类库核心部分 不包含web -->
<!--开发工具-->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-devtools</artifactId>
<scope>runtime</scope>
<optional>true</optional>
</dependency>
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<optional>true</optional>
</dependency>
<!--开发工具-->
</dependencies>
</project>
package com.dookay.cihai.core;
import com.dookay.coral.common.core.CoralCommonCoreMarker;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cache.annotation.EnableCaching;
/**
* @author houkun
*/
public interface CihaiCoreMarker {
}
# 解决 springboot-devtool 影响 tk.mybatis.mapper 插件报错问题
# 详见: https://github.com/abel533/MyBatis-Spring-Boot/issues/5
restart.include.mapper=/mapper-[\\w-\\.]+jar
restart.include.pagehelper=/pagehelper-[\\w-\\.]+jar
restart.include.coralcommon=/coral-common-[\\w-\\.]+jar
\ No newline at end of file
package com.dookay.cihai.core;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.annotation.Rollback;
import org.springframework.test.context.junit4.SpringRunner;
import org.springframework.transaction.annotation.Transactional;
@RunWith(SpringRunner.class)
@SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.NONE)
@Rollback
@Transactional
@MapperScan(basePackageClasses = CihaiCoreMarker.class)
public class CihaiCoreApplicationTests {
@Test
public void contextLoads() {
}
}
# 数据库配置
# 数据库连接
spring.datasource.url=jdbc:mysql://localhost:3306/test
spring.datasource.username=root
# 加密后的密码
spring.datasource.password=UvoEsj8TZ9a11DQRR42EGuoIRjeuqSagmUzCdUeDnw9PJ9hum0Lx/MTPrpIR7isrPdA8lMpaY77eW4g3f1tCQQ==
# 加密时的公钥
public-key=MFwwDQYJKoZIhvcNAQEBBQADSwAwSAJBAJFbtR5GoNcW9j8b4RhZQ1CC1xNBx8Sqphxc8/6vNWYdd7d84AUfSAzFXCzGvuvJ0URNAg9IykPDexY/mHP8dA0CAwEAAQ==
# druid解密配置
spring.datasource.druid.connection-properties=config.decrypt=true;config.decrypt.key=${public-key}
spring.datasource.druid.filter.config.enabled=true
#mybatis
# 设置扫描 mapper xml路径
mapper.mappers=com.dookay.coral.common.core.persistence.Mapper
mybatis.mapper-locations=classpath*:mapper/*.xml
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<parent>
<artifactId>cihai</artifactId>
<groupId>com.dookay</groupId>
<version>1.0-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>cihai-jsp</artifactId>
<packaging>war</packaging>
<properties>
<maven.test.skip>true</maven.test.skip>
<jetty.scope>compile</jetty.scope>
</properties>
<dependencies>
<dependency>
<groupId>com.dookay</groupId>
<artifactId>coral-common-web</artifactId>
</dependency>
<dependency>
<groupId>com.dookay</groupId>
<artifactId>cihai-core</artifactId>
</dependency>
<!--开发工具-->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-devtools</artifactId>
<scope>runtime</scope>
<optional>true</optional>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<optional>true</optional>
</dependency>
<!--表现层-->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
<exclusions>
<exclusion>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-tomcat</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>jstl</artifactId>
<scope>${jetty.scope}</scope>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-jetty</artifactId>
<scope>${jetty.scope}</scope>
</dependency>
<dependency>
<groupId>org.eclipse.jetty</groupId>
<artifactId>apache-jsp</artifactId>
<scope>${jetty.scope}</scope>
</dependency>
<!--表现层-->
<!--工具-->
<dependency>
<groupId>com.fasterxml.jackson.datatype</groupId>
<artifactId>jackson-datatype-jsr310</artifactId>
</dependency>
</dependencies>
</project>
package com.dookay.cihai.jsp;
import com.dookay.coral.common.core.CoralCommonCoreMarker;
import com.dookay.coral.common.web.CoralCommonWebMarker;
import com.dookay.cihai.core.CihaiCoreMarker;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.builder.SpringApplicationBuilder;
import org.springframework.boot.web.servlet.ServletComponentScan;
import org.springframework.boot.web.support.SpringBootServletInitializer;
import org.springframework.cache.annotation.EnableCaching;
/**
* 项目运行入口
*
* @author houkun
*/
@SpringBootApplication(
// 加载不同模块的配置与待注入的Bean
scanBasePackageClasses = {
CoralCommonCoreMarker.class,
CoralCommonWebMarker.class,
CihaiCoreMarker.class,
CihaiJspApplication.class,
})
@MapperScan(basePackageClasses = CihaiCoreMarker.class)
@ServletComponentScan(basePackageClasses = {
CoralCommonWebMarker.class,
CihaiJspApplication.class
})
@EnableCaching
public class CihaiJspApplication extends SpringBootServletInitializer {
@Override
protected SpringApplicationBuilder configure(SpringApplicationBuilder builder) {
return builder.sources(CihaiJspApplication.class);
}
public static void main(String[] args) {
SpringApplication.run(CihaiJspApplication.class, args);
}
}
# 解决 springboot-devtool 影响 tk.mybatis.mapper 插件报错问题
# 详见: https://github.com/abel533/MyBatis-Spring-Boot/issues/5
restart.include.mapper=/mapper-[\\w-\\.]+jar
restart.include.pagehelper=/pagehelper-[\\w-\\.]+jar
restart.include.coralcommon=/coral-common-[\\w-\\.]+jar
restart.include.coraldemocore=/cihai-core[\\w-\\.]+jar
\ No newline at end of file
debug=true
# 数据库连接
spring.datasource.url=jdbc:mysql://localhost:3306/test
spring.datasource.username=root
# 加密后的密码
spring.datasource.password=UvoEsj8TZ9a11DQRR42EGuoIRjeuqSagmUzCdUeDnw9PJ9hum0Lx/MTPrpIR7isrPdA8lMpaY77eW4g3f1tCQQ==
# 加密时的公钥
public-key=MFwwDQYJKoZIhvcNAQEBBQADSwAwSAJBAJFbtR5GoNcW9j8b4RhZQ1CC1xNBx8Sqphxc8/6vNWYdd7d84AUfSAzFXCzGvuvJ0URNAg9IykPDexY/mHP8dA0CAwEAAQ==
# 日志
logging.level.root=info
logging.level.com.dookay.core=trace
# redis
spring.redis.host=127.0.0.1
coral.web.resource.mapping.uploads-inner=/uploads/**
coral.web.resource.mapping.uploads-mapping=file:/data/www/uploads/demo/
coral.web.view.form.interval-milli-second=10000
\ No newline at end of file
# 数据库连接
spring.datasource.url=jdbc:mysql://localhost:3306/test
spring.datasource.username=root
# 加密后的密码
spring.datasource.password=UvoEsj8TZ9a11DQRR42EGuoIRjeuqSagmUzCdUeDnw9PJ9hum0Lx/MTPrpIR7isrPdA8lMpaY77eW4g3f1tCQQ==
# 加密时的公钥
public-key=MFwwDQYJKoZIhvcNAQEBBQADSwAwSAJBAJFbtR5GoNcW9j8b4RhZQ1CC1xNBx8Sqphxc8/6vNWYdd7d84AUfSAzFXCzGvuvJ0URNAg9IykPDexY/mHP8dA0CAwEAAQ==
# 日志
logging.level.root=error
logging.level.com.dookay.coral.common.core=info
logging.level.com.dookay.coral.common.web=info
logging.level.com.dookay.front=info
logging.level.com.dookay.core=info
logging.file=/data/www/log/cihai.log
# redis
spring.redis.host=127.0.0.1
# 上传文件路径映射
coral.web.resource.mapping.uploads-inner=/uploads/**
coral.web.resource.mapping.uploads-mapping=file:/data/www/uploads/demo/
# 打开 gzip
server.compression.enabled=true
# 数据库连接
spring.datasource.url=jdbc:mysql://localhost:3306/test
spring.datasource.username=root
# 加密后的密码
spring.datasource.password=UvoEsj8TZ9a11DQRR42EGuoIRjeuqSagmUzCdUeDnw9PJ9hum0Lx/MTPrpIR7isrPdA8lMpaY77eW4g3f1tCQQ==
# 加密时的公钥
public-key=MFwwDQYJKoZIhvcNAQEBBQADSwAwSAJBAJFbtR5GoNcW9j8b4RhZQ1CC1xNBx8Sqphxc8/6vNWYdd7d84AUfSAzFXCzGvuvJ0URNAg9IykPDexY/mHP8dA0CAwEAAQ==
# 日志
logging.level.root=warn
logging.level.com.dookay.coral.common.core=debug
logging.level.com.dookay.coral.common.web=debug
logging.level.com.dookay.front=debug
logging.level.com.dookay.core=debug
logging.file=/data/www/log/cihai.log
# redis
spring.redis.host=127.0.0.1
# 上传文件路径映射
coral.web.resource.mapping.uploads-inner=/uploads/**
coral.web.resource.mapping.uploads-mapping=file:/data/www/uploads/demo/
# 打开 gzip
server.compression.enabled=true
# 通用配置
spring.profiles.active=dev
# druid性能相关配置
spring.datasource.druid.initial-size=5
spring.datasource.druid.max-active=50
spring.datasource.druid.min-idle=5
spring.datasource.druid.test-on-borrow=true
spring.datasource.druid.test-on-return=false
spring.datasource.druid.test-while-idle=true
spring.datasource.druid.validation-query=select 1
spring.datasource.druid.max-wait=5000
spring.datasource.druid.time-between-eviction-runs-millis=600000
spring.datasource.druid.min-evictable-idle-time-millis=1800000
# druid解密配置
spring.datasource.druid.connection-properties=config.decrypt=true;config.decrypt.key=${public-key}
spring.datasource.druid.filter.config.enabled=true
# 关闭druid监控
spring.datasource.druid.filter.stat.enabled=false
# mybatis插件配置
# 设置扫描 mapper xml路径
mapper.mappers=com.dookay.coral.common.core.persistence.Mapper
mybatis.mapper-locations=classpath*:mapper/*.xml
# jsp页面配置
spring.mvc.view.prefix=/WEB-INF/jsp/
spring.mvc.view.suffix=.jsp
# 错误页面
coral.web.view.error.not-found=404
coral.web.view.error.bad-request=400
coral.web.view.error.internal-error=500
coral.web.view.error.service=service
coral.web.view.error.other=other
<%@ include file="/WEB-INF/jsp/include/taglib.jsp" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<jsp:include page="/WEB-INF/jsp/include/header.jsp">
<jsp:param name="pageTitle" value="coral-list"/>
</jsp:include>
<h1>400</h1>
<p>${error.get("status")}</p>
<p>${error.get("code")}</p>
<p>${error.get("message")}</p>
<p>${error.get("path")}</p>
<p>${error.get("errorDetail")}</p>
<jsp:include page="/WEB-INF/jsp/include/footer.jsp"/>
<%@ include file="/WEB-INF/jsp/include/taglib.jsp" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<jsp:include page="/WEB-INF/jsp/include/header.jsp">
<jsp:param name="pageTitle" value="coral-list"/>
</jsp:include>
<h1>404</h1>
<p>${error.get("status")}</p>
<p>${error.get("code")}</p>
<p>${error.get("message")}</p>
<p>${error.get("path")}</p>
<p>${error.get("errorDetail")}</p>
<jsp:include page="/WEB-INF/jsp/include/footer.jsp"/>
<%@ include file="/WEB-INF/jsp/include/taglib.jsp" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<jsp:include page="/WEB-INF/jsp/include/header.jsp">
<jsp:param name="pageTitle" value="coral-list"/>
</jsp:include>
<h1>500</h1>
<p>${error.get("status")}</p>
<p>${error.get("code")}</p>
<p>${error.get("message")}</p>
<p>${error.get("path")}</p>
<p>${error.get("errorDetail")}</p>
<jsp:include page="/WEB-INF/jsp/include/footer.jsp"/>
<%@ include file="/WEB-INF/jsp/include/taglib.jsp" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%--添加此行消除额外空格--%>
<%@ page trimDirectiveWhitespaces="true" %>
<%--添加此行消除额外空格--%>
<jsp:include page="/WEB-INF/jsp/include/header.jsp">
<jsp:param name="pageTitle" value="coral-list"/>
</jsp:include>
<jsp:useBean id="coralList" scope="request" type="com.dookay.coral.common.web.component.list.CoralListModelContainer<com.dookay.core.domain.CountryDomain>"/>
<h1>coralList</h1>
<%--排序器--%>
<p><a class="${cl:isCurrentOrder("id-desc") ? "active" : ""}" href="${cl:sortUrl("id-desc")}">id-desc</a></p>
<p><a class="${cl:isCurrentOrder("id-asc") ? "active" : ""}" href="${cl:sortUrl("id-asc")}">id-asc</a></p>
<p><a class="${cl:isCurrentOrder("countryCode-desc") ? "active" : ""}" href="${cl:sortUrl("countryCode-desc")}">countryCode-desc</a></p>
<p>currentOrder: ${coralList.sorterModel.orderBy}</p>
<%--排序器--%>
<%--单选--%>
<p>
<c:forEach var="item" items="${cl:singleSelect('id').items}">
<span><a class="${item.selected ? "active" :""}" href="${cl:singleSelectUrl("id", item)}">${item.text}</a></span>
</c:forEach>
<span><a class="${cl:noneSelectByField("id") ? "active" :""}" href="${cl:unSelectUrl("id")}">全部</a></span>
</p>
<%--单选--%>
<form>
<%--多选--%>
<h3>countryCode:</h3>
<c:forEach var="item" items="${cl:multiSelect('countryCode').items}">
<input type="checkbox" name="countryCode"
value="${item.value}" ${item.selected ? "checked" : ""} /> ${item.text}
</c:forEach>
<%--多选--%>
<%--搜索--%>
<h3>countryName</h3>
<input type="text" name="countryName" value="${cl:searchSelect("countryName").selected}">
<%--搜索--%>
<%--范围选择--%>
<input type="date" name="createTimeGt" value="${cl:rangeSelect("createTime").selected.min}">
<input type="date" name="createTimeLt" value="${cl:rangeSelect("createTime").selected.max}">
<%--范围选择--%>
<%--隐藏域,保存分页和排序信息--%>
<cl:filterHidden/>
<%--隐藏域,保存分页和排序信息--%>
<input type="submit" value="提交">
</form>
<table>
<tr>
<th>id</th>
<th>code</th>
<th>name</th>
</tr>
<c:choose>
<c:when test="${cl:isEmpty()}">
<%--无内容--%>
<tr>
<td colspan="3">无数据</td>
</tr>
<%--无内容--%>
</c:when>
<c:otherwise>
<%--有内容--%>
<c:forEach var="country" items="${coralList.resultList}">
<tr>
<td>${country.id}</td>
<td>${country.countryCode}</td>
<td>${country.countryName}</td>
</tr>
</c:forEach>
<%--有内容--%>
</c:otherwise>
</c:choose>
</table>
<%--翻页器--%>
<p>
<c:forEach var="page" items="${coralList.pageModel.pages}">
<span>
<c:choose>
<c:when test="${page != null}">
<a href="${page.url}">${page.pageIndex}</a>
</c:when>
<c:otherwise>
<span>...</span>
</c:otherwise>
</c:choose>
</span>
</c:forEach>
<span>当前第${coralList.pageModel.currentPage.pageIndex}页,共${coralList.pageModel.totalPage}页,${coralList.pageModel.totalRecord}条记录</span>
</p>
<%--翻页器--%>
<style>
a.active {
color: red;
}
</style>
<jsp:include page="/WEB-INF/jsp/include/footer.jsp"/>
\ No newline at end of file
<%@ include file="/WEB-INF/jsp/include/taglib.jsp" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%--添加此行消除额外空格--%>
<%@ page trimDirectiveWhitespaces="true" %>
<%--添加此行消除额外空格--%>
<jsp:include page="/WEB-INF/jsp/include/header.jsp">
<jsp:param name="pageTitle" value="user-list"/>
</jsp:include>
<jsp:useBean id="coralList" scope="request" type="com.dookay.coral.common.web.component.list.CoralListModelContainer<com.dookay.core.domain.UserInfoDomain>"/>
<h1>coralList</h1>
<%--排序器--%>
<p><a class="${cl:isCurrentOrder("id-desc") ? "active" : ""}" href="${cl:sortUrl("id-desc")}">id-desc</a></p>
<p><a class="${cl:isCurrentOrder("id-asc") ? "active" : ""}" href="${cl:sortUrl("id-asc")}">id-asc</a></p>
<p>currentOrder: ${coralList.sorterModel.orderBy}</p>
<%--排序器--%>
<form>
<%--多选--%>
<h3>countryCode:</h3>
<c:forEach var="item" items="${cl:multiSelect('username').items}">
<input type="checkbox" name="username"
value="${item.value}" ${item.selected ? "checked" : ""} /> ${item.text}
</c:forEach>
<%--多选--%>
<%--隐藏域,保存分页和排序信息--%>
<cl:filterHidden/>
<%--隐藏域,保存分页和排序信息--%>
<input type="submit" value="提交">
</form>
<table>
<tr>
<th>id</th>
<th>username</th>
</tr>
<c:choose>
<c:when test="${cl:isEmpty()}">
<%--无内容--%>
<tr>
<td colspan="3">无数据</td>
</tr>
<%--无内容--%>
</c:when>
<c:otherwise>
<%--有内容--%>
<c:forEach var="user" items="${coralList.resultList}">
<tr>
<td>${user.id}</td>
<td>${user.username}</td>
</tr>
</c:forEach>
<%--有内容--%>
</c:otherwise>
</c:choose>
</table>
<%--翻页器--%>
<p>
<c:forEach var="page" items="${coralList.pageModel.pages}">
<span>
<c:choose>
<c:when test="${page != null}">
<a href="${page.url}">${page.pageIndex}</a>
</c:when>
<c:otherwise>
<span>...</span>
</c:otherwise>
</c:choose>
</span>
</c:forEach>
<span>当前第${coralList.pageModel.currentPage.pageIndex}页,共${coralList.pageModel.totalPage}页,${coralList.pageModel.totalRecord}条记录</span>
</p>
<%--翻页器--%>
<style>
a.active {
color: red;
}
</style>
<jsp:include page="/WEB-INF/jsp/include/footer.jsp"/>
\ No newline at end of file
<%@ include file="/WEB-INF/jsp/include/taglib.jsp" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%--添加此行消除额外空格--%>
<%@ page trimDirectiveWhitespaces="true" %>
<%--添加此行消除额外空格--%>
<jsp:include page="/WEB-INF/jsp/include/header.jsp">
<jsp:param name="pageTitle" value="form-index"/>
</jsp:include>
<p>普通html表单需手动添加csrf</p>
<%--@elvariable id="_csrf" type="org.springframework.security.web.csrf.CsrfToken"--%>
<input name="${_csrf.parameterName}" value="${_csrf.token}">
<%--@elvariable id="simpleForm" type="com.dookay.jsp.demo.form.form.SimpleForm"--%>
<form:form action="/form/simple" modelAttribute="simpleForm" cssClass="j_ajaxForm">
<p>
姓名:<form:input path="name"/>
</p>
<p>
手机号:<form:input path="mobile"/>
</p>
<p>
<form:button>提交</form:button>
</p>
</form:form>
<jsp:include page="/WEB-INF/jsp/include/footer.jsp"/>
\ No newline at end of file
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%--添加此行消除额外空格--%>
<%@ page trimDirectiveWhitespaces="true" %>
<%--添加此行消除额外空格--%>
<script src="https://cdn.bootcss.com/jquery/3.2.1/jquery.min.js"></script>
<script src="${ctx}/static/js/backend.js"></script>
<script src="${ctx}/static/js/validator/jquery.validator.min.js"></script>
<script src="${ctx}/static/js/validator/local/zh-CN.js"></script>
<script src="${ctx}/static/js/layer/layer.js"></script>
<script>
$(function () {
backEndApp.init()
})
</script>
</body>
</html>
\ No newline at end of file
<%@ include file="/WEB-INF/jsp/include/taglib.jsp" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%--添加此行消除额外空格--%>
<%@ page trimDirectiveWhitespaces="true" %>
<%--添加此行消除额外空格--%>
<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
<meta name="generator" content="www.dookay.com">
<title>cihai ${param.pageTitle}</title>
</head>
<body>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
<%@ taglib prefix="spring" uri="http://www.springframework.org/tags" %>
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form" %>
<%@ taglib prefix="cl" uri="coral-list" %>
<c:set var="ctx" value="${pageContext.request.contextPath}"/>
\ No newline at end of file
<%@ include file="/WEB-INF/jsp/include/taglib.jsp" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<jsp:include page="/WEB-INF/jsp/include/header.jsp">
<jsp:param name="pageTitle" value="coral-list"/>
</jsp:include>
<h1>index</h1>
<jsp:include page="/WEB-INF/jsp/include/footer.jsp"/>
<%@ include file="/WEB-INF/jsp/include/taglib.jsp" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<jsp:include page="/WEB-INF/jsp/include/header.jsp">
<jsp:param name="pageTitle" value="coral-list"/>
</jsp:include>
<h1>other error</h1>
<p>${error.get("status")}</p>
<p>${error.get("code")}</p>
<p>${error.get("message")}</p>
<p>${error.get("path")}</p>
<p>${error.get("errorDetail")}</p>
<jsp:include page="/WEB-INF/jsp/include/footer.jsp"/>
<%--@elvariable id="error" type="java.util.Map"--%>
<%@ include file="/WEB-INF/jsp/include/taglib.jsp" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<jsp:include page="/WEB-INF/jsp/include/header.jsp">
<jsp:param name="pageTitle" value="coral-list"/>
</jsp:include>
<h1>service error</h1>
<p>${error.get("status")}</p>
<p>${error.get("code")}</p>
<p>${error.get("message")}</p>
<p>${error.get("path")}</p>
<p>${error.get("errorDetail")}</p>
<jsp:include page="/WEB-INF/jsp/include/footer.jsp"/>
<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns="http://xmlns.jcp.org/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/web-app_3_1.xsd"
version="3.1">
</web-app>
\ No newline at end of file
/*js 原生扩展*/
Array.prototype.remove = function (dx) {
for (var i = 0; i < this.length; i++) {
if (this[i] == dx) {
this.splice(i, 1);
}
}
return this;
}
Array.prototype.has = function (dx) {
for (var i = 0; i < this.length; i++) {
if (this[i] == dx) {
return true;
}
}
return false;
}
Array.prototype.contains = function (obj) {
var i = this.length;
while (i--) {
if (this[i] === obj) {
return true;
}
}
return false;
}
Date.prototype.format = function (format) {
/*
* eg:format="yyyy-MM-dd hh:mm:ss";
*/
if (!format) {
format = "yyyy-MM-dd hh:mm:ss";
}
var o = {
"M+": this.getMonth() + 1, // month
"d+": this.getDate(), // day
"h+": this.getHours(), // hour
"m+": this.getMinutes(), // minute
"s+": this.getSeconds(), // second
"q+": Math.floor((this.getMonth() + 3) / 3), // quarter
"S": this.getMilliseconds()
// millisecond
};
if (/(y+)/.test(format)) {
format = format.replace(RegExp.$1, (this.getFullYear() + "").substr(4
- RegExp.$1.length));
}
for (var k in o) {
if (new RegExp("(" + k + ")").test(format)) {
format = format.replace(RegExp.$1, RegExp.$1.length == 1
? o[k]
: ("00" + o[k]).substr(("" + o[k]).length));
}
}
return format;
};
String.prototype.escapeRegExp = function () {
return this.replace(/[.*+?^${}()|[\]\/\\]/g, "\\$0");
};
String.prototype.trimEnd = function (c) {
if (c)
return this.replace(new RegExp(c.escapeRegExp() + "*$"), '');
return this.replace(/\s+$/, '');
}
String.prototype.trimStart = function (c) {
if (c)
return this.replace(new RegExp("^" + c.escapeRegExp() + "*"), '');
return this.replace(/^\s+/, '');
}
var backEndApp = function () {
var _init = function () {
$(function () {
/**
* ajax表单提交
* @param options
* @returns {$}
*/
$.fn.ajaxSubmitForm = function (options) {
var params = {
before: function ($form) {
return true;
},
success: function ($form, data) {
if (data.code == "Ok") {
function okfun() {
if ($form.attr("data-next") != null && $form.attr("data-next") != "" && $form.attr("data-next") != "#")
location.href = $form.attr("data-next");
else if (data.NextUrl != null && data.NextUrl != "") {
location.href = data.NextUrl;
} else {
location.reload();
}
}
var time = parseInt($form.data('time'));
if (isNaN(time)) {
time = 2000;
}
if (time <= 0) {
okfun();
} else {
$.tips(data.message);
setTimeout(function () {
okfun();
}, time);
}
}
// 未登录
else {
$.tips(data.message);
}
}
};
$.extend(params, options);
this.submit(function (e) {
e.preventDefault();
var $form = $(this);
$form.validator();
var result = params.before($form);
if (result == false)
return false;
else {
$form.find(':submit').attr('disabled', 'disabled');
$form.find(':submit').addClass('disabled');
$form.find(':focus').blur();
if ($form.data("validator") != undefined && $form.data("validator") != null) {
$form.isValid(function (v) {
if (v) {
post();
} else {
$form.find(':submit').removeAttr('disabled');
$form.find(':submit').removeClass('disabled');
}
});
}
}
function post() {
$.ajax({
type: $form.attr("method") || "post",
url: $form.attr("action"),
data: $form.serialize(),
error: function (xmlHttpRequest, textStatus, errorThrown) {
$.tip('很遗憾,提交失败');
$form.find(':submit').removeAttr('disabled');
$form.find(':submit').removeClass('disabled');
},
success: function (data) {
if (data != null) {
params.success($form, data);
}
$form.find(':submit').removeAttr('disabled');
$form.find(':submit').removeClass('disabled');
}
});
}
return false;
});
return this;
}
$.extend({
tips: function (msg) {
return layer.open({skin: "msg", time: 1, content: msg});
}
});
$.extend({
tips: function (msg,fn) {
if(!fn){
fn=function () {}
}
return layer.open({skin: "msg", time: 2, content: msg,cancel:fn()});
}
});
$.setUrlParam = function (key, value, href) {
href = href || window.location.href;
var queryReg = /(\?.*)/;
var queryMathes = queryReg.exec(href);
var query = queryMathes && queryMathes.length >= 2 ? queryMathes[1] : '';
query = query.trimEnd('&').trimEnd('#');
var hashReg = /(#.*)/;
var hashMatches = hashReg.exec(href);
var hash = hashMatches && hashMatches.length >= 2 ? hashMatches[1] : '';
query = query.replace(hash, '');
var q = query + "&";
var re = new RegExp("[?|&]" + key + "=.*?&");
if (!re.test(q)) {
if (q == '&') {
q = '';
}
q += key + "=" + encodeURIComponent(value);
}
else
q = q.replace(re, "&" + key + "=" + encodeURIComponent(value) + "&");
q = q.trimStart("&").trimEnd("&");
q = (q[0] == "?" ? q : ("?" + q)) + hash;
return href.replace(/\?.*/, '').replace(hash, '') + q;
}
$.getUrlParam = function (key, query) {
if (!query)
query = window.location.search;
var re = new RegExp("[?|&]" + key + "=(.*?)&");
var matches = re.exec(query + "&");
if (!matches || matches.length < 2)
return "";
return decodeURIComponent(matches[1].replace("+", " "));
}
$(".j_ajaxForm").ajaxSubmitForm();
// $.pageLoading=function () {
// const param={pageIndex:"pageIndex"};
// var options={
// container:"loading-container",
// loadmore:"weui-loadmore"
// };
//
// var loading = false; //状态标记
// var $weui_loadmore = $("."+options.loadmore);
// var totalPage = $("."+options.container).data("totalpage");
// var pageIndex = 1;
//
// console.log(totalPage);
// $(document.body).infinite().on("infinite", function () {
// if (loading) return;
// loading = true;
// $weui_loadmore.show();
// if (pageIndex < totalPage) {
// pageIndex++;
// var nextUrl = $.setUrlParam(param.pageIndex, pageIndex);
// $.get(nextUrl, function (result) {
// setTimeout(function () {
// $("."+options.container).append($(result).find("."+options.container).html());
// loading = false;
// }, 500); //模拟延迟
// })
// } else {
// console.info("end")
// $(document.body).destroyInfinite();
// $weui_loadmore.html("<p>没有更多</p>");
// }
// });
//
// }
})
}
return {
init: function () {
_init();
}
}
}();
\ No newline at end of file
/*! layer-v3.0.1 Web弹层组件 MIT License http://layer.layui.com/ By 贤心 */
;!function(e,t){"use strict";var i,n,a=e.layui&&layui.define,o={getPath:function(){var e=document.scripts,t=e[e.length-1],i=t.src;if(!t.getAttribute("merge"))return i.substring(0,i.lastIndexOf("/")+1)}(),config:{},end:{},minIndex:0,minLeft:[],btn:["&#x786E;&#x5B9A;","&#x53D6;&#x6D88;"],type:["dialog","page","iframe","loading","tips"]},r={v:"3.0.1",ie:function(){var t=navigator.userAgent.toLowerCase();return!!(e.ActiveXObject||"ActiveXObject"in e)&&((t.match(/msie\s(\d+)/)||[])[1]||"11")}(),index:e.layer&&e.layer.v?1e5:0,path:o.getPath,config:function(e,t){return e=e||{},r.cache=o.config=i.extend({},o.config,e),r.path=o.config.path||r.path,"string"==typeof e.extend&&(e.extend=[e.extend]),o.config.path&&r.ready(),e.extend?(a?layui.addcss("modules/layer/"+e.extend):r.link("skin/"+e.extend),this):this},link:function(t,n,a){if(r.path){var o=i("head")[0],l=document.createElement("link");"string"==typeof n&&(a=n);var s=(a||t).replace(/\.|\//g,""),f="layuicss-"+s,c=0;l.rel="stylesheet",l.href=r.path+t,l.id=f,i("#"+f)[0]||o.appendChild(l),"function"==typeof n&&!function d(){return++c>80?e.console&&console.error("layer.css: Invalid"):void(1989===parseInt(i("#"+f).css("width"))?n():setTimeout(d,100))}()}},ready:function(e){var t="skinlayercss",i="1110";return a?layui.addcss("modules/layer/default/layer.css?v="+r.v+i,e,t):r.link("skin/default/layer.css?v="+r.v+i,e,t),this},alert:function(e,t,n){var a="function"==typeof t;return a&&(n=t),r.open(i.extend({content:e,yes:n},a?{}:t))},confirm:function(e,t,n,a){var l="function"==typeof t;return l&&(a=n,n=t),r.open(i.extend({content:e,btn:o.btn,yes:n,btn2:a},l?{}:t))},msg:function(e,n,a){var l="function"==typeof n,f=o.config.skin,c=(f?f+" "+f+"-msg":"")||"layui-layer-msg",d=s.anim.length-1;return l&&(a=n),r.open(i.extend({content:e,time:3e3,shade:!1,skin:c,title:!1,closeBtn:!1,btn:!1,resize:!1,end:a},l&&!o.config.skin?{skin:c+" layui-layer-hui",anim:d}:function(){return n=n||{},(n.icon===-1||n.icon===t&&!o.config.skin)&&(n.skin=c+" "+(n.skin||"layui-layer-hui")),n}()))},load:function(e,t){return r.open(i.extend({type:3,icon:e||0,resize:!1,shade:.01},t))},tips:function(e,t,n){return r.open(i.extend({type:4,content:[e,t],closeBtn:!1,time:3e3,shade:!1,resize:!1,fixed:!1,maxWidth:210},n))}},l=function(e){var t=this;t.index=++r.index,t.config=i.extend({},t.config,o.config,e),document.body?t.creat():setTimeout(function(){t.creat()},50)};l.pt=l.prototype;var s=["layui-layer",".layui-layer-title",".layui-layer-main",".layui-layer-dialog","layui-layer-iframe","layui-layer-content","layui-layer-btn","layui-layer-close"];s.anim=["layer-anim","layer-anim-01","layer-anim-02","layer-anim-03","layer-anim-04","layer-anim-05","layer-anim-06"],l.pt.config={type:0,shade:.3,fixed:!0,move:s[1],title:"&#x4FE1;&#x606F;",offset:"auto",area:"auto",closeBtn:1,time:0,zIndex:19891014,maxWidth:360,anim:0,icon:-1,moveType:1,resize:!0,scrollbar:!0,tips:2},l.pt.vessel=function(e,t){var n=this,a=n.index,r=n.config,l=r.zIndex+a,f="object"==typeof r.title,c=r.maxmin&&(1===r.type||2===r.type),d=r.title?'<div class="layui-layer-title" style="'+(f?r.title[1]:"")+'">'+(f?r.title[0]:r.title)+"</div>":"";return r.zIndex=l,t([r.shade?'<div class="layui-layer-shade" id="layui-layer-shade'+a+'" times="'+a+'" style="'+("z-index:"+(l-1)+"; background-color:"+(r.shade[1]||"#000")+"; opacity:"+(r.shade[0]||r.shade)+"; filter:alpha(opacity="+(100*r.shade[0]||100*r.shade)+");")+'"></div>':"",'<div class="'+s[0]+(" layui-layer-"+o.type[r.type])+(0!=r.type&&2!=r.type||r.shade?"":" layui-layer-border")+" "+(r.skin||"")+'" id="'+s[0]+a+'" type="'+o.type[r.type]+'" times="'+a+'" showtime="'+r.time+'" conType="'+(e?"object":"string")+'" style="z-index: '+l+"; width:"+r.area[0]+";height:"+r.area[1]+(r.fixed?"":";position:absolute;")+'">'+(e&&2!=r.type?"":d)+'<div id="'+(r.id||"")+'" class="layui-layer-content'+(0==r.type&&r.icon!==-1?" layui-layer-padding":"")+(3==r.type?" layui-layer-loading"+r.icon:"")+'">'+(0==r.type&&r.icon!==-1?'<i class="layui-layer-ico layui-layer-ico'+r.icon+'"></i>':"")+(1==r.type&&e?"":r.content||"")+'</div><span class="layui-layer-setwin">'+function(){var e=c?'<a class="layui-layer-min" href="javascript:;"><cite></cite></a><a class="layui-layer-ico layui-layer-max" href="javascript:;"></a>':"";return r.closeBtn&&(e+='<a class="layui-layer-ico '+s[7]+" "+s[7]+(r.title?r.closeBtn:4==r.type?"1":"2")+'" href="javascript:;"></a>'),e}()+"</span>"+(r.btn?function(){var e="";"string"==typeof r.btn&&(r.btn=[r.btn]);for(var t=0,i=r.btn.length;t<i;t++)e+='<a class="'+s[6]+t+'">'+r.btn[t]+"</a>";return'<div class="'+s[6]+" layui-layer-btn-"+(r.btnAlign||"")+'">'+e+"</div>"}():"")+(r.resize?'<span class="layui-layer-resize"></span>':"")+"</div>"],d,i('<div class="layui-layer-move"></div>')),n},l.pt.creat=function(){var e=this,t=e.config,a=e.index,l=t.content,f="object"==typeof l,c=i("body");if(!i("#"+t.id)[0]){switch("string"==typeof t.area&&(t.area="auto"===t.area?["",""]:[t.area,""]),t.shift&&(t.anim=t.shift),6==r.ie&&(t.fixed=!1),t.type){case 0:t.btn="btn"in t?t.btn:o.btn[0],r.closeAll("dialog");break;case 2:var l=t.content=f?t.content:[t.content||"http://layer.layui.com","auto"];t.content='<iframe scrolling="'+(t.content[1]||"auto")+'" allowtransparency="true" id="'+s[4]+a+'" name="'+s[4]+a+'" onload="this.className=\'\';" class="layui-layer-load" frameborder="0" src="'+t.content[0]+'"></iframe>';break;case 3:delete t.title,delete t.closeBtn,t.icon===-1&&0===t.icon,r.closeAll("loading");break;case 4:f||(t.content=[t.content,"body"]),t.follow=t.content[1],t.content=t.content[0]+'<i class="layui-layer-TipsG"></i>',delete t.title,t.tips="object"==typeof t.tips?t.tips:[t.tips,!0],t.tipsMore||r.closeAll("tips")}e.vessel(f,function(n,r,d){c.append(n[0]),f?function(){2==t.type||4==t.type?function(){i("body").append(n[1])}():function(){l.parents("."+s[0])[0]||(l.data("display",l.css("display")).show().addClass("layui-layer-wrap").wrap(n[1]),i("#"+s[0]+a).find("."+s[5]).before(r))}()}():c.append(n[1]),i(".layui-layer-move")[0]||c.append(o.moveElem=d),e.layero=i("#"+s[0]+a),t.scrollbar||s.html.css("overflow","hidden").attr("layer-full",a)}).auto(a),2==t.type&&6==r.ie&&e.layero.find("iframe").attr("src",l[0]),4==t.type?e.tips():e.offset(),t.fixed&&n.on("resize",function(){e.offset(),(/^\d+%$/.test(t.area[0])||/^\d+%$/.test(t.area[1]))&&e.auto(a),4==t.type&&e.tips()}),t.time<=0||setTimeout(function(){r.close(e.index)},t.time),e.move().callback(),s.anim[t.anim]&&e.layero.addClass(s.anim[t.anim]).data("anim",!0)}},l.pt.auto=function(e){function t(e){e=l.find(e),e.height(f[1]-c-d-2*(0|parseFloat(e.css("padding"))))}var a=this,o=a.config,l=i("#"+s[0]+e);""===o.area[0]&&o.maxWidth>0&&(r.ie&&r.ie<8&&o.btn&&l.width(l.innerWidth()),l.outerWidth()>o.maxWidth&&l.width(o.maxWidth));var f=[l.innerWidth(),l.innerHeight()],c=l.find(s[1]).outerHeight()||0,d=l.find("."+s[6]).outerHeight()||0;switch(o.type){case 2:t("iframe");break;default:""===o.area[1]?o.fixed&&f[1]>=n.height()&&(f[1]=n.height(),t("."+s[5])):t("."+s[5])}return a},l.pt.offset=function(){var e=this,t=e.config,i=e.layero,a=[i.outerWidth(),i.outerHeight()],o="object"==typeof t.offset;e.offsetTop=(n.height()-a[1])/2,e.offsetLeft=(n.width()-a[0])/2,o?(e.offsetTop=t.offset[0],e.offsetLeft=t.offset[1]||e.offsetLeft):"auto"!==t.offset&&("t"===t.offset?e.offsetTop=0:"r"===t.offset?e.offsetLeft=n.width()-a[0]:"b"===t.offset?e.offsetTop=n.height()-a[1]:"l"===t.offset?e.offsetLeft=0:"lt"===t.offset?(e.offsetTop=0,e.offsetLeft=0):"lb"===t.offset?(e.offsetTop=n.height()-a[1],e.offsetLeft=0):"rt"===t.offset?(e.offsetTop=0,e.offsetLeft=n.width()-a[0]):"rb"===t.offset?(e.offsetTop=n.height()-a[1],e.offsetLeft=n.width()-a[0]):e.offsetTop=t.offset),t.fixed||(e.offsetTop=/%$/.test(e.offsetTop)?n.height()*parseFloat(e.offsetTop)/100:parseFloat(e.offsetTop),e.offsetLeft=/%$/.test(e.offsetLeft)?n.width()*parseFloat(e.offsetLeft)/100:parseFloat(e.offsetLeft),e.offsetTop+=n.scrollTop(),e.offsetLeft+=n.scrollLeft()),i.attr("minLeft")&&(e.offsetTop=n.height()-(i.find(s[1]).outerHeight()||0),e.offsetLeft=i.css("left")),i.css({top:e.offsetTop,left:e.offsetLeft})},l.pt.tips=function(){var e=this,t=e.config,a=e.layero,o=[a.outerWidth(),a.outerHeight()],r=i(t.follow);r[0]||(r=i("body"));var l={width:r.outerWidth(),height:r.outerHeight(),top:r.offset().top,left:r.offset().left},f=a.find(".layui-layer-TipsG"),c=t.tips[0];t.tips[1]||f.remove(),l.autoLeft=function(){l.left+o[0]-n.width()>0?(l.tipLeft=l.left+l.width-o[0],f.css({right:12,left:"auto"})):l.tipLeft=l.left},l.where=[function(){l.autoLeft(),l.tipTop=l.top-o[1]-10,f.removeClass("layui-layer-TipsB").addClass("layui-layer-TipsT").css("border-right-color",t.tips[1])},function(){l.tipLeft=l.left+l.width+10,l.tipTop=l.top,f.removeClass("layui-layer-TipsL").addClass("layui-layer-TipsR").css("border-bottom-color",t.tips[1])},function(){l.autoLeft(),l.tipTop=l.top+l.height+10,f.removeClass("layui-layer-TipsT").addClass("layui-layer-TipsB").css("border-right-color",t.tips[1])},function(){l.tipLeft=l.left-o[0]-10,l.tipTop=l.top,f.removeClass("layui-layer-TipsR").addClass("layui-layer-TipsL").css("border-bottom-color",t.tips[1])}],l.where[c-1](),1===c?l.top-(n.scrollTop()+o[1]+16)<0&&l.where[2]():2===c?n.width()-(l.left+l.width+o[0]+16)>0||l.where[3]():3===c?l.top-n.scrollTop()+l.height+o[1]+16-n.height()>0&&l.where[0]():4===c&&o[0]+16-l.left>0&&l.where[1](),a.find("."+s[5]).css({"background-color":t.tips[1],"padding-right":t.closeBtn?"30px":""}),a.css({left:l.tipLeft-(t.fixed?n.scrollLeft():0),top:l.tipTop-(t.fixed?n.scrollTop():0)})},l.pt.move=function(){var e=this,t=e.config,a=i(document),l=e.layero,s=l.find(t.move),f=l.find(".layui-layer-resize"),c={};return t.move&&s.css("cursor","move"),s.on("mousedown",function(e){e.preventDefault(),t.move&&(c.moveStart=!0,c.offset=[e.clientX-parseFloat(l.css("left")),e.clientY-parseFloat(l.css("top"))],o.moveElem.css("cursor","move").show())}),f.on("mousedown",function(e){e.preventDefault(),c.resizeStart=!0,c.offset=[e.clientX,e.clientY],c.area=[l.outerWidth(),l.outerHeight()],o.moveElem.css("cursor","se-resize").show()}),a.on("mousemove",function(i){if(c.moveStart){var a=i.clientX-c.offset[0],o=i.clientY-c.offset[1],s="fixed"===l.css("position");if(i.preventDefault(),c.stX=s?0:n.scrollLeft(),c.stY=s?0:n.scrollTop(),!t.moveOut){var f=n.width()-l.outerWidth()+c.stX,d=n.height()-l.outerHeight()+c.stY;a<c.stX&&(a=c.stX),a>f&&(a=f),o<c.stY&&(o=c.stY),o>d&&(o=d)}l.css({left:a,top:o})}if(t.resize&&c.resizeStart){var a=i.clientX-c.offset[0],o=i.clientY-c.offset[1];i.preventDefault(),r.style(e.index,{width:c.area[0]+a,height:c.area[1]+o}),c.isResize=!0}}).on("mouseup",function(e){c.moveStart&&(delete c.moveStart,o.moveElem.hide(),t.moveEnd&&t.moveEnd()),c.resizeStart&&(delete c.resizeStart,o.moveElem.hide())}),e},l.pt.callback=function(){function e(){var e=a.cancel&&a.cancel(t.index,n);e===!1||r.close(t.index)}var t=this,n=t.layero,a=t.config;t.openLayer(),a.success&&(2==a.type?n.find("iframe").on("load",function(){a.success(n,t.index)}):a.success(n,t.index)),6==r.ie&&t.IE6(n),n.find("."+s[6]).children("a").on("click",function(){var e=i(this).index();if(0===e)a.yes?a.yes(t.index,n):a.btn1?a.btn1(t.index,n):r.close(t.index);else{var o=a["btn"+(e+1)]&&a["btn"+(e+1)](t.index,n);o===!1||r.close(t.index)}}),n.find("."+s[7]).on("click",e),a.shadeClose&&i("#layui-layer-shade"+t.index).on("click",function(){r.close(t.index)}),n.find(".layui-layer-min").on("click",function(){var e=a.min&&a.min(n);e===!1||r.min(t.index,a)}),n.find(".layui-layer-max").on("click",function(){i(this).hasClass("layui-layer-maxmin")?(r.restore(t.index),a.restore&&a.restore(n)):(r.full(t.index,a),setTimeout(function(){a.full&&a.full(n)},100))}),a.end&&(o.end[t.index]=a.end)},o.reselect=function(){i.each(i("select"),function(e,t){var n=i(this);n.parents("."+s[0])[0]||1==n.attr("layer")&&i("."+s[0]).length<1&&n.removeAttr("layer").show(),n=null})},l.pt.IE6=function(e){i("select").each(function(e,t){var n=i(this);n.parents("."+s[0])[0]||"none"===n.css("display")||n.attr({layer:"1"}).hide(),n=null})},l.pt.openLayer=function(){var e=this;r.zIndex=e.config.zIndex,r.setTop=function(e){var t=function(){r.zIndex++,e.css("z-index",r.zIndex+1)};return r.zIndex=parseInt(e[0].style.zIndex),e.on("mousedown",t),r.zIndex}},o.record=function(e){var t=[e.width(),e.height(),e.position().top,e.position().left+parseFloat(e.css("margin-left"))];e.find(".layui-layer-max").addClass("layui-layer-maxmin"),e.attr({area:t})},o.rescollbar=function(e){s.html.attr("layer-full")==e&&(s.html[0].style.removeProperty?s.html[0].style.removeProperty("overflow"):s.html[0].style.removeAttribute("overflow"),s.html.removeAttr("layer-full"))},e.layer=r,r.getChildFrame=function(e,t){return t=t||i("."+s[4]).attr("times"),i("#"+s[0]+t).find("iframe").contents().find(e)},r.getFrameIndex=function(e){return i("#"+e).parents("."+s[4]).attr("times")},r.iframeAuto=function(e){if(e){var t=r.getChildFrame("html",e).outerHeight(),n=i("#"+s[0]+e),a=n.find(s[1]).outerHeight()||0,o=n.find("."+s[6]).outerHeight()||0;n.css({height:t+a+o}),n.find("iframe").css({height:t})}},r.iframeSrc=function(e,t){i("#"+s[0]+e).find("iframe").attr("src",t)},r.style=function(e,t,n){var a=i("#"+s[0]+e),r=a.find(".layui-layer-content"),l=a.attr("type"),f=a.find(s[1]).outerHeight()||0,c=a.find("."+s[6]).outerHeight()||0;a.attr("minLeft");l!==o.type[3]&&l!==o.type[4]&&(n||(parseFloat(t.width)<=260&&(t.width=260),parseFloat(t.height)-f-c<=64&&(t.height=64+f+c)),a.css(t),c=a.find("."+s[6]).outerHeight(),l===o.type[2]?a.find("iframe").css({height:parseFloat(t.height)-f-c}):r.css({height:parseFloat(t.height)-f-c-parseFloat(r.css("padding-top"))-parseFloat(r.css("padding-bottom"))}))},r.min=function(e,t){var a=i("#"+s[0]+e),l=a.find(s[1]).outerHeight()||0,f=a.attr("minLeft")||181*o.minIndex+"px",c=a.css("position");o.record(a),o.minLeft[0]&&(f=o.minLeft[0],o.minLeft.shift()),a.attr("position",c),r.style(e,{width:180,height:l,left:f,top:n.height()-l,position:"fixed",overflow:"hidden"},!0),a.find(".layui-layer-min").hide(),"page"===a.attr("type")&&a.find(s[4]).hide(),o.rescollbar(e),a.attr("minLeft")||o.minIndex++,a.attr("minLeft",f)},r.restore=function(e){var t=i("#"+s[0]+e),n=t.attr("area").split(",");t.attr("type");r.style(e,{width:parseFloat(n[0]),height:parseFloat(n[1]),top:parseFloat(n[2]),left:parseFloat(n[3]),position:t.attr("position"),overflow:"visible"},!0),t.find(".layui-layer-max").removeClass("layui-layer-maxmin"),t.find(".layui-layer-min").show(),"page"===t.attr("type")&&t.find(s[4]).show(),o.rescollbar(e)},r.full=function(e){var t,a=i("#"+s[0]+e);o.record(a),s.html.attr("layer-full")||s.html.css("overflow","hidden").attr("layer-full",e),clearTimeout(t),t=setTimeout(function(){var t="fixed"===a.css("position");r.style(e,{top:t?0:n.scrollTop(),left:t?0:n.scrollLeft(),width:n.width(),height:n.height()},!0),a.find(".layui-layer-min").hide()},100)},r.title=function(e,t){var n=i("#"+s[0]+(t||r.index)).find(s[1]);n.html(e)},r.close=function(e){var t=i("#"+s[0]+e),n=t.attr("type"),a="layer-anim-close";if(t[0]){var l="layui-layer-wrap",f=function(){if(n===o.type[1]&&"object"===t.attr("conType")){t.children(":not(."+s[5]+")").remove();for(var a=t.find("."+l),r=0;r<2;r++)a.unwrap();a.css("display",a.data("display")).removeClass(l)}else{if(n===o.type[2])try{var f=i("#"+s[4]+e)[0];f.contentWindow.document.write(""),f.contentWindow.close(),t.find("."+s[5])[0].removeChild(f)}catch(c){}t[0].innerHTML="",t.remove()}"function"==typeof o.end[e]&&o.end[e](),delete o.end[e]};t.data("anim")&&t.addClass(a),i("#layui-layer-moves, #layui-layer-shade"+e).remove(),6==r.ie&&o.reselect(),o.rescollbar(e),t.attr("minLeft")&&(o.minIndex--,o.minLeft.push(t.attr("minLeft"))),setTimeout(function(){f()},r.ie&&r.ie<10||!t.data("anim")?0:200)}},r.closeAll=function(e){i.each(i("."+s[0]),function(){var t=i(this),n=e?t.attr("type")===e:1;n&&r.close(t.attr("times")),n=null})};var f=r.cache||{},c=function(e){return f.skin?" "+f.skin+" "+f.skin+"-"+e:""};r.prompt=function(e,t){var a="";if(e=e||{},"function"==typeof e&&(t=e),e.area){var o=e.area;a='style="width: '+o[0]+"; height: "+o[1]+';"',delete e.area}var l,s=2==e.formType?'<textarea class="layui-layer-input"'+a+">"+(e.value||"")+"</textarea>":function(){return'<input type="'+(1==e.formType?"password":"text")+'" class="layui-layer-input" value="'+(e.value||"")+'">'}();return r.open(i.extend({type:1,btn:["&#x786E;&#x5B9A;","&#x53D6;&#x6D88;"],content:s,skin:"layui-layer-prompt"+c("prompt"),maxWidth:n.width(),success:function(e){l=e.find(".layui-layer-input"),l.focus()},resize:!1,yes:function(i){var n=l.val();""===n?l.focus():n.length>(e.maxlength||500)?r.tips("&#x6700;&#x591A;&#x8F93;&#x5165;"+(e.maxlength||500)+"&#x4E2A;&#x5B57;&#x6570;",l,{tips:1}):t&&t(n,i,l)}},e))},r.tab=function(e){e=e||{};var t=e.tab||{};return r.open(i.extend({type:1,skin:"layui-layer-tab"+c("tab"),resize:!1,title:function(){var e=t.length,i=1,n="";if(e>0)for(n='<span class="layui-layer-tabnow">'+t[0].title+"</span>";i<e;i++)n+="<span>"+t[i].title+"</span>";return n}(),content:'<ul class="layui-layer-tabmain">'+function(){var e=t.length,i=1,n="";if(e>0)for(n='<li class="layui-layer-tabli xubox_tab_layer">'+(t[0].content||"no content")+"</li>";i<e;i++)n+='<li class="layui-layer-tabli">'+(t[i].content||"no content")+"</li>";return n}()+"</ul>",success:function(t){var n=t.find(".layui-layer-title").children(),a=t.find(".layui-layer-tabmain").children();n.on("mousedown",function(t){t.stopPropagation?t.stopPropagation():t.cancelBubble=!0;var n=i(this),o=n.index();n.addClass("layui-layer-tabnow").siblings().removeClass("layui-layer-tabnow"),a.eq(o).show().siblings().hide(),"function"==typeof e.change&&e.change(o)})}},e))},r.photos=function(t,n,a){function o(e,t,i){var n=new Image;return n.src=e,n.complete?t(n):(n.onload=function(){n.onload=null,t(n)},void(n.onerror=function(e){n.onerror=null,i(e)}))}var l={};if(t=t||{},t.photos){var s=t.photos.constructor===Object,f=s?t.photos:{},d=f.data||[],u=f.start||0;if(l.imgIndex=(0|u)+1,t.img=t.img||"img",s){if(0===d.length)return r.msg("&#x6CA1;&#x6709;&#x56FE;&#x7247;")}else{var y=i(t.photos),p=function(){d=[],y.find(t.img).each(function(e){var t=i(this);t.attr("layer-index",e),d.push({alt:t.attr("alt"),pid:t.attr("layer-pid"),src:t.attr("layer-src")||t.attr("src"),thumb:t.attr("src")})})};if(p(),0===d.length)return;if(n||y.on("click",t.img,function(){var e=i(this),n=e.attr("layer-index");r.photos(i.extend(t,{photos:{start:n,data:d,tab:t.tab},full:t.full}),!0),p()}),!n)return}l.imgprev=function(e){l.imgIndex--,l.imgIndex<1&&(l.imgIndex=d.length),l.tabimg(e)},l.imgnext=function(e,t){l.imgIndex++,l.imgIndex>d.length&&(l.imgIndex=1,t)||l.tabimg(e)},l.keyup=function(e){if(!l.end){var t=e.keyCode;e.preventDefault(),37===t?l.imgprev(!0):39===t?l.imgnext(!0):27===t&&r.close(l.index)}},l.tabimg=function(e){d.length<=1||(f.start=l.imgIndex-1,r.close(l.index),r.photos(t,!0,e))},l.event=function(){l.bigimg.hover(function(){l.imgsee.show()},function(){l.imgsee.hide()}),l.bigimg.find(".layui-layer-imgprev").on("click",function(e){e.preventDefault(),l.imgprev()}),l.bigimg.find(".layui-layer-imgnext").on("click",function(e){e.preventDefault(),l.imgnext()}),i(document).on("keyup",l.keyup)},l.loadi=r.load(1,{shade:!("shade"in t)&&.9,scrollbar:!1}),o(d[u].src,function(n){r.close(l.loadi),l.index=r.open(i.extend({type:1,area:function(){var a=[n.width,n.height],o=[i(e).width()-100,i(e).height()-100];if(!t.full&&(a[0]>o[0]||a[1]>o[1])){var r=[a[0]/o[0],a[1]/o[1]];r[0]>r[1]?(a[0]=a[0]/r[0],a[1]=a[1]/r[0]):r[0]<r[1]&&(a[0]=a[0]/r[1],a[1]=a[1]/r[1])}return[a[0]+"px",a[1]+"px"]}(),title:!1,shade:.9,shadeClose:!0,closeBtn:!1,move:".layui-layer-phimg img",moveType:1,scrollbar:!1,moveOut:!0,anim:5*Math.random()|0,skin:"layui-layer-photos"+c("photos"),content:'<div class="layui-layer-phimg"><img src="'+d[u].src+'" alt="'+(d[u].alt||"")+'" layer-pid="'+d[u].pid+'"><div class="layui-layer-imgsee">'+(d.length>1?'<span class="layui-layer-imguide"><a href="javascript:;" class="layui-layer-iconext layui-layer-imgprev"></a><a href="javascript:;" class="layui-layer-iconext layui-layer-imgnext"></a></span>':"")+'<div class="layui-layer-imgbar" style="display:'+(a?"block":"")+'"><span class="layui-layer-imgtit"><a href="javascript:;">'+(d[u].alt||"")+"</a><em>"+l.imgIndex+"/"+d.length+"</em></span></div></div></div>",success:function(e,i){l.bigimg=e.find(".layui-layer-phimg"),l.imgsee=e.find(".layui-layer-imguide,.layui-layer-imgbar"),l.event(e),t.tab&&t.tab(d[u],e)},end:function(){l.end=!0,i(document).off("keyup",l.keyup)}},t))},function(){r.close(l.loadi),r.msg("&#x5F53;&#x524D;&#x56FE;&#x7247;&#x5730;&#x5740;&#x5F02;&#x5E38;<br>&#x662F;&#x5426;&#x7EE7;&#x7EED;&#x67E5;&#x770B;&#x4E0B;&#x4E00;&#x5F20;&#xFF1F;",{time:3e4,btn:["&#x4E0B;&#x4E00;&#x5F20;","&#x4E0D;&#x770B;&#x4E86;"],yes:function(){d.length>1&&l.imgnext(!0,!0)}})})}},o.run=function(t){i=t,n=i(e),s.html=i("html"),r.open=function(e){var t=new l(e);return t.index}},e.layui&&layui.define?(r.ready(),layui.define("jquery",function(t){r.path=layui.cache.dir,o.run(layui.jquery),e.layer=r,t("layer",r)})):"function"==typeof define?define(["jquery"],function(){return o.run(e.jQuery),r}):function(){o.run(e.jQuery),r.ready()}()}(window);
\ No newline at end of file
.layui-layer-imgbar,.layui-layer-imgtit a,.layui-layer-tab .layui-layer-title span,.layui-layer-title{text-overflow:ellipsis;white-space:nowrap}*html{background-image:url(about:blank);background-attachment:fixed}html #layuicss-skinlayercss{display:none;position:absolute;width:1989px}.layui-layer,.layui-layer-shade{position:fixed;_position:absolute;pointer-events:auto}.layui-layer-shade{top:0;left:0;width:100%;height:100%;_height:expression(document.body.offsetHeight+"px")}.layui-layer{-webkit-overflow-scrolling:touch;top:150px;left:0;margin:0;padding:0;background-color:#fff;-webkit-background-clip:content;box-shadow:1px 1px 50px rgba(0,0,0,.3)}.layui-layer-close{position:absolute}.layui-layer-content{position:relative}.layui-layer-border{border:1px solid #B2B2B2;border:1px solid rgba(0,0,0,.1);box-shadow:1px 1px 5px rgba(0,0,0,.2)}.layui-layer-load{background:url(loading-1.gif) center center no-repeat #eee} .layui-layer-ico{background:url(icon.png) no-repeat} .layui-layer-btn a,.layui-layer-dialog .layui-layer-ico,.layui-layer-setwin a{display:inline-block;*display:inline;*zoom:1;vertical-align:top} .layui-layer-move{display:none;position:fixed;*position:absolute;left:0;top:0;width:100%;height:100%;cursor:move;opacity:0;filter:alpha(opacity=0);background-color:#fff;z-index:2147483647} .layui-layer-resize{position:absolute;width:15px;height:15px;right:0;bottom:0;cursor:se-resize} .layui-layer{border-radius:2px;-webkit-animation-fill-mode:both;animation-fill-mode:both;-webkit-animation-duration:.3s;animation-duration:.3s} @-webkit-keyframes bounceIn{0%{opacity:0;-webkit-transform:scale(.5);transform:scale(.5)}100%{opacity:1;-webkit-transform:scale(1);transform:scale(1)}} @keyframes bounceIn{0%{opacity:0;-webkit-transform:scale(.5);-ms-transform:scale(.5);transform:scale(.5)}100%{opacity:1;-webkit-transform:scale(1);-ms-transform:scale(1);transform:scale(1)}} .layer-anim{-webkit-animation-name:bounceIn;animation-name:bounceIn} @-webkit-keyframes zoomInDown{0%{opacity:0;-webkit-transform:scale(.1) translateY(-2000px);transform:scale(.1) translateY(-2000px);-webkit-animation-timing-function:ease-in-out;animation-timing-function:ease-in-out}60%{opacity:1;-webkit-transform:scale(.475) translateY(60px);transform:scale(.475) translateY(60px);-webkit-animation-timing-function:ease-out;animation-timing-function:ease-out}} @keyframes zoomInDown{0%{opacity:0;-webkit-transform:scale(.1) translateY(-2000px);-ms-transform:scale(.1) translateY(-2000px);transform:scale(.1) translateY(-2000px);-webkit-animation-timing-function:ease-in-out;animation-timing-function:ease-in-out}60%{opacity:1;-webkit-transform:scale(.475) translateY(60px);-ms-transform:scale(.475) translateY(60px);transform:scale(.475) translateY(60px);-webkit-animation-timing-function:ease-out;animation-timing-function:ease-out}} .layer-anim-01{-webkit-animation-name:zoomInDown;animation-name:zoomInDown} @-webkit-keyframes fadeInUpBig{0%{opacity:0;-webkit-transform:translateY(2000px);transform:translateY(2000px)}100%{opacity:1;-webkit-transform:translateY(0);transform:translateY(0)}} @keyframes fadeInUpBig{0%{opacity:0;-webkit-transform:translateY(2000px);-ms-transform:translateY(2000px);transform:translateY(2000px)}100%{opacity:1;-webkit-transform:translateY(0);-ms-transform:translateY(0);transform:translateY(0)}} .layer-anim-02{-webkit-animation-name:fadeInUpBig;animation-name:fadeInUpBig} @-webkit-keyframes zoomInLeft{0%{opacity:0;-webkit-transform:scale(.1) translateX(-2000px);transform:scale(.1) translateX(-2000px);-webkit-animation-timing-function:ease-in-out;animation-timing-function:ease-in-out}60%{opacity:1;-webkit-transform:scale(.475) translateX(48px);transform:scale(.475) translateX(48px);-webkit-animation-timing-function:ease-out;animation-timing-function:ease-out}} @keyframes zoomInLeft{0%{opacity:0;-webkit-transform:scale(.1) translateX(-2000px);-ms-transform:scale(.1) translateX(-2000px);transform:scale(.1) translateX(-2000px);-webkit-animation-timing-function:ease-in-out;animation-timing-function:ease-in-out}60%{opacity:1;-webkit-transform:scale(.475) translateX(48px);-ms-transform:scale(.475) translateX(48px);transform:scale(.475) translateX(48px);-webkit-animation-timing-function:ease-out;animation-timing-function:ease-out}} .layer-anim-03{-webkit-animation-name:zoomInLeft;animation-name:zoomInLeft} @-webkit-keyframes rollIn{0%{opacity:0;-webkit-transform:translateX(-100%) rotate(-120deg);transform:translateX(-100%) rotate(-120deg)}100%{opacity:1;-webkit-transform:translateX(0) rotate(0);transform:translateX(0) rotate(0)}} @keyframes rollIn{0%{opacity:0;-webkit-transform:translateX(-100%) rotate(-120deg);-ms-transform:translateX(-100%) rotate(-120deg);transform:translateX(-100%) rotate(-120deg)}100%{opacity:1;-webkit-transform:translateX(0) rotate(0);-ms-transform:translateX(0) rotate(0);transform:translateX(0) rotate(0)}} .layer-anim-04{-webkit-animation-name:rollIn;animation-name:rollIn} @keyframes fadeIn{0%{opacity:0}100%{opacity:1}} .layer-anim-05{-webkit-animation-name:fadeIn;animation-name:fadeIn} @-webkit-keyframes shake{0%,100%{-webkit-transform:translateX(0);transform:translateX(0)}10%,30%,50%,70%,90%{-webkit-transform:translateX(-10px);transform:translateX(-10px)}20%,40%,60%,80%{-webkit-transform:translateX(10px);transform:translateX(10px)}} @keyframes shake{0%,100%{-webkit-transform:translateX(0);-ms-transform:translateX(0);transform:translateX(0)}10%,30%,50%,70%,90%{-webkit-transform:translateX(-10px);-ms-transform:translateX(-10px);transform:translateX(-10px)}20%,40%,60%,80%{-webkit-transform:translateX(10px);-ms-transform:translateX(10px);transform:translateX(10px)}} .layer-anim-06{-webkit-animation-name:shake;animation-name:shake} @-webkit-keyframes fadeIn{0%{opacity:0}100%{opacity:1}} @-webkit-keyframes bounceOut{100%{opacity:0;-webkit-transform:scale(.7);transform:scale(.7)}30%{-webkit-transform:scale(1.05);transform:scale(1.05)}0%{-webkit-transform:scale(1);transform:scale(1)}} @keyframes bounceOut{100%{opacity:0;-webkit-transform:scale(.7);-ms-transform:scale(.7);transform:scale(.7)}30%{-webkit-transform:scale(1.05);-ms-transform:scale(1.05);transform:scale(1.05)}0%{-webkit-transform:scale(1);-ms-transform:scale(1);transform:scale(1)}} .layer-anim-close{-webkit-animation-name:bounceOut;animation-name:bounceOut;-webkit-animation-duration:.2s;animation-duration:.2s} .layui-layer-title{padding:0 80px 0 20px;height:42px;line-height:42px;border-bottom:1px solid #eee;font-size:14px;color:#333;overflow:hidden;background-color:#F8F8F8;border-radius:2px 2px 0 0} .layui-layer-setwin{position:absolute;right:15px;*right:0;top:15px;font-size:0;line-height:initial} .layui-layer-setwin a{position:relative;width:16px;height:16px;margin-left:10px;font-size:12px;_overflow:hidden} .layui-layer-setwin .layui-layer-min cite{position:absolute;width:14px;height:2px;left:0;top:50%;margin-top:-1px;background-color:#2E2D3C;cursor:pointer;_overflow:hidden} .layui-layer-setwin .layui-layer-min:hover cite{background-color:#2D93CA} .layui-layer-setwin .layui-layer-max{background-position:-32px -40px} .layui-layer-setwin .layui-layer-max:hover{background-position:-16px -40px} .layui-layer-setwin .layui-layer-maxmin{background-position:-65px -40px} .layui-layer-setwin .layui-layer-maxmin:hover{background-position:-49px -40px} .layui-layer-setwin .layui-layer-close1{background-position:0 -40px;cursor:pointer} .layui-layer-setwin .layui-layer-close1:hover{opacity:.7} .layui-layer-setwin .layui-layer-close2{position:absolute;right:-28px;top:-28px;width:30px;height:30px;margin-left:0;background-position:-149px -31px;*right:-18px;_display:none} .layui-layer-setwin .layui-layer-close2:hover{background-position:-180px -31px} .layui-layer-btn{text-align:right;padding:0 10px 12px;pointer-events:auto;user-select:none;-webkit-user-select:none} .layui-layer-btn a{height:28px;line-height:28px;margin:0 6px;padding:0 15px;border:1px solid #dedede;background-color:#f1f1f1;color:#333;border-radius:2px;font-weight:400;cursor:pointer;text-decoration:none} .layui-layer-btn a:hover{opacity:.9;text-decoration:none} .layui-layer-btn a:active{opacity:.8} .layui-layer-btn .layui-layer-btn0{border-color:#4898d5;background-color:#2e8ded;color:#fff} .layui-layer-btn-l{text-align:left} .layui-layer-btn-c{text-align:center} .layui-layer-dialog{min-width:260px} .layui-layer-dialog .layui-layer-content{position:relative;padding:20px;line-height:24px;word-break:break-all;overflow:hidden;font-size:14px;overflow-x:hidden;overflow-y:auto} .layui-layer-dialog .layui-layer-content .layui-layer-ico{position:absolute;top:16px;left:15px;_left:-40px;width:30px;height:30px} .layui-layer-ico1{background-position:-30px 0} .layui-layer-ico2{background-position:-60px 0} .layui-layer-ico3{background-position:-90px 0} .layui-layer-ico4{background-position:-120px 0} .layui-layer-ico5{background-position:-150px 0} .layui-layer-ico6{background-position:-180px 0} .layui-layer-rim{border:6px solid #8D8D8D;border:6px solid rgba(0,0,0,.3);border-radius:5px;box-shadow:none} .layui-layer-msg{min-width:180px;border:1px solid #D3D4D3;box-shadow:none} .layui-layer-hui{min-width:100px;background-color:#000;filter:alpha(opacity=60);background-color:rgba(0,0,0,.6);color:#fff;border:none} .layui-layer-hui .layui-layer-content{padding:12px 25px;text-align:center} .layui-layer-dialog .layui-layer-padding{padding:20px 20px 20px 55px;text-align:left} .layui-layer-page .layui-layer-content{position:relative;overflow:auto} .layui-layer-iframe .layui-layer-btn,.layui-layer-page .layui-layer-btn{padding-top:10px} .layui-layer-nobg{background:0 0} .layui-layer-iframe iframe{display:block;width:100%} .layui-layer-loading{border-radius:100%;background:0 0;box-shadow:none;border:none} .layui-layer-loading .layui-layer-content{width:60px;height:24px;background:url(loading-0.gif) no-repeat} .layui-layer-loading .layui-layer-loading1{width:37px;height:37px;background:url(loading-1.gif) no-repeat} .layui-layer-ico16,.layui-layer-loading .layui-layer-loading2{width:32px;height:32px;background:url(loading-2.gif) no-repeat} .layui-layer-tips{background:0 0;box-shadow:none;border:none} .layui-layer-tips .layui-layer-content{position:relative;line-height:22px;min-width:12px;padding:5px 10px;font-size:12px;_float:left;border-radius:2px;box-shadow:1px 1px 3px rgba(0,0,0,.2);background-color:#000;color:#fff} .layui-layer-tips .layui-layer-close{right:-2px;top:-1px} .layui-layer-tips i.layui-layer-TipsG{position:absolute;width:0;height:0;border-width:8px;border-color:transparent;border-style:dashed;*overflow:hidden} .layui-layer-tips i.layui-layer-TipsB,.layui-layer-tips i.layui-layer-TipsT{left:5px;border-right-style:solid;border-right-color:#000} .layui-layer-tips i.layui-layer-TipsT{bottom:-8px} .layui-layer-tips i.layui-layer-TipsB{top:-8px} .layui-layer-tips i.layui-layer-TipsL,.layui-layer-tips i.layui-layer-TipsR{top:1px;border-bottom-style:solid;border-bottom-color:#000} .layui-layer-tips i.layui-layer-TipsR{left:-8px} .layui-layer-tips i.layui-layer-TipsL{right:-8px} .layui-layer-lan[type=dialog]{min-width:280px} .layui-layer-lan .layui-layer-title{background:#4476A7;color:#fff;border:none} .layui-layer-lan .layui-layer-btn{padding:10px;text-align:right;border-top:1px solid #E9E7E7} .layui-layer-lan .layui-layer-btn a{background:#BBB5B5;border:none} .layui-layer-lan .layui-layer-btn .layui-layer-btn1{background:#C9C5C5} .layui-layer-molv .layui-layer-title{background:#009f95;color:#fff;border:none} .layui-layer-molv .layui-layer-btn a{background:#009f95} .layui-layer-molv .layui-layer-btn .layui-layer-btn1{background:#92B8B1} .layui-layer-iconext{background:url(icon-ext.png) no-repeat} .layui-layer-prompt .layui-layer-input{display:block;width:220px;height:30px;margin:0 auto;line-height:30px;padding:0 5px;border:1px solid #ccc;box-shadow:1px 1px 5px rgba(0,0,0,.1) inset;color:#333} .layui-layer-prompt textarea.layui-layer-input{width:300px;height:100px;line-height:20px} .layui-layer-prompt .layui-layer-content{padding:20px} .layui-layer-prompt .layui-layer-btn{padding-top:0} .layui-layer-tab{box-shadow:1px 1px 50px rgba(0,0,0,.4)} .layui-layer-tab .layui-layer-title{padding-left:0;border-bottom:1px solid #ccc;background-color:#eee;overflow:visible} .layui-layer-tab .layui-layer-title span{position:relative;float:left;min-width:80px;max-width:260px;padding:0 20px;text-align:center;cursor:default;overflow:hidden} .layui-layer-tab .layui-layer-title span.layui-layer-tabnow{height:43px;border-left:1px solid #ccc;border-right:1px solid #ccc;background-color:#fff;z-index:10} .layui-layer-tab .layui-layer-title span:first-child{border-left:none} .layui-layer-tabmain{line-height:24px;clear:both} .layui-layer-tabmain .layui-layer-tabli{display:none} .layui-layer-tabmain .layui-layer-tabli.xubox_tab_layer{display:block} .xubox_tabclose{position:absolute;right:10px;top:5px;cursor:pointer} .layui-layer-photos{-webkit-animation-duration:1s;animation-duration:1s} .layui-layer-photos .layui-layer-content{overflow:hidden;text-align:center} .layui-layer-photos .layui-layer-phimg img{position:relative;width:100%;display:inline-block;*display:inline;*zoom:1;vertical-align:top} .layui-layer-imgbar,.layui-layer-imguide{display:none} .layui-layer-imgnext,.layui-layer-imgprev{position:absolute;top:50%;width:27px;_width:44px;height:44px;margin-top:-22px;outline:0;blr:expression(this.onFocus=this.blur())} .layui-layer-imgprev{left:10px;background-position:-5px -5px;_background-position:-70px -5px} .layui-layer-imgprev:hover{background-position:-33px -5px;_background-position:-120px -5px} .layui-layer-imgnext{right:10px;_right:8px;background-position:-5px -50px;_background-position:-70px -50px} .layui-layer-imgnext:hover{background-position:-33px -50px;_background-position:-120px -50px} .layui-layer-imgbar{position:absolute;left:0;bottom:0;width:100%;height:32px;line-height:32px;background-color:rgba(0,0,0,.8);background-color:#000\9;filter:Alpha(opacity=80);color:#fff;overflow:hidden;font-size:0} .layui-layer-imgtit *{display:inline-block;*display:inline;*zoom:1;vertical-align:top;font-size:12px} .layui-layer-imgtit a{max-width:65%;overflow:hidden;color:#fff} .layui-layer-imgtit a:hover{color:#fff;text-decoration:underline} .layui-layer-imgtit em{padding-left:10px;font-style:normal}@media screen and (max-width:1100px){.layui-layer-iframe{overflow-y:auto;-webkit-overflow-scrolling:touch}}
\ No newline at end of file
/*! layer弹层组件拓展类 */
;!function(){layer.use("skin/layer.ext.css",function(){layer.layui_layer_extendlayerextjs=!0});var a=layer.cache||{},b=function(b){return a.skin?" "+a.skin+" "+a.skin+"-"+b:""};layer.prompt=function(a,c){a=a||{},"function"==typeof a&&(c=a);var d,e=2==a.formType?'<textarea class="layui-layer-input">'+(a.value||"")+"</textarea>":function(){return'<input type="'+(1==a.formType?"password":"text")+'" class="layui-layer-input" value="'+(a.value||"")+'">'}();return layer.open($.extend({btn:["&#x786E;&#x5B9A;","&#x53D6;&#x6D88;"],content:e,skin:"layui-layer-prompt"+b("prompt"),success:function(a){d=a.find(".layui-layer-input"),d.focus()},yes:function(b){var e=d.val();""===e?d.focus():e.length>(a.maxlength||500)?layer.tips("&#x6700;&#x591A;&#x8F93;&#x5165;"+(a.maxlength||500)+"&#x4E2A;&#x5B57;&#x6570;",d,{tips:1}):c&&c(e,b,d)}},a))},layer.tab=function(a){a=a||{};var c=a.tab||{};return layer.open($.extend({type:1,skin:"layui-layer-tab"+b("tab"),title:function(){var a=c.length,b=1,d="";if(a>0)for(d='<span class="layui-layer-tabnow">'+c[0].title+"</span>";a>b;b++)d+="<span>"+c[b].title+"</span>";return d}(),content:'<ul class="layui-layer-tabmain">'+function(){var a=c.length,b=1,d="";if(a>0)for(d='<li class="layui-layer-tabli xubox_tab_layer">'+(c[0].content||"no content")+"</li>";a>b;b++)d+='<li class="layui-layer-tabli">'+(c[b].content||"no content")+"</li>";return d}()+"</ul>",success:function(a){var b=a.find(".layui-layer-title").children(),c=a.find(".layui-layer-tabmain").children();b.on("mousedown",function(a){a.stopPropagation?a.stopPropagation():a.cancelBubble=!0;var b=$(this),d=b.index();b.addClass("layui-layer-tabnow").siblings().removeClass("layui-layer-tabnow"),c.eq(d).show().siblings().hide()})}},a))},layer.photos=function(a,c,d){function e(a,b,c){var d=new Image;d.onload=function(){d.onload=null,b(d)},d.onerror=function(a){d.onload=null,c(a)},d.src=a}var f={};if(a=a||{},a.photos){var g=a.photos.constructor===Object,h=g?a.photos:{},i=h.data||[],j=h.start||0;if(f.imgIndex=j+1,g){if(0===i.length)return void layer.msg("&#x6CA1;&#x6709;&#x56FE;&#x7247;")}else{var k=$(a.photos),l=k.find(a.img||"img");if(0===l.length)return;if(c||k.find(h.img||"img").each(function(b){var c=$(this);i.push({alt:c.attr("alt"),pid:c.attr("layer-pid"),src:c.attr("layer-src")||c.attr("src"),thumb:c.attr("src")}),c.on("click",function(){layer.photos($.extend(a,{photos:{start:b,data:i,tab:a.tab},full:a.full}),!0)})}),!c)return}f.imgprev=function(a){f.imgIndex--,f.imgIndex<1&&(f.imgIndex=i.length),f.tabimg(a)},f.imgnext=function(a){f.imgIndex++,f.imgIndex>i.length&&(f.imgIndex=1),f.tabimg(a)},f.keyup=function(a){if(!f.end){var b=a.keyCode;a.preventDefault(),37===b?f.imgprev(!0):39===b?f.imgnext(!0):27===b&&layer.close(f.index)}},f.tabimg=function(b){i.length<=1||(h.start=f.imgIndex-1,layer.close(f.index),layer.photos(a,!0,b))},f.event=function(){f.bigimg.hover(function(){f.imgsee.show()},function(){f.imgsee.hide()}),f.bigimg.find(".layui-layer-imgprev").on("click",function(a){a.preventDefault(),f.imgprev()}),f.bigimg.find(".layui-layer-imgnext").on("click",function(a){a.preventDefault(),f.imgnext()}),$(document).on("keyup",f.keyup)},f.loadi=layer.load(1,{shade:"shade"in a?!1:.9,scrollbar:!1}),e(i[j].src,function(c){layer.close(f.loadi),f.index=layer.open($.extend({type:1,area:function(){var b=[c.width,c.height],d=[$(window).width()-100,$(window).height()-100];return!a.full&&b[0]>d[0]&&(b[0]=d[0],b[1]=b[0]*d[1]/b[0]),[b[0]+"px",b[1]+"px"]}(),title:!1,shade:.9,shadeClose:!0,closeBtn:!1,move:".layui-layer-phimg img",moveType:1,scrollbar:!1,moveOut:!0,shift:5*Math.random()|0,skin:"layui-layer-photos"+b("photos"),content:'<div class="layui-layer-phimg"><img src="'+i[j].src+'" alt="'+(i[j].alt||"")+'" layer-pid="'+i[j].pid+'"><div class="layui-layer-imgsee">'+(i.length>1?'<span class="layui-layer-imguide"><a href="javascript:;" class="layui-layer-iconext layui-layer-imgprev"></a><a href="javascript:;" class="layui-layer-iconext layui-layer-imgnext"></a></span>':"")+'<div class="layui-layer-imgbar" style="display:'+(d?"block":"")+'"><span class="layui-layer-imgtit"><a href="javascript:;">'+(i[j].alt||"")+"</a><em>"+f.imgIndex+"/"+i.length+"</em></span></div></div></div>",success:function(b,c){f.bigimg=b.find(".layui-layer-phimg"),f.imgsee=b.find(".layui-layer-imguide,.layui-layer-imgbar"),f.event(b),a.tab&&a.tab(i[j],b)},end:function(){f.end=!0,$(document).off("keyup",f.keyup)}},a))},function(){layer.close(f.loadi),layer.msg("&#x5F53;&#x524D;&#x56FE;&#x7247;&#x5730;&#x5740;&#x5F02;&#x5E38;",{time:2e3},function(){i.length>1&&f.imgnext(!0)})})}}}();
\ No newline at end of file
body .selectCountry {
background-color: rgba(0,0,0,.8);
}
\ No newline at end of file
.n-inline-block, .nice-validator input, .nice-validator select, .nice-validator textarea, .msg-wrap, .n-icon, .n-msg { display: inline-block; *display: inline; *zoom: 1; }
/*.msg-box{position:relative;*zoom:1}*/
.msg-wrap { position: relative; white-space: nowrap; }
.msg-wrap, .n-icon, .n-msg { vertical-align: top; }
.n-arrow { position: absolute; overflow: hidden; }
.n-arrow b, .n-arrow i { position: absolute; left: 0; top: 0; border: 0; margin: 0; padding: 0; overflow: hidden; font-weight: 400; font-style: normal; font-size: 12px; font-family: serif; line-height: 14px; _line-height: 15px; color: #FFE7D5; }
.n-arrow i { text-shadow: none; }
.n-icon { width: 16px; height: 16px; overflow: hidden; background-repeat: no-repeat; }
.n-msg { display: inline-block; line-height: 15px; margin-left: 2px; *margin-top: -1px; _margin-top: 0; font-size: 14px; font-family: 微软雅黑; }
.n-error { color: #c33; }
.n-ok { color: #390; }
.n-tip, .n-loading { color: #808080; }
.n-error .n-icon { background-position: 0 0; }
.n-ok .n-icon { background-position: -16px 0; }
.n-tip .n-icon { background-position: -32px 0; }
.n-loading .n-icon { background: url("images/loading.gif") 0 center no-repeat !important; }
.n-top, .n-right, .n-bottom, .n-left { line-height: 0; vertical-align: top; outline: 0; position: relative; }
.n-top .n-arrow, .n-bottom .n-arrow { height: 6px; width: 12px; left: 45%; }
.n-left .n-arrow, .n-right .n-arrow { width: 6px; height: 12px; top: 6px; }
.n-top { vertical-align: top; }
.n-top .msg-wrap { margin-bottom: 6px; }
.n-top .n-arrow { bottom: -6px; }
.n-top .n-arrow b { top: -6px; }
.n-top .n-arrow i { top: -7px; }
.n-bottom { vertical-align: bottom; }
.n-bottom .msg-wrap { margin-top: 6px; }
.n-bottom .n-arrow { top: -6px; }
.n-bottom .n-arrow b { top: -1px; }
.n-bottom .n-arrow i { top: 0; }
.n-left .msg-wrap { right: 100%; margin-right: 6px; }
.n-left .n-arrow { right: -6px; }
.n-left .n-arrow b { left: -6px; }
.n-left .n-arrow i { left: -7px; }
.n-right .msg-wrap { margin-left: 6px; }
.n-right .n-arrow { left: -6px; }
.n-right .n-arrow b { left: 1px; }
.n-right .n-arrow i { left: 2px; }
.n-default .n-left, .n-default .n-right { margin-top: 5px; }
.n-default .n-top .msg-wrap { bottom: 100%; }
.n-default .n-bottom .msg-wrap { top: 100%; }
.n-default .msg-wrap { position: absolute; z-index: 1;top: -23px; }
/*.n-default .msg-wrap .n-icon { background-image: url("images/validator_default.png"); }*/
.n-default .n-tip .n-icon { display: none; }
.n-simple .msg-wrap { position: absolute; z-index: 1; }
.n-simple .msg-wrap .n-icon { background-image: url("images/validator_simple.png"); }
.n-simple .n-top .msg-wrap { bottom: 100%; }
.n-simple .n-bottom .msg-wrap { top: 100%; }
.n-simple .n-left, .n-simple .n-right { margin-top: 5px; }
.n-simple .n-bottom .msg-wrap { margin-top: 3px; }
.n-simple .n-tip .n-icon { display: none; }
.n-yellow .msg-wrap { position: absolute; bottom: 100%; z-index: 1; padding: 10px 15px; font-size: 12px; background-color: #FFE7D5; color: #333; box-shadow: 0 1px 3px #999; border-radius: 2px; }
.n-yellow .msg-wrap .n-arrow b { text-shadow: 2px 1px 0px #ccc; }
.n-yellow .msg-wrap .n-arrow i { }
.n-yellow .msg-wrap .n-icon { background-image: url("images/validator_simple.png"); }
.n-yellow .n-top .msg-wrap { bottom: 100%; border-bottom-left-radius: 0; }
.n-yellow .n-bottom .msg-wrap { top: 100%; }
.n-yellow .n-tip, .n-yellow .n-ok, .n-yellow .n-loading { background-color: #f8fdff; border-color: #ddd; color: #333; box-shadow: 0 1px 3px #ccc; }
.n-yellow .n-tip .n-arrow b, .n-yellow .n-ok .n-arrow b, .n-yellow .n-loading .n-arrow b { color: #ddd; text-shadow: 0 0 2px #ccc; }
.n-yellow .n-tip .n-arrow i, .n-yellow .n-ok .n-arrow i, .n-yellow .n-loading .n-arrow i { color: #f8fdff; }
.n-yellow .n-tip .n-icon { display: none; }
.n-invalid { color: #ff0000; border-color: #ff0000; background-color: #ffe8d6; }
.n-top .n-arrow{ border: transparent solid 4px; border-top: #ffe8d6 solid 4px; border-left: #ffe8d6 solid 4px; position: absolute; bottom: -8px; left: 0px;width: 0;height: 0; }
.msg-box { position: relative;bottom: 2px;float: left;}
.nice-validator .error{ border:1px solid #ff0000;padding-top: 1px;padding-bottom: 1px;}
\ No newline at end of file
/*! nice-validator 1.0.10
* (c) 2012-2017 Jony Zhang <niceue@live.com>, MIT Licensed
* https://github.com/niceue/nice-validator
*/
!function(e){"object"==typeof module&&module.exports?module.exports=e(require("jquery")):"function"==typeof define&&define.amd?define(["jquery"],e):e(jQuery)}(function(e,t){"use strict";function i(t,n){function s(){a.$el=e(t),a.$el.length?a._init(a.$el[0],n):J(t)&&(G[t]=n)}var a=this;return a instanceof i?void(i.pending?e(window).on("validatorready",s):s()):new i(t,n)}function n(t){function i(){var t=this.options;for(var i in t)i in Y&&(this[i]=t[i]);e.extend(this,{_valHook:function(){return"true"===this.element.contentEditable?"text":"val"},getValue:function(){var t=this.element;return"number"===t.type&&t.validity&&t.validity.badInput?"NaN":e(t)[this._valHook()]()},setValue:function(t){e(this.element)[this._valHook()](this.value=t)},getRangeMsg:function(e,t,i){function n(e,t){return o?e>t:e>=t}if(t){var s,a=this,r=a.messages[a._r]||"",l=t[0].split("~"),o="false"===t[1],u=l[0],d=l[1],c="rg",f=[""],g=U(e)&&+e===+e;return 2===l.length?u&&d?(g&&n(e,+u)&&n(+d,e)&&(s=!0),f=f.concat(l),c=o?"gtlt":"rg"):u&&!d?(g&&n(e,+u)&&(s=!0),f.push(u),c=o?"gt":"gte"):!u&&d&&(g&&n(+d,e)&&(s=!0),f.push(d),c=o?"lt":"lte"):(e===+u&&(s=!0),f.push(u),c="eq"),r&&(i&&r[c+i]&&(c+=i),f[0]=r[c]),s||a._rules&&(a._rules[a._i].msg=a.renderMsg.apply(null,f))}},renderMsg:function(){var e=arguments,t=e[0],i=e.length;if(t){for(;--i;)t=t.replace("{"+i+"}",e[i]);return t}}})}function n(i,n,s){this.key=i,this.validator=t,e.extend(this,s,n)}return i.prototype=t,n.prototype=new i,n}function s(e,t){if(Q(e)){var i,n=t?t===!0?this:t:s.prototype;for(i in e)g(i)&&(n[i]=r(e[i]))}}function a(e,t){if(Q(e)){var i,n=t?t===!0?this:t:a.prototype;for(i in e)n[i]=e[i]}}function r(t){switch(e.type(t)){case"function":return t;case"array":var i=function(){return t[0].test(this.value)||t[1]||!1};return i.msg=t[1],i;case"regexp":return function(){return t.test(this.value)}}}function l(t){var i,n,s;if(t&&t.tagName){switch(t.tagName){case"INPUT":case"SELECT":case"TEXTAREA":case"BUTTON":case"FIELDSET":i=t.form||e(t).closest("."+k);break;case"FORM":i=t;break;default:i=e(t).closest("."+k)}for(n in G)if(e(i).is(n)){s=G[n];break}return e(i).data(h)||e(i)[h](s).data(h)}}function o(e,t){var i=U(z(e,M+"-"+t));if(i&&(i=new Function("return "+i)()))return r(i)}function u(e,t,i){var n=t.msg,s=t._r;return Q(n)&&(n=n[s]),J(n)||(n=z(e,O+"-"+s)||z(e,O)||(i?J(i)?i:i[s]:"")),n}function d(e){var t;return e&&(t=I.exec(e)),t&&t[0]}function c(e){return"INPUT"===e.tagName&&"checkbox"===e.type||"radio"===e.type}function f(e){return Date.parse(e.replace(/\.|\-/g,"/"))}function g(e){return/^\w+$/.test(e)}function m(e){var t="#"===e.charAt(0);return e=e.replace(/([:.{(|)}\/\[\]])/g,"\\$1"),t?e:'[name="'+e+'"]:first'}var p,h="validator",v="."+h,_=".rule",y=".field",b=".form",k="nice-"+h,w="msg-box",x="aria-required",V="aria-invalid",M="data-rule",O="data-msg",$="data-tip",F="data-ok",E="data-timely",C="data-target",A="data-display",j="data-must",T="novalidate",N=":verifiable",S=/(&)?(!)?\b(\w+)(?:\[\s*(.*?\]?)\s*\]|\(\s*(.*?\)?)\s*\))?\s*(;|\|)?/g,q=/(\w+)(?:\[\s*(.*?\]?)\s*\]|\(\s*(.*?\)?)\s*\))?/,R=/(?:([^:;\(\[]*):)?(.*)/,D=/[^\x00-\xff]/g,I=/top|right|bottom|left/,H=/(?:(cors|jsonp):)?(?:(post|get):)?(.+)/i,L=/[<>'"`\\]|&#x?\d+[A-F]?;?|%3[A-F]/gim,B=e.noop,P=e.proxy,U=e.trim,W=e.isFunction,J=function(e){return"string"==typeof e},Q=function(e){return e&&"[object Object]"===Object.prototype.toString.call(e)},X=document.documentMode||+(navigator.userAgent.match(/MSIE (\d+)/)&&RegExp.$1),z=function(e,i,n){return e&&e.tagName?n===t?e.getAttribute(i):void(null===n?e.removeAttribute(i):e.setAttribute(i,""+n)):null},G={},K={debug:0,theme:"default",ignore:"",focusInvalid:!0,focusCleanup:!1,stopOnError:!1,beforeSubmit:null,valid:null,invalid:null,validation:null,formClass:"n-default",validClass:"n-valid",invalidClass:"n-invalid",bindClassTo:null},Y={timely:1,display:null,target:null,ignoreBlank:!1,showOk:!0,dataFilter:function(e){if(J(e)||Q(e)&&("error"in e||"ok"in e))return e},msgMaker:function(t){var i;return i='<span role="alert" class="msg-wrap n-'+t.type+'">'+t.arrow,t.result?e.each(t.result,function(e,n){i+='<span class="n-'+n.type+'">'+t.icon+'<span class="n-msg">'+n.msg+"</span></span>"}):i+=t.icon+'<span class="n-msg">'+t.msg+"</span>",i+="</span>"},msgWrapper:"span",msgArrow:"",msgIcon:'<span class="n-icon"></span>',msgClass:"n-right",msgStyle:"",msgShow:null,msgHide:null},Z={};return e.fn.validator=function(t){var n=this,s=arguments;return n.is(N)?n:(n.is("form")||(n=this.find("form")),n.length||(n=this),n.each(function(){var n=e(this).data(h);if(n)if(J(t)){if("_"===t.charAt(0))return;n[t].apply(n,[].slice.call(s,1))}else t&&(n._reset(!0),n._init(this,t));else new i(this,t)}),this)},e.fn.isValid=function(e,i){var n,s,a=l(this[0]),r=W(e);return!a||(r||i!==t||(i=e),a.checkOnly=!!i,s=a.options,n=a._multiValidate(this.is(N)?this:this.find(N),function(t){t||!s.focusInvalid||a.checkOnly||a.$el.find("["+V+"]:first").focus(),r&&(e.length?e(t):t&&e()),a.checkOnly=!1}),r?this:n)},e.extend(e.expr.pseudos||e.expr[":"],{verifiable:function(e){var t=e.nodeName.toLowerCase();return("input"===t&&!{submit:1,button:1,reset:1,image:1}[e.type]||"select"===t||"textarea"===t||"true"===e.contentEditable)&&!e.disabled},filled:function(t){return!!U(e(t).val())}}),i.prototype={_init:function(t,i){var r,l,o,u=this;W(i)&&(i={valid:i}),i=u._opt=i||{},o=z(t,"data-"+h+"-option"),o=u._dataOpt=o&&"{"===o.charAt(0)?new Function("return "+o)():{},l=u._themeOpt=Z[i.theme||o.theme||K.theme],r=u.options=e.extend({},K,Y,l,u.options,i,o),u.rules=new s(r.rules,(!0)),u.messages=new a(r.messages,(!0)),u.Field=n(u),u.elements=u.elements||{},u.deferred={},u.errors={},u.fields={},u._initFields(r.fields),u.$el.data(h)||(u.$el.data(h,u).addClass(k+" "+r.formClass).on("form-submit-validate",function(e,t,i,n,s){u.vetoed=s.veto=!u.isValid,u.ajaxFormOptions=n}).on("submit"+v+" validate"+v,P(u,"_submit")).on("reset"+v,P(u,"_reset")).on("showmsg"+v,P(u,"_showmsg")).on("hidemsg"+v,P(u,"_hidemsg")).on("focusin"+v+" click"+v,N,P(u,"_focusin")).on("focusout"+v+" validate"+v,N,P(u,"_focusout")).on("keyup"+v+" input"+v+" compositionstart compositionend",N,P(u,"_focusout")).on("click"+v,":radio,:checkbox","click",P(u,"_focusout")).on("change"+v,'select,input[type="file"]',"change",P(u,"_focusout")),u._NOVALIDATE=z(t,T),z(t,T,T)),J(r.target)&&u.$el.find(r.target).addClass("msg-container")},_guessAjax:function(t){function i(t,i,n){return!!(t&&t[i]&&e.map(t[i],function(e){return~e.namespace.indexOf(n)?1:null}).length)}var n=this;if(!(n.isAjaxSubmit=!!n.options.valid)){var s=(e._data||e.data)(t,"events");n.isAjaxSubmit=i(s,"valid","form")||i(s,"submit","form-plugin")}},_initFields:function(e){function t(e,t){if(null===t||r){var i=a.elements[e];i&&a._resetElement(i,!0),delete a.fields[e]}else a.fields[e]=new a.Field(e,J(t)?{rule:t}:t,a.fields[e])}var i,n,s,a=this,r=null===e;if(r&&(e=a.fields),Q(e))for(i in e)if(~i.indexOf(","))for(n=i.split(","),s=n.length;s--;)t(U(n[s]),e[i]);else t(i,e[i]);a.$el.find(N).each(function(){a._parse(this)})},_parse:function(e){var t,i,n,s=this,a=e.name,r=z(e,M);if(r&&z(e,M,null),e.id&&("#"+e.id in s.fields||!a||null!==r&&(t=s.fields[a])&&r!==t.rule&&e.id!==t.key)&&(a="#"+e.id),a)return t=s.getField(a,!0),t.rule=r||t.rule,(i=z(e,A))&&(t.display=i),t.rule&&((null!==z(e,j)||/\b(?:match|checked)\b/.test(t.rule))&&(t.must=!0),/\brequired\b/.test(t.rule)&&(t.required=!0,z(e,x,!0)),(n=z(e,E))?t.timely=+n:t.timely>3&&z(e,E,t.timely),s._parseRule(t),t.old={}),J(t.target)&&z(e,C,t.target),J(t.tip)&&z(e,$,t.tip),s.fields[a]=t},_parseRule:function(i){var n=R.exec(i.rule);n&&(i._i=0,n[1]&&(i.display=n[1]),n[2]&&(i._rules=[],n[2].replace(S,function(){var n=arguments;n[4]=n[4]||n[5],i._rules.push({and:"&"===n[1],not:"!"===n[2],or:"|"===n[6],method:n[3],params:n[4]?e.map(n[4].split(", "),U):t})})))},_multiValidate:function(i,n){var s=this,a=s.options;return s.hasError=!1,a.ignore&&(i=i.not(a.ignore)),i.each(function(){if(s._validate(this),s.hasError&&a.stopOnError)return!1}),n&&(s.validating=!0,e.when.apply(null,e.map(s.deferred,function(e){return e})).done(function(){n.call(s,!s.hasError),s.validating=!1})),e.isEmptyObject(s.deferred)?!s.hasError:t},_submit:function(i){var n=this,s=n.options,a=i.target,r="submit"===i.type&&!i.isDefaultPrevented();i.preventDefault(),p&&~(p=!1)||n.submiting||"validate"===i.type&&n.$el[0]!==a||W(s.beforeSubmit)&&s.beforeSubmit.call(n,a)===!1||(n.isAjaxSubmit===t&&n._guessAjax(a),n._debug("log","\n<<< event: "+i.type),n._reset(),n.submiting=!0,n._multiValidate(n.$el.find(N),function(t){var i,l=t||2===s.debug?"valid":"invalid";t||(s.focusInvalid&&n.$el.find("["+V+"]:first").focus(),i=e.map(n.errors,function(e){return e})),n.submiting=!1,n.isValid=t,W(s[l])&&s[l].call(n,a,i),n.$el.trigger(l+b,[a,i]),n._debug("log",">>> "+l),t&&(n.vetoed?e(a).ajaxSubmit(n.ajaxFormOptions):r&&!n.isAjaxSubmit&&document.createElement("form").submit.call(a))}))},_reset:function(e){var t=this;t.errors={},e&&(t.reseting=!0,t.$el.find(N).each(function(){t._resetElement(this)}),delete t.reseting)},_resetElement:function(e,t){this._setClass(e,null),this.hideMsg(e),t&&z(e,x,null)},_focusin:function(e){var t,i,n=this,s=n.options,a=e.target;n.validating||"click"===e.type&&document.activeElement===a||(s.focusCleanup&&"true"===z(a,V)&&(n._setClass(a,null),n.hideMsg(a)),i=z(a,$),i?n.showMsg(a,{type:"tip",msg:i}):(z(a,M)&&n._parse(a),(t=z(a,E))&&(8!==t&&9!==t||n._focusout(e))))},_focusout:function(t){var i,n,s,a,r,l,o,u,d,f=this,g=f.options,m=t.target,p=t.type,h="focusin"===p,v="validate"===p,_=0;if("compositionstart"===p&&(f.pauseValidate=!0),"compositionend"===p&&(f.pauseValidate=!1),!f.pauseValidate&&(n=m.name&&c(m)?f.$el.find('input[name="'+m.name+'"]').get(0):m,(s=f.getField(n))&&s.rule)){if(i=s._e,s._e=p,d=s.timely,!v){if(!d||c(m)&&"click"!==p)return;if(r=s.getValue(),s.ignoreBlank&&!r&&!h)return void f.hideMsg(m);if("focusout"===p){if("change"===i)return;if(2===d||8===d){if(a=s.old,!r||!a)return;s.isValid&&!a.showOk?f.hideMsg(m):f._makeMsg(m,s,a)}}else{if(d<2&&!t.data)return;if(l=+new Date,l-(m._ts||0)<100)return;if(m._ts=l,"keyup"===p){if("input"===i)return;if(o=t.keyCode,u={8:1,9:1,16:1,32:1,46:1},9===o&&!r)return;if(o<48&&!u[o])return}h||(_=d<100?"click"===p||"SELECT"===m.tagName?0:400:d)}}g.ignore&&e(m).is(g.ignore)||(clearTimeout(s._t),_?s._t=setTimeout(function(){f._validate(m,s)},_):(v&&(s.old={}),f._validate(m,s)))}},_setClass:function(t,i){var n=e(t),s=this.options;s.bindClassTo&&(n=n.closest(s.bindClassTo)),n.removeClass(s.invalidClass+" "+s.validClass),null!==i&&n.addClass(i?s.validClass:s.invalidClass)},_showmsg:function(e,t,i){var n=this,s=e.target;n.$el.is(s)?Q(t)?n.showMsg(t):"tip"===t&&n.$el.find(N+"["+$+"]",s).each(function(){n.showMsg(this,{type:t,msg:i})}):n.showMsg(s,{type:t,msg:i})},_hidemsg:function(t){var i=e(t.target);i.is(N)&&this.hideMsg(i)},_validatedField:function(t,i,n){var s=this,a=s.options,r=i.isValid=n.isValid=!!n.isValid,l=r?"valid":"invalid";n.key=i.key,n.ruleName=i._r,n.id=t.id,n.value=i.value,s.elements[i.key]=n.element=t,s.isValid=s.$el[0].isValid=r?s.isFormValid():r,r?n.type="ok":(s.submiting&&(s.errors[i.key]=n.msg),s.hasError=!0),i.old=n,W(i[l])&&i[l].call(s,t,n),W(a.validation)&&a.validation.call(s,t,n),e(t).attr(V,!r||null).trigger(l+y,[n,s]),s.$el.triggerHandler("validation",[n,s]),s.checkOnly||(s._setClass(t,n.skip||"tip"===n.type?null:r),s._makeMsg.apply(s,arguments))},_makeMsg:function(t,i,n){i.msgMaker&&(n=e.extend({},n),"focusin"===i._e&&(n.type="tip"),this[n.showOk||n.msg||"tip"===n.type?"showMsg":"hideMsg"](t,n,i))},_validatedRule:function(i,n,s,a){n=n||c.getField(i),a=a||{};var r,l,o,d,c=this,f=n._r,g=n.timely,m=9===g||8===g,p=!1;if(null===s)return c._validatedField(i,n,{isValid:!0,skip:!0}),void(n._i=0);if(s===t?o=!0:s===!0||""===s?p=!0:J(s)?r=s:Q(s)&&(s.error?r=s.error:(r=s.ok,p=!0)),l=n._rules[n._i],l.not&&(r=t,p="required"===f||!p),l.or)if(p)for(;n._i<n._rules.length&&n._rules[n._i].or;)n._i++;else o=!0;else l.and&&(n.isValid||(o=!0));o?p=!0:(p&&n.showOk!==!1&&(d=z(i,F),r=null===d?J(n.ok)?n.ok:r:d,!J(r)&&J(n.showOk)&&(r=n.showOk),J(r)&&(a.showOk=p)),p&&!m||(r=(u(i,n,r||l.msg||c.messages[f])||c.messages.fallback).replace(/\{0\|?([^\}]*)\}/,function(e,t){return c._getDisplay(i,n.display)||t||c.messages[0]})),p||(n.isValid=p),a.msg=r,e(i).trigger((p?"valid":"invalid")+_,[f,r])),!m||o&&!l.and||(p||n._m||(n._m=r),n._v=n._v||[],n._v.push({type:p?o?"tip":"ok":"error",msg:r||l.msg})),c._debug("log"," "+n._i+": "+f+" => "+(p||r)),(p||m)&&n._i<n._rules.length-1?(n._i++,c._checkRule(i,n)):(n._i=0,m?(a.isValid=n.isValid,a.result=n._v,a.msg=n._m||"",n.value||"focusin"!==n._e||(a.type="tip")):a.isValid=p,c._validatedField(i,n,a),delete n._m,delete n._v)},_checkRule:function(i,n){var s,a,r,l=this,u=n.key,d=n._rules[n._i],c=d.method,f=d.params;l.submiting&&l.deferred[u]||(r=n.old,n._r=c,r&&!n.must&&!d.must&&d.result!==t&&r.ruleName===c&&r.id===i.id&&n.value&&r.value===n.value?s=d.result:(a=o(i,c)||l.rules[c]||B,s=a.call(n,i,f,n),a.msg&&(d.msg=a.msg)),Q(s)&&W(s.then)?(l.deferred[u]=s,n.isValid=t,!l.checkOnly&&l.showMsg(i,{type:"loading",msg:l.messages.loading},n),s.then(function(s,a,r){var o,u=U(r.responseText),c=n.dataFilter;/jsonp?/.test(this.dataType)?u=s:"{"===u.charAt(0)&&(u=e.parseJSON(u)),o=c.call(this,u,n),o===t&&(o=c.call(this,u.data,n)),d.data=this.data,d.result=n.old?o:t,l._validatedRule(i,n,o)},function(e,t){l._validatedRule(i,n,l.messages[t]||t)}).always(function(){delete l.deferred[u]})):l._validatedRule(i,n,s))},_validate:function(e,t){var i=this;if(!e.disabled&&null===z(e,T)&&(t=t||i.getField(e),t&&(t._rules||i._parse(e),t._rules)))return i._debug("info",t.key),t.isValid=!0,t.element=e,t.value=t.getValue(),t.required||t.must||t.value||c(e)?(i._checkRule(e,t),t.isValid):(i._validatedField(e,t,{isValid:!0}),!0)},_debug:function(e,t){window.console&&this.options.debug&&console[e](t)},test:function(e,i){var n,s,a,r,l=this,o=q.exec(i);return o&&(a=o[1],a in l.rules&&(r=o[2]||o[3],r=r?r.split(", "):t,s=l.getField(e,!0),s._r=a,s.value=s.getValue(),n=l.rules[a].call(s,e,r))),n===!0||n===t||null===n},_getDisplay:function(e,t){return J(t)?t:W(t)?t.call(this,e):""},_getMsgOpt:function(t,i){var n=i?i:this.options;return e.extend({type:"error",pos:d(n.msgClass),target:n.target,wrapper:n.msgWrapper,style:n.msgStyle,cls:n.msgClass,arrow:n.msgArrow,icon:n.msgIcon},J(t)?{msg:t}:t)},_getMsgDOM:function(i,n){var s,a,r,l,o=e(i);if(o.is(N)?(r=n.target||z(i,C),r&&(r=W(r)?r.call(this,i):this.$el.find(r),r.length&&(r.is(N)?(o=r,i=r.get(0)):r.hasClass(w)?s=r:l=r)),s||(a=c(i)&&i.name||!i.id?i.name:i.id,s=this.$el.find(n.wrapper+"."+w+'[for="'+a+'"]'))):s=o,!n.hide&&!s.length)if(s=e("<"+n.wrapper+">").attr({"class":w+(n.cls?" "+n.cls:""),style:n.style||t,"for":a}),c(i)){var u=o.parent();s.appendTo(u.is("label")?u.parent():u)}else l?s.appendTo(l):s[n.pos&&"right"!==n.pos?"insertBefore":"insertAfter"](o);return s},showMsg:function(t,i,n){if(t){var s,a,r,l,o=this,u=o.options;if(Q(t)&&!t.jquery&&!i)return void e.each(t,function(e,t){var i=o.elements[e]||o.$el.find(m(e))[0];o.showMsg(i,t)});e(t).is(N)&&(n=n||o.getField(t)),(a=(n||u).msgMaker)&&(i=o._getMsgOpt(i,n),t=(t.name&&c(t)?o.$el.find('input[name="'+t.name+'"]'):e(t)).get(0),i.msg||"error"===i.type||(r=z(t,"data-"+i.type),null!==r&&(i.msg=r)),J(i.msg)&&(l=o._getMsgDOM(t,i),!I.test(l[0].className)&&l.addClass(i.cls),6===X&&"bottom"===i.pos&&(l[0].style.marginTop=e(t).outerHeight()+"px"),l.html(a.call(o,i))[0].style.display="",W(s=n&&n.msgShow||u.msgShow)&&s.call(o,l,i.type)))}},hideMsg:function(t,i,n){var s,a,r=this,l=r.options;t=e(t).get(0),e(t).is(N)&&(n=n||r.getField(t),n&&(n.isValid||r.reseting)&&z(t,V,null)),i=r._getMsgOpt(i,n),i.hide=!0,a=r._getMsgDOM(t,i),a.length&&(W(s=n&&n.msgHide||l.msgHide)?s.call(r,a,i.type):(a[0].style.display="none",a[0].innerHTML=null))},getField:function(e,i){var n,s,a=this;if(J(e))n=e,e=t;else{if(z(e,M))return a._parse(e);n=e.id&&"#"+e.id in a.fields||!e.name?"#"+e.id:e.name}return((s=a.fields[n])||i&&(s=new a.Field(n)))&&(s.element=e),s},setField:function(e,t){var i={};e&&(J(e)?i[e]=t:i=e,this._initFields(i))},isFormValid:function(){var e,t,i=this.fields;for(e in i)if(t=i[e],t._rules&&(t.required||t.must||t.value)&&!t.isValid)return!1;return!0},holdSubmit:function(e){this.submiting=e===t||e},cleanUp:function(){this._reset(1)},destroy:function(){this._reset(1),this.$el.off(v).removeData(h),z(this.$el[0],T,this._NOVALIDATE)}},e(window).on("beforeunload",function(){this.focus()}),e(document).on("click",":submit",function(){var e,t=this;t.form&&(e=t.getAttributeNode("formnovalidate"),(e&&null!==e.nodeValue||null!==z(t,T))&&(p=!0))}).on("focusin submit validate","form,."+k,function(t){if(null===z(this,T)){var i,n=e(this);!n.data(h)&&(i=l(this))&&(e.isEmptyObject(i.fields)?(z(this,T,T),n.off(v).removeData(h)):"focusin"===t.type?i._focusin(t):i._submit(t))}}),new a({fallback:"This field is not valid.",loading:"Validating..."}),new s({required:function(t,i){var n=this,s=U(n.value),a=!0;if(i)if(1===i.length){if(g(i[0])){if(n.rules[i[0]]){if(!s&&!n.test(t,i[0]))return z(t,x,null),null;z(t,x,!0)}}else if(!s&&!e(i[0],n.$el).length)return null}else if("not"===i[0])e.each(i.slice(1),function(){return a=s!==U(this)});else if("from"===i[0]){var r,l=n.$el.find(i[1]),o="_validated_";return a=l.filter(function(){var e=n.getField(this);return e&&!!U(e.getValue())}).length>=(i[2]||1),a?s||(r=null):r=u(l[0],n)||!1,e(t).data(o)||l.data(o,1).each(function(){t!==this&&n._validate(this)}).removeData(o),r}return a&&!!s},integer:function(e,t){var i,n="0|",s="[1-9]\\d*",a=t?t[0]:"*";switch(a){case"+":i=s;break;case"-":i="-"+s;break;case"+0":i=n+s;break;case"-0":i=n+"-"+s;break;default:i=n+"-?"+s}return i="^(?:"+i+")$",new RegExp(i).test(this.value)||this.messages.integer[a]},match:function(t,i){if(i){var n,s,a,r,l,o,u,d,c=this,g="eq";if(1===i.length?a=i[0]:(g=i[0],a=i[1]),o=m(a),u=c.$el.find(o)[0]){if(d=c.getField(u),n=c.value,s=d.getValue(),c._match||(c.$el.on("valid"+y+v,o,function(){e(t).trigger("validate")}),c._match=d._match=1),!c.required&&""===n&&""===s)return null;if(l=i[2],l&&(/^date(time)?$/i.test(l)?(n=f(n),s=f(s)):"time"===l&&(n=+n.replace(/:/g,""),s=+s.replace(/:/g,""))),"eq"!==g&&!isNaN(+n)&&isNaN(+s))return!0;switch(r=c.messages.match[g].replace("{1}",c._getDisplay(t,d.display||a)),g){case"lt":return+n<+s||r;case"lte":return+n<=+s||r;case"gte":return+n>=+s||r;case"gt":return+n>+s||r;case"neq":return n!==s||r;default:return n===s||r}}}},range:function(e,t){return this.getRangeMsg(this.value,t)},checked:function(e,t){if(c(e)){var i,n,s=this;return e.name?n=s.$el.find('input[name="'+e.name+'"]').filter(function(){var e=this;return!i&&c(e)&&(i=e),!e.disabled&&e.checked}).length:(i=e,n=i.checked),t?s.getRangeMsg(n,t):!!n||u(i,s,"")||s.messages.required}},length:function(e,t){var i=this.value,n=("true"===t[1]?i.replace(D,"xx"):i).length;return this.getRangeMsg(n,t,t[1]?"_2":"")},remote:function(t,i){if(i){var n,s=this,a=H.exec(i[0]),r=s._rules[s._i],l={},o="",u=a[3],d=a[2]||"POST",c=(a[1]||"").toLowerCase();return r.must=!0,l[t.name]=s.value,i[1]&&e.map(i.slice(1),function(e){var t,i;~e.indexOf("=")?o+="&"+e:(t=e.split(":"),e=U(t[0]),i=U(t[1])||e,l[e]=s.$el.find(m(i)).val())}),l=e.param(l)+o,!s.must&&r.data&&r.data===l?r.result:("cors"!==c&&/^https?:/.test(u)&&!~u.indexOf(location.host)&&(n="jsonp"),e.ajax({url:u,type:d,data:l,dataType:n}))}},filter:function(e,t){var i=this.value,n=i.replace(t?new RegExp("["+t[0]+"]","gm"):L,"");n!==i&&this.setValue(n)}}),i.config=function(t,i){function n(e,t){"rules"===e?new s(t):"messages"===e?new a(t):e in Y?Y[e]=t:K[e]=t}Q(t)?e.each(t,n):J(t)&&n(t,i)},i.setTheme=function(t,i){Q(t)?e.extend(!0,Z,t):J(t)&&Q(i)&&(Z[t]=e.extend(Z[t],i))},i.load=function(t){if(t){var n,s,a,r=document,l={},o=r.scripts[0];t.replace(/([^?=&]+)=([^&#]*)/g,function(e,t,i){l[t]=i}),n=l.dir||i.dir,i.css||""===l.css||(s=r.createElement("link"),s.rel="stylesheet",s.href=i.css=n+"css/jquery.validator.css",o.parentNode.insertBefore(s,o)),!i.local&&~t.indexOf("local")&&""!==l.local&&(i.local=(l.local||r.documentElement.lang||"en").replace("_","-"),i.pending=1,s=r.createElement("script"),s.src=n+"local/"+i.local+".js",a="onload"in s?"onload":"onreadystatechange",s[a]=function(){s.readyState&&!/loaded|complete/.test(s.readyState)||(s=s[a]=null,delete i.pending,e(window).triggerHandler("validatorready"))},o.parentNode.insertBefore(s,o))}},function(){for(var e,t,n=document.scripts,s=n.length,a=/(.*validator(?:\.min)?.js)(\?.*(?:local|css|dir)(?:=[\w\-]*)?)?/;s--&&!t;)e=n[s],t=(e.hasAttribute?e.src:e.getAttribute("src",4)||"").match(a);t&&(i.dir=t[1].split("/").slice(0,-1).join("/")+"/",i.load(t[2]))}(),e[h]=i});
\ No newline at end of file
/*********************************
* Themes, rules, and i18n support
* Locale: English
*********************************/
(function(factory) {
typeof module === "object" && module.exports ? module.exports = factory( require( "jquery" ) ) :
typeof define === 'function' && define.amd ? define(['jquery'], factory) :
factory(jQuery);
}(function($) {
/* Global configuration
*/
$.validator.config({
//stopOnError: true,
//focusCleanup: true,
//theme: 'yellow_right',
//timely: 2,
// Custom rules
rules: {
digits: [/^\d+$/, "Please enter only digits."]
,letters: [/^[a-z]+$/i, "Please enter only letters."]
,date: [/^\d{4}-\d{2}-\d{2}$/, "Please enter a valid date, format: yyyy-mm-dd"]
,time: [/^([01]\d|2[0-3])(:[0-5]\d){1,2}$/, "Please enter a valid time, between 00:00 and 23:59"]
,email: [/^[\w\+\-]+(\.[\w\+\-]+)*@[a-z\d\-]+(\.[a-z\d\-]+)*\.([a-z]{2,4})$/i, "Please enter a valid email address."]
,url: [/^(https?|s?ftp):\/\/\S+$/i, "Please enter a valid URL."]
,accept: function (element, params){
if (!params) return true;
var ext = params[0],
value = $(element).val();
return (ext === '*') ||
(new RegExp(".(?:" + ext + ")$", "i")).test(value) ||
this.renderMsg("Only accept {1} file extension.", ext.replace(/\|/g, ', '));
}
},
// Default error messages
messages: {
0: "This field",
fallback: "{0} is not valid.",
loading: "Validating...",
error: "Network Error.",
timeout: "Request timed out.",
required: "{0} is required.",
remote: "Please try another name.",
integer: {
'*': "Please enter an integer.",
'+': "Please enter a positive integer.",
'+0': "Please enter a positive integer or 0.",
'-': "Please enter a negative integer.",
'-0': "Please enter a negative integer or 0."
},
match: {
eq: "{0} must be equal to {1}.",
neq: "{0} must be not equal to {1}.",
lt: "{0} must be less than {1}.",
gt: "{0} must be greater than {1}.",
lte: "{0} must be less than or equal to {1}.",
gte: "{0} must be greater than or equal to {1}."
},
range: {
rg: "Please enter a number between {1} and {2}.",
gte: "Please enter a number greater than or equal to {1}.",
lte: "Please enter a number less than or equal to {1}.",
gtlt: "Please fill in the number of {1} to {2}.",
gt: "Please enter a number greater than {1}.",
lt: "Please enter a number less than {1}."
},
checked: {
eq: "Please check {1} items.",
rg: "Please check between {1} and {2} items.",
gte: "Please check at least {1} items.",
lte: "Please check no more than {1} items."
},
length: {
eq: "Please enter {1} characters.",
rg: "Please enter a value between {1} and {2} characters long.",
gte: "Please enter at least {1} characters.",
lte: "Please enter no more than {1} characters.",
eq_2: "",
rg_2: "",
gte_2: "",
lte_2: ""
}
}
});
/* Themes
*/
var TPL_ARROW = '<span class="n-arrow"><b>◆</b><i>◆</i></span>';
$.validator.setTheme({
'simple_right': {
formClass: 'n-simple',
msgClass: 'n-right'
},
'simple_bottom': {
formClass: 'n-simple',
msgClass: 'n-bottom'
},
'yellow_top': {
formClass: 'n-yellow',
msgClass: 'n-top',
msgArrow: TPL_ARROW
},
'yellow_right': {
formClass: 'n-yellow',
msgClass: 'n-right',
msgArrow: TPL_ARROW
},
'yellow_right_effect': {
formClass: 'n-yellow',
msgClass: 'n-right',
msgArrow: TPL_ARROW,
msgShow: function($msgbox, type){
var $el = $msgbox.children();
if ($el.is(':animated')) return;
if (type === 'error') {
$el.css({left: '20px', opacity: 0})
.delay(100).show().stop()
.animate({left: '-4px', opacity: 1}, 150)
.animate({left: '3px'}, 80)
.animate({left: 0}, 80);
} else {
$el.css({left: 0, opacity: 1}).fadeIn(200);
}
},
msgHide: function($msgbox, type){
var $el = $msgbox.children();
$el.stop().delay(100).show()
.animate({left: '20px', opacity: 0}, 300, function(){
$msgbox.hide();
});
}
}
});
}));
/*********************************
* Themes, rules, and i18n support
* Locale: English; 英文
*********************************/
(function(factory) {
typeof module === "object" && module.exports ? module.exports = factory( require( "jquery" ) ) :
typeof define === 'function' && define.amd ? define(['jquery'], factory) :
factory(jQuery);
}(function($) {
/* Global configuration
*/
$.validator.config({
//stopOnError: true,
//focusCleanup: true,
//theme: 'yellow_right',
//timely: 2,
// Custom rules
rules: {
digits: [/^\d+$/, "Please fill in the numbers."]
,letters: [/^[a-z]+$/i, "Please fill in the letter."]
,date: [/^\d{4}-\d{2}-\d{2}$/, "Please fill in the valid date form: yyyy-mm-dd."]
,time: [/^([01]\d|2[0-3])(:[0-5]\d){1,2}$/, "Please fill in the valid time between 00:00 and 23:59."]
,email: [/^[\w\+\-]+(\.[\w\+\-]+)*@[a-z\d\-]+(\.[a-z\d\-]+)*\.([a-z]{2,4})$/i, "Please fill in the correct email address."]
,url: [/^(https?|s?ftp):\/\/\S+$/i, "Please fill in the valid URL."]
,qq: [/^[1-9]\d{4,}$/, "Please fill in the valid QQ number."]
,IDcard: [/^\d{6}(19|2\d)?\d{2}(0[1-9]|1[012])(0[1-9]|[12]\d|3[01])\d{3}(\d|X)?$/, "Please fill in the correct identification number."]
,tel: [/^(?:(?:0\d{2,3}[\- ]?[1-9]\d{6,7})|(?:[48]00[\- ]?[1-9]\d{6}))$/, "Must fill in correctly."]
,mobile: [/^1[3-9]\d{9}$/, "Must fill in correctly."]
,zipcode: [/^\d{6}$/, "Please check the zip code format."]
,chinese: [/^[\u0391-\uFFE5]+$/, "Please fill in the Chinese characters."]
,username: [/^\w{3,12}$/, "Please fill in 3-12 digits, letters and underline."]
,password: [/^[\S]{6,16}$/, "Please fill out the 6-16 characters and cannot contain spaces"]
,accept: function (element, params){
if (!params) return true;
var ext = params[0],
value = $(element).val();
return (ext === '*') ||
(new RegExp(".(?:" + ext + ")$", "i")).test(value) ||
this.renderMsg("Files that accept only the{1}suffix", ext.replace(/\|/g, ','));
}
},
// Default error messages
messages: {
0: "in here",
fallback: "{0} the format is incorrect",
loading: "Verifying...",
error: "Network anomaly",
timeout: "Request Timeout",
required: "{0} Must Fill",
remote: "{0}Already in use",
equalTo: "The password entered for the two time must be consistent.",
integer: {
'*': "Please fill in the integer.",
'+': "Fill in the positive integer, please.",
'+0': "Please fill in the positive integer or 0.",
'-': "Please fill in the negative integer.",
'-0': "Please fill in the negative integer or 0."
},
match: {
eq: "{0} and {1} is not same",
neq: "{0} and {1} can not be the same",
lt: "{0} must be less than {1}",
gt: "{0} must be greater than {1}",
lte: "{0} not greater than {1}",
gte: "{0} not less than {1}"
},
range: {
rg: "请填写{1}到{2}的数",
gte: "请填写不小于{1}的数",
lte: "请填写最大{1}的数",
gtlt: "请填写{1}到{2}之间的数",
gt: "请填写大于{1}的数",
lt: "请填写小于{1}的数"
},
checked: {
eq: "请选择{1}项",
rg: "请选择{1}到{2}项",
gte: "请至少选择{1}项",
lte: "请最多选择{1}项"
},
length: {
eq: "请填写{1}个字符",
rg: "请填写{1}到{2}个字符",
gte: "请至少填写{1}个字符",
lte: "请最多填写{1}个字符",
eq_2: "",
rg_2: "",
gte_2: "",
lte_2: ""
}
}
});
/* Themes
*/
var TPL_ARROW = '<span class="n-arrow"><b>◆</b><i>◆</i></span>';
$.validator.setTheme({
'simple_right': {
formClass: 'n-simple',
msgClass: 'n-right'
},
'simple_bottom': {
formClass: 'n-simple',
msgClass: 'n-bottom'
},
'yellow_top': {
formClass: 'n-yellow',
msgClass: 'n-top',
msgArrow: TPL_ARROW
},
'yellow_right': {
formClass: 'n-yellow',
msgClass: 'n-right',
msgArrow: TPL_ARROW
},
'yellow_right_effect': {
formClass: 'n-yellow',
msgClass: 'n-right',
msgArrow: TPL_ARROW,
msgShow: function($msgbox, type){
var $el = $msgbox.children();
if ($el.is(':animated')) return;
if (type === 'error') {
$el.css({left: '20px', opacity: 0})
.delay(100).show().stop()
.animate({left: '-4px', opacity: 1}, 150)
.animate({left: '3px'}, 80)
.animate({left: 0}, 80);
} else {
$el.css({left: 0, opacity: 1}).fadeIn(200);
}
},
msgHide: function($msgbox, type){
var $el = $msgbox.children();
$el.stop().delay(100).show()
.animate({left: '20px', opacity: 0}, 300, function(){
$msgbox.hide();
});
}
}
});
}));
/*********************************
* Themes, rules, and i18n support
* Locale: Japanese; 日本語
*********************************/
(function(factory) {
typeof module === "object" && module.exports ? module.exports = factory( require( "jquery" ) ) :
typeof define === 'function' && define.amd ? define(['jquery'], factory) :
factory(jQuery);
}(function($) {
/* Global configuration
*/
$.validator.config({
//stopOnError: true,
//focusCleanup: true,
//theme: 'yellow_right',
//timely: 2,
// Custom rules
rules: {
digits: [/^\d+$/, "数字だけを入力してください"]
,letters: [/^[a-z]+$/i, "手紙のみでお願いします"]
,date: [/^\d{4}-\d{2}-\d{2}$/, "有効な日付を入力してください、,フォーマット:YYYY-MM-DD"]
,time: [/^([01]\d|2[0-3])(:[0-5]\d){1,2}$/, "有効な時刻を入力してください,00:00~23:59の間"]
,email: [/^[\w\+\-]+(\.[\w\+\-]+)*@[a-z\d\-]+(\.[a-z\d\-]+)*\.([a-z]{2,4})$/i, "有効なメールアドレスを入力してください"]
,url: [/^(https?|s?ftp):\/\/\S+$/i, "有効なURLを入力してください"]
,accept: function (element, params){
if (!params) return true;
var ext = params[0],
value = $(element).val();
return (ext === '*') ||
(new RegExp(".(?:" + ext + ")$", "i")).test(value) ||
this.renderMsg("ファイル拡張子を{1}のみを受け入れる", ext.replace(/\|/g, '、'));
}
},
// Default error messages
messages: {
0: "このフィールド",
fallback: "{0}は有効ではありません",
loading: "検証プロセス...",
error: "ネットワークエラー",
timeout: "要求がタイムアウトしました",
required: "{0}は必須です",
remote: "この値が使用されている",
integer: {
'*': "整数を入力してください",
'+': "正の整数を入力してください",
'+0': "正の整数または0を入力してください",
'-': "負の整数を入力してください",
'-0': "負の整数または0を入力してください"
},
match: {
eq: "{0}と{1}と同じでなければなりません",
neq: "{0}と{1}は同じにすることはできません",
lt: "{0}未満{1}なければならない",
gt: "{0}より{1}大なければならない",
lte: "{0}小なりイコール{1}なければならない",
gte: "{0}大なりイコール{1}なければならない"
},
range: {
rg: "{1}~{2}の数を入力してください",
gte: "{1}以上の数を入力してください",
lte: "{1}以下の数を入力してください",
gtlt: "{1}~{2}の間の数を入力してください",
gt: "{1}より大きい数を入力してください",
lt: "{1}より小きい数を入力してください"
},
checked: {
eq: "{1}項目を選択してください",
rg: "{1}から{2}の項目を選択してください",
gte: "少なくとも{1}の項目を選択してください",
lte: "{1}の項目まで選択してください"
},
length: {
eq: "{1}文字を入力してください",
rg: "{1}文字から{2}文字までの値を入力してください",
gte: "{1}文字以上で入力してください",
lte: "{1}文字以内で入力してください",
eq_2: "",
rg_2: "",
gte_2: "",
lte_2: ""
}
}
});
/* Themes
*/
var TPL_ARROW = '<span class="n-arrow"><b>◆</b><i>◆</i></span>';
$.validator.setTheme({
'simple_right': {
formClass: 'n-simple',
msgClass: 'n-right'
},
'simple_bottom': {
formClass: 'n-simple',
msgClass: 'n-bottom'
},
'yellow_top': {
formClass: 'n-yellow',
msgClass: 'n-top',
msgArrow: TPL_ARROW
},
'yellow_right': {
formClass: 'n-yellow',
msgClass: 'n-right',
msgArrow: TPL_ARROW
},
'yellow_right_effect': {
formClass: 'n-yellow',
msgClass: 'n-right',
msgArrow: TPL_ARROW,
msgShow: function($msgbox, type){
var $el = $msgbox.children();
if ($el.is(':animated')) return;
if (type === 'error') {
$el.css({left: '20px', opacity: 0})
.delay(100).show().stop()
.animate({left: '-4px', opacity: 1}, 150)
.animate({left: '3px'}, 80)
.animate({left: 0}, 80);
} else {
$el.css({left: 0, opacity: 1}).fadeIn(200);
}
},
msgHide: function($msgbox, type){
var $el = $msgbox.children();
$el.stop().delay(100).show()
.animate({left: '20px', opacity: 0}, 300, function(){
$msgbox.hide();
});
}
}
});
}));
/*********************************
* Themes, rules, and i18n support
* Locale: Chinese; 中文
*********************************/
(function(factory) {
typeof module === "object" && module.exports ? module.exports = factory( require( "jquery" ) ) :
typeof define === 'function' && define.amd ? define(['jquery'], factory) :
factory(jQuery);
}(function($) {
/* Global configuration
*/
$.validator.config({
//stopOnError: true,
//focusCleanup: true,
//theme: 'yellow_right',
//timely: 2,
// Custom rules
rules: {
digits: [/^\d+$/, "请填写数字"]
,letters: [/^[a-z]+$/i, "请填写字母"]
,date: [/^\d{4}-\d{2}-\d{2}$/, "请填写有效的日期,格式:yyyy-mm-dd"]
,time: [/^([01]\d|2[0-3])(:[0-5]\d){1,2}$/, "请填写有效的时间,00:00到23:59之间"]
,email: [/^[\w\+\-]+(\.[\w\+\-]+)*@[a-z\d\-]+(\.[a-z\d\-]+)*\.([a-z]{2,4})$/i, "请填写有效的邮箱"]
,url: [/^(https?|s?ftp):\/\/\S+$/i, "请填写有效的网址"]
,qq: [/^[1-9]\d{4,}$/, "请填写有效的QQ号"]
,IDcard: [/^\d{6}(19|2\d)?\d{2}(0[1-9]|1[012])(0[1-9]|[12]\d|3[01])\d{3}(\d|X)?$/, "请填写正确的身份证号码"]
,tel: [/^(?:(?:0\d{2,3}[\- ]?[1-9]\d{6,7})|(?:[48]00[\- ]?[1-9]\d{6}))$/, "请填写有效的电话号码"]
,mobile: [/^1[3-9]\d{9}$/, "请填写有效的手机号"]
,zipcode: [/^\d{6}$/, "请检查邮政编码格式"]
,chinese: [/^[\u0391-\uFFE5]+$/, "请填写中文字符"]
,username: [/^\w{3,12}$/, "请填写3-12位数字、字母、下划线"]
,password: [/^[\S]{6,16}$/, "请填写6-16位字符,不能包含空格"]
,accept: function (element, params){
if (!params) return true;
var ext = params[0],
value = $(element).val();
return (ext === '*') ||
(new RegExp(".(?:" + ext + ")$", "i")).test(value) ||
this.renderMsg("只接受{1}后缀的文件", ext.replace(/\|/g, ','));
}
},
// Default error messages
messages: {
0: "此处",
fallback: "{0}格式不正确",
loading: "正在验证...",
error: "网络异常",
timeout: "请求超时",
required: "{0}不能为空",
remote: "{0}已被使用",
integer: {
'*': "请填写整数",
'+': "请填写正整数",
'+0': "请填写正整数或0",
'-': "请填写负整数",
'-0': "请填写负整数或0"
},
match: {
eq: "{0}与{1}不一致",
neq: "{0}与{1}不能相同",
lt: "{0}必须小于{1}",
gt: "{0}必须大于{1}",
lte: "{0}不能大于{1}",
gte: "{0}不能小于{1}"
},
range: {
rg: "请填写{1}到{2}的数",
gte: "请填写不小于{1}的数",
lte: "请填写最大{1}的数",
gtlt: "请填写{1}到{2}之间的数",
gt: "请填写大于{1}的数",
lt: "请填写小于{1}的数"
},
checked: {
eq: "请选择{1}项",
rg: "请选择{1}到{2}项",
gte: "请至少选择{1}项",
lte: "请最多选择{1}项"
},
length: {
eq: "请填写{1}个字符",
rg: "请填写{1}到{2}个字符",
gte: "请至少填写{1}个字符",
lte: "请最多填写{1}个字符",
eq_2: "",
rg_2: "",
gte_2: "",
lte_2: ""
}
}
});
/* Themes
*/
var TPL_ARROW = '<span class="n-arrow"><b>◆</b><i>◆</i></span>';
$.validator.setTheme({
'simple_right': {
formClass: 'n-simple',
msgClass: 'n-right'
},
'simple_bottom': {
formClass: 'n-simple',
msgClass: 'n-bottom'
},
'yellow_top': {
formClass: 'n-yellow',
msgClass: 'n-top',
msgArrow: TPL_ARROW
},
'yellow_right': {
formClass: 'n-yellow',
msgClass: 'n-right',
msgArrow: TPL_ARROW
},
'yellow_right_effect': {
formClass: 'n-yellow',
msgClass: 'n-right',
msgArrow: TPL_ARROW,
msgShow: function($msgbox, type){
var $el = $msgbox.children();
if ($el.is(':animated')) return;
if (type === 'error') {
$el.css({left: '20px', opacity: 0})
.delay(100).show().stop()
.animate({left: '-4px', opacity: 1}, 150)
.animate({left: '3px'}, 80)
.animate({left: 0}, 80);
} else {
$el.css({left: 0, opacity: 1}).fadeIn(200);
}
},
msgHide: function($msgbox, type){
var $el = $msgbox.children();
$el.stop().delay(100).show()
.animate({left: '20px', opacity: 0}, 300, function(){
$msgbox.hide();
});
}
}
});
}));
/*********************************
* Themes, rules, and i18n support
* Locale: Chinese; 中文
*********************************/
(function(factory) {
typeof module === "object" && module.exports ? module.exports = factory( require( "jquery" ) ) :
typeof define === 'function' && define.amd ? define(['jquery'], factory) :
factory(jQuery);
}(function($) {
/* Global configuration
*/
$.validator.config({
//stopOnError: true,
//focusCleanup: true,
//theme: 'yellow_right',
//timely: 2,
// Custom rules
rules: {
digits: [/^\d+$/, "请填写数字"]
,letters: [/^[a-z]+$/i, "请填写字母"]
,date: [/^\d{4}-\d{2}-\d{2}$/, "请填写有效的日期,格式:yyyy-mm-dd"]
,time: [/^([01]\d|2[0-3])(:[0-5]\d){1,2}$/, "请填写有效的时间,00:00到23:59之间"]
,email: [/^[\w\+\-]+(\.[\w\+\-]+)*@[a-z\d\-]+(\.[a-z\d\-]+)*\.([a-z]{2,4})$/i, "请填写有效的邮箱"]
,url: [/^(https?|s?ftp):\/\/\S+$/i, "请填写有效的网址"]
,qq: [/^[1-9]\d{4,}$/, "请填写有效的QQ号"]
,IDcard: [/^\d{6}(19|2\d)?\d{2}(0[1-9]|1[012])(0[1-9]|[12]\d|3[01])\d{3}(\d|X)?$/, "请填写正确的身份证号码"]
,tel: [/^(?:(?:0\d{2,3}[\- ]?[1-9]\d{6,7})|(?:[48]00[\- ]?[1-9]\d{6}))$/, "请填写有效的电话号码"]
,mobile: [/^1[3-9]\d{9}$/, "请填写有效的手机号"]
,allMobile: [/^(\+|[0-9])\d+$/, "请填写有效的手机号"]
,zipcode: [/^\d{6}$/, "请检查邮政编码格式"]
,chinese: [/^[\u0391-\uFFE5]+$/, "请填写中文字符"]
,username: [/^\w{3,12}$/, "请填写3-12位数字、字母、下划线"]
,password: [/^[\S]{6,16}$/, "请填写6-16位字符,不能包含空格"]
,accept: function (element, params){
if (!params) return true;
var ext = params[0],
value = $(element).val();
return (ext === '*') ||
(new RegExp(".(?:" + ext + ")$", "i")).test(value) ||
this.renderMsg("只接受{1}后缀的文件", ext.replace(/\|/g, ','));
}
},
// Default error messages
messages: {
0: "此处",
fallback: "{0}格式不正确",
loading: "正在验证...",
error: "网络异常",
timeout: "请求超时",
required: "{0}不能为空",
remote: "{0}已被使用",
equalTo: "两次输入的密码必须一致",
integer: {
'*': "请填写整数",
'+': "请填写正整数",
'+0': "请填写正整数或0",
'-': "请填写负整数",
'-0': "请填写负整数或0"
},
match: {
eq: "{0}与{1}不一致",
neq: "{0}与{1}不能相同",
lt: "{0}必须小于{1}",
gt: "{0}必须大于{1}",
lte: "{0}不能大于{1}",
gte: "{0}不能小于{1}"
},
range: {
rg: "请填写{1}到{2}的数",
gte: "请填写不小于{1}的数",
lte: "请填写最大{1}的数",
gtlt: "请填写{1}到{2}之间的数",
gt: "请填写大于{1}的数",
lt: "请填写小于{1}的数"
},
checked: {
eq: "请选择{1}项",
rg: "请选择{1}到{2}项",
gte: "请至少选择{1}项",
lte: "请最多选择{1}项"
},
length: {
eq: "请填写{1}个字符",
rg: "请填写{1}到{2}个字符",
gte: "请至少填写{1}个字符",
lte: "请最多填写{1}个字符",
eq_2: "",
rg_2: "",
gte_2: "",
lte_2: ""
}
}
});
/* Themes
*/
var TPL_ARROW = '<span class="n-arrow"><b>◆</b><i>◆</i></span>';
$.validator.setTheme({
'simple_right': {
formClass: 'n-simple',
msgClass: 'n-right'
},
'simple_bottom': {
formClass: 'n-simple',
msgClass: 'n-bottom'
},
'yellow_top': {
formClass: 'n-yellow',
msgClass: 'n-top',
msgArrow: TPL_ARROW
},
'yellow_right': {
formClass: 'n-yellow',
msgClass: 'n-right',
msgArrow: TPL_ARROW
},
'yellow_right_effect': {
formClass: 'n-yellow',
msgClass: 'n-right',
msgArrow: TPL_ARROW,
msgShow: function($msgbox, type){
var $el = $msgbox.children();
if ($el.is(':animated')) return;
if (type === 'error') {
$el.css({left: '20px', opacity: 0})
.delay(100).show().stop()
.animate({left: '-4px', opacity: 1}, 150)
.animate({left: '3px'}, 80)
.animate({left: 0}, 80);
} else {
$el.css({left: 0, opacity: 1}).fadeIn(200);
}
},
msgHide: function($msgbox, type){
var $el = $msgbox.children();
$el.stop().delay(100).show()
.animate({left: '20px', opacity: 0}, 300, function(){
$msgbox.hide();
});
}
}
});
}));
/*********************************
* Themes, rules, and i18n support
* Locale: Chinese; 中文; TW (Taiwan)
*********************************/
(function(factory) {
typeof module === "object" && module.exports ? module.exports = factory( require( "jquery" ) ) :
typeof define === 'function' && define.amd ? define(['jquery'], factory) :
factory(jQuery);
}(function($) {
/* Global configuration
*/
$.validator.config({
//stopOnError: true,
//focusCleanup: true,
//theme: 'yellow_right',
//timely: 2,
// Custom rules
rules: {
digits: [/^\d+$/, "請填寫數字"]
,letters: [/^[a-z]+$/i, "請填寫字母"]
,date: [/^\d{4}-\d{2}-\d{2}$/, "請填寫有效的日期,格式:yyyy-mm-dd"]
,time: [/^([01]\d|2[0-3])(:[0-5]\d){1,2}$/, "請填寫有效的時間,00:00到23:59之間"]
,email: [/^[\w\+\-]+(\.[\w\+\-]+)*@[a-z\d\-]+(\.[a-z\d\-]+)*\.([a-z]{2,4})$/i, "請填寫有效的電郵"]
,url: [/^(https?|s?ftp):\/\/\S+$/i, "請填寫有效的網址"]
,accept: function (element, params){
if (!params) return true;
var ext = params[0],
value = $(element).val();
return (ext === '*') ||
(new RegExp(".(?:" + ext + ")$", "i")).test(value) ||
this.renderMsg("只接受{1}後綴的文件", ext.replace(/\|/g, ','));
}
},
// Default error messages
messages: {
0: "此處",
fallback: "{0}格式不正確",
loading: "正在驗證...",
error: "網絡異常",
timeout: "請求超時",
required: "{0}不能為空",
remote: "{0}已被使用",
integer: {
'*': "請填寫整數",
'+': "請填寫正整數",
'+0': "請填寫正整數或0",
'-': "請填寫負整數",
'-0': "請填寫負整數或0"
},
match: {
eq: "{0}與{1}不一致",
neq: "{0}與{1}不能相同",
lt: "{0}必須小於{1}",
gt: "{0}必須大於{1}",
lte: "{0}不能大於{1}",
gte: "{0}不能小於{1}"
},
range: {
rg: "請填寫{1}到{2}的數",
gte: "請填寫不小於{1}的數",
lte: "請填寫最大{1}的數",
gtlt: "請填寫{1}到{2}之間的數",
gt: "請填寫大於{1}的數",
lt: "請填寫小於{1}的數"
},
checked: {
eq: "請選擇{1}項",
rg: "請選擇{1}到{2}項",
gte: "請至少選擇{1}項",
lte: "請最多選擇{1}項"
},
length: {
eq: "請填寫{1}個字符",
rg: "請填寫{1}到{2}個字符",
gte: "請至少填寫{1}個字符",
lte: "請最多填寫{1}個字符",
eq_2: "",
rg_2: "",
gte_2: "",
lte_2: ""
}
}
});
/* Themes
*/
var TPL_ARROW = '<span class="n-arrow"><b>◆</b><i>◆</i></span>';
$.validator.setTheme({
'simple_right': {
formClass: 'n-simple',
msgClass: 'n-right'
},
'simple_bottom': {
formClass: 'n-simple',
msgClass: 'n-bottom'
},
'yellow_top': {
formClass: 'n-yellow',
msgClass: 'n-top',
msgArrow: TPL_ARROW
},
'yellow_right': {
formClass: 'n-yellow',
msgClass: 'n-right',
msgArrow: TPL_ARROW
},
'yellow_right_effect': {
formClass: 'n-yellow',
msgClass: 'n-right',
msgArrow: TPL_ARROW,
msgShow: function($msgbox, type){
var $el = $msgbox.children();
if ($el.is(':animated')) return;
if (type === 'error') {
$el.css({left: '20px', opacity: 0})
.delay(100).show().stop()
.animate({left: '-4px', opacity: 1}, 150)
.animate({left: '3px'}, 80)
.animate({left: 0}, 80);
} else {
$el.css({left: 0, opacity: 1}).fadeIn(200);
}
},
msgHide: function($msgbox, type){
var $el = $msgbox.children();
$el.stop().delay(100).show()
.animate({left: '20px', opacity: 0}, 300, function(){
$msgbox.hide();
});
}
}
});
}));
package com.dookay.cihai.jsp;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.annotation.Rollback;
import org.springframework.test.context.junit4.SpringRunner;
import org.springframework.transaction.annotation.Transactional;
@RunWith(SpringRunner.class)
@SpringBootTest
@Rollback
@Transactional
public class CihaiJspApplicationTests {
@Test
public void contextLoads() {
}
}
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.dookay</groupId>
<artifactId>cihai</artifactId>
<version>1.0-SNAPSHOT</version>
<packaging>pom</packaging>
<name>cihai</name>
<description>稻壳开发模板项目</description>
<properties>
<dookay.common.version>2.0.15</dookay.common.version>
<dookay.dependencies.version>2.0.1</dookay.dependencies.version>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<java.version>1.8</java.version>
<complier.plugin.version>3.7.0</complier.plugin.version>
</properties>
<dependencyManagement>
<dependencies>
<!--稻壳版本依赖-->
<dependency>
<groupId>com.dookay</groupId>
<artifactId>coral-dependencies</artifactId>
<version>${dookay.dependencies.version}</version>
<scope>import</scope>
<type>pom</type>
</dependency>
<!--稻壳版本依赖-->
<!--稻壳基础库-->
<dependency>
<groupId>com.dookay</groupId>
<artifactId>coral-common-core</artifactId>
<version>${dookay.common.version}</version>
</dependency>
<dependency>
<groupId>com.dookay</groupId>
<artifactId>coral-common-web</artifactId>
<version>${dookay.common.version}</version>
</dependency>
<!--稻壳基础库-->
<!--项目内依赖-->
<dependency>
<groupId>com.dookay</groupId>
<artifactId>cihai-core</artifactId>
<version>1.0-SNAPSHOT</version>
</dependency>
<!--项目内依赖-->
</dependencies>
</dependencyManagement>
<build>
<pluginManagement>
<plugins>
<!--打包插件 - 指定 java 版本-->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>${complier.plugin.version}</version>
<configuration>
<source>${java.version}</source>
<target>${java.version}</target>
</configuration>
</plugin>
<!--打包插件 - 指定 java 版本-->
</plugins>
</pluginManagement>
</build>
<modules>
<module>cihai-core</module>
<module>cihai-jsp</module>
<module>cihai-app</module>
</modules>
</project>
\ No newline at end of file
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!