update
|
@ -19,7 +19,10 @@
|
||||||
8. 连接池监视:监视当期系统数据库连接池状态,可进行分析SQL找出系统性能瓶颈。
|
8. 连接池监视:监视当期系统数据库连接池状态,可进行分析SQL找出系统性能瓶颈。
|
||||||
9. 工作流引擎:实现业务工单流转、在线流程设计器。
|
9. 工作流引擎:实现业务工单流转、在线流程设计器。
|
||||||
10. 代码生成工具:实体类、mapper、dao、service、controller
|
10. 代码生成工具:实体类、mapper、dao、service、controller
|
||||||
11. Jekins
|
11. Jekins git 自动部署
|
||||||
|
12. redis
|
||||||
|
13. 表单重复提交,前后端解决方案
|
||||||
|
14. 攻击防护(防止伪造身份)
|
||||||
|
|
||||||
|
|
||||||
#### 安装教程
|
#### 安装教程
|
||||||
|
|
|
@ -23,3 +23,26 @@
|
||||||
</div>
|
</div>
|
||||||
</th:block>
|
</th:block>
|
||||||
```
|
```
|
||||||
|
|
||||||
|
1. 登录状态失效?
|
||||||
|
2. 登录用户如何控制访问权限?比如直接访问路径
|
||||||
|
3.
|
||||||
|
|
||||||
|
本文细分角色和权限,并将用户、角色、权限和资源均采用数据库存储,并且自定义滤器,代替原有的FilterSecurityInterceptor过滤器,
|
||||||
|
并分别实现AccessDecisionManager、InvocationSecurityMetadataSourceService和UserDetailsService,并在配置文件中进行相应配置。
|
||||||
|
|
||||||
|
spring security的简单原理:
|
||||||
|
使用众多的拦截器对url拦截,以此来管理权限。但是这么多拦截器,笔者不可能对其一一来讲,主要讲里面核心流程的两个。
|
||||||
|
|
||||||
|
首先,权限管理离不开登陆验证的,所以登陆验证拦截器AuthenticationProcessingFilter要讲;
|
||||||
|
还有就是对访问的资源管理吧,所以资源管理拦截器AbstractSecurityInterceptor要讲;
|
||||||
|
|
||||||
|
但拦截器里面的实现需要一些组件来实现,所以就有了AuthenticationManager、accessDecisionManager等组件来支撑。
|
||||||
|
|
||||||
|
现在先大概过一遍整个流程,用户登陆,会被AuthenticationProcessingFilter拦截,调用AuthenticationManager的实现,而且AuthenticationManager会调用ProviderManager来获取用户验证信息(不同的Provider调用的服务不同,因为这些信息可以是在数据库上,可以是在LDAP服务器上,可以是xml配置文件上等),如果验证通过后会将用户的权限信息封装一个User放到spring的全局缓存SecurityContextHolder中,以备后面访问资源时使用。
|
||||||
|
访问资源(即授权管理),访问url时,会通过AbstractSecurityInterceptor拦截器拦截,其中会调用FilterInvocationSecurityMetadataSource的方法来获取被拦截url所需的全部权限,在调用授权管理器AccessDecisionManager,这个授权管理器会通过spring的全局缓存SecurityContextHolder获取用户的权限信息,还会获取被拦截的url和被拦截url所需的全部权限,然后根据所配的策略(有:一票决定,一票否定,少数服从多数等),如果权限足够,则返回,权限不够则报错并调用权限不足页面。
|
||||||
|
|
||||||
|
|
||||||
|
### 参考
|
||||||
|
|
||||||
|
* https://blog.csdn.net/u012373815/article/details/54633046
|
|
@ -1,46 +0,0 @@
|
||||||
package com.songpeng.common.config;
|
|
||||||
|
|
||||||
import com.songpeng.system.service.impl.SysUserServiceImpl;
|
|
||||||
import org.springframework.context.annotation.Bean;
|
|
||||||
import org.springframework.context.annotation.Configuration;
|
|
||||||
import org.springframework.security.config.annotation.authentication.builders.AuthenticationManagerBuilder;
|
|
||||||
import org.springframework.security.config.annotation.web.builders.HttpSecurity;
|
|
||||||
import org.springframework.security.config.annotation.web.configuration.EnableWebSecurity;
|
|
||||||
import org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter;
|
|
||||||
import org.springframework.security.core.userdetails.UserDetailsService;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Controller
|
|
||||||
*
|
|
||||||
* @author songpeng
|
|
||||||
* @date 2019/5/23
|
|
||||||
*/
|
|
||||||
@Configuration
|
|
||||||
@EnableWebSecurity
|
|
||||||
public class WebSecurityConfig extends WebSecurityConfigurerAdapter {
|
|
||||||
|
|
||||||
@Bean
|
|
||||||
UserDetailsService customUserService() { //注册UserDetailsService 的bean
|
|
||||||
return new SysUserServiceImpl();
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
protected void configure(AuthenticationManagerBuilder auth) throws Exception {
|
|
||||||
// user Details Service验证
|
|
||||||
auth.userDetailsService(customUserService());
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
protected void configure(HttpSecurity http) throws Exception {
|
|
||||||
// TODO 1. csrf 暂时关闭
|
|
||||||
http.authorizeRequests().anyRequest().permitAll().and().csrf().disable();
|
|
||||||
// .anyRequest().authenticated() //任何请求,登录后可以访问
|
|
||||||
// .and()
|
|
||||||
// .formLogin()
|
|
||||||
// .loginPage("/login")
|
|
||||||
// .failureUrl("/login?error")
|
|
||||||
// .permitAll() //登录页面用户任意访问
|
|
||||||
// .and()
|
|
||||||
// .logout().permitAll(); //注销行为任意访问
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -0,0 +1,58 @@
|
||||||
|
package com.songpeng.common.config.security;
|
||||||
|
|
||||||
|
import org.springframework.security.access.AccessDecisionManager;
|
||||||
|
import org.springframework.security.access.AccessDeniedException;
|
||||||
|
import org.springframework.security.access.ConfigAttribute;
|
||||||
|
import org.springframework.security.authentication.InsufficientAuthenticationException;
|
||||||
|
import org.springframework.security.core.Authentication;
|
||||||
|
import org.springframework.security.core.GrantedAuthority;
|
||||||
|
import org.springframework.util.CollectionUtils;
|
||||||
|
|
||||||
|
import java.util.Collection;
|
||||||
|
import java.util.Iterator;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author songpeng
|
||||||
|
* @date 2019/6/20
|
||||||
|
*/
|
||||||
|
public class CustomAccessDecisionManager implements AccessDecisionManager {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* decide 方法是判定是否拥有权限的决策方法,
|
||||||
|
* authentication 是释CustomUserService中循环添加到 GrantedAuthority 对象中的权限信息集合.
|
||||||
|
* object 包含客户端发起的请求的requset信息,可转换为 HttpServletRequest request = ((FilterInvocation) object).getHttpRequest();
|
||||||
|
* configAttributes 为MyInvocationSecurityMetadataSource的getAttributes(Object object)这个方法返回的结果,
|
||||||
|
* 此方法是为了判定用户请求的url 是否在权限表中,如果在权限表中,则返回给 decide 方法,用来判定用户是否有此权限。如果不在权限表中则放行。
|
||||||
|
*
|
||||||
|
* @param authentication
|
||||||
|
* @param object
|
||||||
|
* @param collection
|
||||||
|
* @throws AccessDeniedException
|
||||||
|
* @throws InsufficientAuthenticationException
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public void decide(Authentication authentication, Object object, Collection<ConfigAttribute> collection) throws AccessDeniedException, InsufficientAuthenticationException {
|
||||||
|
if (collection == null) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
for (ConfigAttribute configAttribute : collection) {
|
||||||
|
String needRole = configAttribute.getAttribute();
|
||||||
|
for (GrantedAuthority ga : authentication.getAuthorities()) {
|
||||||
|
if (needRole.trim().equals(ga.getAuthority().trim()) || needRole.trim().equals("ROLE_ANONYMOUS")) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
throw new AccessDeniedException("无权限");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean supports(ConfigAttribute configAttribute) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean supports(Class<?> aClass) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,142 @@
|
||||||
|
package com.songpeng.common.config.security;
|
||||||
|
|
||||||
|
import com.songpeng.common.utils.StringUtil;
|
||||||
|
import com.songpeng.system.domain.SysMenu;
|
||||||
|
import com.songpeng.system.domain.SysRole;
|
||||||
|
import com.songpeng.system.service.SysMenuService;
|
||||||
|
import com.songpeng.system.service.SysRoleService;
|
||||||
|
import org.slf4j.Logger;
|
||||||
|
import org.slf4j.LoggerFactory;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.core.env.PropertySource;
|
||||||
|
import org.springframework.security.access.ConfigAttribute;
|
||||||
|
import org.springframework.security.access.SecurityConfig;
|
||||||
|
import org.springframework.security.web.FilterInvocation;
|
||||||
|
import org.springframework.security.web.access.intercept.FilterInvocationSecurityMetadataSource;
|
||||||
|
import org.springframework.util.AntPathMatcher;
|
||||||
|
import org.springframework.util.PathMatcher;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.Collection;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 权限资源: 获取请求url需要的权限
|
||||||
|
* 主要责任就是当访问一个url时返回这个url所需要的访问权限
|
||||||
|
*
|
||||||
|
* @author SongPeng
|
||||||
|
* @date 2019/6/21
|
||||||
|
*/
|
||||||
|
public class CustomFilterInvocationSecurityMetadataSource implements FilterInvocationSecurityMetadataSource {
|
||||||
|
|
||||||
|
private static final Logger LOGGER = LoggerFactory.getLogger(CustomFilterInvocationSecurityMetadataSource.class);
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private SysMenuService sysMenuService;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private SysRoleService sysRoleService;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private PropertySource propertySourceBean;
|
||||||
|
|
||||||
|
private PathMatcher matcher = new AntPathMatcher();
|
||||||
|
|
||||||
|
private String indexUrl = "/index.jsp";
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 方法返回本次访问需要的权限,可以有多个权限。
|
||||||
|
* 在上面的实现中如果没有匹配的url直接返回null,
|
||||||
|
* 也就是没有配置权限的url默认都为白名单,想要换成默认是黑名单只要修改这里即可
|
||||||
|
*
|
||||||
|
* @param object
|
||||||
|
* @return
|
||||||
|
* @throws IllegalArgumentException
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public Collection<ConfigAttribute> getAttributes(Object object) throws IllegalArgumentException {
|
||||||
|
//获取当前访问url
|
||||||
|
String url = ((FilterInvocation) object).getRequestUrl();
|
||||||
|
int firstQuestionMarkIndex = url.indexOf("?");
|
||||||
|
if (firstQuestionMarkIndex != -1) {
|
||||||
|
url = url.substring(0, firstQuestionMarkIndex);
|
||||||
|
}
|
||||||
|
List<ConfigAttribute> result = new ArrayList<>();
|
||||||
|
|
||||||
|
try {
|
||||||
|
//设置不拦截
|
||||||
|
if (propertySourceBean.getProperty("security.ignoring") != null) {
|
||||||
|
String[] paths = propertySourceBean.getProperty("security.ignoring").toString().split(",");
|
||||||
|
//判断是否符合规则
|
||||||
|
for (String path : paths) {
|
||||||
|
String temp = StringUtil.clearSpace(path);
|
||||||
|
if (matcher.match(temp, url)) {
|
||||||
|
ConfigAttribute attribute = new SecurityConfig("ROLE_ANONYMOUS");
|
||||||
|
result.add(attribute);
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
//如果不是拦截列表里的
|
||||||
|
if (!isIntercept(url)) {
|
||||||
|
ConfigAttribute attribute = new SecurityConfig("ROLE_ANONYMOUS");
|
||||||
|
result.add(attribute);
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
//查询匹配的url
|
||||||
|
List<SysMenu> menuList = sysMenuService.getMenusByUrl(url);
|
||||||
|
if (menuList != null && menuList.size() > 0) {
|
||||||
|
for (SysMenu menu : menuList) {
|
||||||
|
//查询拥有该菜单权限的角色列表
|
||||||
|
List<SysRole> roles = sysRoleService.getRolesByMenuId(menu.getId());
|
||||||
|
if (roles != null && roles.size() > 0) {
|
||||||
|
for (SysRole role : roles) {
|
||||||
|
ConfigAttribute conf = new SecurityConfig(role.getCode());
|
||||||
|
result.add(conf);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} catch (Exception e) {
|
||||||
|
LOGGER.error("获取本次访问需要的权限异常", e);
|
||||||
|
}
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Collection<ConfigAttribute> getAllConfigAttributes() {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean supports(Class<?> aClass) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 判断是否需要过滤
|
||||||
|
*
|
||||||
|
* @param url
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public boolean isIntercept(String url) {
|
||||||
|
String[] filterPaths = propertySourceBean.getProperty("security.intercept").toString().split(",");
|
||||||
|
for (String filter : filterPaths) {
|
||||||
|
if (matcher.match(StringUtil.clearSpace(filter), url) & !matcher.match(indexUrl, url)) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getIndexUrl() {
|
||||||
|
return indexUrl;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setIndexUrl(String indexUrl) {
|
||||||
|
this.indexUrl = indexUrl;
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,63 @@
|
||||||
|
package com.songpeng.common.config.security;
|
||||||
|
|
||||||
|
import org.springframework.security.access.SecurityMetadataSource;
|
||||||
|
import org.springframework.security.access.intercept.AbstractSecurityInterceptor;
|
||||||
|
import org.springframework.security.access.intercept.InterceptorStatusToken;
|
||||||
|
import org.springframework.security.web.FilterInvocation;
|
||||||
|
import org.springframework.security.web.access.intercept.FilterInvocationSecurityMetadataSource;
|
||||||
|
|
||||||
|
import javax.servlet.*;
|
||||||
|
import java.io.IOException;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author songpeng
|
||||||
|
* @date 2019/6/20
|
||||||
|
*/
|
||||||
|
public class CustomFilterSecurityInterceptor extends AbstractSecurityInterceptor implements Filter {
|
||||||
|
private FilterInvocationSecurityMetadataSource securityMetadataSource;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void init(FilterConfig filterConfig) throws ServletException {
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException, ServletException {
|
||||||
|
FilterInvocation fi = new FilterInvocation(request, response, chain);
|
||||||
|
invoke(fi);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void destroy() {
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Class<?> getSecureObjectClass() {
|
||||||
|
return FilterInvocation.class;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public SecurityMetadataSource obtainSecurityMetadataSource() {
|
||||||
|
return this.securityMetadataSource;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void invoke(FilterInvocation fi) throws IOException {
|
||||||
|
//fi里面有一个被拦截的url
|
||||||
|
//里面调用MyInvocationSecurityMetadataSource的getAttributes(Object object)这个方法获取fi对应的所有权限
|
||||||
|
//再调用MyAccessDecisionManager的decide方法来校验用户的权限是否足够
|
||||||
|
InterceptorStatusToken token = super.beforeInvocation(fi);
|
||||||
|
try {
|
||||||
|
//执行下一个拦截器
|
||||||
|
fi.getChain().doFilter(fi.getRequest(), fi.getResponse());
|
||||||
|
} catch (ServletException e) {
|
||||||
|
super.afterInvocation(token, null);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public FilterInvocationSecurityMetadataSource getSecurityMetadataSource() {
|
||||||
|
return securityMetadataSource;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setSecurityMetadataSource(FilterInvocationSecurityMetadataSource securityMetadataSource) {
|
||||||
|
this.securityMetadataSource = securityMetadataSource;
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,68 @@
|
||||||
|
package com.songpeng.common.config.security;
|
||||||
|
|
||||||
|
import com.songpeng.system.service.impl.SysUserServiceImpl;
|
||||||
|
import org.springframework.context.annotation.Bean;
|
||||||
|
import org.springframework.context.annotation.Configuration;
|
||||||
|
import org.springframework.security.config.annotation.authentication.builders.AuthenticationManagerBuilder;
|
||||||
|
import org.springframework.security.config.annotation.web.builders.HttpSecurity;
|
||||||
|
import org.springframework.security.config.annotation.web.builders.WebSecurity;
|
||||||
|
import org.springframework.security.config.annotation.web.configuration.EnableWebSecurity;
|
||||||
|
import org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter;
|
||||||
|
import org.springframework.security.core.userdetails.UserDetailsService;
|
||||||
|
import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder;
|
||||||
|
import org.springframework.security.crypto.password.PasswordEncoder;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Controller
|
||||||
|
*
|
||||||
|
* @author songpeng
|
||||||
|
* @date 2019/5/23
|
||||||
|
*/
|
||||||
|
@Configuration
|
||||||
|
@EnableWebSecurity
|
||||||
|
public class WebSecurityConfig extends WebSecurityConfigurerAdapter {
|
||||||
|
|
||||||
|
@Bean
|
||||||
|
public PasswordEncoder passwordEncoder() {
|
||||||
|
return new BCryptPasswordEncoder();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 注册UserDetailsService 的bean
|
||||||
|
*
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@Bean
|
||||||
|
UserDetailsService customUserService() {
|
||||||
|
return new SysUserServiceImpl();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void configure(AuthenticationManagerBuilder auth) throws Exception {
|
||||||
|
// 用户认证
|
||||||
|
// 使用加密验证
|
||||||
|
auth.userDetailsService(customUserService()).passwordEncoder(passwordEncoder());
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void configure(WebSecurity web) {
|
||||||
|
web.ignoring().antMatchers("/css/**", "/fonts/**", "/img/**", "/js/**", "/lib/**", "/favicon.ico", "/blog", "/", "/sign_in");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void configure(HttpSecurity http) throws Exception {
|
||||||
|
// TODO 1. csrf 暂时关闭
|
||||||
|
http.headers()
|
||||||
|
.and().authorizeRequests()
|
||||||
|
.antMatchers("/registry").permitAll()
|
||||||
|
.anyRequest().authenticated()
|
||||||
|
.and().formLogin().loginPage("/sign_in")
|
||||||
|
.loginProcessingUrl("/login").defaultSuccessUrl("/personal_center", true)
|
||||||
|
.failureUrl("/sign_in?error").permitAll()
|
||||||
|
.and().sessionManagement().invalidSessionUrl("/sign_in")
|
||||||
|
.and().rememberMe().tokenValiditySeconds(1209600)
|
||||||
|
.and().logout().logoutSuccessUrl("/sign_in").permitAll()
|
||||||
|
.and().csrf().disable();
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -1,52 +0,0 @@
|
||||||
package com.songpeng.common.security;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 基于角色的授权
|
|
||||||
*
|
|
||||||
* @author songpeng
|
|
||||||
* @date 2019/6/17
|
|
||||||
*/
|
|
||||||
|
|
||||||
import org.springframework.security.core.GrantedAuthority;
|
|
||||||
import org.springframework.security.core.SpringSecurityCoreVersion;
|
|
||||||
|
|
||||||
public class RoleGrantedAuthority implements GrantedAuthority {
|
|
||||||
|
|
||||||
private static final long serialVersionUID = SpringSecurityCoreVersion.SERIAL_VERSION_UID;
|
|
||||||
|
|
||||||
private final String role;
|
|
||||||
|
|
||||||
public RoleGrantedAuthority(String role) {
|
|
||||||
this.role = role;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean equals(Object obj) {
|
|
||||||
if (obj instanceof String) {
|
|
||||||
return obj.equals(this.role);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (obj instanceof GrantedAuthority) {
|
|
||||||
GrantedAuthority attr = (GrantedAuthority) obj;
|
|
||||||
|
|
||||||
return this.role.equals(attr.getAuthority());
|
|
||||||
}
|
|
||||||
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public String getAuthority() {
|
|
||||||
return this.role;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public int hashCode() {
|
|
||||||
return this.role.hashCode();
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public String toString() {
|
|
||||||
return this.role;
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -13,12 +13,12 @@ import java.util.Date;
|
||||||
* Controller
|
* Controller
|
||||||
* Created by songpeng on 2019/5/21.
|
* Created by songpeng on 2019/5/21.
|
||||||
*/
|
*/
|
||||||
public class DateUtils extends org.apache.commons.lang3.time.DateUtils {
|
public class DateUtil extends org.apache.commons.lang3.time.DateUtils {
|
||||||
private static String[] parsePatterns = new String[]{"yyyy-MM-dd", "yyyy-MM-dd HH:mm:ss", "yyyy-MM-dd HH:mm", "yyyy/MM/dd", "yyyy/MM/dd HH:mm:ss", "yyyy/MM/dd HH:mm", "yyyy-MM-dd HH:mm:ss.E", "yyyy-MM-dd HH:mm:ss.0", "yyyy-MM-dd 00:00:00.0"};
|
private static String[] parsePatterns = new String[]{"yyyy-MM-dd", "yyyy-MM-dd HH:mm:ss", "yyyy-MM-dd HH:mm", "yyyy/MM/dd", "yyyy/MM/dd HH:mm:ss", "yyyy/MM/dd HH:mm", "yyyy-MM-dd HH:mm:ss.E", "yyyy-MM-dd HH:mm:ss.0", "yyyy-MM-dd 00:00:00.0"};
|
||||||
public static String datePatterns = "yyyy-MM-dd";
|
public static String datePatterns = "yyyy-MM-dd";
|
||||||
public static String dateTimePatterns = "yyyy-MM-dd HH:mm:ss";
|
public static String dateTimePatterns = "yyyy-MM-dd HH:mm:ss";
|
||||||
|
|
||||||
public DateUtils() {
|
public DateUtil() {
|
||||||
}
|
}
|
||||||
|
|
||||||
public static String getDate() {
|
public static String getDate() {
|
|
@ -8,7 +8,7 @@ package com.songpeng.common.utils;
|
||||||
*/
|
*/
|
||||||
public class FileType {
|
public class FileType {
|
||||||
public static int fileType(String fileName) {
|
public static int fileType(String fileName) {
|
||||||
if (StringUtils.isBlank(fileName)) {
|
if (StringUtil.isBlank(fileName)) {
|
||||||
fileName = "文件名为空!";
|
fileName = "文件名为空!";
|
||||||
return 500;
|
return 500;
|
||||||
|
|
||||||
|
|
|
@ -127,4 +127,9 @@ public final class IdUtil {
|
||||||
throw new IllegalArgumentException("Invalid id: " + stringId);
|
throw new IllegalArgumentException("Invalid id: " + stringId);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static void main(String[] args) {
|
||||||
|
String s = IdUtil.nextId();
|
||||||
|
System.out.println(s);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -57,14 +57,14 @@ public class PageRequest implements Serializable {
|
||||||
|
|
||||||
public Map<String, Object> getParams() {
|
public Map<String, Object> getParams() {
|
||||||
String key;
|
String key;
|
||||||
if (StringUtils.isNotEmpty(this.order)) {
|
if (StringUtil.isNotEmpty(this.order)) {
|
||||||
String[] orders = this.order.split(",");
|
String[] orders = this.order.split(",");
|
||||||
String[] sorts = this.sort.split(",");
|
String[] sorts = this.sort.split(",");
|
||||||
key = "";
|
key = "";
|
||||||
int i = 0;
|
int i = 0;
|
||||||
|
|
||||||
for (int j = orders.length; i < j; ++i) {
|
for (int j = orders.length; i < j; ++i) {
|
||||||
key = StringUtils.assemblyString(new String[]{key, orders[i], " ", sorts[i], ","});
|
key = StringUtil.assemblyString(new String[]{key, orders[i], " ", sorts[i], ","});
|
||||||
}
|
}
|
||||||
|
|
||||||
this.params.put("orderByClause", key.substring(0, key.length() - 1));
|
this.params.put("orderByClause", key.substring(0, key.length() - 1));
|
||||||
|
@ -85,7 +85,7 @@ public class PageRequest implements Serializable {
|
||||||
key = (String) entry.getKey();
|
key = (String) entry.getKey();
|
||||||
value = entry.getValue();
|
value = entry.getValue();
|
||||||
} while (value == null);
|
} while (value == null);
|
||||||
} while (StringUtils.isBlank(String.valueOf(value)));
|
} while (StringUtil.isBlank(String.valueOf(value)));
|
||||||
|
|
||||||
if ((key.endsWith("IN") || key.endsWith("NI")) && value instanceof String) {
|
if ((key.endsWith("IN") || key.endsWith("NI")) && value instanceof String) {
|
||||||
this.params.put(key, Arrays.asList(value.toString().split(",")));
|
this.params.put(key, Arrays.asList(value.toString().split(",")));
|
||||||
|
@ -93,7 +93,7 @@ public class PageRequest implements Serializable {
|
||||||
} while (!key.endsWith("TimeEnd") && !key.endsWith("DateEnd"));
|
} while (!key.endsWith("TimeEnd") && !key.endsWith("DateEnd"));
|
||||||
|
|
||||||
if (String.valueOf(value).length() == 10) {
|
if (String.valueOf(value).length() == 10) {
|
||||||
this.params.put(key, DateUtils.formatDateTime(DateUtils.getDateEnd(DateUtils.parseDate(value))));
|
this.params.put(key, DateUtil.formatDateTime(DateUtil.getDateEnd(DateUtil.parseDate(value))));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,23 @@
|
||||||
|
package com.songpeng.common.utils;
|
||||||
|
|
||||||
|
import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder;
|
||||||
|
import org.springframework.security.crypto.password.PasswordEncoder;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author songpeng
|
||||||
|
* @date 2019/6/18
|
||||||
|
*/
|
||||||
|
public class PasswordEncoderUtil {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 使用构造方法生成对象
|
||||||
|
*/
|
||||||
|
private static PasswordEncoder passwordEncoder = new BCryptPasswordEncoder();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 对密码使用BCryptPasswordEncoder加密方式进行加密
|
||||||
|
*/
|
||||||
|
public static String passwordEncoder(String password) {
|
||||||
|
return passwordEncoder.encode(password);
|
||||||
|
}
|
||||||
|
}
|
|
@ -11,11 +11,11 @@ import java.util.regex.Pattern;
|
||||||
* Controller
|
* Controller
|
||||||
* Created by songpeng on 2019/5/21.
|
* Created by songpeng on 2019/5/21.
|
||||||
*/
|
*/
|
||||||
public class StringUtils extends org.apache.commons.lang3.StringUtils {
|
public class StringUtil extends org.apache.commons.lang3.StringUtils {
|
||||||
|
|
||||||
private static final Pattern DANGER_CHAR_PATTERN = Pattern.compile("['|\"|\\|<|>]");
|
private static final Pattern DANGER_CHAR_PATTERN = Pattern.compile("['|\"|\\|<|>]");
|
||||||
|
|
||||||
public StringUtils() {
|
public StringUtil() {
|
||||||
}
|
}
|
||||||
|
|
||||||
public static String maptToUrlParam(Map<String, Object> paramMap, String encode) throws Exception {
|
public static String maptToUrlParam(Map<String, Object> paramMap, String encode) throws Exception {
|
||||||
|
@ -149,4 +149,18 @@ public class StringUtils extends org.apache.commons.lang3.StringUtils {
|
||||||
public static boolean isDanger(String str) {
|
public static boolean isDanger(String str) {
|
||||||
return isBlank(str) ? false : DANGER_CHAR_PATTERN.matcher(str).find();
|
return isBlank(str) ? false : DANGER_CHAR_PATTERN.matcher(str).find();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static String clearSpace(String str) {
|
||||||
|
return str.replaceAll(" ", "");
|
||||||
|
}
|
||||||
|
|
||||||
|
public static String[] clearSpace(String... str) {
|
||||||
|
String[] temps = new String[str.length];
|
||||||
|
|
||||||
|
for(int i = 0; i < str.length; ++i) {
|
||||||
|
temps[i] = str[i].replaceAll(" ", "");
|
||||||
|
}
|
||||||
|
|
||||||
|
return temps;
|
||||||
|
}
|
||||||
}
|
}
|
|
@ -5,6 +5,8 @@ import org.slf4j.LoggerFactory;
|
||||||
import org.springframework.stereotype.Controller;
|
import org.springframework.stereotype.Controller;
|
||||||
import org.springframework.ui.Model;
|
import org.springframework.ui.Model;
|
||||||
import org.springframework.web.bind.annotation.GetMapping;
|
import org.springframework.web.bind.annotation.GetMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
|
import org.springframework.web.bind.annotation.ResponseBody;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 登录 Controller
|
* 登录 Controller
|
||||||
|
@ -61,4 +63,10 @@ public class LoginController {
|
||||||
return "admin/main";
|
return "admin/main";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@RequestMapping("/personal_center")
|
||||||
|
@ResponseBody
|
||||||
|
String loginSuccess() {
|
||||||
|
return "success";
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,165 @@
|
||||||
|
package com.songpeng.system.domain;
|
||||||
|
|
||||||
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
|
|
||||||
|
import javax.persistence.Column;
|
||||||
|
import javax.persistence.Id;
|
||||||
|
import javax.persistence.Table;
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 系统菜单
|
||||||
|
*
|
||||||
|
* @author songpeng
|
||||||
|
* @date 2019/5/23
|
||||||
|
*/
|
||||||
|
@Table(name = "SYS_MENU")
|
||||||
|
public class SysMenu implements Serializable {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = -3876673376417160668L;
|
||||||
|
|
||||||
|
@Id
|
||||||
|
@Column(name = "ID")
|
||||||
|
private String id;
|
||||||
|
@Column(name = "NAME")
|
||||||
|
private String name;
|
||||||
|
@Column(name = "URL")
|
||||||
|
private String url;
|
||||||
|
@Column(name = "PARENT_ID")
|
||||||
|
private String parentId;
|
||||||
|
@Column(name = "GRADE")
|
||||||
|
private String grade;
|
||||||
|
@Column(name = "SORT_NUM")
|
||||||
|
private String sortNum;
|
||||||
|
@Column(name = "TYPE")
|
||||||
|
private String type;
|
||||||
|
@Column(name = "PERMISSION")
|
||||||
|
private String permission;
|
||||||
|
@Column(name = "ICON")
|
||||||
|
private String icon;
|
||||||
|
@Column(name = "DESCRIPTION")
|
||||||
|
private String description;
|
||||||
|
@Column(name = "CREATED")
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||||
|
private Date created;
|
||||||
|
@Column(name = "CREATED_BY")
|
||||||
|
private String createdBy;
|
||||||
|
@Column(name = "LAST_UPD")
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||||
|
private Date lastUpd;
|
||||||
|
@Column(name = "LAST_UPD_BY")
|
||||||
|
private String lastUpdBy;
|
||||||
|
|
||||||
|
public String getId() {
|
||||||
|
return id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setId(String id) {
|
||||||
|
this.id = id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getName() {
|
||||||
|
return name;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setName(String name) {
|
||||||
|
this.name = name;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getUrl() {
|
||||||
|
return url;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setUrl(String url) {
|
||||||
|
this.url = url;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getParentId() {
|
||||||
|
return parentId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setParentId(String parentId) {
|
||||||
|
this.parentId = parentId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getGrade() {
|
||||||
|
return grade;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setGrade(String grade) {
|
||||||
|
this.grade = grade;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getSortNum() {
|
||||||
|
return sortNum;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setSortNum(String sortNum) {
|
||||||
|
this.sortNum = sortNum;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getType() {
|
||||||
|
return type;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setType(String type) {
|
||||||
|
this.type = type;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getPermission() {
|
||||||
|
return permission;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setPermission(String permission) {
|
||||||
|
this.permission = permission;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getIcon() {
|
||||||
|
return icon;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setIcon(String icon) {
|
||||||
|
this.icon = icon;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getDescription() {
|
||||||
|
return description;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setDescription(String description) {
|
||||||
|
this.description = description;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Date getCreated() {
|
||||||
|
return created;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCreated(Date created) {
|
||||||
|
this.created = created;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getCreatedBy() {
|
||||||
|
return createdBy;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCreatedBy(String createdBy) {
|
||||||
|
this.createdBy = createdBy;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Date getLastUpd() {
|
||||||
|
return lastUpd;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setLastUpd(Date lastUpd) {
|
||||||
|
this.lastUpd = lastUpd;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getLastUpdBy() {
|
||||||
|
return lastUpdBy;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setLastUpdBy(String lastUpdBy) {
|
||||||
|
this.lastUpdBy = lastUpdBy;
|
||||||
|
}
|
||||||
|
}
|
|
@ -1,15 +1,43 @@
|
||||||
package com.songpeng.system.domain;
|
package com.songpeng.system.domain;
|
||||||
|
|
||||||
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
|
|
||||||
|
import javax.persistence.Column;
|
||||||
|
import javax.persistence.Id;
|
||||||
|
import javax.persistence.Table;
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 系统角色
|
* 系统角色
|
||||||
*
|
*
|
||||||
* @author songpeng
|
* @author songpeng
|
||||||
* @date 2019/5/23
|
* @date 2019/5/23
|
||||||
*/
|
*/
|
||||||
public class SysRole {
|
@Table(name = "SYS_ROLE")
|
||||||
|
public class SysRole implements Serializable {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = -3876673376417160668L;
|
||||||
|
|
||||||
|
@Id
|
||||||
|
@Column(name = "ID")
|
||||||
private Long id;
|
private Long id;
|
||||||
|
@Column(name = "NAME")
|
||||||
private String name;
|
private String name;
|
||||||
|
@Column(name = "CODE")
|
||||||
private String code;
|
private String code;
|
||||||
|
@Column(name = "STATUS")
|
||||||
|
private String status;
|
||||||
|
@Column(name = "CREATED")
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||||
|
private Date created;
|
||||||
|
@Column(name = "CREATED_BY")
|
||||||
|
private String createdBy;
|
||||||
|
@Column(name = "LAST_UPD")
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||||
|
private Date lastUpd;
|
||||||
|
@Column(name = "LAST_UPD_BY")
|
||||||
|
private String lastUpdBy;
|
||||||
|
|
||||||
public Long getId() {
|
public Long getId() {
|
||||||
return id;
|
return id;
|
||||||
|
@ -34,4 +62,44 @@ public class SysRole {
|
||||||
public void setCode(String code) {
|
public void setCode(String code) {
|
||||||
this.code = code;
|
this.code = code;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public String getStatus() {
|
||||||
|
return status;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setStatus(String status) {
|
||||||
|
this.status = status;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Date getCreated() {
|
||||||
|
return created;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCreated(Date created) {
|
||||||
|
this.created = created;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getCreatedBy() {
|
||||||
|
return createdBy;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCreatedBy(String createdBy) {
|
||||||
|
this.createdBy = createdBy;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Date getLastUpd() {
|
||||||
|
return lastUpd;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setLastUpd(Date lastUpd) {
|
||||||
|
this.lastUpd = lastUpd;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getLastUpdBy() {
|
||||||
|
return lastUpdBy;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setLastUpdBy(String lastUpdBy) {
|
||||||
|
this.lastUpdBy = lastUpdBy;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -28,11 +28,49 @@ public class SysUser implements Serializable {
|
||||||
private String username;
|
private String username;
|
||||||
@Column(name = "PASSWORD")
|
@Column(name = "PASSWORD")
|
||||||
private String password;
|
private String password;
|
||||||
|
@Column(name = "DEPT_ID")
|
||||||
|
private String deptId;
|
||||||
|
@Column(name = "EMAIL")
|
||||||
|
private String email;
|
||||||
|
@Column(name = "MOBILE")
|
||||||
|
private String mobile;
|
||||||
|
@Column(name = "TEL")
|
||||||
|
private String tel;
|
||||||
|
@Column(name = "SEX")
|
||||||
|
private String sex;
|
||||||
@Column(name = "BIRTHDAY")
|
@Column(name = "BIRTHDAY")
|
||||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||||
private Date birthday;
|
private Date birthday;
|
||||||
|
@Column(name = "PIC_ID")
|
||||||
|
private String picId;
|
||||||
|
@Column(name = "ID_CARD")
|
||||||
|
private String idCard;
|
||||||
|
@Column(name = "HOBBY")
|
||||||
|
private String hobby;
|
||||||
|
@Column(name = "PROVINCE")
|
||||||
|
private String province;
|
||||||
|
@Column(name = "CITY")
|
||||||
|
private String city;
|
||||||
|
@Column(name = "DISTRICT")
|
||||||
|
private String district;
|
||||||
|
@Column(name = "STREET")
|
||||||
|
private String street;
|
||||||
|
@Column(name = "STREET_NUMBER")
|
||||||
|
private String streetNumber;
|
||||||
|
@Column(name = "DESCRIPTION")
|
||||||
|
private String description;
|
||||||
@Column(name = "STATUS")
|
@Column(name = "STATUS")
|
||||||
private String status;
|
private String status;
|
||||||
|
@Column(name = "CREATED")
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||||
|
private Date created;
|
||||||
|
@Column(name = "CREATED_BY")
|
||||||
|
private String createdBy;
|
||||||
|
@Column(name = "LAST_UPD")
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||||
|
private Date lastUpd;
|
||||||
|
@Column(name = "LAST_UPD_BY")
|
||||||
|
private String lastUpdBy;
|
||||||
|
|
||||||
public String getId() {
|
public String getId() {
|
||||||
return id;
|
return id;
|
||||||
|
@ -66,6 +104,46 @@ public class SysUser implements Serializable {
|
||||||
this.password = password;
|
this.password = password;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public String getDeptId() {
|
||||||
|
return deptId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setDeptId(String deptId) {
|
||||||
|
this.deptId = deptId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getEmail() {
|
||||||
|
return email;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setEmail(String email) {
|
||||||
|
this.email = email;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getMobile() {
|
||||||
|
return mobile;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setMobile(String mobile) {
|
||||||
|
this.mobile = mobile;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getTel() {
|
||||||
|
return tel;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setTel(String tel) {
|
||||||
|
this.tel = tel;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getSex() {
|
||||||
|
return sex;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setSex(String sex) {
|
||||||
|
this.sex = sex;
|
||||||
|
}
|
||||||
|
|
||||||
public Date getBirthday() {
|
public Date getBirthday() {
|
||||||
return birthday;
|
return birthday;
|
||||||
}
|
}
|
||||||
|
@ -74,6 +152,78 @@ public class SysUser implements Serializable {
|
||||||
this.birthday = birthday;
|
this.birthday = birthday;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public String getPicId() {
|
||||||
|
return picId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setPicId(String picId) {
|
||||||
|
this.picId = picId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getIdCard() {
|
||||||
|
return idCard;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setIdCard(String idCard) {
|
||||||
|
this.idCard = idCard;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getHobby() {
|
||||||
|
return hobby;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setHobby(String hobby) {
|
||||||
|
this.hobby = hobby;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getProvince() {
|
||||||
|
return province;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setProvince(String province) {
|
||||||
|
this.province = province;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getCity() {
|
||||||
|
return city;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCity(String city) {
|
||||||
|
this.city = city;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getDistrict() {
|
||||||
|
return district;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setDistrict(String district) {
|
||||||
|
this.district = district;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getStreet() {
|
||||||
|
return street;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setStreet(String street) {
|
||||||
|
this.street = street;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getStreetNumber() {
|
||||||
|
return streetNumber;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setStreetNumber(String streetNumber) {
|
||||||
|
this.streetNumber = streetNumber;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getDescription() {
|
||||||
|
return description;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setDescription(String description) {
|
||||||
|
this.description = description;
|
||||||
|
}
|
||||||
|
|
||||||
public String getStatus() {
|
public String getStatus() {
|
||||||
return status;
|
return status;
|
||||||
}
|
}
|
||||||
|
@ -81,4 +231,67 @@ public class SysUser implements Serializable {
|
||||||
public void setStatus(String status) {
|
public void setStatus(String status) {
|
||||||
this.status = status;
|
this.status = status;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public Date getCreated() {
|
||||||
|
return created;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCreated(Date created) {
|
||||||
|
this.created = created;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getCreatedBy() {
|
||||||
|
return createdBy;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCreatedBy(String createdBy) {
|
||||||
|
this.createdBy = createdBy;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Date getLastUpd() {
|
||||||
|
return lastUpd;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setLastUpd(Date lastUpd) {
|
||||||
|
this.lastUpd = lastUpd;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getLastUpdBy() {
|
||||||
|
return lastUpdBy;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setLastUpdBy(String lastUpdBy) {
|
||||||
|
this.lastUpdBy = lastUpdBy;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String toString() {
|
||||||
|
final StringBuffer sb = new StringBuffer("SysUser{");
|
||||||
|
sb.append("id='").append(id).append('\'');
|
||||||
|
sb.append(", name='").append(name).append('\'');
|
||||||
|
sb.append(", username='").append(username).append('\'');
|
||||||
|
sb.append(", password='").append(password).append('\'');
|
||||||
|
sb.append(", deptId='").append(deptId).append('\'');
|
||||||
|
sb.append(", email='").append(email).append('\'');
|
||||||
|
sb.append(", mobile='").append(mobile).append('\'');
|
||||||
|
sb.append(", tel='").append(tel).append('\'');
|
||||||
|
sb.append(", sex='").append(sex).append('\'');
|
||||||
|
sb.append(", birthday=").append(birthday);
|
||||||
|
sb.append(", picId='").append(picId).append('\'');
|
||||||
|
sb.append(", idCard='").append(idCard).append('\'');
|
||||||
|
sb.append(", hobby='").append(hobby).append('\'');
|
||||||
|
sb.append(", province='").append(province).append('\'');
|
||||||
|
sb.append(", city='").append(city).append('\'');
|
||||||
|
sb.append(", district='").append(district).append('\'');
|
||||||
|
sb.append(", street='").append(street).append('\'');
|
||||||
|
sb.append(", streetNumber='").append(streetNumber).append('\'');
|
||||||
|
sb.append(", description='").append(description).append('\'');
|
||||||
|
sb.append(", status='").append(status).append('\'');
|
||||||
|
sb.append(", created=").append(created);
|
||||||
|
sb.append(", createdBy='").append(createdBy).append('\'');
|
||||||
|
sb.append(", lastUpd=").append(lastUpd);
|
||||||
|
sb.append(", lastUpdBy='").append(lastUpdBy).append('\'');
|
||||||
|
sb.append('}');
|
||||||
|
return sb.toString();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,10 +1,10 @@
|
||||||
package com.songpeng.system.dto;
|
package com.songpeng.system.dto;
|
||||||
|
|
||||||
import com.songpeng.common.security.RoleGrantedAuthority;
|
import com.songpeng.common.utils.StringUtil;
|
||||||
import com.songpeng.common.utils.StringUtils;
|
|
||||||
import com.songpeng.system.domain.SysRole;
|
import com.songpeng.system.domain.SysRole;
|
||||||
import com.songpeng.system.domain.SysUser;
|
import com.songpeng.system.domain.SysUser;
|
||||||
import org.springframework.security.core.GrantedAuthority;
|
import org.springframework.security.core.GrantedAuthority;
|
||||||
|
import org.springframework.security.core.authority.SimpleGrantedAuthority;
|
||||||
import org.springframework.security.core.userdetails.UserDetails;
|
import org.springframework.security.core.userdetails.UserDetails;
|
||||||
import org.springframework.util.CollectionUtils;
|
import org.springframework.util.CollectionUtils;
|
||||||
|
|
||||||
|
@ -27,14 +27,14 @@ public class SysUserDto extends SysUser implements UserDetails {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Collection<? extends GrantedAuthority> getAuthorities() {
|
public Collection<? extends GrantedAuthority> getAuthorities() {
|
||||||
List<RoleGrantedAuthority> authorityList = new ArrayList<>();
|
List<SimpleGrantedAuthority> authorityList = new ArrayList<>();
|
||||||
authorityList.add(new RoleGrantedAuthority("ROLE_USER"));
|
authorityList.add(new SimpleGrantedAuthority("ROLE_USER"));
|
||||||
|
|
||||||
// 加入角色权限
|
// 加入角色权限
|
||||||
if (CollectionUtils.isEmpty(roleList)) {
|
if (CollectionUtils.isEmpty(roleList)) {
|
||||||
for (SysRole role : roleList) {
|
for (SysRole role : roleList) {
|
||||||
if (StringUtils.isNotBlank(role.getCode())) {
|
if (StringUtil.isNotBlank(role.getCode())) {
|
||||||
authorityList.add(new RoleGrantedAuthority("ROLE_" + role.getCode().toUpperCase()));
|
authorityList.add(new SimpleGrantedAuthority("ROLE_" + role.getCode().toUpperCase()));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -58,17 +58,18 @@ public class SysUserDto extends SysUser implements UserDetails {
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public boolean isAccountNonLocked() {
|
public boolean isAccountNonLocked() {
|
||||||
return false;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 指示是否已过期的用户的凭据(密码),过期的凭据防止认证
|
* 指示是否已过期的用户的凭据(密码),过期的凭据防止认证
|
||||||
|
* 帐户密码是否过期,一般有的密码要求性高的系统会使用到,比较每隔一段时间就要求用户重置密码
|
||||||
*
|
*
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public boolean isCredentialsNonExpired() {
|
public boolean isCredentialsNonExpired() {
|
||||||
return false;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -78,7 +79,7 @@ public class SysUserDto extends SysUser implements UserDetails {
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public boolean isEnabled() {
|
public boolean isEnabled() {
|
||||||
return false;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
public List<SysRole> getRoleList() {
|
public List<SysRole> getRoleList() {
|
||||||
|
|
|
@ -0,0 +1,8 @@
|
||||||
|
package com.songpeng.system.mapper;
|
||||||
|
|
||||||
|
import com.songpeng.common.utils.SpMapper;
|
||||||
|
import com.songpeng.system.domain.SysMenu;
|
||||||
|
|
||||||
|
public interface SysMenuMapper extends SpMapper<SysMenu> {
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,13 @@
|
||||||
|
package com.songpeng.system.mapper;
|
||||||
|
|
||||||
|
import com.songpeng.common.utils.SpMapper;
|
||||||
|
import com.songpeng.system.domain.SysRole;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
public interface SysRoleMapper extends SpMapper<SysRole> {
|
||||||
|
|
||||||
|
List<SysRole> getRolesByUserId(String userId);
|
||||||
|
|
||||||
|
List<SysRole> getRolesByMenuId(String menuId);
|
||||||
|
}
|
|
@ -0,0 +1,22 @@
|
||||||
|
package com.songpeng.system.service;
|
||||||
|
|
||||||
|
import com.songpeng.system.domain.SysMenu;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* SysMenuService
|
||||||
|
*
|
||||||
|
* @author songpeng
|
||||||
|
* @date 2019/4/20
|
||||||
|
*/
|
||||||
|
public interface SysMenuService {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据url查询所属菜单
|
||||||
|
*
|
||||||
|
* @param url
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
List<SysMenu> getMenusByUrl(String url);
|
||||||
|
}
|
|
@ -0,0 +1,15 @@
|
||||||
|
package com.songpeng.system.service;
|
||||||
|
|
||||||
|
import com.songpeng.system.domain.SysRole;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* UserService
|
||||||
|
*
|
||||||
|
* @author songpeng
|
||||||
|
* @date 2019/4/20
|
||||||
|
*/
|
||||||
|
public interface SysRoleService {
|
||||||
|
List<SysRole> getRolesByMenuId(String menuId);
|
||||||
|
}
|
|
@ -11,7 +11,7 @@ import java.util.Map;
|
||||||
* UserService
|
* UserService
|
||||||
*
|
*
|
||||||
* @author songpeng
|
* @author songpeng
|
||||||
* @date 2019/4/20.
|
* @date 2019/4/20
|
||||||
*/
|
*/
|
||||||
public interface SysUserService {
|
public interface SysUserService {
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,53 @@
|
||||||
|
package com.songpeng.system.service.impl;
|
||||||
|
|
||||||
|
import com.songpeng.system.domain.SysMenu;
|
||||||
|
import com.songpeng.system.mapper.SysMenuMapper;
|
||||||
|
import com.songpeng.system.service.SysMenuService;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.util.AntPathMatcher;
|
||||||
|
import org.springframework.util.PathMatcher;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author songpeng
|
||||||
|
* @date 2019/6/21
|
||||||
|
*/
|
||||||
|
public class SysMenuServiceImpl implements SysMenuService {
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private SysMenuMapper sysMenuMapper;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据url查询所属菜单
|
||||||
|
*
|
||||||
|
* @param url
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public List<SysMenu> getMenusByUrl(String url) {
|
||||||
|
List<SysMenu> menuList = sysMenuMapper.selectAll();
|
||||||
|
List<SysMenu> menus = new ArrayList<>();
|
||||||
|
if (menuList != null) {
|
||||||
|
menus.addAll(menuList.stream().filter(menu -> urlMatcher(menu.getUrl(), url)).collect(Collectors.toList()));
|
||||||
|
}
|
||||||
|
return menus;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* url 匹配
|
||||||
|
*
|
||||||
|
* @param permstr
|
||||||
|
* @param url
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
private boolean urlMatcher(String permstr, String url) {
|
||||||
|
if (permstr == null) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
PathMatcher matcher = new AntPathMatcher();
|
||||||
|
return matcher.match(permstr, url);
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,23 @@
|
||||||
|
package com.songpeng.system.service.impl;
|
||||||
|
|
||||||
|
import com.songpeng.system.domain.SysRole;
|
||||||
|
import com.songpeng.system.mapper.SysRoleMapper;
|
||||||
|
import com.songpeng.system.service.SysRoleService;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author songpeng
|
||||||
|
* @date 2019/6/21
|
||||||
|
*/
|
||||||
|
public class SysRoleServiceImpl implements SysRoleService {
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private SysRoleMapper sysRoleMapper;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<SysRole> getRolesByMenuId(String menuId) {
|
||||||
|
return sysRoleMapper.getRolesByMenuId(menuId);
|
||||||
|
}
|
||||||
|
}
|
|
@ -4,7 +4,8 @@ import com.github.pagehelper.PageHelper;
|
||||||
import com.github.pagehelper.PageInfo;
|
import com.github.pagehelper.PageInfo;
|
||||||
import com.songpeng.common.utils.IdUtil;
|
import com.songpeng.common.utils.IdUtil;
|
||||||
import com.songpeng.common.utils.PageRequest;
|
import com.songpeng.common.utils.PageRequest;
|
||||||
import com.songpeng.common.utils.StringUtils;
|
import com.songpeng.common.utils.PasswordEncoderUtil;
|
||||||
|
import com.songpeng.common.utils.StringUtil;
|
||||||
import com.songpeng.system.domain.SysUser;
|
import com.songpeng.system.domain.SysUser;
|
||||||
import com.songpeng.system.dto.SysUserDto;
|
import com.songpeng.system.dto.SysUserDto;
|
||||||
import com.songpeng.system.enmus.ESysUser;
|
import com.songpeng.system.enmus.ESysUser;
|
||||||
|
@ -46,17 +47,18 @@ public class SysUserServiceImpl implements SysUserService, UserDetailsService {
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public UserDetails loadUserByUsername(String username) throws UsernameNotFoundException {
|
public UserDetails loadUserByUsername(String username) throws UsernameNotFoundException {
|
||||||
if (StringUtils.isBlank(username)) {
|
if (StringUtil.isBlank(username)) {
|
||||||
throw new BadCredentialsException("用户名不能为空!");
|
throw new BadCredentialsException("用户名不能为空!");
|
||||||
}
|
}
|
||||||
|
|
||||||
// 根据用户名和正常状态获取用户信息
|
// 根据用户名和正常状态获取用户信息
|
||||||
Map<String, Object> paraMap = new HashMap(1) {{
|
Map<String, Object> paraMap = new HashMap(1) {{
|
||||||
put("userName", username);
|
put("username", username);
|
||||||
}};
|
}};
|
||||||
SysUserDto userDto = getUserDtoRoles(paraMap);
|
SysUserDto userDto = getUserDtoRoles(paraMap);
|
||||||
|
|
||||||
if (userDto == null) {
|
if (userDto == null) {
|
||||||
|
LOGGER.error("未找到用户名为 {} 的用户信息", username);
|
||||||
throw new BadCredentialsException("未找到用户名为 " + username + " 的用户信息");
|
throw new BadCredentialsException("未找到用户名为 " + username + " 的用户信息");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -93,6 +95,7 @@ public class SysUserServiceImpl implements SysUserService, UserDetailsService {
|
||||||
@Override
|
@Override
|
||||||
public void add(SysUser sysUser, String[] roles) {
|
public void add(SysUser sysUser, String[] roles) {
|
||||||
sysUser.setId(IdUtil.nextId());
|
sysUser.setId(IdUtil.nextId());
|
||||||
|
sysUser.setPassword(PasswordEncoderUtil.passwordEncoder(sysUser.getPassword()));
|
||||||
sysUser.setStatus(ESysUser.STATUS_NORMAL.getValue());
|
sysUser.setStatus(ESysUser.STATUS_NORMAL.getValue());
|
||||||
LOGGER.info("user insert id: {}", sysUser.getId());
|
LOGGER.info("user insert id: {}", sysUser.getId());
|
||||||
sysUserMapper.insertSelective(sysUser);
|
sysUserMapper.insertSelective(sysUser);
|
||||||
|
|
|
@ -0,0 +1,22 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8" ?>
|
||||||
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
|
||||||
|
<mapper namespace="com.songpeng.system.mapper.SysMenuMapper">
|
||||||
|
|
||||||
|
<resultMap id="BaseResultMap" type="com.songpeng.system.domain.SysMenu">
|
||||||
|
<id column="id" jdbcType="VARCHAR" property="id"/>
|
||||||
|
<result column="name" jdbcType="VARCHAR" property="name"/>
|
||||||
|
<result column="url" jdbcType="VARCHAR" property="url"/>
|
||||||
|
<result column="parent_id" jdbcType="VARCHAR" property="parentId"/>
|
||||||
|
<result column="grade" jdbcType="CHAR" property="grade"/>
|
||||||
|
<result column="sort_num" jdbcType="INTEGER" property="sortNum"/>
|
||||||
|
<result column="type" jdbcType="CHAR" property="type"/>
|
||||||
|
<result column="permission" jdbcType="VARCHAR" property="permission"/>
|
||||||
|
<result column="icon" jdbcType="VARCHAR" property="icon"/>
|
||||||
|
<result column="description" jdbcType="VARCHAR" property="description"/>
|
||||||
|
<result column="created_by" jdbcType="VARCHAR" property="createdBy"/>
|
||||||
|
<result column="created" jdbcType="TIMESTAMP" property="created"/>
|
||||||
|
<result column="last_upd_by" jdbcType="VARCHAR" property="lastUpdBy"/>
|
||||||
|
<result column="last_upd" jdbcType="TIMESTAMP" property="lastUpd"/>
|
||||||
|
</resultMap>
|
||||||
|
|
||||||
|
</mapper>
|
|
@ -0,0 +1,29 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8" ?>
|
||||||
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
|
||||||
|
<mapper namespace="com.songpeng.system.mapper.SysRoleMapper">
|
||||||
|
|
||||||
|
<resultMap id="BaseResultMap" type="com.songpeng.system.domain.SysRole">
|
||||||
|
<result column="ID" jdbcType="VARCHAR" property="id"/>
|
||||||
|
<result column="NAME" jdbcType="VARCHAR" property="name"/>
|
||||||
|
<result column="CODE" jdbcType="VARCHAR" property="code"/>
|
||||||
|
<result column="STATUS" jdbcType="VARCHAR" property="status"/>
|
||||||
|
</resultMap>
|
||||||
|
|
||||||
|
<!-- 根据用户id获取其角色列表 -->
|
||||||
|
<select id="getRolesByUserId" parameterType="java.lang.String" resultMap="BaseResultMap">
|
||||||
|
SELECT t.*
|
||||||
|
FROM SYS_ROLE t,
|
||||||
|
SYS_USER_ROLE sur
|
||||||
|
WHERE t.ID = sur.ROLE_ID
|
||||||
|
AND sur.USER_ID = #{userId}
|
||||||
|
AND t.STATUS = '1'
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<!-- 根据菜单id查询所属角色 -->
|
||||||
|
<select id="getRolesByMenuId" resultMap="BaseResultMap">
|
||||||
|
SELECT t.*
|
||||||
|
FROM BASE_ROLE t
|
||||||
|
LEFT JOIN SYS_ROLE_MENU srm ON t.ID = srm.ROLE_ID
|
||||||
|
WHERE srm.MENU_ID = #{menuId}
|
||||||
|
</select>
|
||||||
|
</mapper>
|
|
@ -0,0 +1,56 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8" ?>
|
||||||
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
|
||||||
|
<mapper namespace="com.songpeng.system.mapper.SysUserMapper">
|
||||||
|
|
||||||
|
<resultMap id="BaseResultMap" type="com.songpeng.system.domain.SysUser">
|
||||||
|
<id column="id" jdbcType="VARCHAR" property="id" />
|
||||||
|
<result column="name" jdbcType="VARCHAR" property="name" />
|
||||||
|
<result column="username" jdbcType="VARCHAR" property="username" />
|
||||||
|
<result column="password" jdbcType="VARCHAR" property="password" />
|
||||||
|
<result column="dept_id" jdbcType="VARCHAR" property="deptId" />
|
||||||
|
<result column="email" jdbcType="VARCHAR" property="email" />
|
||||||
|
<result column="mobile" jdbcType="VARCHAR" property="mobile" />
|
||||||
|
<result column="tel" jdbcType="VARCHAR" property="tel" />
|
||||||
|
<result column="sex" jdbcType="CHAR" property="sex" />
|
||||||
|
<result column="birthday" jdbcType="TIMESTAMP" property="birthday" />
|
||||||
|
<result column="pic_id" jdbcType="VARCHAR" property="picId" />
|
||||||
|
<result column="id_card" jdbcType="VARCHAR" property="idCard" />
|
||||||
|
<result column="hobby" jdbcType="VARCHAR" property="hobby" />
|
||||||
|
<result column="province" jdbcType="VARCHAR" property="province" />
|
||||||
|
<result column="city" jdbcType="VARCHAR" property="city" />
|
||||||
|
<result column="district" jdbcType="VARCHAR" property="district" />
|
||||||
|
<result column="street" jdbcType="VARCHAR" property="street" />
|
||||||
|
<result column="street_number" jdbcType="VARCHAR" property="streetNumber" />
|
||||||
|
<result column="description" jdbcType="VARCHAR" property="description" />
|
||||||
|
<result column="status" jdbcType="CHAR" property="status" />
|
||||||
|
<result column="created_by" jdbcType="VARCHAR" property="createdBy" />
|
||||||
|
<result column="created" jdbcType="TIMESTAMP" property="created" />
|
||||||
|
<result column="last_upd_by" jdbcType="VARCHAR" property="lastUpdBy" />
|
||||||
|
<result column="last_upd" jdbcType="TIMESTAMP" property="lastUpd" />
|
||||||
|
</resultMap>
|
||||||
|
|
||||||
|
<!--SysUserRolesDto 返回-->
|
||||||
|
<resultMap id="SysUserDtoRolesMap" type="com.songpeng.system.dto.SysUserDto" extends="BaseResultMap">
|
||||||
|
<collection property="roleList"
|
||||||
|
ofType="com.songpeng.system.domain.SysRole"
|
||||||
|
column="id"
|
||||||
|
select="com.songpeng.system.mapper.SysRoleMapper.getRolesByUserId"/>
|
||||||
|
</resultMap>
|
||||||
|
|
||||||
|
<!--分页查询用户-->
|
||||||
|
<select id="getPage" resultType="com.songpeng.system.dto.SysUserDto">
|
||||||
|
SELECT
|
||||||
|
t.*
|
||||||
|
FROM
|
||||||
|
sys_user t
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<!--查询用户列表(包含角色列表)-->
|
||||||
|
<select id="getSysUserDtosRoles" parameterType="java.lang.String" resultMap="SysUserDtoRolesMap">
|
||||||
|
SELECT
|
||||||
|
t.*
|
||||||
|
FROM
|
||||||
|
sys_user t
|
||||||
|
WHERE t.username = #{username}
|
||||||
|
</select>
|
||||||
|
</mapper>
|
|
@ -1,36 +0,0 @@
|
||||||
<?xml version="1.0" encoding="UTF-8" ?>
|
|
||||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
|
|
||||||
<mapper namespace="com.songpeng.system.mapper.SysUserMapper">
|
|
||||||
|
|
||||||
<resultMap id="BaseResultMap" type="com.songpeng.system.domain.SysUser">
|
|
||||||
<result column="ID" jdbcType="VARCHAR" property="id"/>
|
|
||||||
<result column="NAME" jdbcType="VARCHAR" property="name"/>
|
|
||||||
<result column="USERNAME" jdbcType="VARCHAR" property="username"/>
|
|
||||||
<result column="PASSWORD" jdbcType="VARCHAR" property="password"/>
|
|
||||||
</resultMap>
|
|
||||||
|
|
||||||
<!--SysUserRolesDto 返回-->
|
|
||||||
<resultMap id="SysUserDtoRolesMap" type="com.songpeng.system.dto.SysUserDto" extends="BaseResultMap">
|
|
||||||
<collection property="roleList"
|
|
||||||
ofType="com.songpeng.system.domain.SysRole"
|
|
||||||
column="id"
|
|
||||||
select="com.songpeng.system.mapper.SysUserMapper.selectRolesByUserId"/>
|
|
||||||
</resultMap>
|
|
||||||
|
|
||||||
<!--分页查询用户-->
|
|
||||||
<select id="getPage" resultType="com.songpeng.system.dto.SysUserDto">
|
|
||||||
SELECT
|
|
||||||
t.*
|
|
||||||
FROM
|
|
||||||
sys_user t
|
|
||||||
</select>
|
|
||||||
|
|
||||||
<!--查询用户列表(包含角色列表)-->
|
|
||||||
<select id="getSysUserDtosRoles" parameterType="java.lang.String" resultMap="SysUserDtoRolesMap">
|
|
||||||
SELECT
|
|
||||||
t.*
|
|
||||||
FROM
|
|
||||||
sys_user t
|
|
||||||
WHERE t.username = #{username}
|
|
||||||
</select>
|
|
||||||
</mapper>
|
|
|
@ -1,394 +0,0 @@
|
||||||
/*
|
|
||||||
* Clean Blog v1.0.0 (http://startbootstrap.com)
|
|
||||||
* Copyright 2014 Start Bootstrap
|
|
||||||
* Licensed under Apache 2.0 (https://github.com/IronSummitMedia/startbootstrap/blob/gh-pages/LICENSE)
|
|
||||||
*/
|
|
||||||
body {
|
|
||||||
font-family: 'Lora', 'Times New Roman', serif;
|
|
||||||
font-size: 20px;
|
|
||||||
color: #404040;
|
|
||||||
}
|
|
||||||
p {
|
|
||||||
line-height: 1.5;
|
|
||||||
margin: 30px 0;
|
|
||||||
}
|
|
||||||
p a {
|
|
||||||
text-decoration: underline;
|
|
||||||
}
|
|
||||||
h1,
|
|
||||||
h2,
|
|
||||||
h3,
|
|
||||||
h4,
|
|
||||||
h5,
|
|
||||||
h6 {
|
|
||||||
font-family: 'Open Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif;
|
|
||||||
font-weight: 800;
|
|
||||||
}
|
|
||||||
a {
|
|
||||||
color: #404040;
|
|
||||||
}
|
|
||||||
a:hover,
|
|
||||||
a:focus {
|
|
||||||
color: #0085a1;
|
|
||||||
}
|
|
||||||
a img:hover,
|
|
||||||
a img:focus {
|
|
||||||
cursor: zoom-in;
|
|
||||||
}
|
|
||||||
blockquote {
|
|
||||||
color: #808080;
|
|
||||||
font-style: italic;
|
|
||||||
}
|
|
||||||
hr.small {
|
|
||||||
max-width: 100px;
|
|
||||||
margin: 15px auto;
|
|
||||||
border-width: 4px;
|
|
||||||
border-color: white;
|
|
||||||
}
|
|
||||||
.navbar-custom {
|
|
||||||
position: absolute;
|
|
||||||
top: 0;
|
|
||||||
left: 0;
|
|
||||||
width: 100%;
|
|
||||||
z-index: 3;
|
|
||||||
font-family: 'Open Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif;
|
|
||||||
}
|
|
||||||
.navbar-custom .navbar-brand {
|
|
||||||
font-weight: 800;
|
|
||||||
}
|
|
||||||
.navbar-custom .nav li a {
|
|
||||||
text-transform: uppercase;
|
|
||||||
font-size: 18px;
|
|
||||||
font-weight: 800;
|
|
||||||
letter-spacing: 1px;
|
|
||||||
}
|
|
||||||
@media only screen and (min-width: 768px) {
|
|
||||||
.navbar-custom {
|
|
||||||
background: transparent;
|
|
||||||
border-bottom: 1px solid transparent;
|
|
||||||
}
|
|
||||||
.navbar-custom .navbar-brand {
|
|
||||||
color: white;
|
|
||||||
padding: 20px;
|
|
||||||
}
|
|
||||||
.navbar-custom .navbar-brand:hover,
|
|
||||||
.navbar-custom .navbar-brand:focus {
|
|
||||||
color: rgba(255, 255, 255, 0.8);
|
|
||||||
}
|
|
||||||
.navbar-custom .nav li a {
|
|
||||||
color: white;
|
|
||||||
padding: 20px;
|
|
||||||
}
|
|
||||||
.navbar-custom .nav li a:hover,
|
|
||||||
.navbar-custom .nav li a:focus {
|
|
||||||
color: rgba(255, 255, 255, 0.8);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@media only screen and (min-width: 1170px) {
|
|
||||||
.navbar-custom {
|
|
||||||
-webkit-transition: background-color 0.3s;
|
|
||||||
-moz-transition: background-color 0.3s;
|
|
||||||
transition: background-color 0.3s;
|
|
||||||
/* Force Hardware Acceleration in WebKit */
|
|
||||||
-webkit-transform: translate3d(0, 0, 0);
|
|
||||||
-moz-transform: translate3d(0, 0, 0);
|
|
||||||
-ms-transform: translate3d(0, 0, 0);
|
|
||||||
-o-transform: translate3d(0, 0, 0);
|
|
||||||
transform: translate3d(0, 0, 0);
|
|
||||||
-webkit-backface-visibility: hidden;
|
|
||||||
backface-visibility: hidden;
|
|
||||||
}
|
|
||||||
.navbar-custom.is-fixed {
|
|
||||||
/* when the user scrolls down, we hide the header right above the viewport */
|
|
||||||
position: fixed;
|
|
||||||
top: -61px;
|
|
||||||
background-color: rgba(255, 255, 255, 0.9);
|
|
||||||
border-bottom: 1px solid #f2f2f2;
|
|
||||||
-webkit-transition: -webkit-transform 0.3s;
|
|
||||||
-moz-transition: -moz-transform 0.3s;
|
|
||||||
transition: transform 0.3s;
|
|
||||||
}
|
|
||||||
.navbar-custom.is-fixed .navbar-brand {
|
|
||||||
color: #404040;
|
|
||||||
}
|
|
||||||
.navbar-custom.is-fixed .navbar-brand:hover,
|
|
||||||
.navbar-custom.is-fixed .navbar-brand:focus {
|
|
||||||
color: #0085a1;
|
|
||||||
}
|
|
||||||
.navbar-custom.is-fixed .nav li a {
|
|
||||||
color: #404040;
|
|
||||||
}
|
|
||||||
.navbar-custom.is-fixed .nav li a:hover,
|
|
||||||
.navbar-custom.is-fixed .nav li a:focus {
|
|
||||||
color: #0085a1;
|
|
||||||
}
|
|
||||||
.navbar-custom.is-visible {
|
|
||||||
/* if the user changes the scrolling direction, we show the header */
|
|
||||||
-webkit-transform: translate3d(0, 100%, 0);
|
|
||||||
-moz-transform: translate3d(0, 100%, 0);
|
|
||||||
-ms-transform: translate3d(0, 100%, 0);
|
|
||||||
-o-transform: translate3d(0, 100%, 0);
|
|
||||||
transform: translate3d(0, 100%, 0);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
.intro-header {
|
|
||||||
background-color: #808080;
|
|
||||||
background: no-repeat center center;
|
|
||||||
background-attachment: scroll;
|
|
||||||
-webkit-background-size: cover;
|
|
||||||
-moz-background-size: cover;
|
|
||||||
background-size: cover;
|
|
||||||
-o-background-size: cover;
|
|
||||||
margin-bottom: 50px;
|
|
||||||
}
|
|
||||||
.intro-header .site-heading,
|
|
||||||
.intro-header .post-heading,
|
|
||||||
.intro-header .page-heading {
|
|
||||||
padding: 100px 0 50px;
|
|
||||||
color: white;
|
|
||||||
}
|
|
||||||
@media only screen and (min-width: 768px) {
|
|
||||||
.intro-header .site-heading,
|
|
||||||
.intro-header .post-heading,
|
|
||||||
.intro-header .page-heading {
|
|
||||||
padding: 150px 0;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
.intro-header .site-heading,
|
|
||||||
.intro-header .page-heading {
|
|
||||||
text-align: center;
|
|
||||||
}
|
|
||||||
.intro-header .site-heading h1,
|
|
||||||
.intro-header .page-heading h1 {
|
|
||||||
margin-top: 0;
|
|
||||||
font-size: 50px;
|
|
||||||
}
|
|
||||||
.intro-header .site-heading .subheading,
|
|
||||||
.intro-header .page-heading .subheading {
|
|
||||||
font-size: 24px;
|
|
||||||
line-height: 1.1;
|
|
||||||
display: block;
|
|
||||||
font-family: 'Open Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif;
|
|
||||||
font-weight: 300;
|
|
||||||
margin: 10px 0 0;
|
|
||||||
}
|
|
||||||
@media only screen and (min-width: 768px) {
|
|
||||||
.intro-header .site-heading h1,
|
|
||||||
.intro-header .page-heading h1 {
|
|
||||||
font-size: 80px;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
.intro-header .post-heading h1 {
|
|
||||||
font-size: 35px;
|
|
||||||
}
|
|
||||||
.intro-header .post-heading .subheading,
|
|
||||||
.intro-header .post-heading .meta {
|
|
||||||
line-height: 1.1;
|
|
||||||
display: block;
|
|
||||||
}
|
|
||||||
.intro-header .post-heading .subheading {
|
|
||||||
font-family: 'Open Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif;
|
|
||||||
font-size: 24px;
|
|
||||||
margin: 10px 0 30px;
|
|
||||||
font-weight: 600;
|
|
||||||
}
|
|
||||||
.intro-header .post-heading .meta {
|
|
||||||
font-family: 'Lora', 'Times New Roman', serif;
|
|
||||||
font-style: italic;
|
|
||||||
font-weight: 300;
|
|
||||||
font-size: 20px;
|
|
||||||
}
|
|
||||||
.intro-header .post-heading .meta a {
|
|
||||||
color: white;
|
|
||||||
}
|
|
||||||
@media only screen and (min-width: 768px) {
|
|
||||||
.intro-header .post-heading h1 {
|
|
||||||
font-size: 55px;
|
|
||||||
}
|
|
||||||
.intro-header .post-heading .subheading {
|
|
||||||
font-size: 30px;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
.post-preview > a {
|
|
||||||
color: #404040;
|
|
||||||
}
|
|
||||||
.post-preview > a:hover,
|
|
||||||
.post-preview > a:focus {
|
|
||||||
text-decoration: none;
|
|
||||||
color: #0085a1;
|
|
||||||
}
|
|
||||||
.post-preview > a > .post-title {
|
|
||||||
font-size: 30px;
|
|
||||||
margin-top: 30px;
|
|
||||||
margin-bottom: 10px;
|
|
||||||
}
|
|
||||||
.post-preview > a > .post-subtitle {
|
|
||||||
margin: 0;
|
|
||||||
font-weight: 300;
|
|
||||||
margin-bottom: 10px;
|
|
||||||
}
|
|
||||||
.post-preview > .post-meta {
|
|
||||||
color: #808080;
|
|
||||||
font-size: 18px;
|
|
||||||
font-style: italic;
|
|
||||||
margin-top: 0;
|
|
||||||
}
|
|
||||||
.post-preview > .post-meta > a {
|
|
||||||
text-decoration: none;
|
|
||||||
color: #404040;
|
|
||||||
}
|
|
||||||
.post-preview > .post-meta > a:hover,
|
|
||||||
.post-preview > .post-meta > a:focus {
|
|
||||||
color: #0085a1;
|
|
||||||
text-decoration: underline;
|
|
||||||
}
|
|
||||||
@media only screen and (min-width: 768px) {
|
|
||||||
.post-preview > a > .post-title {
|
|
||||||
font-size: 36px;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
.section-heading {
|
|
||||||
font-size: 36px;
|
|
||||||
margin-top: 60px;
|
|
||||||
font-weight: 700;
|
|
||||||
}
|
|
||||||
.caption {
|
|
||||||
text-align: center;
|
|
||||||
font-size: 14px;
|
|
||||||
padding: 10px;
|
|
||||||
font-style: italic;
|
|
||||||
margin: 0;
|
|
||||||
display: block;
|
|
||||||
border-bottom-right-radius: 5px;
|
|
||||||
border-bottom-left-radius: 5px;
|
|
||||||
}
|
|
||||||
footer {
|
|
||||||
padding: 50px 0 65px;
|
|
||||||
}
|
|
||||||
footer .list-inline {
|
|
||||||
margin: 0;
|
|
||||||
padding: 0;
|
|
||||||
}
|
|
||||||
footer .copyright {
|
|
||||||
font-size: 14px;
|
|
||||||
text-align: center;
|
|
||||||
margin-bottom: 0;
|
|
||||||
}
|
|
||||||
.floating-label-form-group {
|
|
||||||
font-size: 14px;
|
|
||||||
position: relative;
|
|
||||||
margin-bottom: 0;
|
|
||||||
padding-bottom: 0.5em;
|
|
||||||
border-bottom: 1px solid #eeeeee;
|
|
||||||
}
|
|
||||||
.floating-label-form-group input,
|
|
||||||
.floating-label-form-group textarea {
|
|
||||||
z-index: 1;
|
|
||||||
position: relative;
|
|
||||||
padding-right: 0;
|
|
||||||
padding-left: 0;
|
|
||||||
border: none;
|
|
||||||
border-radius: 0;
|
|
||||||
font-size: 1.5em;
|
|
||||||
background: none;
|
|
||||||
box-shadow: none !important;
|
|
||||||
resize: none;
|
|
||||||
}
|
|
||||||
.floating-label-form-group label {
|
|
||||||
display: block;
|
|
||||||
z-index: 0;
|
|
||||||
position: relative;
|
|
||||||
top: 2em;
|
|
||||||
margin: 0;
|
|
||||||
font-size: 0.85em;
|
|
||||||
line-height: 1.764705882em;
|
|
||||||
vertical-align: middle;
|
|
||||||
vertical-align: baseline;
|
|
||||||
opacity: 0;
|
|
||||||
-webkit-transition: top 0.3s ease,opacity 0.3s ease;
|
|
||||||
-moz-transition: top 0.3s ease,opacity 0.3s ease;
|
|
||||||
-ms-transition: top 0.3s ease,opacity 0.3s ease;
|
|
||||||
transition: top 0.3s ease,opacity 0.3s ease;
|
|
||||||
}
|
|
||||||
.floating-label-form-group::not(:first-child) {
|
|
||||||
padding-left: 14px;
|
|
||||||
border-left: 1px solid #eeeeee;
|
|
||||||
}
|
|
||||||
.floating-label-form-group-with-value label {
|
|
||||||
top: 0;
|
|
||||||
opacity: 1;
|
|
||||||
}
|
|
||||||
.floating-label-form-group-with-focus label {
|
|
||||||
color: #0085a1;
|
|
||||||
}
|
|
||||||
form .row:first-child .floating-label-form-group {
|
|
||||||
border-top: 1px solid #eeeeee;
|
|
||||||
}
|
|
||||||
.btn {
|
|
||||||
font-family: 'Open Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif;
|
|
||||||
text-transform: uppercase;
|
|
||||||
font-size: 14px;
|
|
||||||
font-weight: 800;
|
|
||||||
letter-spacing: 1px;
|
|
||||||
border-radius: 0;
|
|
||||||
padding: 15px 25px;
|
|
||||||
}
|
|
||||||
.btn-lg {
|
|
||||||
font-size: 16px;
|
|
||||||
padding: 25px 35px;
|
|
||||||
}
|
|
||||||
.btn-default:hover,
|
|
||||||
.btn-default:focus {
|
|
||||||
background-color: #0085a1;
|
|
||||||
border: 1px solid #0085a1;
|
|
||||||
color: white;
|
|
||||||
}
|
|
||||||
.pager {
|
|
||||||
margin: 20px 0 0;
|
|
||||||
}
|
|
||||||
.pager li > a,
|
|
||||||
.pager li > span {
|
|
||||||
font-family: 'Open Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif;
|
|
||||||
text-transform: uppercase;
|
|
||||||
font-size: 14px;
|
|
||||||
font-weight: 800;
|
|
||||||
letter-spacing: 1px;
|
|
||||||
padding: 15px 25px;
|
|
||||||
background-color: white;
|
|
||||||
border-radius: 0;
|
|
||||||
}
|
|
||||||
.pager li > a:hover,
|
|
||||||
.pager li > a:focus {
|
|
||||||
color: white;
|
|
||||||
background-color: #0085a1;
|
|
||||||
border: 1px solid #0085a1;
|
|
||||||
}
|
|
||||||
.pager .disabled > a,
|
|
||||||
.pager .disabled > a:hover,
|
|
||||||
.pager .disabled > a:focus,
|
|
||||||
.pager .disabled > span {
|
|
||||||
color: #808080;
|
|
||||||
background-color: #404040;
|
|
||||||
cursor: not-allowed;
|
|
||||||
}
|
|
||||||
::-moz-selection {
|
|
||||||
color: white;
|
|
||||||
text-shadow: none;
|
|
||||||
background: #0085a1;
|
|
||||||
}
|
|
||||||
::selection {
|
|
||||||
color: white;
|
|
||||||
text-shadow: none;
|
|
||||||
background: #0085a1;
|
|
||||||
}
|
|
||||||
img::selection {
|
|
||||||
color: white;
|
|
||||||
background: transparent;
|
|
||||||
}
|
|
||||||
img::-moz-selection {
|
|
||||||
color: white;
|
|
||||||
background: transparent;
|
|
||||||
}
|
|
||||||
body {
|
|
||||||
webkit-tap-highlight-color: #0085a1;
|
|
||||||
}
|
|
|
@ -0,0 +1,236 @@
|
||||||
|
body{background: #fff;}
|
||||||
|
|
||||||
|
/** 首页 */
|
||||||
|
|
||||||
|
/*导航部分*/
|
||||||
|
.nav{width: 100%; height: 80px; box-shadow: 0 3px 3px 0 #CCC; background: #FFF; position: fixed; left: 0; top: 0; z-index: 999; overflow: hidden; transition: 0.3s}
|
||||||
|
.nav.index{background: rgba(255, 255, 255 ,0.8); box-shadow: 0 0 0 0 rgba(0,0,0,0.05);}
|
||||||
|
.nav.scroll{ background: #FFF; box-shadow: 0 3px 3px 0 rgba(0,0,0,0.05); transition: 0.3s}
|
||||||
|
.nav .layui-container{position: relative; transition: all 400ms ease-out;}
|
||||||
|
.nav .nav-logo{height: 100%; position: absolute; top: 0; left: 15px; line-height: 80px;}
|
||||||
|
.nav .nav-list{display: inline-block; height: 80px;}
|
||||||
|
.nav .nav-list button{width: 25px; height: 30px; position: absolute; top: 30px; right: 15px; background-color: transparent; border: none; outline: none; cursor: pointer;}
|
||||||
|
.nav .nav-list button span{display: block; width: 25px; height: 2px; background: #2db5a3; margin-bottom: 6px; transition: 0.5s;}
|
||||||
|
.nav .nav-list button span.spa1{transform: rotate(45deg);}
|
||||||
|
.nav .nav-list button span.spa3{transform: rotate(-45deg) translate(5px,-5px);}
|
||||||
|
.nav .layui-nav{width: 100%; position: absolute; top: 80px; right: 0; color: #000; background: transparent;}
|
||||||
|
.nav .layui-nav .layui-nav-item{display: block; line-height: 60px;}
|
||||||
|
.nav .layui-nav *{font-size: 18px;}
|
||||||
|
.nav .layui-nav .layui-nav-item a{padding: 0 0; color: #000;}
|
||||||
|
.nav .layui-nav-bar,
|
||||||
|
.nav .layui-nav .layui-this:after{height: 2px; background-color: #2db5a3;}
|
||||||
|
.nav .layui-nav .layui-this a
|
||||||
|
,.nav .layui-nav .layui-nav-item a:hover{color: #2db5a3;}
|
||||||
|
|
||||||
|
/*轮播*/
|
||||||
|
#banner img{min-width: 100%; height: 898px;}
|
||||||
|
#banner .panel{width: 400px; position: absolute; top: 25%; left: 50%; margin-left: -200px; text-align: center;}
|
||||||
|
#banner .panel p{color: #8c8c8c; font-size: 44px; line-height: 80px; letter-spacing: 15px;}
|
||||||
|
#banner .panel p.title{color: #4a4a4a; font-size: 54px; letter-spacing: 10px;}
|
||||||
|
|
||||||
|
/*主体—产品*/
|
||||||
|
.main-product{padding-top: 90px; padding-bottom: 130px;}
|
||||||
|
.main-product p{font-size: 16px; color: #ababab; line-height: 28px;}
|
||||||
|
.main-product p.title
|
||||||
|
,.main-service p.title{color: #484848; font-size: 24px; text-align: center; line-height: 160px;}
|
||||||
|
.main-product p.title span
|
||||||
|
,.main-service p.title span{color: #2db5a3;}
|
||||||
|
.main-product .content{border: 1px solid #DEDEDE; padding: 30px 36px 0 36px; text-align: center; transition: 0.3s;}
|
||||||
|
.main-product .content p.label{font-size: 18px; color: #939393; line-height: 46px; padding-top: 6px;}
|
||||||
|
.main-product .content a{font-size: 18px; color: #a1d8cb; line-height: 68px;}
|
||||||
|
.main-product .content:hover{box-shadow: 0 0 3px 3px #EEE; transition: 0.3s;}
|
||||||
|
.main-product .content img{transition: 2s;}
|
||||||
|
.main-product .content img:hover{transform: rotateY(180deg);}
|
||||||
|
|
||||||
|
/*主体-服务*/
|
||||||
|
.main-service{background: #f8f8f8;}
|
||||||
|
.main-service .content{position: relative;}
|
||||||
|
.main-service .content .content-left{width: 50%;}
|
||||||
|
.main-service .content .content-left img{width: 100%;}
|
||||||
|
.main-service .content .content-right{box-sizing: border-box; background: #FFF; padding: 58px 40px 0 48px; width: 50%; height: 100%; position: absolute; top: 0; right: 0; transition: 0.3s; overflow: hidden;}
|
||||||
|
.main-service .content .content-right p{color: #adadad; line-height: 32px; overflow: hidden; text-overflow: ellipsis;}
|
||||||
|
.main-service .content .content-right p.label{font-size: 16px; color: #4a4a4a;}
|
||||||
|
.main-service .content .content-right span{display: block; width: 50px; height: 2px; background: #2cb6a1; margin-bottom: 23px;}
|
||||||
|
.main-service .content .content-right:hover{box-shadow: 2px 2px 2px #EEE; transition: 0.3s;}
|
||||||
|
.main-service .service-more{padding-top: 80px; padding-bottom: 80px; text-align: center;}
|
||||||
|
.main-service .service-more a{padding: 10px 62px; font-size: 23px; line-height: 46px;color: #FFF; background: #7fd3c6; border-radius: 3px;}
|
||||||
|
|
||||||
|
/*底部*/
|
||||||
|
.footer{padding-bottom: 70px; background: #5e6664;}
|
||||||
|
.footer .footer-web{padding-top: 50px; padding-bottom: 63px;}
|
||||||
|
.footer .footer-web a{color: #a5aaa9; line-height: 22px; margin-right: 20px; transition: 0.3s;}
|
||||||
|
.footer .footer-web a:hover{color: #dce1e0; transition: 0.3s;}
|
||||||
|
.footer .footer-contact{color: #fff;}
|
||||||
|
.footer .footer-contact a{color: #a5aaa9;}
|
||||||
|
.footer .footer-contact .contact-top{padding-top: 20px; line-height: 30px;}
|
||||||
|
.footer .footer-contact .contact-bottom{line-height: 35px;}
|
||||||
|
|
||||||
|
|
||||||
|
/** 产品 */
|
||||||
|
.banner{height: 320px; margin-top: 80px;}
|
||||||
|
.banner.product{background: url(../img/nav_img1.jpg) no-repeat center top; background-size: cover;}
|
||||||
|
.main.product{padding: 30px 0 75px 0;}
|
||||||
|
.main.product .content{padding: 50px 0; border-bottom: 1px solid #e8e8e8;}
|
||||||
|
.main.product .content .content-img{text-align: center;}
|
||||||
|
.main.product .content .content-img img{max-width: 100%;}
|
||||||
|
.main.product .content .label{color: #565656; font-size: 30px; line-height: 78px; margin-top: 32px;}
|
||||||
|
.main.product .content .detail{font-size: 16px; line-height: 28px; color: #d7d7d7; padding-bottom: 30px;}
|
||||||
|
.main.product .content a{color: #a0d2cc; font-size: 16px; line-height: 38px; padding:10px 11px 10px 23px; border: 1px solid #a0d2cc; border-radius: 3px;}
|
||||||
|
|
||||||
|
|
||||||
|
/** 动态 */
|
||||||
|
.banner.news{background: url(../img/nav_img3.jpg) no-repeat center top; background-size: cover;}
|
||||||
|
.banner .title{padding-top: 170px;}
|
||||||
|
.banner .title.active{padding-top: 120px; transition: 1.5s;}
|
||||||
|
.banner .title p{color: #606060; font-size: 36px; text-align: center; line-height: 50px; letter-spacing: 5px;}
|
||||||
|
.banner .title p.en{font-size: 20px; letter-spacing: 3px;}
|
||||||
|
.main-news{padding: 70px 0 80px 0;}
|
||||||
|
.main-news .content > div{padding-bottom: 40px; border-bottom: 1px dashed #eaeaea; position: relative;}
|
||||||
|
.main-news .content .news-img{display: inline-block; width: 30%; vertical-align: top;}
|
||||||
|
.main-news .content .news-img img{max-width: 90%;}
|
||||||
|
.main-news .content .news-panel{display: inline-block; width: 70%; vertical-align: top; padding-left: 5px; box-sizing: border-box;}
|
||||||
|
.main-news .content .news-panel strong a{display: block; color: #555; font-size: 18px; line-height: 26px; overflow: hidden; text-overflow:ellipsis; white-space: nowrap;}
|
||||||
|
.main-news .content .news-panel p.detail{color: #777; line-height: 24px;}
|
||||||
|
.main-news .content .news-panel p.read-push{color: #AAA; padding-top: 5px;}
|
||||||
|
.main-news #newsPage .layui-laypage{display: block; text-align: center; margin-top: 70px;}
|
||||||
|
.main-news #newsPage .layui-laypage a,.main-news #newsPage .layui-laypage span{font-size: 18px; line-height: 40px; height: 40px; margin-right: 20px; border-radius: 3px; color: #e3e3e3;}
|
||||||
|
/*动态详情页*/
|
||||||
|
.main-newsdate{margin-top: 80px; text-align: center;}
|
||||||
|
.main-newsdate .news{text-align: left; line-height: 104px;}
|
||||||
|
.main-newsdate h1{padding-top: 6px;}
|
||||||
|
.main-newsdate .pushtime{color: #686868; font-size: 18px; line-height: 82px;}
|
||||||
|
.main-newsdate .introTop{padding-bottom: 28px; font-size: 18px; line-height: 20px; text-align: left;}
|
||||||
|
.main-newsdate .introBott{font-size: 18px; line-height: 42px; text-align: justify; padding: 40px 0 102px 0;}
|
||||||
|
.main-newsdate img{max-width: 100%;}
|
||||||
|
|
||||||
|
|
||||||
|
/** 案例 */
|
||||||
|
.banner.case{background: url(../img/nav_img2.jpg) no-repeat center top; background-size: cover;}
|
||||||
|
.main-case{padding: 30px 0 75px;}
|
||||||
|
.main-case .content{width: 48%; text-align: center; padding-top: 120px; padding-bottom: 20px; border-bottom: 2px solid #c9c9c9;}
|
||||||
|
.main-case .content.even{margin-left: 2%;}
|
||||||
|
.main-case .content .case-img{border: 1px solid #e2e2e2; overflow: hidden;}
|
||||||
|
.main-case .content .case-img img{width: 100%; transition: 2s;}
|
||||||
|
.main-case .content .case-img img:hover{transform: scale(1.2,1.2); transition: 2s;}
|
||||||
|
.main-case .content p.lable{padding-top: 13px; font-size: 30px; line-height: 76px;}
|
||||||
|
.main-case .content p{font-size: 18px; line-height: 32px; color: #505050;}
|
||||||
|
.main-case #casePage .layui-laypage{display: block; text-align: center; margin-top: 100px;}
|
||||||
|
.main-case #casePage .layui-laypage a,.main-case #casePage .layui-laypage span{font-size: 18px; line-height: 40px; height: 40px; margin-right: 20px; border-radius: 3px; color: #e3e3e3;}
|
||||||
|
|
||||||
|
|
||||||
|
/** 关于 */
|
||||||
|
.banner.about{background: url(../img/nav_img4.jpg) no-repeat center top; background-size: cover;}
|
||||||
|
.main-about{padding-bottom: 130px;}
|
||||||
|
.main-about ul.aboutab{padding: 100px 0; text-align: center;}
|
||||||
|
.main-about ul.aboutab li{display: inline-block; padding: 0 22px; margin-left: 15px; font-size: 20px; line-height: 46px; color: #b5b5b5; border: 1px solid #e2e2e2; border-radius: 3px; cursor: pointer;}
|
||||||
|
.main-about ul.aboutab li:first-child{margin-left: 0;}
|
||||||
|
.main-about ul.aboutab li.layui-this
|
||||||
|
,.main-about ul.aboutab li:hover{color: #2ab5a3; border-color: #afddd7; transition: 0.3s;}
|
||||||
|
.main-about .tabJob, .main-about .tabCour{display: none;}
|
||||||
|
/*公司简介*/
|
||||||
|
.main-about .tabIntro{padding-bottom: 15px;}
|
||||||
|
.main-about .tabIntro .content{vertical-align: middle;}
|
||||||
|
.main-about .tabIntro .content .img{width: 50%;}
|
||||||
|
.main-about .tabIntro .content .img img{width: 100%;}
|
||||||
|
.main-about .tabIntro .content .panel{width: 50%;}
|
||||||
|
.main-about .tabIntro .content p{padding: 0 20px; line-height: 24px; text-align: justify;}
|
||||||
|
.main-about .tabIntro .p_hidden{padding: 0 20px; display: none;}
|
||||||
|
/*招贤纳士*/
|
||||||
|
.main-about .tabJob .content{padding: 0 0 40px 20px; border: 1px solid #e2e2e2; border-top: 4px solid #65d0c5; margin-top: 90px;}
|
||||||
|
.main-about .tabJob .content:first-child{margin-top: 10px;}
|
||||||
|
.main-about .tabJob .content p{font-size: 18px; line-height: 40px;}
|
||||||
|
.main-about .tabJob .content p.title{font-size: 24px; color: #545454; line-height: 60px;}
|
||||||
|
.main-about .tabJob .content ol{padding-left: 20px; list-style-type: none; counter-reset: sectioncounter;}
|
||||||
|
.main-about .tabJob .content ol li{color: #8d8d8d; font-size: 16px; line-height: 30px;}
|
||||||
|
.main-about .tabJob .content ol li:before {content: counter(sectioncounter) "、"; counter-increment: sectioncounter;}
|
||||||
|
/*发展历程*/
|
||||||
|
.main-about .tabCour p.title{font-size: 28px; line-height: 28px; text-align: center;}
|
||||||
|
.main-about .tabCour .timeline{position: relative; margin-top: 75px;}
|
||||||
|
.main-about .tabCour .timeline:before{position: absolute; top: 0; bottom: 0; content: ""; width: 2px; background-color: #e2e2e2; left: 50px;}
|
||||||
|
.main-about .tabCour .timeline li{position: relative; padding-top: 70px;}
|
||||||
|
.main-about .tabCour .timeline li:first-child{padding-top: 0;}
|
||||||
|
.main-about .tabCour .timeline li .cour-img{position: absolute; left: 0; width: 100px; border-radius: 50%;}
|
||||||
|
.main-about .tabCour .timeline li .cour-img img{width: 100%;}
|
||||||
|
.main-about .tabCour .timeline li .cour-panel{padding-top: 20px; padding-left: 120px; text-align: left;}
|
||||||
|
.main-about .tabCour .timeline li .cour-panel p.label{font-size: 18px; color: #000;}
|
||||||
|
.main-about .tabCour .timeline li .cour-panel p{color: #949494; line-height: 30px;}
|
||||||
|
|
||||||
|
|
||||||
|
@media screen and (max-width: 480px){
|
||||||
|
.main-service .content .content-right{padding: 10px 10px 0 10px;}
|
||||||
|
.main-service .content .content-right p{line-height: 24px;}
|
||||||
|
.main-news .content .news-panel p.read-push{font-size: 12px;}
|
||||||
|
.main-case .content{padding-top: 60px;}
|
||||||
|
.main-case .content p.lable{padding-top: 10px; font-size: 18px; line-height: 48px;}
|
||||||
|
.main-case .content p{font-size: 12px; line-height: 20px; color: #505050;}
|
||||||
|
.main-about ul.aboutab{padding: 70px 0;}
|
||||||
|
.main-about ul.aboutab li{padding: 0 15px; font-size: 16px; box-sizing: border-box;}
|
||||||
|
.main-about .tabIntro .content .img{width: 100%;}
|
||||||
|
.main-about .tabIntro .content .panel{width: 100%;}
|
||||||
|
.main-about .tabIntro .content .panel.p_block{display: none;}
|
||||||
|
.main-about .tabIntro .p_hidden{display: block;}
|
||||||
|
.main-news #newsPage .layui-laypage a,.main-news #newsPage .layui-laypage span
|
||||||
|
,.main-case #casePage .layui-laypage a,.main-case #casePage .layui-laypage span{padding: 0 12px; font-size: 14px; line-height: 30px; height: 30px; margin-right: 4px;}
|
||||||
|
}
|
||||||
|
/*小屏幕*/
|
||||||
|
@media screen and (min-width: 768px){
|
||||||
|
.nav{max-height: 80px;}
|
||||||
|
.nav.index{background: rgba(255, 255, 255 ,0.3);}
|
||||||
|
.nav .nav-list button{display: none;}
|
||||||
|
.nav .layui-nav{width: auto; position: absolute; top: 0; padding: 0 5px; border-radius: 0; margin: 0;}
|
||||||
|
.nav .layui-nav .layui-nav-item{display: inline-block; margin:0 53px; line-height: 80px;}
|
||||||
|
.main-product p.title
|
||||||
|
,.main-service p.title{font-size: 36px; line-height: 216px;}
|
||||||
|
.main.product .content .content-img{text-align: left;}
|
||||||
|
.main-news .content .news-panel strong a{font-size: 20px; line-height: 30px;}
|
||||||
|
.main-news .content .news-panel p.read-push{padding-top: 0; position: absolute; bottom: 40px;}
|
||||||
|
.main-newsdate .pushtime{line-height: 142px;}
|
||||||
|
.main-case .content{width: 45%;}
|
||||||
|
.main-case .content.even{margin-left: 9%;}
|
||||||
|
.main-about ul.aboutab li{padding: 0 32px; font-size: 24px; margin-left: 30px; line-height: 50px;}
|
||||||
|
.main-about .tabIntro .content p{padding: 0 30px; font-size: 18px; line-height: 30px;}
|
||||||
|
.main-about .tabJob .content p{font-size: 24px; line-height: 50px;}
|
||||||
|
.main-about .tabJob .content p.title{font-size: 30px; line-height: 90px;}
|
||||||
|
.main-about .tabJob .content ol li{font-size: 20px; line-height: 60px;}
|
||||||
|
.main-about .tabCour .timeline:before{left: 50%;}
|
||||||
|
.main-about .tabCour .timeline li{min-height: 195px; padding-top: 95px;}
|
||||||
|
.main-about .tabCour .timeline li .cour-img{left: 50%; margin-left: -97.5px; width: 195px;}
|
||||||
|
.main-about .tabCour .timeline li .cour-panel{padding-top: 55px; padding-left: 0;}
|
||||||
|
.main-about .tabCour .timeline li.odd .cour-panel{text-align: right;}
|
||||||
|
}
|
||||||
|
@media screen and (min-width: 768px) and (max-width: 992px){
|
||||||
|
.main.product .content div.right{padding-left: 20px;}
|
||||||
|
.nav .layui-nav .layui-nav-item{margin:0 33px;}
|
||||||
|
.main-service .content .content-right{padding: 10px 10px 0 15px;}
|
||||||
|
.main-service .content .content-right span{margin-bottom: 20px;}
|
||||||
|
.main-service .content .content-right p{line-height: 28px;}
|
||||||
|
.main.product .content .label{line-height: 40px; margin-top: 0;}
|
||||||
|
.main.product .content .detail{padding-bottom: 10px;}
|
||||||
|
}
|
||||||
|
/*大屏幕*/
|
||||||
|
@media screen and (min-width: 992px){
|
||||||
|
.main.product .content{padding: 100px 0;}
|
||||||
|
.main.product .content div.right{padding-left: 0;}
|
||||||
|
.main-news .content .news-img{width: 20%;}
|
||||||
|
.main-news .content .news-panel{width: 80%;}
|
||||||
|
.main-case .content{width: 31%;}
|
||||||
|
.main-case .content.even{margin-left: 0;}
|
||||||
|
.main-case .content.center{margin-right: 3%; margin-left: 3%;}
|
||||||
|
.main-about .tabIntro .content p{padding: 0 50px; font-size: 20px; line-height: 40px;}
|
||||||
|
}
|
||||||
|
/*超大屏幕*/
|
||||||
|
@media screen and (min-width: 1200px) {
|
||||||
|
.main-news .content .news-img{width: 35%;}
|
||||||
|
.main-news .content .news-panel{width: 65%;}
|
||||||
|
.main-news .content:nth-child(odd){padding-right: 20px;}
|
||||||
|
.main-news .content:nth-child(even){padding-left: 20px;}
|
||||||
|
.main-about .tabCour .timeline li .cour-panel{padding-left: 50px;}
|
||||||
|
.main-about .tabCour .timeline li.odd .cour-panel{padding-left: 0; padding-right: 50px;}
|
||||||
|
}
|
||||||
|
@media screen and (min-width: 1300px) {
|
||||||
|
.layui-container{width: 1200px; padding: 0;}
|
||||||
|
.main-about .tabJob .content:last-child{margin-bottom: 180px;}
|
||||||
|
.nav .nav-logo{position: absolute; top: 0; left: 0;}
|
||||||
|
.layui-col-space80{margin: -40px;}
|
||||||
|
.layui-col-space80>*{padding: 40px;}
|
||||||
|
}
|
|
@ -1,205 +0,0 @@
|
||||||
html{
|
|
||||||
height: 100%;
|
|
||||||
font-family: PingFangSC-Light,'helvetica neue','hiragino sans gb',arial,'microsoft yahei ui','microsoft yahei',simsun,sans-serif;
|
|
||||||
font-size: 14px;
|
|
||||||
}
|
|
||||||
body.signin {
|
|
||||||
background: #18c8f6;
|
|
||||||
height: auto;
|
|
||||||
background:url("../img/backg02.jpg") no-repeat center fixed;
|
|
||||||
-webkit-background-size: cover;
|
|
||||||
-moz-background-size: cover;
|
|
||||||
-o-background-size: cover;
|
|
||||||
background-size: cover;
|
|
||||||
color: rgba(255,255,255,.95);
|
|
||||||
}
|
|
||||||
.logopanel h1{
|
|
||||||
font-size: 40px;
|
|
||||||
}
|
|
||||||
.signin-info h3{
|
|
||||||
font-size: 24px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.signinpanel {
|
|
||||||
width: 912px;
|
|
||||||
margin: 7% auto 0 auto;
|
|
||||||
}
|
|
||||||
.btn-login{
|
|
||||||
border: 1px solid #00a3ff;
|
|
||||||
background-color: #00A3FF;
|
|
||||||
color: #fff;
|
|
||||||
border-radius: 2px;
|
|
||||||
}
|
|
||||||
.btn-login:hover{
|
|
||||||
color: #fff;
|
|
||||||
background-color: #0097ee;
|
|
||||||
border: 1px solid #0097ee;
|
|
||||||
}
|
|
||||||
.signinpanel .logopanel {
|
|
||||||
float: none;
|
|
||||||
width: auto;
|
|
||||||
padding: 0;
|
|
||||||
background: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
.signinpanel .signin-info ul {
|
|
||||||
list-style: none;
|
|
||||||
padding: 0;
|
|
||||||
margin: 20px 0;
|
|
||||||
font-size: 20px;
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
.signinpanel .form-control {
|
|
||||||
display: block;
|
|
||||||
margin-top: 15px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.signinpanel .uname {
|
|
||||||
background: #fff url(../img/user.png) no-repeat 95% center;color:#333;
|
|
||||||
}
|
|
||||||
|
|
||||||
.signinpanel .pword {
|
|
||||||
background: #fff url(../img/locked.png) no-repeat 95% center;color:#333;
|
|
||||||
}
|
|
||||||
|
|
||||||
.signinpanel .btn {
|
|
||||||
margin-top: 15px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.signinpanel form {
|
|
||||||
background: #fff;
|
|
||||||
border: 1px solid rgba(255,255,255,.3);
|
|
||||||
-moz-box-shadow: 0 3px 0 rgba(12, 12, 12, 0.03);
|
|
||||||
-webkit-box-shadow: 0 3px 0 rgba(12, 12, 12, 0.03);
|
|
||||||
box-shadow: 0 3px 0 rgba(12, 12, 12, 0.03);
|
|
||||||
-moz-border-radius: 3px;
|
|
||||||
-webkit-border-radius: 3px;
|
|
||||||
border-radius: 3px;
|
|
||||||
padding: 30px;
|
|
||||||
color:#666;
|
|
||||||
}
|
|
||||||
.signinpanel form >h3{
|
|
||||||
color: #333333;
|
|
||||||
font-size: 24px;
|
|
||||||
font-family: "microsoft yahei";
|
|
||||||
font-weight: 400;
|
|
||||||
}
|
|
||||||
.signup-footer{border-top: solid 1px rgba(255,255,255,.3);margin:20px 0;padding-top: 15px;}
|
|
||||||
.outside-login{
|
|
||||||
border-top: #dcdee3 1px solid;
|
|
||||||
padding: 7% 0 0;
|
|
||||||
text-align: center;
|
|
||||||
position: relative;
|
|
||||||
margin: 9% 0% 0;
|
|
||||||
border-radius: 0 0 1% 1%;
|
|
||||||
}
|
|
||||||
.outside-login-tit{
|
|
||||||
position: absolute;
|
|
||||||
top: -8px;
|
|
||||||
left: 50%;
|
|
||||||
margin: 0 0 0 -50px;
|
|
||||||
text-align: center;
|
|
||||||
width: 100px;
|
|
||||||
height: 14px;
|
|
||||||
line-height: 1;
|
|
||||||
color: #999;
|
|
||||||
}
|
|
||||||
.outside-login-tit span{
|
|
||||||
position: relative;
|
|
||||||
z-index: 2;
|
|
||||||
}
|
|
||||||
.outside-login-tit:before {
|
|
||||||
top: 0;
|
|
||||||
left: 0;
|
|
||||||
background-color: #fff;
|
|
||||||
}
|
|
||||||
.outside-login-tit:after {
|
|
||||||
top: 7px;
|
|
||||||
left: 0;
|
|
||||||
background-color: #fff;
|
|
||||||
}
|
|
||||||
.outside-login-tit:after, .outside-login-tit:before {
|
|
||||||
content: '';
|
|
||||||
display: block;
|
|
||||||
width: 100%;
|
|
||||||
height: 7px;
|
|
||||||
position: absolute;
|
|
||||||
z-index: 1;
|
|
||||||
}
|
|
||||||
.outside-login-con {
|
|
||||||
font-size: 0;
|
|
||||||
padding-top: 10px;
|
|
||||||
}
|
|
||||||
.outside-login-list {
|
|
||||||
width: 116%;
|
|
||||||
margin-left: -8%;
|
|
||||||
}
|
|
||||||
.outside-login-btn {
|
|
||||||
display: inline-block;
|
|
||||||
vertical-align: middle;
|
|
||||||
text-align: center;
|
|
||||||
width: 33.3333%;
|
|
||||||
}
|
|
||||||
.outside-login-list .actived {
|
|
||||||
display: inline-block;
|
|
||||||
}
|
|
||||||
.outside-login-btn em {
|
|
||||||
display: block;
|
|
||||||
width: 50px;
|
|
||||||
height: 50px;
|
|
||||||
line-height: 50px;
|
|
||||||
border-radius: 50%;
|
|
||||||
margin: 0 auto 5px;
|
|
||||||
white-space: normal;
|
|
||||||
font-size: 20px;
|
|
||||||
color: #fff;
|
|
||||||
}
|
|
||||||
.outside-login-btn:first-child, .outside-login-btn:last-child {
|
|
||||||
width: 30.3333%;
|
|
||||||
}
|
|
||||||
.outside-login-btn span {
|
|
||||||
font-size: 14px;
|
|
||||||
color: #333;
|
|
||||||
}
|
|
||||||
.oschina em{
|
|
||||||
background-color: #4ec34d;
|
|
||||||
}
|
|
||||||
.git em{
|
|
||||||
background-color: #211b1b;
|
|
||||||
}
|
|
||||||
.my em{
|
|
||||||
background-color: #ff4700
|
|
||||||
}
|
|
||||||
@media screen and (max-width: 768px) {
|
|
||||||
.signinpanel,
|
|
||||||
.signuppanel {
|
|
||||||
margin: 0 auto;
|
|
||||||
width: 413px!important;
|
|
||||||
padding: 20px;
|
|
||||||
}
|
|
||||||
.signinpanel form {
|
|
||||||
margin-top: 20px;
|
|
||||||
}
|
|
||||||
.signup-footer {
|
|
||||||
margin-bottom: 10px;
|
|
||||||
}
|
|
||||||
.signuppanel .form-control {
|
|
||||||
margin-bottom: 10px;
|
|
||||||
}
|
|
||||||
.signup-footer .pull-left,
|
|
||||||
.signup-footer .pull-right {
|
|
||||||
float: none !important;
|
|
||||||
text-align: center;
|
|
||||||
}
|
|
||||||
.signinpanel .signin-info ul {
|
|
||||||
display: none;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@media screen and (max-width: 320px) {
|
|
||||||
.signinpanel,
|
|
||||||
.signuppanel {
|
|
||||||
margin:0 20px;
|
|
||||||
width:auto;
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,222 +0,0 @@
|
||||||
.toast-title {
|
|
||||||
font-weight: 700
|
|
||||||
}
|
|
||||||
|
|
||||||
.toast-message {
|
|
||||||
-ms-word-wrap: break-word;
|
|
||||||
word-wrap: break-word
|
|
||||||
}
|
|
||||||
|
|
||||||
.toast-message a, .toast-message label {
|
|
||||||
color: #fff
|
|
||||||
}
|
|
||||||
|
|
||||||
.toast-message a:hover {
|
|
||||||
color: #ccc;
|
|
||||||
text-decoration: none
|
|
||||||
}
|
|
||||||
|
|
||||||
.toast-close-button {
|
|
||||||
position: relative;
|
|
||||||
right: -.3em;
|
|
||||||
top: -.3em;
|
|
||||||
float: right;
|
|
||||||
font-size: 20px;
|
|
||||||
font-weight: 700;
|
|
||||||
color: #fff;
|
|
||||||
-webkit-text-shadow: 0 1px 0 #fff;
|
|
||||||
text-shadow: 0 1px 0 #fff;
|
|
||||||
opacity: .8;
|
|
||||||
-ms-filter: alpha(Opacity=80);
|
|
||||||
filter: alpha(opacity=80)
|
|
||||||
}
|
|
||||||
|
|
||||||
.toast-close-button:focus, .toast-close-button:hover {
|
|
||||||
color: #000;
|
|
||||||
text-decoration: none;
|
|
||||||
cursor: pointer;
|
|
||||||
opacity: .4;
|
|
||||||
-ms-filter: alpha(Opacity=40);
|
|
||||||
filter: alpha(opacity=40)
|
|
||||||
}
|
|
||||||
|
|
||||||
button.toast-close-button {
|
|
||||||
padding: 0;
|
|
||||||
cursor: pointer;
|
|
||||||
background: 0 0;
|
|
||||||
border: 0;
|
|
||||||
-webkit-appearance: none
|
|
||||||
}
|
|
||||||
|
|
||||||
.toast-top-center {
|
|
||||||
top: 0;
|
|
||||||
right: 0;
|
|
||||||
width: 100%
|
|
||||||
}
|
|
||||||
|
|
||||||
.toast-bottom-center {
|
|
||||||
bottom: 0;
|
|
||||||
right: 0;
|
|
||||||
width: 100%
|
|
||||||
}
|
|
||||||
|
|
||||||
.toast-top-full-width {
|
|
||||||
top: 0;
|
|
||||||
right: 0;
|
|
||||||
width: 100%
|
|
||||||
}
|
|
||||||
|
|
||||||
.toast-bottom-full-width {
|
|
||||||
bottom: 0;
|
|
||||||
right: 0;
|
|
||||||
width: 100%
|
|
||||||
}
|
|
||||||
|
|
||||||
.toast-top-left {
|
|
||||||
top: 12px;
|
|
||||||
left: 12px
|
|
||||||
}
|
|
||||||
|
|
||||||
.toast-top-right {
|
|
||||||
top: 12px;
|
|
||||||
right: 12px
|
|
||||||
}
|
|
||||||
|
|
||||||
.toast-bottom-right {
|
|
||||||
right: 12px;
|
|
||||||
bottom: 12px
|
|
||||||
}
|
|
||||||
|
|
||||||
.toast-bottom-left {
|
|
||||||
bottom: 12px;
|
|
||||||
left: 12px
|
|
||||||
}
|
|
||||||
|
|
||||||
#toast-container {
|
|
||||||
position: fixed;
|
|
||||||
z-index: 999999
|
|
||||||
}
|
|
||||||
|
|
||||||
#toast-container * {
|
|
||||||
-moz-box-sizing: border-box;
|
|
||||||
-webkit-box-sizing: border-box;
|
|
||||||
box-sizing: border-box
|
|
||||||
}
|
|
||||||
|
|
||||||
#toast-container > div {
|
|
||||||
position: relative;
|
|
||||||
overflow: hidden;
|
|
||||||
margin: 0 0 6px;
|
|
||||||
padding: 15px 15px 15px 50px;
|
|
||||||
width: 300px;
|
|
||||||
-moz-border-radius: 3px;
|
|
||||||
-webkit-border-radius: 3px;
|
|
||||||
border-radius: 3px;
|
|
||||||
background-position: 15px center;
|
|
||||||
background-repeat: no-repeat;
|
|
||||||
-moz-box-shadow: 0 0 12px #999;
|
|
||||||
-webkit-box-shadow: 0 0 12px #999;
|
|
||||||
box-shadow: 0 0 12px #999;
|
|
||||||
color: #fff;
|
|
||||||
opacity: .8;
|
|
||||||
-ms-filter: alpha(Opacity=80);
|
|
||||||
filter: alpha(opacity=80)
|
|
||||||
}
|
|
||||||
|
|
||||||
#toast-container > :hover {
|
|
||||||
-moz-box-shadow: 0 0 12px #000;
|
|
||||||
-webkit-box-shadow: 0 0 12px #000;
|
|
||||||
box-shadow: 0 0 12px #000;
|
|
||||||
opacity: 1;
|
|
||||||
-ms-filter: alpha(Opacity=100);
|
|
||||||
filter: alpha(opacity=100);
|
|
||||||
cursor: pointer
|
|
||||||
}
|
|
||||||
|
|
||||||
#toast-container > .toast-info {
|
|
||||||
background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAGwSURBVEhLtZa9SgNBEMc9sUxxRcoUKSzSWIhXpFMhhYWFhaBg4yPYiWCXZxBLERsLRS3EQkEfwCKdjWJAwSKCgoKCcudv4O5YLrt7EzgXhiU3/4+b2ckmwVjJSpKkQ6wAi4gwhT+z3wRBcEz0yjSseUTrcRyfsHsXmD0AmbHOC9Ii8VImnuXBPglHpQ5wwSVM7sNnTG7Za4JwDdCjxyAiH3nyA2mtaTJufiDZ5dCaqlItILh1NHatfN5skvjx9Z38m69CgzuXmZgVrPIGE763Jx9qKsRozWYw6xOHdER+nn2KkO+Bb+UV5CBN6WC6QtBgbRVozrahAbmm6HtUsgtPC19tFdxXZYBOfkbmFJ1VaHA1VAHjd0pp70oTZzvR+EVrx2Ygfdsq6eu55BHYR8hlcki+n+kERUFG8BrA0BwjeAv2M8WLQBtcy+SD6fNsmnB3AlBLrgTtVW1c2QN4bVWLATaIS60J2Du5y1TiJgjSBvFVZgTmwCU+dAZFoPxGEEs8nyHC9Bwe2GvEJv2WXZb0vjdyFT4Cxk3e/kIqlOGoVLwwPevpYHT+00T+hWwXDf4AJAOUqWcDhbwAAAAASUVORK5CYII=) !important
|
|
||||||
}
|
|
||||||
|
|
||||||
#toast-container > .toast-error {
|
|
||||||
background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAHOSURBVEhLrZa/SgNBEMZzh0WKCClSCKaIYOED+AAKeQQLG8HWztLCImBrYadgIdY+gIKNYkBFSwu7CAoqCgkkoGBI/E28PdbLZmeDLgzZzcx83/zZ2SSXC1j9fr+I1Hq93g2yxH4iwM1vkoBWAdxCmpzTxfkN2RcyZNaHFIkSo10+8kgxkXIURV5HGxTmFuc75B2RfQkpxHG8aAgaAFa0tAHqYFfQ7Iwe2yhODk8+J4C7yAoRTWI3w/4klGRgR4lO7Rpn9+gvMyWp+uxFh8+H+ARlgN1nJuJuQAYvNkEnwGFck18Er4q3egEc/oO+mhLdKgRyhdNFiacC0rlOCbhNVz4H9FnAYgDBvU3QIioZlJFLJtsoHYRDfiZoUyIxqCtRpVlANq0EU4dApjrtgezPFad5S19Wgjkc0hNVnuF4HjVA6C7QrSIbylB+oZe3aHgBsqlNqKYH48jXyJKMuAbiyVJ8KzaB3eRc0pg9VwQ4niFryI68qiOi3AbjwdsfnAtk0bCjTLJKr6mrD9g8iq/S/B81hguOMlQTnVyG40wAcjnmgsCNESDrjme7wfftP4P7SP4N3CJZdvzoNyGq2c/HWOXJGsvVg+RA/k2MC/wN6I2YA2Pt8GkAAAAASUVORK5CYII=) !important
|
|
||||||
}
|
|
||||||
|
|
||||||
#toast-container > .toast-success {
|
|
||||||
background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAADsSURBVEhLY2AYBfQMgf///3P8+/evAIgvA/FsIF+BavYDDWMBGroaSMMBiE8VC7AZDrIFaMFnii3AZTjUgsUUWUDA8OdAH6iQbQEhw4HyGsPEcKBXBIC4ARhex4G4BsjmweU1soIFaGg/WtoFZRIZdEvIMhxkCCjXIVsATV6gFGACs4Rsw0EGgIIH3QJYJgHSARQZDrWAB+jawzgs+Q2UO49D7jnRSRGoEFRILcdmEMWGI0cm0JJ2QpYA1RDvcmzJEWhABhD/pqrL0S0CWuABKgnRki9lLseS7g2AlqwHWQSKH4oKLrILpRGhEQCw2LiRUIa4lwAAAABJRU5ErkJggg==) !important
|
|
||||||
}
|
|
||||||
|
|
||||||
#toast-container > .toast-warning {
|
|
||||||
background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAGYSURBVEhL5ZSvTsNQFMbXZGICMYGYmJhAQIJAICYQPAACiSDB8AiICQQJT4CqQEwgJvYASAQCiZiYmJhAIBATCARJy+9rTsldd8sKu1M0+dLb057v6/lbq/2rK0mS/TRNj9cWNAKPYIJII7gIxCcQ51cvqID+GIEX8ASG4B1bK5gIZFeQfoJdEXOfgX4QAQg7kH2A65yQ87lyxb27sggkAzAuFhbbg1K2kgCkB1bVwyIR9m2L7PRPIhDUIXgGtyKw575yz3lTNs6X4JXnjV+LKM/m3MydnTbtOKIjtz6VhCBq4vSm3ncdrD2lk0VgUXSVKjVDJXJzijW1RQdsU7F77He8u68koNZTz8Oz5yGa6J3H3lZ0xYgXBK2QymlWWA+RWnYhskLBv2vmE+hBMCtbA7KX5drWyRT/2JsqZ2IvfB9Y4bWDNMFbJRFmC9E74SoS0CqulwjkC0+5bpcV1CZ8NMej4pjy0U+doDQsGyo1hzVJttIjhQ7GnBtRFN1UarUlH8F3xict+HY07rEzoUGPlWcjRFRr4/gChZgc3ZL2d8oAAAAASUVORK5CYII=) !important
|
|
||||||
}
|
|
||||||
|
|
||||||
#toast-container.toast-bottom-center > div, #toast-container.toast-top-center > div {
|
|
||||||
width: 300px;
|
|
||||||
margin: auto
|
|
||||||
}
|
|
||||||
|
|
||||||
#toast-container.toast-bottom-full-width > div, #toast-container.toast-top-full-width > div {
|
|
||||||
width: 96%;
|
|
||||||
margin: auto
|
|
||||||
}
|
|
||||||
|
|
||||||
.toast {
|
|
||||||
background-color: #030303
|
|
||||||
}
|
|
||||||
|
|
||||||
.toast-success {
|
|
||||||
background-color: #51a351
|
|
||||||
}
|
|
||||||
|
|
||||||
.toast-error {
|
|
||||||
background-color: #bd362f
|
|
||||||
}
|
|
||||||
|
|
||||||
.toast-info {
|
|
||||||
background-color: #2f96b4
|
|
||||||
}
|
|
||||||
|
|
||||||
.toast-warning {
|
|
||||||
background-color: #f89406
|
|
||||||
}
|
|
||||||
|
|
||||||
.toast-progress {
|
|
||||||
position: absolute;
|
|
||||||
left: 0;
|
|
||||||
bottom: 0;
|
|
||||||
height: 4px;
|
|
||||||
background-color: #000;
|
|
||||||
opacity: .4;
|
|
||||||
-ms-filter: alpha(Opacity=40);
|
|
||||||
filter: alpha(opacity=40)
|
|
||||||
}
|
|
||||||
|
|
||||||
@media all and (max-width: 240px) {
|
|
||||||
#toast-container > div {
|
|
||||||
padding: 8px 8px 8px 50px;
|
|
||||||
width: 11em
|
|
||||||
}
|
|
||||||
|
|
||||||
#toast-container .toast-close-button {
|
|
||||||
right: -.2em;
|
|
||||||
top: -.2em
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@media all and (min-width: 241px) and (max-width: 480px) {
|
|
||||||
#toast-container > div {
|
|
||||||
padding: 8px 8px 8px 50px;
|
|
||||||
width: 18em
|
|
||||||
}
|
|
||||||
|
|
||||||
#toast-container .toast-close-button {
|
|
||||||
right: -.2em;
|
|
||||||
top: -.2em
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@media all and (min-width: 481px) and (max-width: 768px) {
|
|
||||||
#toast-container > div {
|
|
||||||
padding: 15px 15px 15px 50px;
|
|
||||||
width: 25em
|
|
||||||
}
|
|
||||||
}
|
|
After Width: | Height: | Size: 318 KiB |
After Width: | Height: | Size: 283 KiB |
Before Width: | Height: | Size: 169 KiB |
Before Width: | Height: | Size: 447 KiB |
Before Width: | Height: | Size: 131 KiB |
Before Width: | Height: | Size: 485 KiB |
After Width: | Height: | Size: 3.4 KiB |
|
@ -1,278 +0,0 @@
|
||||||
//自定义js
|
|
||||||
|
|
||||||
//公共配置
|
|
||||||
|
|
||||||
|
|
||||||
$(document).ready(function () {
|
|
||||||
|
|
||||||
// MetsiMenu
|
|
||||||
$('#side-menu').metisMenu();
|
|
||||||
|
|
||||||
// 打开右侧边栏
|
|
||||||
$('.right-sidebar-toggle').click(function () {
|
|
||||||
$('#right-sidebar').toggleClass('sidebar-open');
|
|
||||||
});
|
|
||||||
|
|
||||||
// 右侧边栏使用slimscroll
|
|
||||||
$('.sidebar-container').slimScroll({
|
|
||||||
height: '100%',
|
|
||||||
railOpacity: 0.4,
|
|
||||||
wheelStep: 10
|
|
||||||
});
|
|
||||||
|
|
||||||
// 打开聊天窗口
|
|
||||||
$('.open-small-chat').click(function () {
|
|
||||||
$(this).children().toggleClass('fa-comments').toggleClass('fa-remove');
|
|
||||||
$('.small-chat-box').toggleClass('active');
|
|
||||||
});
|
|
||||||
|
|
||||||
// 聊天窗口使用slimscroll
|
|
||||||
$('.small-chat-box .content').slimScroll({
|
|
||||||
height: '234px',
|
|
||||||
railOpacity: 0.4
|
|
||||||
});
|
|
||||||
|
|
||||||
// Small todo handler
|
|
||||||
$('.check-link').click(function () {
|
|
||||||
var button = $(this).find('i');
|
|
||||||
var label = $(this).next('span');
|
|
||||||
button.toggleClass('fa-check-square').toggleClass('fa-square-o');
|
|
||||||
label.toggleClass('todo-completed');
|
|
||||||
return false;
|
|
||||||
});
|
|
||||||
|
|
||||||
//固定菜单栏
|
|
||||||
$(function () {
|
|
||||||
$('.sidebar-collapse').slimScroll({
|
|
||||||
height: '100%',
|
|
||||||
railOpacity: 0.9,
|
|
||||||
alwaysVisible: false
|
|
||||||
});
|
|
||||||
});
|
|
||||||
|
|
||||||
|
|
||||||
// 菜单切换
|
|
||||||
$('.navbar-minimalize').click(function () {
|
|
||||||
$("body").toggleClass("mini-navbar");
|
|
||||||
SmoothlyMenu();
|
|
||||||
});
|
|
||||||
|
|
||||||
|
|
||||||
// 侧边栏高度
|
|
||||||
function fix_height() {
|
|
||||||
var heightWithoutNavbar = $("body > #wrapper").height() - 61;
|
|
||||||
$(".sidebard-panel").css("min-height", heightWithoutNavbar + "px");
|
|
||||||
}
|
|
||||||
fix_height();
|
|
||||||
|
|
||||||
$(window).bind("load resize click scroll", function () {
|
|
||||||
if (!$("body").hasClass('body-small')) {
|
|
||||||
fix_height();
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
//侧边栏滚动
|
|
||||||
$(window).scroll(function () {
|
|
||||||
if ($(window).scrollTop() > 0 && !$('body').hasClass('fixed-nav')) {
|
|
||||||
$('#right-sidebar').addClass('sidebar-top');
|
|
||||||
} else {
|
|
||||||
$('#right-sidebar').removeClass('sidebar-top');
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
$('.full-height-scroll').slimScroll({
|
|
||||||
height: '100%'
|
|
||||||
});
|
|
||||||
|
|
||||||
$('#side-menu>li').click(function () {
|
|
||||||
if ($('body').hasClass('mini-navbar')) {
|
|
||||||
NavToggle();
|
|
||||||
}
|
|
||||||
});
|
|
||||||
$('#side-menu>li li a').click(function () {
|
|
||||||
if ($(window).width() < 769) {
|
|
||||||
NavToggle();
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
$('.nav-close').click(NavToggle);
|
|
||||||
|
|
||||||
//ios浏览器兼容性处理
|
|
||||||
if (/(iPhone|iPad|iPod|iOS)/i.test(navigator.userAgent)) {
|
|
||||||
$('#content-main').css('overflow-y', 'auto');
|
|
||||||
}
|
|
||||||
|
|
||||||
});
|
|
||||||
|
|
||||||
$(window).bind("load resize", function () {
|
|
||||||
if ($(this).width() < 769) {
|
|
||||||
$('body').addClass('mini-navbar');
|
|
||||||
$('.navbar-static-side').fadeIn();
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
function NavToggle() {
|
|
||||||
$('.navbar-minimalize').trigger('click');
|
|
||||||
}
|
|
||||||
|
|
||||||
function SmoothlyMenu() {
|
|
||||||
if (!$('body').hasClass('mini-navbar')) {
|
|
||||||
$('#side-menu').hide();
|
|
||||||
setTimeout(
|
|
||||||
function () {
|
|
||||||
$('#side-menu').fadeIn(500);
|
|
||||||
}, 100);
|
|
||||||
} else if ($('body').hasClass('fixed-sidebar')) {
|
|
||||||
$('#side-menu').hide();
|
|
||||||
setTimeout(
|
|
||||||
function () {
|
|
||||||
$('#side-menu').fadeIn(500);
|
|
||||||
}, 300);
|
|
||||||
} else {
|
|
||||||
$('#side-menu').removeAttr('style');
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
//主题设置
|
|
||||||
$(function () {
|
|
||||||
|
|
||||||
// 顶部菜单固定
|
|
||||||
$('#fixednavbar').click(function () {
|
|
||||||
if ($('#fixednavbar').is(':checked')) {
|
|
||||||
$(".navbar-static-top").removeClass('navbar-static-top').addClass('navbar-fixed-top');
|
|
||||||
$("body").removeClass('boxed-layout');
|
|
||||||
$("body").addClass('fixed-nav');
|
|
||||||
$('#boxedlayout').prop('checked', false);
|
|
||||||
|
|
||||||
if (localStorageSupport) {
|
|
||||||
localStorage.setItem("boxedlayout", 'off');
|
|
||||||
}
|
|
||||||
|
|
||||||
if (localStorageSupport) {
|
|
||||||
localStorage.setItem("fixednavbar", 'on');
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
$(".navbar-fixed-top").removeClass('navbar-fixed-top').addClass('navbar-static-top');
|
|
||||||
$("body").removeClass('fixed-nav');
|
|
||||||
|
|
||||||
if (localStorageSupport) {
|
|
||||||
localStorage.setItem("fixednavbar", 'off');
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
|
|
||||||
// 收起左侧菜单
|
|
||||||
$('#collapsemenu').click(function () {
|
|
||||||
if ($('#collapsemenu').is(':checked')) {
|
|
||||||
$("body").addClass('mini-navbar');
|
|
||||||
SmoothlyMenu();
|
|
||||||
|
|
||||||
if (localStorageSupport) {
|
|
||||||
localStorage.setItem("collapse_menu", 'on');
|
|
||||||
}
|
|
||||||
|
|
||||||
} else {
|
|
||||||
$("body").removeClass('mini-navbar');
|
|
||||||
SmoothlyMenu();
|
|
||||||
|
|
||||||
if (localStorageSupport) {
|
|
||||||
localStorage.setItem("collapse_menu", 'off');
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
// 固定宽度
|
|
||||||
$('#boxedlayout').click(function () {
|
|
||||||
if ($('#boxedlayout').is(':checked')) {
|
|
||||||
$("body").addClass('boxed-layout');
|
|
||||||
$('#fixednavbar').prop('checked', false);
|
|
||||||
$(".navbar-fixed-top").removeClass('navbar-fixed-top').addClass('navbar-static-top');
|
|
||||||
$("body").removeClass('fixed-nav');
|
|
||||||
if (localStorageSupport) {
|
|
||||||
localStorage.setItem("fixednavbar", 'off');
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
if (localStorageSupport) {
|
|
||||||
localStorage.setItem("boxedlayout", 'on');
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
$("body").removeClass('boxed-layout');
|
|
||||||
|
|
||||||
if (localStorageSupport) {
|
|
||||||
localStorage.setItem("boxedlayout", 'off');
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
// 默认主题
|
|
||||||
$('.s-skin-0').click(function () {
|
|
||||||
$("body").removeClass("skin-1");
|
|
||||||
$("body").removeClass("skin-2");
|
|
||||||
$("body").removeClass("skin-3");
|
|
||||||
return false;
|
|
||||||
});
|
|
||||||
|
|
||||||
// 蓝色主题
|
|
||||||
$('.s-skin-1').click(function () {
|
|
||||||
$("body").removeClass("skin-2");
|
|
||||||
$("body").removeClass("skin-3");
|
|
||||||
$("body").addClass("skin-1");
|
|
||||||
return false;
|
|
||||||
});
|
|
||||||
|
|
||||||
// 黄色主题
|
|
||||||
$('.s-skin-3').click(function () {
|
|
||||||
$("body").removeClass("skin-1");
|
|
||||||
$("body").removeClass("skin-2");
|
|
||||||
$("body").addClass("skin-3");
|
|
||||||
return false;
|
|
||||||
});
|
|
||||||
|
|
||||||
if (localStorageSupport) {
|
|
||||||
var collapse = localStorage.getItem("collapse_menu");
|
|
||||||
var fixednavbar = localStorage.getItem("fixednavbar");
|
|
||||||
var boxedlayout = localStorage.getItem("boxedlayout");
|
|
||||||
|
|
||||||
if (collapse == 'on') {
|
|
||||||
$('#collapsemenu').prop('checked', 'checked')
|
|
||||||
}
|
|
||||||
if (fixednavbar == 'on') {
|
|
||||||
$('#fixednavbar').prop('checked', 'checked')
|
|
||||||
}
|
|
||||||
if (boxedlayout == 'on') {
|
|
||||||
$('#boxedlayout').prop('checked', 'checked')
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (localStorageSupport) {
|
|
||||||
|
|
||||||
var collapse = localStorage.getItem("collapse_menu");
|
|
||||||
var fixednavbar = localStorage.getItem("fixednavbar");
|
|
||||||
var boxedlayout = localStorage.getItem("boxedlayout");
|
|
||||||
|
|
||||||
var body = $('body');
|
|
||||||
|
|
||||||
if (collapse == 'on') {
|
|
||||||
if (!body.hasClass('body-small')) {
|
|
||||||
body.addClass('mini-navbar');
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (fixednavbar == 'on') {
|
|
||||||
$(".navbar-static-top").removeClass('navbar-static-top').addClass('navbar-fixed-top');
|
|
||||||
body.addClass('fixed-nav');
|
|
||||||
}
|
|
||||||
|
|
||||||
if (boxedlayout == 'on') {
|
|
||||||
body.addClass('boxed-layout');
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
//判断浏览器是否支持html5本地存储
|
|
||||||
function localStorageSupport() {
|
|
||||||
return (('localStorage' in window) && window['localStorage'] !== null)
|
|
||||||
}
|
|
|
@ -1,310 +0,0 @@
|
||||||
|
|
||||||
$(function () {
|
|
||||||
//计算元素集合的总宽度
|
|
||||||
function calSumWidth(elements) {
|
|
||||||
var width = 0;
|
|
||||||
$(elements).each(function () {
|
|
||||||
width += $(this).outerWidth(true);
|
|
||||||
});
|
|
||||||
return width;
|
|
||||||
}
|
|
||||||
//滚动到指定选项卡
|
|
||||||
function scrollToTab(element) {
|
|
||||||
var marginLeftVal = calSumWidth($(element).prevAll()), marginRightVal = calSumWidth($(element).nextAll());
|
|
||||||
// 可视区域非tab宽度
|
|
||||||
var tabOuterWidth = calSumWidth($(".content-tabs").children().not(".J_menuTabs"));
|
|
||||||
//可视区域tab宽度
|
|
||||||
var visibleWidth = $(".content-tabs").outerWidth(true) - tabOuterWidth;
|
|
||||||
//实际滚动宽度
|
|
||||||
var scrollVal = 0;
|
|
||||||
if ($(".page-tabs-content").outerWidth() < visibleWidth) {
|
|
||||||
scrollVal = 0;
|
|
||||||
} else if (marginRightVal <= (visibleWidth - $(element).outerWidth(true) - $(element).next().outerWidth(true))) {
|
|
||||||
if ((visibleWidth - $(element).next().outerWidth(true)) > marginRightVal) {
|
|
||||||
scrollVal = marginLeftVal;
|
|
||||||
var tabElement = element;
|
|
||||||
while ((scrollVal - $(tabElement).outerWidth()) > ($(".page-tabs-content").outerWidth() - visibleWidth)) {
|
|
||||||
scrollVal -= $(tabElement).prev().outerWidth();
|
|
||||||
tabElement = $(tabElement).prev();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
} else if (marginLeftVal > (visibleWidth - $(element).outerWidth(true) - $(element).prev().outerWidth(true))) {
|
|
||||||
scrollVal = marginLeftVal - $(element).prev().outerWidth(true);
|
|
||||||
}
|
|
||||||
$('.page-tabs-content').animate({
|
|
||||||
marginLeft: 0 - scrollVal + 'px'
|
|
||||||
}, "fast");
|
|
||||||
}
|
|
||||||
//查看左侧隐藏的选项卡
|
|
||||||
function scrollTabLeft() {
|
|
||||||
var marginLeftVal = Math.abs(parseInt($('.page-tabs-content').css('margin-left')));
|
|
||||||
// 可视区域非tab宽度
|
|
||||||
var tabOuterWidth = calSumWidth($(".content-tabs").children().not(".J_menuTabs"));
|
|
||||||
//可视区域tab宽度
|
|
||||||
var visibleWidth = $(".content-tabs").outerWidth(true) - tabOuterWidth;
|
|
||||||
//实际滚动宽度
|
|
||||||
var scrollVal = 0;
|
|
||||||
if ($(".page-tabs-content").width() < visibleWidth) {
|
|
||||||
return false;
|
|
||||||
} else {
|
|
||||||
var tabElement = $(".J_menuTab:first");
|
|
||||||
var offsetVal = 0;
|
|
||||||
while ((offsetVal + $(tabElement).outerWidth(true)) <= marginLeftVal) {//找到离当前tab最近的元素
|
|
||||||
offsetVal += $(tabElement).outerWidth(true);
|
|
||||||
tabElement = $(tabElement).next();
|
|
||||||
}
|
|
||||||
offsetVal = 0;
|
|
||||||
if (calSumWidth($(tabElement).prevAll()) > visibleWidth) {
|
|
||||||
while ((offsetVal + $(tabElement).outerWidth(true)) < (visibleWidth) && tabElement.length > 0) {
|
|
||||||
offsetVal += $(tabElement).outerWidth(true);
|
|
||||||
tabElement = $(tabElement).prev();
|
|
||||||
}
|
|
||||||
scrollVal = calSumWidth($(tabElement).prevAll());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
$('.page-tabs-content').animate({
|
|
||||||
marginLeft: 0 - scrollVal + 'px'
|
|
||||||
}, "fast");
|
|
||||||
}
|
|
||||||
//查看右侧隐藏的选项卡
|
|
||||||
function scrollTabRight() {
|
|
||||||
var marginLeftVal = Math.abs(parseInt($('.page-tabs-content').css('margin-left')));
|
|
||||||
// 可视区域非tab宽度
|
|
||||||
var tabOuterWidth = calSumWidth($(".content-tabs").children().not(".J_menuTabs"));
|
|
||||||
//可视区域tab宽度
|
|
||||||
var visibleWidth = $(".content-tabs").outerWidth(true) - tabOuterWidth;
|
|
||||||
//实际滚动宽度
|
|
||||||
var scrollVal = 0;
|
|
||||||
if ($(".page-tabs-content").width() < visibleWidth) {
|
|
||||||
return false;
|
|
||||||
} else {
|
|
||||||
var tabElement = $(".J_menuTab:first");
|
|
||||||
var offsetVal = 0;
|
|
||||||
while ((offsetVal + $(tabElement).outerWidth(true)) <= marginLeftVal) {//找到离当前tab最近的元素
|
|
||||||
offsetVal += $(tabElement).outerWidth(true);
|
|
||||||
tabElement = $(tabElement).next();
|
|
||||||
}
|
|
||||||
offsetVal = 0;
|
|
||||||
while ((offsetVal + $(tabElement).outerWidth(true)) < (visibleWidth) && tabElement.length > 0) {
|
|
||||||
offsetVal += $(tabElement).outerWidth(true);
|
|
||||||
tabElement = $(tabElement).next();
|
|
||||||
}
|
|
||||||
scrollVal = calSumWidth($(tabElement).prevAll());
|
|
||||||
if (scrollVal > 0) {
|
|
||||||
$('.page-tabs-content').animate({
|
|
||||||
marginLeft: 0 - scrollVal + 'px'
|
|
||||||
}, "fast");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
//通过遍历给菜单项加上data-index属性
|
|
||||||
$(".J_menuItem").each(function (index) {
|
|
||||||
if (!$(this).attr('data-index')) {
|
|
||||||
$(this).attr('data-index', index);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
function menuItem() {
|
|
||||||
// 获取标识数据
|
|
||||||
var dataUrl = $(this).attr('href'),
|
|
||||||
dataIndex = $(this).data('index'),
|
|
||||||
menuName = $.trim($(this).text()),
|
|
||||||
flag = true;
|
|
||||||
if (dataUrl == undefined || $.trim(dataUrl).length == 0)return false;
|
|
||||||
|
|
||||||
// 选项卡菜单已存在
|
|
||||||
$('.J_menuTab').each(function () {
|
|
||||||
if ($(this).data('id') == dataUrl) {
|
|
||||||
if (!$(this).hasClass('active')) {
|
|
||||||
$(this).addClass('active').siblings('.J_menuTab').removeClass('active');
|
|
||||||
scrollToTab(this);
|
|
||||||
// 显示tab对应的内容区
|
|
||||||
$('.J_mainContent .J_iframe').each(function () {
|
|
||||||
if ($(this).data('id') == dataUrl) {
|
|
||||||
$(this).show().siblings('.J_iframe').hide();
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
flag = false;
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
// 选项卡菜单不存在
|
|
||||||
if (flag) {
|
|
||||||
var str = '<a href="javascript:;" class="active J_menuTab" data-id="' + dataUrl + '">' + menuName + ' <i class="fa fa-times-circle"></i></a>';
|
|
||||||
$('.J_menuTab').removeClass('active');
|
|
||||||
|
|
||||||
// 添加选项卡对应的iframe
|
|
||||||
var str1 = '<iframe class="J_iframe" name="iframe' + dataIndex + '" width="100%" height="100%" src="' + dataUrl + '" frameborder="0" data-id="' + dataUrl + '" seamless></iframe>';
|
|
||||||
$('.J_mainContent').find('iframe.J_iframe').hide().parents('.J_mainContent').append(str1);
|
|
||||||
|
|
||||||
//显示loading提示
|
|
||||||
// var loading = layer.load();
|
|
||||||
//
|
|
||||||
// $('.J_mainContent iframe:visible').load(function () {
|
|
||||||
// //iframe加载完成后隐藏loading提示
|
|
||||||
// layer.close(loading);
|
|
||||||
// });
|
|
||||||
// 添加选项卡
|
|
||||||
$('.J_menuTabs .page-tabs-content').append(str);
|
|
||||||
scrollToTab($('.J_menuTab.active'));
|
|
||||||
}
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
$('.J_menuItem').on('click', menuItem);
|
|
||||||
|
|
||||||
// 关闭选项卡菜单
|
|
||||||
function closeTab() {
|
|
||||||
var closeTabId = $(this).parents('.J_menuTab').data('id');
|
|
||||||
var currentWidth = $(this).parents('.J_menuTab').width();
|
|
||||||
|
|
||||||
// 当前元素处于活动状态
|
|
||||||
if ($(this).parents('.J_menuTab').hasClass('active')) {
|
|
||||||
|
|
||||||
// 当前元素后面有同辈元素,使后面的一个元素处于活动状态
|
|
||||||
if ($(this).parents('.J_menuTab').next('.J_menuTab').size()) {
|
|
||||||
|
|
||||||
var activeId = $(this).parents('.J_menuTab').next('.J_menuTab:eq(0)').data('id');
|
|
||||||
$(this).parents('.J_menuTab').next('.J_menuTab:eq(0)').addClass('active');
|
|
||||||
|
|
||||||
$('.J_mainContent .J_iframe').each(function () {
|
|
||||||
if ($(this).data('id') == activeId) {
|
|
||||||
$(this).show().siblings('.J_iframe').hide();
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
var marginLeftVal = parseInt($('.page-tabs-content').css('margin-left'));
|
|
||||||
if (marginLeftVal < 0) {
|
|
||||||
$('.page-tabs-content').animate({
|
|
||||||
marginLeft: (marginLeftVal + currentWidth) + 'px'
|
|
||||||
}, "fast");
|
|
||||||
}
|
|
||||||
|
|
||||||
// 移除当前选项卡
|
|
||||||
$(this).parents('.J_menuTab').remove();
|
|
||||||
|
|
||||||
// 移除tab对应的内容区
|
|
||||||
$('.J_mainContent .J_iframe').each(function () {
|
|
||||||
if ($(this).data('id') == closeTabId) {
|
|
||||||
$(this).remove();
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
// 当前元素后面没有同辈元素,使当前元素的上一个元素处于活动状态
|
|
||||||
if ($(this).parents('.J_menuTab').prev('.J_menuTab').size()) {
|
|
||||||
var activeId = $(this).parents('.J_menuTab').prev('.J_menuTab:last').data('id');
|
|
||||||
$(this).parents('.J_menuTab').prev('.J_menuTab:last').addClass('active');
|
|
||||||
$('.J_mainContent .J_iframe').each(function () {
|
|
||||||
if ($(this).data('id') == activeId) {
|
|
||||||
$(this).show().siblings('.J_iframe').hide();
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
// 移除当前选项卡
|
|
||||||
$(this).parents('.J_menuTab').remove();
|
|
||||||
|
|
||||||
// 移除tab对应的内容区
|
|
||||||
$('.J_mainContent .J_iframe').each(function () {
|
|
||||||
if ($(this).data('id') == closeTabId) {
|
|
||||||
$(this).remove();
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
// 当前元素不处于活动状态
|
|
||||||
else {
|
|
||||||
// 移除当前选项卡
|
|
||||||
$(this).parents('.J_menuTab').remove();
|
|
||||||
|
|
||||||
// 移除相应tab对应的内容区
|
|
||||||
$('.J_mainContent .J_iframe').each(function () {
|
|
||||||
if ($(this).data('id') == closeTabId) {
|
|
||||||
$(this).remove();
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
scrollToTab($('.J_menuTab.active'));
|
|
||||||
}
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
$('.J_menuTabs').on('click', '.J_menuTab i', closeTab);
|
|
||||||
|
|
||||||
//关闭其他选项卡
|
|
||||||
function closeOtherTabs(){
|
|
||||||
$('.page-tabs-content').children("[data-id]").not(":first").not(".active").each(function () {
|
|
||||||
$('.J_iframe[data-id="' + $(this).data('id') + '"]').remove();
|
|
||||||
$(this).remove();
|
|
||||||
});
|
|
||||||
$('.page-tabs-content').css("margin-left", "0");
|
|
||||||
}
|
|
||||||
$('.J_tabCloseOther').on('click', closeOtherTabs);
|
|
||||||
|
|
||||||
//滚动到已激活的选项卡
|
|
||||||
function showActiveTab(){
|
|
||||||
scrollToTab($('.J_menuTab.active'));
|
|
||||||
}
|
|
||||||
$('.J_tabShowActive').on('click', showActiveTab);
|
|
||||||
|
|
||||||
|
|
||||||
// 点击选项卡菜单
|
|
||||||
function activeTab() {
|
|
||||||
if (!$(this).hasClass('active')) {
|
|
||||||
var currentId = $(this).data('id');
|
|
||||||
// 显示tab对应的内容区
|
|
||||||
$('.J_mainContent .J_iframe').each(function () {
|
|
||||||
if ($(this).data('id') == currentId) {
|
|
||||||
$(this).show().siblings('.J_iframe').hide();
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
$(this).addClass('active').siblings('.J_menuTab').removeClass('active');
|
|
||||||
scrollToTab(this);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
$('.J_menuTabs').on('click', '.J_menuTab', activeTab);
|
|
||||||
|
|
||||||
//刷新iframe
|
|
||||||
function refreshTab() {
|
|
||||||
var target = $('.J_iframe[data-id="' + $(this).data('id') + '"]');
|
|
||||||
var url = target.attr('src');
|
|
||||||
// //显示loading提示
|
|
||||||
// var loading = layer.load();
|
|
||||||
// target.attr('src', url).load(function () {
|
|
||||||
// //关闭loading提示
|
|
||||||
// layer.close(loading);
|
|
||||||
// });
|
|
||||||
}
|
|
||||||
|
|
||||||
$('.J_menuTabs').on('dblclick', '.J_menuTab', refreshTab);
|
|
||||||
|
|
||||||
// 左移按扭
|
|
||||||
$('.J_tabLeft').on('click', scrollTabLeft);
|
|
||||||
|
|
||||||
// 右移按扭
|
|
||||||
$('.J_tabRight').on('click', scrollTabRight);
|
|
||||||
|
|
||||||
// 关闭全部
|
|
||||||
$('.J_tabCloseAll').on('click', function () {
|
|
||||||
$('.page-tabs-content').children("[data-id]").not(":first").each(function () {
|
|
||||||
$('.J_iframe[data-id="' + $(this).data('id') + '"]').remove();
|
|
||||||
$(this).remove();
|
|
||||||
});
|
|
||||||
$('.page-tabs-content').children("[data-id]:first").each(function () {
|
|
||||||
$('.J_iframe[data-id="' + $(this).data('id') + '"]').show();
|
|
||||||
$(this).addClass("active");
|
|
||||||
});
|
|
||||||
$('.page-tabs-content').css("margin-left", "0");
|
|
||||||
});
|
|
||||||
|
|
||||||
});
|
|
|
@ -1,2 +0,0 @@
|
||||||
/*! 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:["确定","取消"],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("最多输入"+(a.maxlength||500)+"个字数",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.onerror=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("没有图片")}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,b){f.imgIndex++,f.imgIndex>i.length&&(f.imgIndex=1,b)||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("当前图片地址异常<br>是否继续查看下一张?",{time:3e4,btn:["下一张","不看了"],yes:function(){i.length>1&&f.imgnext(!0,!0)}})})}}}();
|
|
|
@ -1,75 +0,0 @@
|
||||||
/**
|
|
||||||
|
|
||||||
@Name: laydate 核心样式
|
|
||||||
@Author:贤心
|
|
||||||
@Site:http://sentsin.com/layui/laydate
|
|
||||||
|
|
||||||
**/
|
|
||||||
|
|
||||||
html{_background-image:url(about:blank); _background-attachment:fixed;}
|
|
||||||
.layer-date{display: inline-block!important;vertical-align:text-top;max-width:240px;}
|
|
||||||
.laydate_body .laydate_box, .laydate_body .laydate_box *{margin:0; padding:0;}
|
|
||||||
.laydate-icon,
|
|
||||||
.laydate-icon-default,
|
|
||||||
.laydate-icon-danlan,
|
|
||||||
.laydate-icon-dahong,
|
|
||||||
.laydate-icon-molv{height:34px; padding-right:20px;min-width:34px;vertical-align: text-top;border:1px solid #C6C6C6; background-repeat:no-repeat; background-position:right center; background-color:#fff; outline:0;}
|
|
||||||
.laydate-icon-default{ background-image:url(../skins/default/icon.png)}
|
|
||||||
.laydate-icon-danlan{border:1px solid #B1D2EC; background-image:url(../skins/danlan/icon.png)}
|
|
||||||
.laydate-icon-dahong{background-image:url(../skins/dahong/icon.png)}
|
|
||||||
.laydate-icon-molv{background-image:url(../skins/molv/icon.png)}
|
|
||||||
.laydate_body .laydate_box{width:240px; font:12px '\5B8B\4F53'; z-index:99999999; *margin:-2px 0 0 -2px; *overflow:hidden; _margin:0; _position:absolute!important; background-color:#fff;}
|
|
||||||
.laydate_body .laydate_box li{list-style:none;}
|
|
||||||
.laydate_body .laydate_box .laydate_void{cursor:text!important;}
|
|
||||||
.laydate_body .laydate_box a, .laydate_body .laydate_box a:hover{text-decoration:none; blr:expression(this.onFocus=this.blur()); cursor:pointer;}
|
|
||||||
.laydate_body .laydate_box a:hover{text-decoration:none;}
|
|
||||||
.laydate_body .laydate_box cite, .laydate_body .laydate_box label{position:absolute; width:0; height:0; border-width:5px; border-style:dashed; border-color:transparent; overflow:hidden; cursor:pointer;}
|
|
||||||
.laydate_body .laydate_box .laydate_yms, .laydate_body .laydate_box .laydate_time{display:none;}
|
|
||||||
.laydate_body .laydate_box .laydate_show{display:block;}
|
|
||||||
.laydate_body .laydate_box input{outline:0; font-size:14px; background-color:#fff;}
|
|
||||||
.laydate_body .laydate_top{position:relative; height:26px; padding:5px; *width:100%; z-index:99;}
|
|
||||||
.laydate_body .laydate_ym{position:relative; float:left; height:24px; cursor:pointer;}
|
|
||||||
.laydate_body .laydate_ym input{float:left; height:24px; line-height:24px; text-align:center; border:none; cursor:pointer;}
|
|
||||||
.laydate_body .laydate_ym .laydate_yms{position:absolute; left: -1px; top: 24px; height:181px;}
|
|
||||||
.laydate_body .laydate_y{width:121px;}
|
|
||||||
.laydate_body .laydate_y input{width:64px; margin-right:15px;}
|
|
||||||
.laydate_body .laydate_y .laydate_yms{width:121px; text-align:center;}
|
|
||||||
.laydate_body .laydate_y .laydate_yms a{position:relative; display:block; height:20px;}
|
|
||||||
.laydate_body .laydate_y .laydate_yms ul{height:139px; padding:0; *overflow:hidden;}
|
|
||||||
.laydate_body .laydate_y .laydate_yms ul li{float:left; width:60px; height:20px; line-height: 20px; text-overflow: ellipsis; overflow: hidden; white-space: nowrap;}
|
|
||||||
.laydate_box *{box-sizing:content-box!important;}
|
|
||||||
.laydate_body .laydate_m{width:99px;float: right;margin-right:-2px;}
|
|
||||||
.laydate_body .laydate_m .laydate_yms{width:99px; padding:0;}
|
|
||||||
.laydate_body .laydate_m input{width:42px; margin-right:15px;}
|
|
||||||
.laydate_body .laydate_m .laydate_yms span{display:block; float:left; width:42px; margin: 5px 0 0 5px; line-height:24px; text-align:center; _display:inline;}
|
|
||||||
.laydate_body .laydate_choose{display:block; float:left; position:relative; width:20px; height:24px;}
|
|
||||||
.laydate_body .laydate_choose cite, .laydate_body .laydate_tab cite{left:50%; top:50%;}
|
|
||||||
.laydate_body .laydate_chtop cite{margin:-7px 0 0 -5px; border-bottom-style:solid;}
|
|
||||||
.laydate_body .laydate_chdown cite, .laydate_body .laydate_ym label{top:50%; margin:-2px 0 0 -5px; border-top-style:solid;}
|
|
||||||
.laydate_body .laydate_chprev cite{margin:-5px 0 0 -7px;}
|
|
||||||
.laydate_body .laydate_chnext cite{margin:-5px 0 0 -2px;}
|
|
||||||
.laydate_body .laydate_ym label{right:28px;}
|
|
||||||
.laydate_body .laydate_table{ width:230px; margin:0 5px; border-collapse:collapse; border-spacing:0px; }
|
|
||||||
.laydate_body .laydate_table td{width:31px; height:19px; line-height:19px; text-align: center; cursor:pointer; font-size: 12px;}
|
|
||||||
.laydate_body .laydate_table thead{height:22px; line-height:22px;}
|
|
||||||
.laydate_body .laydate_table thead th{font-weight:400; font-size:12px; text-align:center;}
|
|
||||||
.laydate_body .laydate_bottom{position:relative; height:22px; line-height:20px; padding:5px; font-size:12px;}
|
|
||||||
.laydate_body .laydate_bottom #laydate_hms{position: relative; z-index: 1; float:left; }
|
|
||||||
.laydate_body .laydate_time{ position:absolute; left:5px; bottom: 26px; width:129px; height:125px; *overflow:hidden;}
|
|
||||||
.laydate_body .laydate_time .laydate_hmsno{ padding:5px 0 0 5px;}
|
|
||||||
.laydate_body .laydate_time .laydate_hmsno span{display:block; float:left; width:24px; height:19px; line-height:19px; text-align:center; cursor:pointer; *margin-bottom:-5px;}
|
|
||||||
.laydate_body .laydate_time1{width:228px; height:154px;}
|
|
||||||
.laydate_body .laydate_time1 .laydate_hmsno{padding: 6px 0 0 8px;}
|
|
||||||
.laydate_body .laydate_time1 .laydate_hmsno span{width:21px; height:20px; line-height:20px;}
|
|
||||||
.laydate_body .laydate_msg{left:49px; bottom:67px; width:141px; height:auto; overflow: hidden;}
|
|
||||||
.laydate_body .laydate_msg p{padding:5px 10px;}
|
|
||||||
.laydate_body .laydate_bottom li{float:left; height:20px; line-height:20px; border-right:none; font-weight:900;}
|
|
||||||
.laydate_body .laydate_bottom .laydate_sj{width:33px; text-align:center; font-weight:400;}
|
|
||||||
.laydate_body .laydate_bottom input{float:left; width:21px; height:20px; line-height:20px; border:none; text-align:center; cursor:pointer; font-size:12px; font-weight:400;}
|
|
||||||
.laydate_body .laydate_bottom .laydte_hsmtex{height:20px; line-height:20px; text-align:center;}
|
|
||||||
.laydate_body .laydate_bottom .laydte_hsmtex span{position:absolute; width:20px; top:0; right:0px; cursor:pointer;}
|
|
||||||
.laydate_body .laydate_bottom .laydte_hsmtex span:hover{font-size:14px;}
|
|
||||||
.laydate_body .laydate_bottom .laydate_btn{position:absolute; right:5px; top:5px;}
|
|
||||||
.laydate_body .laydate_bottom .laydate_btn a{float:left; height:20px; padding:0 6px; _padding:0 5px;}
|
|
||||||
.laydate_body .laydate_bottom .laydate_v{position:absolute; left:10px; top:6px; font-family:Courier; z-index:0;}
|
|
||||||
|
|
Before Width: | Height: | Size: 309 B |
|
@ -1,59 +0,0 @@
|
||||||
/**
|
|
||||||
|
|
||||||
@Name: laydate皮肤:墨绿
|
|
||||||
@Author:贤心
|
|
||||||
@Site:http://sentsin.com/layui/laydate
|
|
||||||
|
|
||||||
**/
|
|
||||||
|
|
||||||
.laydate-icon{border:1px solid #ccc; background-image:url(icon.png)}
|
|
||||||
|
|
||||||
.laydate_body .laydate_bottom #laydate_hms,
|
|
||||||
.laydate_body .laydate_time{border:1px solid #ccc;}
|
|
||||||
|
|
||||||
.laydate_body .laydate_box,
|
|
||||||
.laydate_body .laydate_ym .laydate_yms,
|
|
||||||
.laydate_body .laydate_time{box-shadow: 2px 2px 5px rgba(0,0,0,.1);}
|
|
||||||
|
|
||||||
.laydate_body .laydate_box{border-top:none; border-bottom:none; background-color:#fff; color:#00625A;}
|
|
||||||
.laydate_body .laydate_box input{background:none!important; color:#fff;}
|
|
||||||
.laydate_body .laydate_box .laydate_void{color:#00E8D7!important;}
|
|
||||||
.laydate_body .laydate_box a, .laydate_body .laydate_box a:hover{color:#00625A;}
|
|
||||||
.laydate_body .laydate_box a:hover{color:#666;}
|
|
||||||
.laydate_body .laydate_click{background-color:#009F95!important; color:#fff!important;}
|
|
||||||
.laydate_body .laydate_top{border-top:1px solid #009F95; background-color:#009F95}
|
|
||||||
.laydate_body .laydate_ym{border:1px solid #009F95; background-color:#009F95;}
|
|
||||||
.laydate_body .laydate_ym .laydate_yms{border:1px solid #009F95; background-color:#009F95; color:#fff;}
|
|
||||||
.laydate_body .laydate_y .laydate_yms a{border-bottom:1px solid #009F95;}
|
|
||||||
.laydate_body .laydate_y .laydate_yms .laydate_chdown{border-top:1px solid #009F95; border-bottom:none;}
|
|
||||||
.laydate_body .laydate_choose{border-left:1px solid #009F95;}
|
|
||||||
.laydate_body .laydate_chprev{border-left:none; border-right:1px solid #009F95;}
|
|
||||||
.laydate_body .laydate_choose:hover,
|
|
||||||
.laydate_body .laydate_y .laydate_yms a:hover{background-color:#00C1B3;}
|
|
||||||
.laydate_body .laydate_chtop cite{border-bottom-color:#fff;}
|
|
||||||
.laydate_body .laydate_chdown cite, .laydate_body .laydate_ym label{border-top-color:#fff;}
|
|
||||||
.laydate_body .laydate_chprev cite{border-right-style:solid; border-right-color:#fff;}
|
|
||||||
.laydate_body .laydate_chnext cite{border-left-style:solid; border-left-color:#fff;}
|
|
||||||
.laydate_body .laydate_table{width: 240px!important; margin: 0!important; border:1px solid #ccc; border-top:none; border-bottom:none;}
|
|
||||||
.laydate_body .laydate_table td{border:none; height:21px!important; line-height:21px!important; background-color:#fff; color:#00625A;}
|
|
||||||
.laydate_body .laydate_table .laydate_nothis{color:#999;}
|
|
||||||
.laydate_body .laydate_table thead{border-bottom:1px solid #ccc; height:21px!important; line-height:21px!important;}
|
|
||||||
.laydate_body .laydate_table thead th{}
|
|
||||||
.laydate_body .laydate_bottom{border:1px solid #ccc; border-top:none;}
|
|
||||||
.laydate_body .laydate_bottom #laydate_hms{background-color:#fff;}
|
|
||||||
.laydate_body .laydate_time{background-color:#fff;}
|
|
||||||
.laydate_body .laydate_time1{width: 226px!important; height: 152px!important;}
|
|
||||||
.laydate_body .laydate_bottom .laydate_sj{width:31px!important; border-right:1px solid #ccc; background-color:#fff;}
|
|
||||||
.laydate_body .laydate_bottom input{background-color:#fff; color:#00625A;}
|
|
||||||
.laydate_body .laydate_bottom .laydte_hsmtex{border-bottom:1px solid #ccc;}
|
|
||||||
.laydate_body .laydate_bottom .laydate_btn{border-right:1px solid #ccc;}
|
|
||||||
.laydate_body .laydate_bottom .laydate_v{color:#999}
|
|
||||||
.laydate_body .laydate_bottom .laydate_btn a{border: 1px solid #ccc; border-right:none; background-color:#fff;}
|
|
||||||
.laydate_body .laydate_bottom .laydate_btn a:hover{background-color:#F6F6F6; color:#00625A;}
|
|
||||||
|
|
||||||
.laydate_body .laydate_m .laydate_yms span:hover,
|
|
||||||
.laydate_body .laydate_time .laydate_hmsno span:hover,
|
|
||||||
.laydate_body .laydate_y .laydate_yms ul li:hover,
|
|
||||||
.laydate_body .laydate_table td:hover{background-color:#00C1B3; color:#fff;}
|
|
||||||
|
|
||||||
|
|
|
@ -1,30 +0,0 @@
|
||||||
{
|
|
||||||
"status": 1,
|
|
||||||
"msg": "ok",
|
|
||||||
"data": [
|
|
||||||
{
|
|
||||||
"id": "100001",
|
|
||||||
"name": "Beaut-zihan",
|
|
||||||
"time": "10:23",
|
|
||||||
"face": "img/a1.jpg"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"id": "100002",
|
|
||||||
"name": "慕容晓晓",
|
|
||||||
"time": "昨天",
|
|
||||||
"face": "img/a2.jpg"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"id": "1000033",
|
|
||||||
"name": "乔峰",
|
|
||||||
"time": "2014-4.22",
|
|
||||||
"face": "img/a3.jpg"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"id": "10000333",
|
|
||||||
"name": "高圆圆",
|
|
||||||
"time": "2014-4.21",
|
|
||||||
"face": "img/a4.jpg"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
|
@ -1,107 +0,0 @@
|
||||||
{
|
|
||||||
"status": 1,
|
|
||||||
"msg": "ok",
|
|
||||||
"data": [
|
|
||||||
{
|
|
||||||
"name": "销售部",
|
|
||||||
"nums": 36,
|
|
||||||
"id": 1,
|
|
||||||
"item": [
|
|
||||||
{
|
|
||||||
"id": "100001",
|
|
||||||
"name": "郭敬明",
|
|
||||||
"face": "img/a5.jpg"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"id": "100002",
|
|
||||||
"name": "作家崔成浩",
|
|
||||||
"face": "img/a6.jpg"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"id": "1000022",
|
|
||||||
"name": "韩寒",
|
|
||||||
"face": "img/a7.jpg"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"id": "10000222",
|
|
||||||
"name": "范爷",
|
|
||||||
"face": "img/a8.jpg"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"id": "100002222",
|
|
||||||
"name": "小马哥",
|
|
||||||
"face": "img/a9.jpg"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "大学同窗",
|
|
||||||
"nums": 16,
|
|
||||||
"id": 2,
|
|
||||||
"item": [
|
|
||||||
{
|
|
||||||
"id": "1000033",
|
|
||||||
"name": "苏醒",
|
|
||||||
"face": "img/a9.jpg"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"id": "10000333",
|
|
||||||
"name": "马云",
|
|
||||||
"face": "img/a8.jpg"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"id": "100003",
|
|
||||||
"name": "鬼脚七",
|
|
||||||
"face": "img/a7.jpg"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"id": "100004",
|
|
||||||
"name": "谢楠",
|
|
||||||
"face": "img/a6.jpg"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"id": "100005",
|
|
||||||
"name": "徐峥",
|
|
||||||
"face": "img/a5.jpg"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "H+后台主题",
|
|
||||||
"nums": 38,
|
|
||||||
"id": 3,
|
|
||||||
"item": [
|
|
||||||
{
|
|
||||||
"id": "100006",
|
|
||||||
"name": "柏雪近在它香",
|
|
||||||
"face": "img/a4.jpg"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"id": "100007",
|
|
||||||
"name": "罗昌平",
|
|
||||||
"face": "img/a3.jpg"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"id": "100008",
|
|
||||||
"name": "Crystal影子",
|
|
||||||
"face": "img/a2.jpg"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"id": "100009",
|
|
||||||
"name": "艺小想",
|
|
||||||
"face": "img/a1.jpg"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"id": "100010",
|
|
||||||
"name": "天猫",
|
|
||||||
"face": "img/a8.jpg"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"id": "100011",
|
|
||||||
"name": "张泉灵",
|
|
||||||
"face": "img/a7.jpg"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
|
@ -1,57 +0,0 @@
|
||||||
{
|
|
||||||
"status": 1,
|
|
||||||
"msg": "ok",
|
|
||||||
"data": [
|
|
||||||
{
|
|
||||||
"name": "H+交流群",
|
|
||||||
"nums": 36,
|
|
||||||
"id": 1,
|
|
||||||
"item": [
|
|
||||||
{
|
|
||||||
"id": "101",
|
|
||||||
"name": "H+ Bug反馈",
|
|
||||||
"face": "http://tp2.sinaimg.cn/2211874245/180/40050524279/0"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"id": "102",
|
|
||||||
"name": "H+ 技术交流",
|
|
||||||
"face": "http://tp3.sinaimg.cn/1820711170/180/1286855219/1"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "Bootstrap",
|
|
||||||
"nums": 16,
|
|
||||||
"id": 2,
|
|
||||||
"item": [
|
|
||||||
{
|
|
||||||
"id": "103",
|
|
||||||
"name": "Bootstrap中文",
|
|
||||||
"face": "http://tp2.sinaimg.cn/2211874245/180/40050524279/0"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"id": "104",
|
|
||||||
"name": "Bootstrap资源",
|
|
||||||
"face": "http://tp3.sinaimg.cn/1820711170/180/1286855219/1"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "WebApp",
|
|
||||||
"nums": 106,
|
|
||||||
"id": 3,
|
|
||||||
"item": [
|
|
||||||
{
|
|
||||||
"id": "105",
|
|
||||||
"name": "移动开发",
|
|
||||||
"face": "http://tp2.sinaimg.cn/2211874245/180/40050524279/0"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"id": "106",
|
|
||||||
"name": "H5前言",
|
|
||||||
"face": "http://tp3.sinaimg.cn/1820711170/180/1286855219/1"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
|
@ -1,56 +0,0 @@
|
||||||
{
|
|
||||||
"status": 1,
|
|
||||||
"msg": "ok",
|
|
||||||
"data": [
|
|
||||||
{
|
|
||||||
"id": "100001",
|
|
||||||
"name": "無言的蒁説",
|
|
||||||
"face": "img/a1.jpg"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"id": "100002",
|
|
||||||
"name": "婷宝奢侈品",
|
|
||||||
"face": "img/a2.jpg"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"id": "100003",
|
|
||||||
"name": "忆恨思爱",
|
|
||||||
"face": "img/a3.jpg"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"id": "100004",
|
|
||||||
"name": "天涯奥拓慢",
|
|
||||||
"face": "img/a4.jpg"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"id": "100005",
|
|
||||||
"name": "雨落无声的天空",
|
|
||||||
"face": "img/a5.jpg"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"id": "100006",
|
|
||||||
"name": "李越LycorisRadiate",
|
|
||||||
"face": "img/a6.jpg"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"id": "100007",
|
|
||||||
"name": "冯胖妞张直丑",
|
|
||||||
"face": "img/a7.jpg"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"id": "100008",
|
|
||||||
"name": "陈龙hmmm",
|
|
||||||
"face": "img/a8.jpg"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"id": "100009",
|
|
||||||
"name": "别闹哥胆儿小",
|
|
||||||
"face": "img/a9.jpg"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"id": "100010",
|
|
||||||
"name": "锅锅锅锅萌哒哒 ",
|
|
||||||
"face": "img/a10.jpg"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
|
@ -1,158 +0,0 @@
|
||||||
/*
|
|
||||||
|
|
||||||
@Name: layim WebIM 1.0.0
|
|
||||||
@Author:贤心(子涵修改)
|
|
||||||
@Date: 2014-04-25
|
|
||||||
@Blog: http://sentsin.com
|
|
||||||
|
|
||||||
*/
|
|
||||||
body,div,dl,dt,dd,ul,ol,li,h1,h2,h3,h4,h5,h6,input,button,textarea,p,blockquote,th,td,form{margin:0; padding:0;}
|
|
||||||
input,button,textarea,select,optgroup,option{font-family:inherit; font-size:inherit; font-style:inherit; font-weight:inherit; outline: 0;}
|
|
||||||
li{list-style:none;}
|
|
||||||
.xxim_icon, .xxim_main i, .layim_chatbox i{position:absolute;}
|
|
||||||
.loading{background:url(loading.gif) no-repeat center center;}
|
|
||||||
.layim_chatbox a, .layim_chatbox a:hover{color:#343434; text-decoration:none; }
|
|
||||||
.layim_zero{position:absolute; width:0; height:0; border-style:dashed; border-color:transparent; overflow:hidden;}
|
|
||||||
|
|
||||||
.xxim_main{position:fixed; right:1px; bottom:1px; width:230px; border:1px solid #BEBEBE; background-color:#fff; font-size:12px; box-shadow: 0 0 10px rgba(0,0,0,.2); z-index:99999999}
|
|
||||||
.layim_chatbox textarea{resize:none;}
|
|
||||||
.xxim_main em, .xxim_main i, .layim_chatbox em, .layim_chatbox i{font-style:normal; font-weight:400;}
|
|
||||||
.xxim_main h5{font-size:100%; font-weight:400;}
|
|
||||||
|
|
||||||
/* 搜索栏 */
|
|
||||||
.xxim_search{position:relative; padding-left:40px; height:40px; border-bottom:1px solid #DCDCDC; background-color:#fff;}
|
|
||||||
.xxim_search i{left:10px; top:12px; width:16px; height:16px;font-size: 16px;color:#999;}
|
|
||||||
.xxim_search input{border:none; background:none; width: 180px; margin-top:10px; line-height:20px;}
|
|
||||||
.xxim_search span{display:none; position:absolute; right:10px; top:10px; height:18px; line-height:18px;width:18px;text-align: center;background-color:#AFAFAF; color:#fff; cursor:pointer; border-radius:2px; font-size:12px; font-weight:900;}
|
|
||||||
.xxim_search span:hover{background-color:#FCBE00;}
|
|
||||||
|
|
||||||
/* 主面板tab */
|
|
||||||
.xxim_tabs{height:45px; border-bottom:1px solid #DBDBDB; background-color:#F4F4F4; font-size:0;}
|
|
||||||
.xxim_tabs span{position:relative; display:inline-block; *display:inline; *zoom:1; vertical-align:top; width:76px; height:45px; border-right:1px solid #DBDBDB; cursor:pointer; font-size:12px;}
|
|
||||||
.xxim_tabs span i{top:12px; left:50%; width:20px; margin-left:-10px; height:20px;font-size:20px;color:#ccc;}
|
|
||||||
.xxim_tabs .xxim_tabnow{height:46px; background-color:#fff;}
|
|
||||||
.xxim_tabs .xxim_tabnow i{color:#1ab394;}
|
|
||||||
.xxim_tabs .xxim_latechat{border-right:none;}
|
|
||||||
.xxim_tabs .xxim_tabfriend i{width:14px; margin-left:-7px;}
|
|
||||||
|
|
||||||
/* 主面板列表 */
|
|
||||||
.xxim_list{display:none; height:350px; padding:5px 0; overflow:hidden;}
|
|
||||||
.xxim_list:hover{ overflow-y:auto;}
|
|
||||||
.xxim_list h5{position:relative; padding-left:32px; height:26px; line-height:26px; cursor:pointer; color:#000; font-size:0;}
|
|
||||||
.xxim_list h5 span{display:inline-block; *display:inline; *zoom:1; vertical-align:top; max-width:140px; overflow:hidden; text-overflow: ellipsis; white-space:nowrap; font-size:12px;}
|
|
||||||
.xxim_list h5 i{left:15px; top:8px; width:10px; height:10px;font-size:10px;color:#666;}
|
|
||||||
.xxim_list h5 *{font-size:12px;}
|
|
||||||
.xxim_list .xxim_chatlist{display:none;}
|
|
||||||
.xxim_list .xxim_liston h5 i{width:8px; height:7px;}
|
|
||||||
.xxim_list .xxim_liston .xxim_chatlist{display:block;}
|
|
||||||
.xxim_chatlist {}
|
|
||||||
.xxim_chatlist li{position:relative; height:40px; line-height:30px; padding:5px 10px; font-size:0; cursor:pointer;}
|
|
||||||
.xxim_chatlist li:hover{background-color:#F2F4F8}
|
|
||||||
.xxim_chatlist li *{display:inline-block; *display:inline; *zoom:1; vertical-align:top; font-size:12px;}
|
|
||||||
.xxim_chatlist li span{padding-left:10px; max-width:120px; overflow:hidden; text-overflow: ellipsis; white-space:nowrap;}
|
|
||||||
.xxim_chatlist li img{width:30px; height:30px;}
|
|
||||||
.xxim_chatlist li .xxim_time{position:absolute; right:10px; color:#999;}
|
|
||||||
.xxim_list .xxim_errormsg{text-align:center; margin:50px 0; color:#999;}
|
|
||||||
.xxim_searchmain{position:absolute; width:230px; height:491px; left:0; top:41px; z-index:10; background-color:#fff;}
|
|
||||||
|
|
||||||
/* 主面板底部 */
|
|
||||||
.xxim_bottom{height:34px; border-top:1px solid #D0DCF3; background-color:#F2F4F8;}
|
|
||||||
.xxim_expend{border-left:1px solid #D0DCF3; border-bottom:1px solid #D0DCF3;}
|
|
||||||
.xxim_bottom li{position:relative; width:50px; height:32px; line-height:32px; float:left; border-right:1px solid #D0DCF3; cursor:pointer;}
|
|
||||||
.xxim_bottom li i{ top:9px;}
|
|
||||||
.xxim_bottom .xxim_hide{border-right:none;}
|
|
||||||
.xxim_bottom .xxim_online{width:72px; padding-left:35px;}
|
|
||||||
.xxim_online i{left:13px; width:14px; height:14px;font-size:14px;color:#FFA00A;}
|
|
||||||
.xxim_setonline{display:none; position:absolute; left:-79px; bottom:-1px; border:1px solid #DCDCDC; background-color:#fff;}
|
|
||||||
.xxim_setonline span{position:relative; display:block; width:32px;width: 77px; padding:0 10px 0 35px;}
|
|
||||||
.xxim_setonline span:hover{background-color:#F2F4F8;}
|
|
||||||
.xxim_offline .xxim_nowstate, .xxim_setoffline i{color:#999;}
|
|
||||||
.xxim_mymsg i{left:18px; width:14px; height:14px;font-size: 14px;}
|
|
||||||
.xxim_mymsg a{position:absolute; left:0; top:0; width:50px; height:32px;}
|
|
||||||
.xxim_seter i{left:18px; width:14px; height:14px;font-size: 14px;}
|
|
||||||
.xxim_hide i{left:18px; width:14px; height:14px;font-size: 14px;}
|
|
||||||
.xxim_show i{}
|
|
||||||
.xxim_bottom .xxim_on{position:absolute; left:-17px; top:50%; width:16px;text-align: center;color:#999;line-height: 97px; height:97px; margin-top:-49px;border:solid 1px #BEBEBE;border-right: none; background:#F2F4F8;}
|
|
||||||
.xxim_bottom .xxim_off{}
|
|
||||||
|
|
||||||
/* 聊天窗口 */
|
|
||||||
.layim_chatbox{width:620px; border:1px solid #BEBEBE; background-color:#fff; font-size:12px; box-shadow: 0 0 10px rgba(0,0,0,.2);}
|
|
||||||
.layim_chatbox h6{position:relative; height:40px; border-bottom:1px solid #D9D9D9; background-color:#FCFDFA}
|
|
||||||
.layim_move{position:absolute; height:40px; width: 620px; z-index:0;}
|
|
||||||
.layim_face{position:absolute; bottom:-1px; left:10px; width:64px; height:64px;padding:1px;background: #fff; border:1px solid #ccc;}
|
|
||||||
.layim_face img{width:60px; height:60px;}
|
|
||||||
.layim_names{position:absolute; left:90px; max-width:300px; line-height:40px; color:#000; overflow:hidden; text-overflow: ellipsis; white-space:nowrap; font-size:14px;}
|
|
||||||
.layim_rightbtn{position:absolute; right:15px; top:12px; font-size:20px;}
|
|
||||||
.layim_rightbtn i{position:relative; width:16px; height:16px; display:inline-block; *display:inline; *zoom:1; vertical-align:top; cursor:pointer; transition: all .3s;text-align: center;line-height: 16px;}
|
|
||||||
.layim_rightbtn .layim_close{background: #FFA00A;color:#fff;}
|
|
||||||
.layim_rightbtn .layim_close:hover{-webkit-transform: rotate(180deg); -moz-transform: rotate(180deg);}
|
|
||||||
.layim_rightbtn .layer_setmin{margin-right:5px;color:#999;font-size:14px;font-weight: 700;}
|
|
||||||
.layim_chat, .layim_chatmore,.layim_groups{height:450px; overflow:hidden;}
|
|
||||||
.layim_chatmore{display:none; float:left; width:135px; border-right:1px solid #BEBEBE; background-color:#F2F2F2}
|
|
||||||
.layim_chatlist li, .layim_groups li{position:relative; height:30px; line-height:30px; padding:0 10px; overflow:hidden; text-overflow: ellipsis; white-space:nowrap; cursor:pointer;}
|
|
||||||
.layim_chatlist li{padding:0 20px 0 10px;}
|
|
||||||
.layim_chatlist li:hover{background-color:#E3E3E3;}
|
|
||||||
.layim_chatlist li span{display:inline-block; *display:inline; *zoom:1; vertical-align:top; width:90px; overflow:hidden; text-overflow: ellipsis; white-space:nowrap;}
|
|
||||||
.layim_chatlist li em{display:none; position:absolute; top:6px; right:10px; height:18px; line-height:18px;width:18px;text-align: center;font-size:14px;font-weight:900; border-radius:3px;}
|
|
||||||
.layim_chatlist li em:hover{background-color: #FCBE00; color:#fff;}
|
|
||||||
.layim_chatlist .layim_chatnow,.layim_chatlist .layim_chatnow:hover{/*border-top:1px solid #D9D9D9; border-bottom:1px solid #D9D9D9;*/ background-color:#fff;}
|
|
||||||
.layim_chat{}
|
|
||||||
.layim_chatarea{height:280px;}
|
|
||||||
.layim_chatview{display:none; height:280px; overflow:hidden;}
|
|
||||||
.layim_chatmore:hover, .layim_groups:hover, .layim_chatview:hover{overflow-y:auto;}
|
|
||||||
.layim_chatview li{margin-bottom:10px; clear:both; *zoom:1;}
|
|
||||||
.layim_chatview li:after{content:'\20'; clear:both; *zoom:1; display:block; height:0;}
|
|
||||||
|
|
||||||
.layim_chatthis{display:block;}
|
|
||||||
.layim_chatuser{float:left; padding:15px; font-size:0;}
|
|
||||||
.layim_chatuser *{display:inline-block; *display:inline; *zoom:1; vertical-align:top; line-height:30px; font-size:12px; padding-right:10px;}
|
|
||||||
.layim_chatuser img{width:30px; height:30px;padding-right: 0;margin-right: 15px;}
|
|
||||||
.layim_chatuser .layim_chatname{max-width:230px; overflow:hidden; text-overflow: ellipsis; white-space:nowrap;}
|
|
||||||
.layim_chatuser .layim_chattime{color:#999; padding-left:10px;}
|
|
||||||
.layim_chatsay{position:relative; float:left; margin:0 15px; padding:10px; line-height:20px; background-color:#F3F3F3; border-radius:3px; clear:both;}
|
|
||||||
.layim_chatsay .layim_zero{left:5px; top:-8px; border-width:8px; border-right-style:solid; border-right-color:#F3F3F3;}
|
|
||||||
.layim_chateme .layim_chatuser{float:right;}
|
|
||||||
.layim_chateme .layim_chatuser *{padding-right:0; padding-left:10px;}
|
|
||||||
.layim_chateme .layim_chatuser img{margin-left:15px;padding-left: 0;}
|
|
||||||
.layim_chateme .layim_chatsay .layim_zero{left:auto; right:10px;}
|
|
||||||
.layim_chateme .layim_chatuser .layim_chattime{padding-left:0; padding-right:10px;}
|
|
||||||
.layim_chateme .layim_chatsay{float:right; background-color:#EBFBE3}
|
|
||||||
.layim_chateme .layim_zero{border-right-color:#EBFBE3;}
|
|
||||||
.layim_groups{display:none; float:right; width:130px; border-left:1px solid #D9D9D9; background-color:#fff;}
|
|
||||||
.layim_groups ul{display:none;}
|
|
||||||
.layim_groups ul.layim_groupthis{display:block;}
|
|
||||||
.layim_groups li *{display:inline-block; *display:inline; *zoom:1; vertical-align:top; margin-right:10px;}
|
|
||||||
.layim_groups li img{width:20px; height:20px; margin-top:5px;}
|
|
||||||
.layim_groups li span{max-width:80px; overflow:hidden; text-overflow: ellipsis; white-space:nowrap;}
|
|
||||||
.layim_groups li:hover{background-color:#F3F3F3;}
|
|
||||||
.layim_groups .layim_errors{text-align:center; color:#999;}
|
|
||||||
.layim_tool{position:relative; height:35px; line-height:35px; padding-left:10px; background-color:#F3F3F3;}
|
|
||||||
.layim_tool i{position:relative; top:10px; display:inline-block; *display:inline; *zoom:1; vertical-align:top; width:16px; height:16px; margin-right:10px; cursor:pointer;font-size:16px;color:#999;font-weight: 700;}
|
|
||||||
.layim_tool i:hover{color:#FFA00A;}
|
|
||||||
.layim_tool .layim_seechatlog{position:absolute; right:15px;}
|
|
||||||
.layim_tool .layim_seechatlog i{}
|
|
||||||
.layim_write{display:block; border:none; width:98%; height:90px; line-height:20px; margin:5px auto 0;}
|
|
||||||
.layim_send{position:relative; height:40px; background-color:#F3F3F3;}
|
|
||||||
.layim_sendbtn{position:absolute; height:26px; line-height:26px; right:10px; top:8px; padding:0 40px 0 20px; background-color:#FFA00A; color:#fff; border-radius:3px; cursor:pointer;}
|
|
||||||
.layim_enter{position:absolute; right:0; border-left:1px solid #FFB94F; width:24px; height:26px;}
|
|
||||||
.layim_enter:hover{background-color:#E68A00; border-radius:0 3px 3px 0;}
|
|
||||||
.layim_enter .layim_zero{left:7px; top:11px; border-width:5px; border-top-style:solid; border-top-color:#FFE0B3;}
|
|
||||||
.layim_sendtype{display:none; position:absolute; right:10px; bottom:37px; border:1px solid #D9D9D9; background-color:#fff; text-align:left;}
|
|
||||||
.layim_sendtype span{display:block; line-height:24px; padding:0 10px 0 25px; cursor:pointer;}
|
|
||||||
.layim_sendtype span:hover{background-color:#F3F3F3;}
|
|
||||||
.layim_sendtype span i{left:5px;}
|
|
||||||
|
|
||||||
.layim_min{display:none; position:absolute; left:-190px; bottom:-1px; width:160px; height:32px; line-height:32px; padding:0 10px; overflow:hidden; text-overflow: ellipsis; white-space:nowrap; border:1px solid #ccc; box-shadow: 0 0 5px rgba(0,0,75,.2); background-color:#FCFDFA; cursor:pointer;}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,630 +0,0 @@
|
||||||
/*
|
|
||||||
|
|
||||||
@Name: layui WebIM 1.0.0
|
|
||||||
@Author:贤心
|
|
||||||
@Date: 2014-04-25
|
|
||||||
@Blog: http://sentsin.com
|
|
||||||
|
|
||||||
*/
|
|
||||||
|
|
||||||
;!function(win, undefined){
|
|
||||||
|
|
||||||
var config = {
|
|
||||||
msgurl: 'mailbox.html?msg=',
|
|
||||||
chatlogurl: 'mailbox.html?user=',
|
|
||||||
aniTime: 200,
|
|
||||||
right: -232,
|
|
||||||
api: {
|
|
||||||
friend: 'js/plugins/layer/layim/data/friend.json', //好友列表接口
|
|
||||||
group: 'js/plugins/layer/layim/data/group.json', //群组列表接口
|
|
||||||
chatlog: 'js/plugins/layer/layim/data/chatlog.json', //聊天记录接口
|
|
||||||
groups: 'js/plugins/layer/layim/data/groups.json', //群组成员接口
|
|
||||||
sendurl: '' //发送消息接口
|
|
||||||
},
|
|
||||||
user: { //当前用户信息
|
|
||||||
name: '游客',
|
|
||||||
face: 'img/a1.jpg'
|
|
||||||
},
|
|
||||||
|
|
||||||
//自动回复内置文案,也可动态读取数据库配置
|
|
||||||
autoReplay: [
|
|
||||||
'您好,我现在有事不在,一会再和您联系。',
|
|
||||||
'你没发错吧?',
|
|
||||||
'洗澡中,请勿打扰,偷窥请购票,个体四十,团体八折,订票电话:一般人我不告诉他!',
|
|
||||||
'你好,我是主人的美女秘书,有什么事就跟我说吧,等他回来我会转告他的。',
|
|
||||||
'我正在拉磨,没法招呼您,因为我们家毛驴去动物保护协会把我告了,说我剥夺它休产假的权利。',
|
|
||||||
'<(@ ̄︶ ̄@)>',
|
|
||||||
'你要和我说话?你真的要和我说话?你确定自己想说吗?你一定非说不可吗?那你说吧,这是自动回复。',
|
|
||||||
'主人正在开机自检,键盘鼠标看好机会出去凉快去了,我是他的电冰箱,我打字比较慢,你慢慢说,别急……',
|
|
||||||
'(*^__^*) 嘻嘻,是贤心吗?'
|
|
||||||
],
|
|
||||||
|
|
||||||
|
|
||||||
chating: {},
|
|
||||||
hosts: (function(){
|
|
||||||
var dk = location.href.match(/\:\d+/);
|
|
||||||
dk = dk ? dk[0] : '';
|
|
||||||
return 'http://' + document.domain + dk + '/';
|
|
||||||
})(),
|
|
||||||
json: function(url, data, callback, error){
|
|
||||||
return $.ajax({
|
|
||||||
type: 'POST',
|
|
||||||
url: url,
|
|
||||||
data: data,
|
|
||||||
dataType: 'json',
|
|
||||||
success: callback,
|
|
||||||
error: error
|
|
||||||
});
|
|
||||||
},
|
|
||||||
stopMP: function(e){
|
|
||||||
e ? e.stopPropagation() : e.cancelBubble = true;
|
|
||||||
}
|
|
||||||
}, dom = [$(window), $(document), $('html'), $('body')], xxim = {};
|
|
||||||
|
|
||||||
//主界面tab
|
|
||||||
xxim.tabs = function(index){
|
|
||||||
var node = xxim.node;
|
|
||||||
node.tabs.eq(index).addClass('xxim_tabnow').siblings().removeClass('xxim_tabnow');
|
|
||||||
node.list.eq(index).show().siblings('.xxim_list').hide();
|
|
||||||
if(node.list.eq(index).find('li').length === 0){
|
|
||||||
xxim.getDates(index);
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
//节点
|
|
||||||
xxim.renode = function(){
|
|
||||||
var node = xxim.node = {
|
|
||||||
tabs: $('#xxim_tabs>span'),
|
|
||||||
list: $('.xxim_list'),
|
|
||||||
online: $('.xxim_online'),
|
|
||||||
setonline: $('.xxim_setonline'),
|
|
||||||
onlinetex: $('#xxim_onlinetex'),
|
|
||||||
xximon: $('#xxim_on'),
|
|
||||||
layimFooter: $('#xxim_bottom'),
|
|
||||||
xximHide: $('#xxim_hide'),
|
|
||||||
xximSearch: $('#xxim_searchkey'),
|
|
||||||
searchMian: $('#xxim_searchmain'),
|
|
||||||
closeSearch: $('#xxim_closesearch'),
|
|
||||||
layimMin: $('#layim_min')
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
//主界面缩放
|
|
||||||
xxim.expend = function(){
|
|
||||||
var node = xxim.node;
|
|
||||||
if(xxim.layimNode.attr('state') !== '1'){
|
|
||||||
xxim.layimNode.stop().animate({right: config.right}, config.aniTime, function(){
|
|
||||||
node.xximon.addClass('xxim_off');
|
|
||||||
try{
|
|
||||||
localStorage.layimState = 1;
|
|
||||||
}catch(e){}
|
|
||||||
xxim.layimNode.attr({state: 1});
|
|
||||||
node.layimFooter.addClass('xxim_expend').stop().animate({marginLeft: config.right}, config.aniTime/2);
|
|
||||||
node.xximHide.addClass('xxim_show');
|
|
||||||
});
|
|
||||||
} else {
|
|
||||||
xxim.layimNode.stop().animate({right: 1}, config.aniTime, function(){
|
|
||||||
node.xximon.removeClass('xxim_off');
|
|
||||||
try{
|
|
||||||
localStorage.layimState = 2;
|
|
||||||
}catch(e){}
|
|
||||||
xxim.layimNode.removeAttr('state');
|
|
||||||
node.layimFooter.removeClass('xxim_expend');
|
|
||||||
node.xximHide.removeClass('xxim_show');
|
|
||||||
});
|
|
||||||
node.layimFooter.stop().animate({marginLeft: 0}, config.aniTime);
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
//初始化窗口格局
|
|
||||||
xxim.layinit = function(){
|
|
||||||
var node = xxim.node;
|
|
||||||
|
|
||||||
//主界面
|
|
||||||
try{
|
|
||||||
/*
|
|
||||||
if(!localStorage.layimState){
|
|
||||||
config.aniTime = 0;
|
|
||||||
localStorage.layimState = 1;
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
if(localStorage.layimState === '1'){
|
|
||||||
xxim.layimNode.attr({state: 1}).css({right: config.right});
|
|
||||||
node.xximon.addClass('xxim_off');
|
|
||||||
node.layimFooter.addClass('xxim_expend').css({marginLeft: config.right});
|
|
||||||
node.xximHide.addClass('xxim_show');
|
|
||||||
}
|
|
||||||
}catch(e){
|
|
||||||
//layer.msg(e.message, 5, -1);
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
//聊天窗口
|
|
||||||
xxim.popchat = function(param){
|
|
||||||
var node = xxim.node, log = {};
|
|
||||||
|
|
||||||
log.success = function(layero){
|
|
||||||
layer.setMove();
|
|
||||||
|
|
||||||
xxim.chatbox = layero.find('#layim_chatbox');
|
|
||||||
log.chatlist = xxim.chatbox.find('.layim_chatmore>ul');
|
|
||||||
|
|
||||||
log.chatlist.html('<li data-id="'+ param.id +'" type="'+ param.type +'" id="layim_user'+ param.type + param.id +'"><span>'+ param.name +'</span><em>×</em></li>')
|
|
||||||
xxim.tabchat(param, xxim.chatbox);
|
|
||||||
|
|
||||||
//最小化聊天窗
|
|
||||||
xxim.chatbox.find('.layer_setmin').on('click', function(){
|
|
||||||
var indexs = layero.attr('times');
|
|
||||||
layero.hide();
|
|
||||||
node.layimMin.text(xxim.nowchat.name).show();
|
|
||||||
});
|
|
||||||
|
|
||||||
//关闭窗口
|
|
||||||
xxim.chatbox.find('.layim_close').on('click', function(){
|
|
||||||
var indexs = layero.attr('times');
|
|
||||||
layer.close(indexs);
|
|
||||||
xxim.chatbox = null;
|
|
||||||
config.chating = {};
|
|
||||||
config.chatings = 0;
|
|
||||||
});
|
|
||||||
|
|
||||||
//关闭某个聊天
|
|
||||||
log.chatlist.on('mouseenter', 'li', function(){
|
|
||||||
$(this).find('em').show();
|
|
||||||
}).on('mouseleave', 'li', function(){
|
|
||||||
$(this).find('em').hide();
|
|
||||||
});
|
|
||||||
log.chatlist.on('click', 'li em', function(e){
|
|
||||||
var parents = $(this).parent(), dataType = parents.attr('type');
|
|
||||||
var dataId = parents.attr('data-id'), index = parents.index();
|
|
||||||
var chatlist = log.chatlist.find('li'), indexs;
|
|
||||||
|
|
||||||
config.stopMP(e);
|
|
||||||
|
|
||||||
delete config.chating[dataType + dataId];
|
|
||||||
config.chatings--;
|
|
||||||
|
|
||||||
parents.remove();
|
|
||||||
$('#layim_area'+ dataType + dataId).remove();
|
|
||||||
if(dataType === 'group'){
|
|
||||||
$('#layim_group'+ dataType + dataId).remove();
|
|
||||||
}
|
|
||||||
|
|
||||||
if(parents.hasClass('layim_chatnow')){
|
|
||||||
if(index === config.chatings){
|
|
||||||
indexs = index - 1;
|
|
||||||
} else {
|
|
||||||
indexs = index + 1;
|
|
||||||
}
|
|
||||||
xxim.tabchat(config.chating[chatlist.eq(indexs).attr('type') + chatlist.eq(indexs).attr('data-id')]);
|
|
||||||
}
|
|
||||||
|
|
||||||
if(log.chatlist.find('li').length === 1){
|
|
||||||
log.chatlist.parent().hide();
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
//聊天选项卡
|
|
||||||
log.chatlist.on('click', 'li', function(){
|
|
||||||
var othis = $(this), dataType = othis.attr('type'), dataId = othis.attr('data-id');
|
|
||||||
xxim.tabchat(config.chating[dataType + dataId]);
|
|
||||||
});
|
|
||||||
|
|
||||||
//发送热键切换
|
|
||||||
log.sendType = $('#layim_sendtype'), log.sendTypes = log.sendType.find('span');
|
|
||||||
$('#layim_enter').on('click', function(e){
|
|
||||||
config.stopMP(e);
|
|
||||||
log.sendType.show();
|
|
||||||
});
|
|
||||||
log.sendTypes.on('click', function(){
|
|
||||||
log.sendTypes.find('i').text('')
|
|
||||||
$(this).find('i').text('√');
|
|
||||||
});
|
|
||||||
|
|
||||||
xxim.transmit();
|
|
||||||
};
|
|
||||||
|
|
||||||
log.html = '<div class="layim_chatbox" id="layim_chatbox">'
|
|
||||||
+'<h6>'
|
|
||||||
+'<span class="layim_move"></span>'
|
|
||||||
+' <a href="'+ param.url +'" class="layim_face" target="_blank"><img src="'+ param.face +'" ></a>'
|
|
||||||
+' <a href="'+ param.url +'" class="layim_names" target="_blank">'+ param.name +'</a>'
|
|
||||||
+' <span class="layim_rightbtn">'
|
|
||||||
+' <i class="layer_setmin">—</i>'
|
|
||||||
+' <i class="layim_close">×</i>'
|
|
||||||
+' </span>'
|
|
||||||
+'</h6>'
|
|
||||||
+'<div class="layim_chatmore" id="layim_chatmore">'
|
|
||||||
+' <ul class="layim_chatlist"></ul>'
|
|
||||||
+'</div>'
|
|
||||||
+'<div class="layim_groups" id="layim_groups"></div>'
|
|
||||||
+'<div class="layim_chat">'
|
|
||||||
+' <div class="layim_chatarea" id="layim_chatarea">'
|
|
||||||
+' <ul class="layim_chatview layim_chatthis" id="layim_area'+ param.type + param.id +'"></ul>'
|
|
||||||
+' </div>'
|
|
||||||
+' <div class="layim_tool">'
|
|
||||||
+' <i class="layim_addface fa fa-meh-o" title="发送表情"></i>'
|
|
||||||
+' <a href="javascript:;"><i class="layim_addimage fa fa-picture-o" title="上传图片"></i></a>'
|
|
||||||
+' <a href="javascript:;"><i class="layim_addfile fa fa-paperclip" title="上传附件"></i></a>'
|
|
||||||
+' <a href="" target="_blank" class="layim_seechatlog"><i class="fa fa-comment-o"></i>聊天记录</a>'
|
|
||||||
+' </div>'
|
|
||||||
+' <textarea class="layim_write" id="layim_write"></textarea>'
|
|
||||||
+' <div class="layim_send">'
|
|
||||||
+' <div class="layim_sendbtn" id="layim_sendbtn">发送<span class="layim_enter" id="layim_enter"><em class="layim_zero"></em></span></div>'
|
|
||||||
+' <div class="layim_sendtype" id="layim_sendtype">'
|
|
||||||
+' <span><i>√</i>按Enter键发送</span>'
|
|
||||||
+' <span><i></i>按Ctrl+Enter键发送</span>'
|
|
||||||
+' </div>'
|
|
||||||
+' </div>'
|
|
||||||
+'</div>'
|
|
||||||
+'</div>';
|
|
||||||
|
|
||||||
if(config.chatings < 1){
|
|
||||||
$.layer({
|
|
||||||
type: 1,
|
|
||||||
border: [0],
|
|
||||||
title: false,
|
|
||||||
shade: [0],
|
|
||||||
area: ['620px', '493px'],
|
|
||||||
move: '.layim_chatbox .layim_move',
|
|
||||||
moveType: 1,
|
|
||||||
closeBtn: false,
|
|
||||||
offset: [(($(window).height() - 493)/2)+'px', ''],
|
|
||||||
page: {
|
|
||||||
html: log.html
|
|
||||||
}, success: function(layero){
|
|
||||||
log.success(layero);
|
|
||||||
}
|
|
||||||
})
|
|
||||||
} else {
|
|
||||||
log.chatmore = xxim.chatbox.find('#layim_chatmore');
|
|
||||||
log.chatarea = xxim.chatbox.find('#layim_chatarea');
|
|
||||||
|
|
||||||
log.chatmore.show();
|
|
||||||
|
|
||||||
log.chatmore.find('ul>li').removeClass('layim_chatnow');
|
|
||||||
log.chatmore.find('ul').append('<li data-id="'+ param.id +'" type="'+ param.type +'" id="layim_user'+ param.type + param.id +'" class="layim_chatnow"><span>'+ param.name +'</span><em>×</em></li>');
|
|
||||||
|
|
||||||
log.chatarea.find('.layim_chatview').removeClass('layim_chatthis');
|
|
||||||
log.chatarea.append('<ul class="layim_chatview layim_chatthis" id="layim_area'+ param.type + param.id +'"></ul>');
|
|
||||||
|
|
||||||
xxim.tabchat(param);
|
|
||||||
}
|
|
||||||
|
|
||||||
//群组
|
|
||||||
log.chatgroup = xxim.chatbox.find('#layim_groups');
|
|
||||||
if(param.type === 'group'){
|
|
||||||
log.chatgroup.find('ul').removeClass('layim_groupthis');
|
|
||||||
log.chatgroup.append('<ul class="layim_groupthis" id="layim_group'+ param.type + param.id +'"></ul>');
|
|
||||||
xxim.getGroups(param);
|
|
||||||
}
|
|
||||||
//点击群员切换聊天窗
|
|
||||||
log.chatgroup.on('click', 'ul>li', function(){
|
|
||||||
xxim.popchatbox($(this));
|
|
||||||
});
|
|
||||||
};
|
|
||||||
|
|
||||||
//定位到某个聊天队列
|
|
||||||
xxim.tabchat = function(param){
|
|
||||||
var node = xxim.node, log = {}, keys = param.type + param.id;
|
|
||||||
xxim.nowchat = param;
|
|
||||||
|
|
||||||
xxim.chatbox.find('#layim_user'+ keys).addClass('layim_chatnow').siblings().removeClass('layim_chatnow');
|
|
||||||
xxim.chatbox.find('#layim_area'+ keys).addClass('layim_chatthis').siblings().removeClass('layim_chatthis');
|
|
||||||
xxim.chatbox.find('#layim_group'+ keys).addClass('layim_groupthis').siblings().removeClass('layim_groupthis');
|
|
||||||
|
|
||||||
xxim.chatbox.find('.layim_face>img').attr('src', param.face);
|
|
||||||
xxim.chatbox.find('.layim_face, .layim_names').attr('href', param.href);
|
|
||||||
xxim.chatbox.find('.layim_names').text(param.name);
|
|
||||||
|
|
||||||
xxim.chatbox.find('.layim_seechatlog').attr('href', config.chatlogurl + param.id);
|
|
||||||
|
|
||||||
log.groups = xxim.chatbox.find('.layim_groups');
|
|
||||||
if(param.type === 'group'){
|
|
||||||
log.groups.show();
|
|
||||||
} else {
|
|
||||||
log.groups.hide();
|
|
||||||
}
|
|
||||||
|
|
||||||
$('#layim_write').focus();
|
|
||||||
|
|
||||||
};
|
|
||||||
|
|
||||||
//弹出聊天窗
|
|
||||||
xxim.popchatbox = function(othis){
|
|
||||||
var node = xxim.node, dataId = othis.attr('data-id'), param = {
|
|
||||||
id: dataId, //用户ID
|
|
||||||
type: othis.attr('type'),
|
|
||||||
name: othis.find('.xxim_onename').text(), //用户名
|
|
||||||
face: othis.find('.xxim_oneface').attr('src'), //用户头像
|
|
||||||
href: 'profile.html?user=' + dataId //用户主页
|
|
||||||
}, key = param.type + dataId;
|
|
||||||
if(!config.chating[key]){
|
|
||||||
xxim.popchat(param);
|
|
||||||
config.chatings++;
|
|
||||||
} else {
|
|
||||||
xxim.tabchat(param);
|
|
||||||
}
|
|
||||||
config.chating[key] = param;
|
|
||||||
|
|
||||||
var chatbox = $('#layim_chatbox');
|
|
||||||
if(chatbox[0]){
|
|
||||||
node.layimMin.hide();
|
|
||||||
chatbox.parents('.xubox_layer').show();
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
//请求群员
|
|
||||||
xxim.getGroups = function(param){
|
|
||||||
var keys = param.type + param.id, str = '',
|
|
||||||
groupss = xxim.chatbox.find('#layim_group'+ keys);
|
|
||||||
groupss.addClass('loading');
|
|
||||||
config.json(config.api.groups, {}, function(datas){
|
|
||||||
if(datas.status === 1){
|
|
||||||
var ii = 0, lens = datas.data.length;
|
|
||||||
if(lens > 0){
|
|
||||||
for(; ii < lens; ii++){
|
|
||||||
str += '<li data-id="'+ datas.data[ii].id +'" type="one"><img src="'+ datas.data[ii].face +'" class="xxim_oneface"><span class="xxim_onename">'+ datas.data[ii].name +'</span></li>';
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
str = '<li class="layim_errors">没有群员</li>';
|
|
||||||
}
|
|
||||||
|
|
||||||
} else {
|
|
||||||
str = '<li class="layim_errors">'+ datas.msg +'</li>';
|
|
||||||
}
|
|
||||||
groupss.removeClass('loading');
|
|
||||||
groupss.html(str);
|
|
||||||
}, function(){
|
|
||||||
groupss.removeClass('loading');
|
|
||||||
groupss.html('<li class="layim_errors">请求异常</li>');
|
|
||||||
});
|
|
||||||
};
|
|
||||||
|
|
||||||
//消息传输
|
|
||||||
xxim.transmit = function(){
|
|
||||||
var node = xxim.node, log = {};
|
|
||||||
node.sendbtn = $('#layim_sendbtn');
|
|
||||||
node.imwrite = $('#layim_write');
|
|
||||||
|
|
||||||
//发送
|
|
||||||
log.send = function(){
|
|
||||||
var data = {
|
|
||||||
content: node.imwrite.val(),
|
|
||||||
id: xxim.nowchat.id,
|
|
||||||
sign_key: '', //密匙
|
|
||||||
_: +new Date
|
|
||||||
};
|
|
||||||
|
|
||||||
if(data.content.replace(/\s/g, '') === ''){
|
|
||||||
layer.tips('说点啥呗!', '#layim_write', 2);
|
|
||||||
node.imwrite.focus();
|
|
||||||
} else {
|
|
||||||
//此处皆为模拟
|
|
||||||
var keys = xxim.nowchat.type + xxim.nowchat.id;
|
|
||||||
|
|
||||||
//聊天模版
|
|
||||||
log.html = function(param, type){
|
|
||||||
return '<li class="'+ (type === 'me' ? 'layim_chateme' : '') +'">'
|
|
||||||
+'<div class="layim_chatuser">'
|
|
||||||
+ function(){
|
|
||||||
if(type === 'me'){
|
|
||||||
return '<span class="layim_chattime">'+ param.time +'</span>'
|
|
||||||
+'<span class="layim_chatname">'+ param.name +'</span>'
|
|
||||||
+'<img src="'+ param.face +'" >';
|
|
||||||
} else {
|
|
||||||
return '<img src="'+ param.face +'" >'
|
|
||||||
+'<span class="layim_chatname">'+ param.name +'</span>'
|
|
||||||
+'<span class="layim_chattime">'+ param.time +'</span>';
|
|
||||||
}
|
|
||||||
}()
|
|
||||||
+'</div>'
|
|
||||||
+'<div class="layim_chatsay">'+ param.content +'<em class="layim_zero"></em></div>'
|
|
||||||
+'</li>';
|
|
||||||
};
|
|
||||||
|
|
||||||
log.imarea = xxim.chatbox.find('#layim_area'+ keys);
|
|
||||||
|
|
||||||
log.imarea.append(log.html({
|
|
||||||
time: '2014-04-26 0:37',
|
|
||||||
name: config.user.name,
|
|
||||||
face: config.user.face,
|
|
||||||
content: data.content
|
|
||||||
}, 'me'));
|
|
||||||
node.imwrite.val('').focus();
|
|
||||||
log.imarea.scrollTop(log.imarea[0].scrollHeight);
|
|
||||||
|
|
||||||
setTimeout(function(){
|
|
||||||
log.imarea.append(log.html({
|
|
||||||
time: '2014-04-26 0:38',
|
|
||||||
name: xxim.nowchat.name,
|
|
||||||
face: xxim.nowchat.face,
|
|
||||||
content: config.autoReplay[(Math.random()*config.autoReplay.length) | 0]
|
|
||||||
}));
|
|
||||||
log.imarea.scrollTop(log.imarea[0].scrollHeight);
|
|
||||||
}, 500);
|
|
||||||
|
|
||||||
/*
|
|
||||||
that.json(config.api.sendurl, data, function(datas){
|
|
||||||
|
|
||||||
});
|
|
||||||
*/
|
|
||||||
}
|
|
||||||
|
|
||||||
};
|
|
||||||
node.sendbtn.on('click', log.send);
|
|
||||||
|
|
||||||
node.imwrite.keyup(function(e){
|
|
||||||
if(e.keyCode === 13){
|
|
||||||
log.send();
|
|
||||||
}
|
|
||||||
});
|
|
||||||
};
|
|
||||||
|
|
||||||
//事件
|
|
||||||
xxim.event = function(){
|
|
||||||
var node = xxim.node;
|
|
||||||
|
|
||||||
//主界面tab
|
|
||||||
node.tabs.eq(0).addClass('xxim_tabnow');
|
|
||||||
node.tabs.on('click', function(){
|
|
||||||
var othis = $(this), index = othis.index();
|
|
||||||
xxim.tabs(index);
|
|
||||||
});
|
|
||||||
|
|
||||||
//列表展收
|
|
||||||
node.list.on('click', 'h5', function(){
|
|
||||||
var othis = $(this), chat = othis.siblings('.xxim_chatlist'), parentss = othis.find("i");
|
|
||||||
if(parentss.hasClass('fa-caret-down')){
|
|
||||||
chat.hide();
|
|
||||||
parentss.attr('class','fa fa-caret-right');
|
|
||||||
} else {
|
|
||||||
chat.show();
|
|
||||||
parentss.attr('class','fa fa-caret-down');
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
//设置在线隐身
|
|
||||||
node.online.on('click', function(e){
|
|
||||||
config.stopMP(e);
|
|
||||||
node.setonline.show();
|
|
||||||
});
|
|
||||||
node.setonline.find('span').on('click', function(e){
|
|
||||||
var index = $(this).index();
|
|
||||||
config.stopMP(e);
|
|
||||||
if(index === 0){
|
|
||||||
node.onlinetex.html('在线');
|
|
||||||
node.online.removeClass('xxim_offline');
|
|
||||||
} else if(index === 1) {
|
|
||||||
node.onlinetex.html('隐身');
|
|
||||||
node.online.addClass('xxim_offline');
|
|
||||||
}
|
|
||||||
node.setonline.hide();
|
|
||||||
});
|
|
||||||
|
|
||||||
node.xximon.on('click', xxim.expend);
|
|
||||||
node.xximHide.on('click', xxim.expend);
|
|
||||||
|
|
||||||
//搜索
|
|
||||||
node.xximSearch.keyup(function(){
|
|
||||||
var val = $(this).val().replace(/\s/g, '');
|
|
||||||
if(val !== ''){
|
|
||||||
node.searchMian.show();
|
|
||||||
node.closeSearch.show();
|
|
||||||
//此处的搜索ajax参考xxim.getDates
|
|
||||||
node.list.eq(3).html('<li class="xxim_errormsg">没有符合条件的结果</li>');
|
|
||||||
} else {
|
|
||||||
node.searchMian.hide();
|
|
||||||
node.closeSearch.hide();
|
|
||||||
}
|
|
||||||
});
|
|
||||||
node.closeSearch.on('click', function(){
|
|
||||||
$(this).hide();
|
|
||||||
node.searchMian.hide();
|
|
||||||
node.xximSearch.val('').focus();
|
|
||||||
});
|
|
||||||
|
|
||||||
//弹出聊天窗
|
|
||||||
config.chatings = 0;
|
|
||||||
node.list.on('click', '.xxim_childnode', function(){
|
|
||||||
var othis = $(this);
|
|
||||||
xxim.popchatbox(othis);
|
|
||||||
});
|
|
||||||
|
|
||||||
//点击最小化栏
|
|
||||||
node.layimMin.on('click', function(){
|
|
||||||
$(this).hide();
|
|
||||||
$('#layim_chatbox').parents('.xubox_layer').show();
|
|
||||||
});
|
|
||||||
|
|
||||||
|
|
||||||
//document事件
|
|
||||||
dom[1].on('click', function(){
|
|
||||||
node.setonline.hide();
|
|
||||||
$('#layim_sendtype').hide();
|
|
||||||
});
|
|
||||||
};
|
|
||||||
|
|
||||||
//请求列表数据
|
|
||||||
xxim.getDates = function(index){
|
|
||||||
var api = [config.api.friend, config.api.group, config.api.chatlog],
|
|
||||||
node = xxim.node, myf = node.list.eq(index);
|
|
||||||
myf.addClass('loading');
|
|
||||||
config.json(api[index], {}, function(datas){
|
|
||||||
if(datas.status === 1){
|
|
||||||
var i = 0, myflen = datas.data.length, str = '', item;
|
|
||||||
if(myflen > 1){
|
|
||||||
if(index !== 2){
|
|
||||||
for(; i < myflen; i++){
|
|
||||||
str += '<li data-id="'+ datas.data[i].id +'" class="xxim_parentnode">'
|
|
||||||
+'<h5><i class="fa fa-caret-right"></i><span class="xxim_parentname">'+ datas.data[i].name +'</span><em class="xxim_nums">('+ datas.data[i].nums +')</em></h5>'
|
|
||||||
+'<ul class="xxim_chatlist">';
|
|
||||||
item = datas.data[i].item;
|
|
||||||
for(var j = 0; j < item.length; j++){
|
|
||||||
str += '<li data-id="'+ item[j].id +'" class="xxim_childnode" type="'+ (index === 0 ? 'one' : 'group') +'"><img src="'+ item[j].face +'" class="xxim_oneface"><span class="xxim_onename">'+ item[j].name +'</span></li>';
|
|
||||||
}
|
|
||||||
str += '</ul></li>';
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
str += '<li class="xxim_liston">'
|
|
||||||
+'<ul class="xxim_chatlist">';
|
|
||||||
for(; i < myflen; i++){
|
|
||||||
str += '<li data-id="'+ datas.data[i].id +'" class="xxim_childnode" type="one"><img src="'+ datas.data[i].face +'" class="xxim_oneface"><span class="xxim_onename">'+ datas.data[i].name +'</span><em class="xxim_time">'+ datas.data[i].time +'</em></li>';
|
|
||||||
}
|
|
||||||
str += '</ul></li>';
|
|
||||||
}
|
|
||||||
myf.html(str);
|
|
||||||
} else {
|
|
||||||
myf.html('<li class="xxim_errormsg">没有任何数据</li>');
|
|
||||||
}
|
|
||||||
myf.removeClass('loading');
|
|
||||||
} else {
|
|
||||||
myf.html('<li class="xxim_errormsg">'+ datas.msg +'</li>');
|
|
||||||
}
|
|
||||||
}, function(){
|
|
||||||
myf.html('<li class="xxim_errormsg">请求失败</li>');
|
|
||||||
myf.removeClass('loading');
|
|
||||||
});
|
|
||||||
};
|
|
||||||
|
|
||||||
//渲染骨架
|
|
||||||
xxim.view = (function(){
|
|
||||||
var xximNode = xxim.layimNode = $('<div id="xximmm" class="xxim_main">'
|
|
||||||
+'<div class="xxim_top" id="xxim_top">'
|
|
||||||
+' <div class="xxim_search"><i class="fa fa-search"></i><input id="xxim_searchkey" /><span id="xxim_closesearch">×</span></div>'
|
|
||||||
+' <div class="xxim_tabs" id="xxim_tabs"><span class="xxim_tabfriend" title="好友"><i class="fa fa-user"></i></span><span class="xxim_tabgroup" title="群组"><i class="fa fa-users"></i></span><span class="xxim_latechat" title="最近聊天"><i class="fa fa-clock-o"></i></span></div>'
|
|
||||||
+' <ul class="xxim_list" style="display:block"></ul>'
|
|
||||||
+' <ul class="xxim_list"></ul>'
|
|
||||||
+' <ul class="xxim_list"></ul>'
|
|
||||||
+' <ul class="xxim_list xxim_searchmain" id="xxim_searchmain"></ul>'
|
|
||||||
+'</div>'
|
|
||||||
+'<ul class="xxim_bottom" id="xxim_bottom">'
|
|
||||||
+'<li class="xxim_online" id="xxim_online">'
|
|
||||||
+'<i class="xxim_nowstate fa fa-check-circle"></i><span id="xxim_onlinetex">在线</span>'
|
|
||||||
+'<div class="xxim_setonline">'
|
|
||||||
+'<span><i class="fa fa-check-circle"></i>在线</span>'
|
|
||||||
+'<span class="xxim_setoffline"><i class="fa fa-check-circle"></i>隐身</span>'
|
|
||||||
+'</div>'
|
|
||||||
+'</li>'
|
|
||||||
+'<li class="xxim_mymsg" id="xxim_mymsg" title="我的私信"><i class="fa fa-comment"></i><a href="'+ config.msgurl +'" target="_blank"></a></li>'
|
|
||||||
+'<li class="xxim_seter" id="xxim_seter" title="设置">'
|
|
||||||
+'<i class="fa fa-gear"></i>'
|
|
||||||
+'<div>'
|
|
||||||
|
|
||||||
+'</div>'
|
|
||||||
+'</li>'
|
|
||||||
+'<li class="xxim_hide" id="xxim_hide"><i class="fa fa-exchange"></i></li>'
|
|
||||||
+'<li id="xxim_on" class="xxim_icon xxim_on fa fa-ellipsis-v"></li>'
|
|
||||||
+'<div class="layim_min" id="layim_min"></div>'
|
|
||||||
+'</ul>'
|
|
||||||
+'</div>');
|
|
||||||
dom[3].append(xximNode);
|
|
||||||
|
|
||||||
xxim.renode();
|
|
||||||
xxim.getDates(0);
|
|
||||||
xxim.event();
|
|
||||||
xxim.layinit();
|
|
||||||
}());
|
|
||||||
|
|
||||||
}(window);
|
|
||||||
|
|
Before Width: | Height: | Size: 166 B |
|
@ -1,2 +0,0 @@
|
||||||
/*! layer mobile-v2.0.0 Web弹层组件 MIT License http://layer.layui.com/mobile By 贤心 */
|
|
||||||
;!function(e){"use strict";var t=document,n="querySelectorAll",i="getElementsByClassName",a=function(e){return t[n](e)},s={type:0,shade:!0,shadeClose:!0,fixed:!0,anim:"scale"},l={extend:function(e){var t=JSON.parse(JSON.stringify(s));for(var n in e)t[n]=e[n];return t},timer:{},end:{}};l.touch=function(e,t){e.addEventListener("click",function(e){t.call(this,e)},!1)};var r=0,o=["layui-m-layer"],c=function(e){var t=this;t.config=l.extend(e),t.view()};c.prototype.view=function(){var e=this,n=e.config,s=t.createElement("div");e.id=s.id=o[0]+r,s.setAttribute("class",o[0]+" "+o[0]+(n.type||0)),s.setAttribute("index",r);var l=function(){var e="object"==typeof n.title;return n.title?'<h3 style="'+(e?n.title[1]:"")+'">'+(e?n.title[0]:n.title)+"</h3>":""}(),c=function(){"string"==typeof n.btn&&(n.btn=[n.btn]);var e,t=(n.btn||[]).length;return 0!==t&&n.btn?(e='<span yes type="1">'+n.btn[0]+"</span>",2===t&&(e='<span no type="0">'+n.btn[1]+"</span>"+e),'<div class="layui-m-layerbtn">'+e+"</div>"):""}();if(n.fixed||(n.top=n.hasOwnProperty("top")?n.top:100,n.style=n.style||"",n.style+=" top:"+(t.body.scrollTop+n.top)+"px"),2===n.type&&(n.content='<i></i><i class="layui-m-layerload"></i><i></i><p>'+(n.content||"")+"</p>"),n.skin&&(n.anim="up"),"msg"===n.skin&&(n.shade=!1),s.innerHTML=(n.shade?"<div "+("string"==typeof n.shade?'style="'+n.shade+'"':"")+' class="layui-m-layershade"></div>':"")+'<div class="layui-m-layermain" '+(n.fixed?"":'style="position:static;"')+'><div class="layui-m-layersection"><div class="layui-m-layerchild '+(n.skin?"layui-m-layer-"+n.skin+" ":"")+(n.className?n.className:"")+" "+(n.anim?"layui-m-anim-"+n.anim:"")+'" '+(n.style?'style="'+n.style+'"':"")+">"+l+'<div class="layui-m-layercont">'+n.content+"</div>"+c+"</div></div></div>",!n.type||2===n.type){var d=t[i](o[0]+n.type),y=d.length;y>=1&&layer.close(d[0].getAttribute("index"))}document.body.appendChild(s);var u=e.elem=a("#"+e.id)[0];n.success&&n.success(u),e.index=r++,e.action(n,u)},c.prototype.action=function(e,t){var n=this;e.time&&(l.timer[n.index]=setTimeout(function(){layer.close(n.index)},1e3*e.time));var a=function(){var t=this.getAttribute("type");0==t?(e.no&&e.no(),layer.close(n.index)):e.yes?e.yes(n.index):layer.close(n.index)};if(e.btn)for(var s=t[i]("layui-m-layerbtn")[0].children,r=s.length,o=0;o<r;o++)l.touch(s[o],a);if(e.shade&&e.shadeClose){var c=t[i]("layui-m-layershade")[0];l.touch(c,function(){layer.close(n.index,e.end)})}e.end&&(l.end[n.index]=e.end)},e.layer={v:"2.0",index:r,open:function(e){var t=new c(e||{});return t.index},close:function(e){var n=a("#"+o[0]+e)[0];n&&(n.innerHTML="",t.body.removeChild(n),clearTimeout(l.timer[e]),delete l.timer[e],"function"==typeof l.end[e]&&l.end[e](),delete l.end[e])},closeAll:function(){for(var e=t[i](o[0]),n=0,a=e.length;n<a;n++)layer.close(0|e[0].getAttribute("index"))}},"function"==typeof define?define(function(){return layer}):function(){var e=document.scripts,n=e[e.length-1],i=n.src,a=i.substring(0,i.lastIndexOf("/")+1);n.getAttribute("merge")||document.head.appendChild(function(){var e=t.createElement("link");return e.href=a+"need/layer.css?2.0",e.type="text/css",e.rel="styleSheet",e.id="layermcss",e}())}()}(window);
|
|
Before Width: | Height: | Size: 11 KiB |
Before Width: | Height: | Size: 7.5 KiB |
Before Width: | Height: | Size: 210 B |
Before Width: | Height: | Size: 32 KiB |
Before Width: | Height: | Size: 5.7 KiB |
Before Width: | Height: | Size: 701 B |
Before Width: | Height: | Size: 1.7 KiB |
Before Width: | Height: | Size: 2.3 KiB |
Before Width: | Height: | Size: 221 B |
|
@ -1,8 +0,0 @@
|
||||||
/*!
|
|
||||||
|
|
||||||
@Name: layer拓展样式
|
|
||||||
@Date: 2012.12.13
|
|
||||||
@Author: 贤心
|
|
||||||
@blog: sentsin.com
|
|
||||||
|
|
||||||
*/.layui-layer-imgbar,.layui-layer-imgtit a,.layui-layer-tab .layui-layer-title span{text-overflow:ellipsis;white-space:nowrap}.layui-layer-iconext{background:url(default/icon-ext.png) no-repeat}html #layui_layer_skinlayerextcss{display:none;position:absolute;width:1989px}.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-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;background:url(default/xubox_loading1.gif) center center no-repeat #000}.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}
|
|
Before Width: | Height: | Size: 7.4 KiB |
|
@ -1,141 +0,0 @@
|
||||||
/*
|
|
||||||
* layer皮肤
|
|
||||||
* 作者:一☆隐☆一
|
|
||||||
* QQ:9073194
|
|
||||||
* 请保留这里的信息 谢谢!虽然你不保留我也不能把你怎么样!
|
|
||||||
*/
|
|
||||||
|
|
||||||
html #layui_layer_skinmoonstylecss {
|
|
||||||
display: none;
|
|
||||||
position: absolute;
|
|
||||||
width: 1989px;
|
|
||||||
}
|
|
||||||
body .layer-ext-moon[type="dialog"] {
|
|
||||||
min-width: 320px;
|
|
||||||
}
|
|
||||||
body .layer-ext-moon-msg[type="dialog"]{min-width:200px;}
|
|
||||||
body .layer-ext-moon .layui-layer-title {
|
|
||||||
background: #f6f6f6;
|
|
||||||
color: #212a31;
|
|
||||||
font-size: 16px;
|
|
||||||
font-weight: bold;
|
|
||||||
height: 46px;
|
|
||||||
line-height: 46px;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
body .layer-ext-moon .layui-layer-content .layui-layer-ico {
|
|
||||||
height: 32px;
|
|
||||||
width: 32px;
|
|
||||||
top:18.5px;
|
|
||||||
}
|
|
||||||
body .layer-ext-moon .layui-layer-ico0 {
|
|
||||||
background: url(default.png) no-repeat -96px 0;
|
|
||||||
;
|
|
||||||
}
|
|
||||||
body .layer-ext-moon .layui-layer-ico1 {
|
|
||||||
background: url(default.png) no-repeat -224px 0;
|
|
||||||
;
|
|
||||||
}
|
|
||||||
body .layer-ext-moon .layui-layer-ico2 {
|
|
||||||
background: url(default.png) no-repeat -192px 0;
|
|
||||||
}
|
|
||||||
body .layer-ext-moon .layui-layer-ico3 {
|
|
||||||
background: url(default.png) no-repeat -160px 0;
|
|
||||||
}
|
|
||||||
body .layer-ext-moon .layui-layer-ico4 {
|
|
||||||
background: url(default.png) no-repeat -320px 0;
|
|
||||||
}
|
|
||||||
body .layer-ext-moon .layui-layer-ico5 {
|
|
||||||
background: url(default.png) no-repeat -288px 0;
|
|
||||||
}
|
|
||||||
body .layer-ext-moon .layui-layer-ico6 {
|
|
||||||
background: url(default.png) -256px 0;
|
|
||||||
}
|
|
||||||
body .layer-ext-moon .layui-layer-ico7 {
|
|
||||||
background: url(default.png) no-repeat -128px 0;
|
|
||||||
}
|
|
||||||
body .layer-ext-moon .layui-layer-setwin {
|
|
||||||
top: 15px;
|
|
||||||
right: 15px;
|
|
||||||
}
|
|
||||||
body .layer-ext-moon .layui-layer-setwin a {
|
|
||||||
width: 16px;
|
|
||||||
height: 16px;
|
|
||||||
}
|
|
||||||
body .layer-ext-moon .layui-layer-setwin .layui-layer-min cite:hover {
|
|
||||||
background-color: #56abe4;
|
|
||||||
}
|
|
||||||
body .layer-ext-moon .layui-layer-setwin .layui-layer-max {
|
|
||||||
background: url(default.png) no-repeat -80px 0;
|
|
||||||
}
|
|
||||||
body .layer-ext-moon .layui-layer-setwin .layui-layer-max:hover {
|
|
||||||
background: url(default.png) no-repeat -64px 0;
|
|
||||||
}
|
|
||||||
body .layer-ext-moon .layui-layer-setwin .layui-layer-maxmin {
|
|
||||||
background: url(default.png) no-repeat -32px 0;
|
|
||||||
}
|
|
||||||
body .layer-ext-moon .layui-layer-setwin .layui-layer-maxmin:hover {
|
|
||||||
background: url(default.png) no-repeat -16px 0;
|
|
||||||
}
|
|
||||||
body .layer-ext-moon .layui-layer-setwin .layui-layer-close1,body .layer-ext-moon .layui-layer-setwin .layui-layer-close2 {
|
|
||||||
background: url(default.png) 0 0;
|
|
||||||
}
|
|
||||||
body .layer-ext-moon .layui-layer-setwin .layui-layer-close1:hover,body .layer-ext-moon .layui-layer-setwin .layui-layer-close2:hover {
|
|
||||||
background: url(default.png) -48px 0;
|
|
||||||
}
|
|
||||||
body .layer-ext-moon .layui-layer-padding{padding-top: 24px;}
|
|
||||||
body .layer-ext-moon .layui-layer-btn {
|
|
||||||
padding: 15px 0;
|
|
||||||
background: #f0f4f7;
|
|
||||||
border-top: 1px #c7c7c7 solid;
|
|
||||||
}
|
|
||||||
body .layer-ext-moon .layui-layer-btn a {
|
|
||||||
font-size: 12px;
|
|
||||||
font-weight: normal;
|
|
||||||
margin: 0 3px;
|
|
||||||
margin-right: 7px;
|
|
||||||
margin-left: 7px;
|
|
||||||
padding: 6px 20px;
|
|
||||||
color: #fff;
|
|
||||||
border: 1px solid #0064b6;
|
|
||||||
background: #0071ce;
|
|
||||||
border-radius: 3px;
|
|
||||||
display: inline-block;
|
|
||||||
height: 20px;
|
|
||||||
line-height: 20px;
|
|
||||||
text-align: center;
|
|
||||||
vertical-align: middle;
|
|
||||||
background-repeat: no-repeat;
|
|
||||||
text-decoration: none;
|
|
||||||
outline: none;
|
|
||||||
-moz-box-sizing: content-box;
|
|
||||||
-webkit-box-sizing: content-box;
|
|
||||||
box-sizing: content-box;
|
|
||||||
}
|
|
||||||
body .layer-ext-moon .layui-layer-btn .layui-layer-btn0 {
|
|
||||||
background: #0071ce;
|
|
||||||
}
|
|
||||||
body .layer-ext-moon .layui-layer-btn .layui-layer-btn1 {
|
|
||||||
background: #fff;
|
|
||||||
color: #404a58;
|
|
||||||
border: 1px solid #c0c4cd;
|
|
||||||
border-radius: 3px;
|
|
||||||
}
|
|
||||||
body .layer-ext-moon .layui-layer-btn .layui-layer-btn2 {
|
|
||||||
background: #f60;
|
|
||||||
color: #fff;
|
|
||||||
border: 1px solid #f60;
|
|
||||||
border-radius: 3px;
|
|
||||||
}
|
|
||||||
body .layer-ext-moon .layui-layer-btn .layui-layer-btn3 {
|
|
||||||
background: #f00;
|
|
||||||
color: #fff;
|
|
||||||
border: 1px solid #f00;
|
|
||||||
border-radius: 3px;
|
|
||||||
}
|
|
||||||
|
|
||||||
body .layer-ext-moon .layui-layer-title span.layui-layer-tabnow{
|
|
||||||
height:46px;
|
|
||||||
}
|
|
Before Width: | Height: | Size: 5.8 KiB |
Before Width: | Height: | Size: 5.7 KiB |
Before Width: | Height: | Size: 701 B |
Before Width: | Height: | Size: 1.7 KiB |
|
@ -1,120 +0,0 @@
|
||||||
/*
|
|
||||||
* metismenu - v1.1.3
|
|
||||||
* Easy menu jQuery plugin for Twitter Bootstrap 3
|
|
||||||
* https://github.com/onokumus/metisMenu
|
|
||||||
*
|
|
||||||
* Made by Osman Nuri Okumus
|
|
||||||
* Under MIT License
|
|
||||||
*/
|
|
||||||
;(function($, window, document, undefined) {
|
|
||||||
|
|
||||||
var pluginName = "metisMenu",
|
|
||||||
defaults = {
|
|
||||||
toggle: true,
|
|
||||||
doubleTapToGo: false
|
|
||||||
};
|
|
||||||
|
|
||||||
function Plugin(element, options) {
|
|
||||||
this.element = $(element);
|
|
||||||
this.settings = $.extend({}, defaults, options);
|
|
||||||
this._defaults = defaults;
|
|
||||||
this._name = pluginName;
|
|
||||||
this.init();
|
|
||||||
}
|
|
||||||
|
|
||||||
Plugin.prototype = {
|
|
||||||
init: function() {
|
|
||||||
|
|
||||||
var $this = this.element,
|
|
||||||
$toggle = this.settings.toggle,
|
|
||||||
obj = this;
|
|
||||||
|
|
||||||
if (this.isIE() <= 9) {
|
|
||||||
$this.find("li.active").has("ul").children("ul").collapse("show");
|
|
||||||
$this.find("li").not(".active").has("ul").children("ul").collapse("hide");
|
|
||||||
} else {
|
|
||||||
$this.find("li.active").has("ul").children("ul").addClass("collapse in");
|
|
||||||
$this.find("li").not(".active").has("ul").children("ul").addClass("collapse");
|
|
||||||
}
|
|
||||||
|
|
||||||
//add the "doubleTapToGo" class to active items if needed
|
|
||||||
if (obj.settings.doubleTapToGo) {
|
|
||||||
$this.find("li.active").has("ul").children("a").addClass("doubleTapToGo");
|
|
||||||
}
|
|
||||||
|
|
||||||
$this.find("li").has("ul").children("a").on("click" + "." + pluginName, function(e) {
|
|
||||||
e.preventDefault();
|
|
||||||
|
|
||||||
//Do we need to enable the double tap
|
|
||||||
if (obj.settings.doubleTapToGo) {
|
|
||||||
|
|
||||||
//if we hit a second time on the link and the href is valid, navigate to that url
|
|
||||||
if (obj.doubleTapToGo($(this)) && $(this).attr("href") !== "#" && $(this).attr("href") !== "") {
|
|
||||||
e.stopPropagation();
|
|
||||||
document.location = $(this).attr("href");
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
$(this).parent("li").toggleClass("active").children("ul").collapse("toggle");
|
|
||||||
|
|
||||||
if ($toggle) {
|
|
||||||
$(this).parent("li").siblings().removeClass("active").children("ul.in").collapse("hide");
|
|
||||||
}
|
|
||||||
|
|
||||||
});
|
|
||||||
},
|
|
||||||
|
|
||||||
isIE: function() { //https://gist.github.com/padolsey/527683
|
|
||||||
var undef,
|
|
||||||
v = 3,
|
|
||||||
div = document.createElement("div"),
|
|
||||||
all = div.getElementsByTagName("i");
|
|
||||||
|
|
||||||
while (
|
|
||||||
div.innerHTML = "<!--[if gt IE " + (++v) + "]><i></i><![endif]-->",
|
|
||||||
all[0]
|
|
||||||
) {
|
|
||||||
return v > 4 ? v : undef;
|
|
||||||
}
|
|
||||||
},
|
|
||||||
|
|
||||||
//Enable the link on the second click.
|
|
||||||
doubleTapToGo: function(elem) {
|
|
||||||
var $this = this.element;
|
|
||||||
|
|
||||||
//if the class "doubleTapToGo" exists, remove it and return
|
|
||||||
if (elem.hasClass("doubleTapToGo")) {
|
|
||||||
elem.removeClass("doubleTapToGo");
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
//does not exists, add a new class and return false
|
|
||||||
if (elem.parent().children("ul").length) {
|
|
||||||
//first remove all other class
|
|
||||||
$this.find(".doubleTapToGo").removeClass("doubleTapToGo");
|
|
||||||
//add the class on the current element
|
|
||||||
elem.addClass("doubleTapToGo");
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
},
|
|
||||||
|
|
||||||
remove: function() {
|
|
||||||
this.element.off("." + pluginName);
|
|
||||||
this.element.removeData(pluginName);
|
|
||||||
}
|
|
||||||
|
|
||||||
};
|
|
||||||
|
|
||||||
$.fn[pluginName] = function(options) {
|
|
||||||
this.each(function () {
|
|
||||||
var el = $(this);
|
|
||||||
if (el.data(pluginName)) {
|
|
||||||
el.data(pluginName).remove();
|
|
||||||
}
|
|
||||||
el.data(pluginName, new Plugin(this, options));
|
|
||||||
});
|
|
||||||
return this;
|
|
||||||
};
|
|
||||||
|
|
||||||
})(jQuery, window, document);
|
|
|
@ -1,15 +0,0 @@
|
||||||
/*! Copyright (c) 2011 Piotr Rochala (http://rocha.la)
|
|
||||||
* Dual licensed under the MIT (http://www.opensource.org/licenses/mit-license.php)
|
|
||||||
* and GPL (http://www.opensource.org/licenses/gpl-license.php) licenses.
|
|
||||||
*
|
|
||||||
* Version: 1.3.0
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
(function(f){jQuery.fn.extend({slimScroll:function(h){var a=f.extend({width:"auto",height:"250px",size:"4px",color:"#000",position:"right",distance:"1px",start:"top",opacity:0.4,alwaysVisible:!1,disableFadeOut:!1,railVisible:!1,railColor:"#333",railOpacity:0.2,railDraggable:!0,railClass:"slimScrollRail",barClass:"slimScrollBar",wrapperClass:"slimScrollDiv",allowPageScroll:!1,wheelStep:20,touchScrollStep:200,borderRadius:"7px",railBorderRadius:"7px"},h);this.each(function(){function r(d){if(s){d=d||
|
|
||||||
window.event;var c=0;d.wheelDelta&&(c=-d.wheelDelta/120);d.detail&&(c=d.detail/3);f(d.target||d.srcTarget||d.srcElement).closest("."+a.wrapperClass).is(b.parent())&&m(c,!0);d.preventDefault&&!k&&d.preventDefault();k||(d.returnValue=!1)}}function m(d,f,h){k=!1;var e=d,g=b.outerHeight()-c.outerHeight();f&&(e=parseInt(c.css("top"))+d*parseInt(a.wheelStep)/100*c.outerHeight(),e=Math.min(Math.max(e,0),g),e=0<d?Math.ceil(e):Math.floor(e),c.css({top:e+"px"}));l=parseInt(c.css("top"))/(b.outerHeight()-c.outerHeight());
|
|
||||||
e=l*(b[0].scrollHeight-b.outerHeight());h&&(e=d,d=e/b[0].scrollHeight*b.outerHeight(),d=Math.min(Math.max(d,0),g),c.css({top:d+"px"}));b.scrollTop(e);b.trigger("slimscrolling",~~e);v();p()}function C(){window.addEventListener?(this.addEventListener("DOMMouseScroll",r,!1),this.addEventListener("mousewheel",r,!1),this.addEventListener("MozMousePixelScroll",r,!1)):document.attachEvent("onmousewheel",r)}function w(){u=Math.max(b.outerHeight()/b[0].scrollHeight*b.outerHeight(),D);c.css({height:u+"px"});
|
|
||||||
var a=u==b.outerHeight()?"none":"block";c.css({display:a})}function v(){w();clearTimeout(A);l==~~l?(k=a.allowPageScroll,B!=l&&b.trigger("slimscroll",0==~~l?"top":"bottom")):k=!1;B=l;u>=b.outerHeight()?k=!0:(c.stop(!0,!0).fadeIn("fast"),a.railVisible&&g.stop(!0,!0).fadeIn("fast"))}function p(){a.alwaysVisible||(A=setTimeout(function(){a.disableFadeOut&&s||(x||y)||(c.fadeOut("slow"),g.fadeOut("slow"))},1E3))}var s,x,y,A,z,u,l,B,D=30,k=!1,b=f(this);if(b.parent().hasClass(a.wrapperClass)){var n=b.scrollTop(),
|
|
||||||
c=b.parent().find("."+a.barClass),g=b.parent().find("."+a.railClass);w();if(f.isPlainObject(h)){if("height"in h&&"auto"==h.height){b.parent().css("height","auto");b.css("height","auto");var q=b.parent().parent().height();b.parent().css("height",q);b.css("height",q)}if("scrollTo"in h)n=parseInt(a.scrollTo);else if("scrollBy"in h)n+=parseInt(a.scrollBy);else if("destroy"in h){c.remove();g.remove();b.unwrap();return}m(n,!1,!0)}}else{a.height="auto"==a.height?b.parent().height():a.height;n=f("<div></div>").addClass(a.wrapperClass).css({position:"relative",width:a.width,height:a.height});b.css({width:a.width,height:a.height});var g=f("<div></div>").addClass(a.railClass).css({width:a.size,height:"100%",position:"absolute",top:0,display:a.alwaysVisible&&a.railVisible?"block":"none","border-radius":a.railBorderRadius,background:a.railColor,opacity:a.railOpacity,zIndex:90}),c=f("<div></div>").addClass(a.barClass).css({background:a.color,width:a.size,position:"absolute",top:0,opacity:a.opacity,display:a.alwaysVisible?
|
|
||||||
"block":"none","border-radius":a.borderRadius,BorderRadius:a.borderRadius,MozBorderRadius:a.borderRadius,WebkitBorderRadius:a.borderRadius,zIndex:99}),q="right"==a.position?{right:a.distance}:{left:a.distance};g.css(q);c.css(q);b.wrap(n);b.parent().append(c);b.parent().append(g);a.railDraggable&&c.bind("mousedown",function(a){var b=f(document);y=!0;t=parseFloat(c.css("top"));pageY=a.pageY;b.bind("mousemove.slimscroll",function(a){currTop=t+a.pageY-pageY;c.css("top",currTop);m(0,c.position().top,!1)});
|
|
||||||
b.bind("mouseup.slimscroll",function(a){y=!1;p();b.unbind(".slimscroll")});return!1}).bind("selectstart.slimscroll",function(a){a.stopPropagation();a.preventDefault();return!1});g.hover(function(){v()},function(){p()});c.hover(function(){x=!0},function(){x=!1});b.hover(function(){s=!0;v();p()},function(){s=!1;p()});b.bind("touchstart",function(a,b){a.originalEvent.touches.length&&(z=a.originalEvent.touches[0].pageY)});b.bind("touchmove",function(b){k||b.originalEvent.preventDefault();b.originalEvent.touches.length&&
|
|
||||||
(m((z-b.originalEvent.touches[0].pageY)/a.touchScrollStep,!0),z=b.originalEvent.touches[0].pageY)});w();"bottom"===a.start?(c.css({top:b.outerHeight()-c.outerHeight()}),m(0,!0)):"top"!==a.start&&(m(f(a.start).position().top,null,!0),a.alwaysVisible||c.hide());C()}});return this}});jQuery.fn.extend({slimscroll:jQuery.fn.slimScroll})})(jQuery);
|
|
|
@ -1,3 +0,0 @@
|
||||||
/*! Summernote v0.8.8 | (c) 2013- Alan Hong and other contributors | MIT license */
|
|
||||||
|
|
||||||
!function(a){a.extend(a.summernote.lang,{"zh-CN":{font:{bold:"粗体",italic:"斜体",underline:"下划线",clear:"清除格式",height:"行高",name:"字体",strikethrough:"删除线",subscript:"下标",superscript:"上标",size:"字号"},image:{image:"图片",insert:"插入图片",resizeFull:"缩放至 100%",resizeHalf:"缩放至 50%",resizeQuarter:"缩放至 25%",floatLeft:"靠左浮动",floatRight:"靠右浮动",floatNone:"取消浮动",shapeRounded:"形状: 圆角",shapeCircle:"形状: 圆",shapeThumbnail:"形状: 缩略图",shapeNone:"形状: 无",dragImageHere:"将图片拖拽至此处",selectFromFiles:"从本地上传",maximumFileSize:"文件大小最大值",maximumFileSizeError:"文件大小超出最大值。",url:"图片地址",remove:"移除图片"},video:{video:"视频",videoLink:"视频链接",insert:"插入视频",url:"视频地址",providers:"(优酷, 腾讯, Instagram, DailyMotion, Youtube等)"},link:{link:"链接",insert:"插入链接",unlink:"去除链接",edit:"编辑链接",textToDisplay:"显示文本",url:"链接地址",openInNewWindow:"在新窗口打开"},table:{table:"表格"},hr:{insert:"水平线"},style:{style:"样式",p:"普通",blockquote:"引用",pre:"代码",h1:"标题 1",h2:"标题 2",h3:"标题 3",h4:"标题 4",h5:"标题 5",h6:"标题 6"},lists:{unordered:"无序列表",ordered:"有序列表"},options:{help:"帮助",fullscreen:"全屏",codeview:"源代码"},paragraph:{paragraph:"段落",outdent:"减少缩进",indent:"增加缩进",left:"左对齐",center:"居中对齐",right:"右对齐",justify:"两端对齐"},color:{recent:"最近使用",more:"更多",background:"背景",foreground:"前景",transparent:"透明",setTransparent:"透明",reset:"重置",resetToDefault:"默认"},shortcut:{shortcuts:"快捷键",close:"关闭",textFormatting:"文本格式",action:"动作",paragraphFormatting:"段落格式",documentStyle:"文档样式",extraKeys:"额外按键"},history:{undo:"撤销",redo:"重做"},help:{insertParagraph:"插入段落",undo:"撤销",redo:"重做",tab:"增加缩进",untab:"减少缩进",bold:"粗体",italic:"斜体",underline:"下划线",strikethrough:"删除线",removeFormat:"清除格式",justifyLeft:"左对齐",justifyCenter:"居中对齐",justifyRight:"右对齐",justifyFull:"两端对齐",insertUnorderedList:"无序列表",insertOrderedList:"有序列表",outdent:"减少缩进",indent:"增加缩进",formatPara:"设置选中内容样式为 普通",formatH1:"设置选中内容样式为 标题1",formatH2:"设置选中内容样式为 标题2",formatH3:"设置选中内容样式为 标题3",formatH4:"设置选中内容样式为 标题4",formatH5:"设置选中内容样式为 标题5",formatH6:"设置选中内容样式为 标题6",insertHorizontalRule:"插入水平线","linkDialog.show":"显示链接对话框"}}})}(jQuery);
|
|
|
@ -1,2 +0,0 @@
|
||||||
!function(e){e(["jquery"],function(e){return function(){function t(e,t,n){return f({type:O.error,iconClass:g().iconClasses.error,message:e,optionsOverride:n,title:t})}function n(t,n){return t||(t=g()),v=e("#"+t.containerId),v.length?v:(n&&(v=c(t)),v)}function i(e,t,n){return f({type:O.info,iconClass:g().iconClasses.info,message:e,optionsOverride:n,title:t})}function o(e){w=e}function s(e,t,n){return f({type:O.success,iconClass:g().iconClasses.success,message:e,optionsOverride:n,title:t})}function a(e,t,n){return f({type:O.warning,iconClass:g().iconClasses.warning,message:e,optionsOverride:n,title:t})}function r(e){var t=g();v||n(t),l(e,t)||u(t)}function d(t){var i=g();return v||n(i),t&&0===e(":focus",t).length?void h(t):void(v.children().length&&v.remove())}function u(t){for(var n=v.children(),i=n.length-1;i>=0;i--)l(e(n[i]),t)}function l(t,n){return t&&0===e(":focus",t).length?(t[n.hideMethod]({duration:n.hideDuration,easing:n.hideEasing,complete:function(){h(t)}}),!0):!1}function c(t){return v=e("<div/>").attr("id",t.containerId).addClass(t.positionClass).attr("aria-live","polite").attr("role","alert"),v.appendTo(e(t.target)),v}function p(){return{tapToDismiss:!0,toastClass:"toast",containerId:"toast-container",debug:!1,showMethod:"fadeIn",showDuration:300,showEasing:"swing",onShown:void 0,hideMethod:"fadeOut",hideDuration:1e3,hideEasing:"swing",onHidden:void 0,extendedTimeOut:1e3,iconClasses:{error:"toast-error",info:"toast-info",success:"toast-success",warning:"toast-warning"},iconClass:"toast-info",positionClass:"toast-top-right",timeOut:5e3,titleClass:"toast-title",messageClass:"toast-message",target:"body",closeHtml:'<button type="button">×</button>',newestOnTop:!0,preventDuplicates:!1,progressBar:!1}}function m(e){w&&w(e)}function f(t){function i(t){return!e(":focus",l).length||t?(clearTimeout(O.intervalId),l[r.hideMethod]({duration:r.hideDuration,easing:r.hideEasing,complete:function(){h(l),r.onHidden&&"hidden"!==b.state&&r.onHidden(),b.state="hidden",b.endTime=new Date,m(b)}})):void 0}function o(){(r.timeOut>0||r.extendedTimeOut>0)&&(u=setTimeout(i,r.extendedTimeOut),O.maxHideTime=parseFloat(r.extendedTimeOut),O.hideEta=(new Date).getTime()+O.maxHideTime)}function s(){clearTimeout(u),O.hideEta=0,l.stop(!0,!0)[r.showMethod]({duration:r.showDuration,easing:r.showEasing})}function a(){var e=(O.hideEta-(new Date).getTime())/O.maxHideTime*100;f.width(e+"%")}var r=g(),d=t.iconClass||r.iconClass;if("undefined"!=typeof t.optionsOverride&&(r=e.extend(r,t.optionsOverride),d=t.optionsOverride.iconClass||d),r.preventDuplicates){if(t.message===C)return;C=t.message}T++,v=n(r,!0);var u=null,l=e("<div/>"),c=e("<div/>"),p=e("<div/>"),f=e("<div/>"),w=e(r.closeHtml),O={intervalId:null,hideEta:null,maxHideTime:null},b={toastId:T,state:"visible",startTime:new Date,options:r,map:t};return t.iconClass&&l.addClass(r.toastClass).addClass(d),t.title&&(c.append(t.title).addClass(r.titleClass),l.append(c)),t.message&&(p.append(t.message).addClass(r.messageClass),l.append(p)),r.closeButton&&(w.addClass("toast-close-button").attr("role","button"),l.prepend(w)),r.progressBar&&(f.addClass("toast-progress"),l.prepend(f)),l.hide(),r.newestOnTop?v.prepend(l):v.append(l),l[r.showMethod]({duration:r.showDuration,easing:r.showEasing,complete:r.onShown}),r.timeOut>0&&(u=setTimeout(i,r.timeOut),O.maxHideTime=parseFloat(r.timeOut),O.hideEta=(new Date).getTime()+O.maxHideTime,r.progressBar&&(O.intervalId=setInterval(a,10))),l.hover(s,o),!r.onclick&&r.tapToDismiss&&l.click(i),r.closeButton&&w&&w.click(function(e){e.stopPropagation?e.stopPropagation():void 0!==e.cancelBubble&&e.cancelBubble!==!0&&(e.cancelBubble=!0),i(!0)}),r.onclick&&l.click(function(){r.onclick(),i()}),m(b),r.debug&&console&&console.log(b),l}function g(){return e.extend({},p(),b.options)}function h(e){v||(v=n()),e.is(":visible")||(e.remove(),e=null,0===v.children().length&&(v.remove(),C=void 0))}var v,w,C,T=0,O={error:"error",info:"info",success:"success",warning:"warning"},b={clear:r,remove:d,error:t,getContainer:n,info:i,options:{},subscribe:o,success:s,version:"2.1.0",warning:a};return b}()})}("function"==typeof define&&define.amd?define:function(e,t){"undefined"!=typeof module&&module.exports?module.exports=t(require("jquery")):window.toastr=t(window.jQuery)});
|
|
||||||
//# sourceMappingURL=/toastr.js.map
|
|
|
@ -0,0 +1,2 @@
|
||||||
|
/** layui-v2.5.4 MIT License By https://www.layui.com */
|
||||||
|
html #layuicss-skincodecss{display:none;position:absolute;width:1989px}.layui-code-h3,.layui-code-view{position:relative;font-size:12px}.layui-code-view{display:block;margin:10px 0;padding:0;border:1px solid #e2e2e2;border-left-width:6px;background-color:#F2F2F2;color:#333;font-family:Courier New}.layui-code-h3{padding:0 10px;height:32px;line-height:32px;border-bottom:1px solid #e2e2e2}.layui-code-h3 a{position:absolute;right:10px;top:0;color:#999}.layui-code-view .layui-code-ol{position:relative;overflow:auto}.layui-code-view .layui-code-ol li{position:relative;margin-left:45px;line-height:20px;padding:0 5px;border-left:1px solid #e2e2e2;list-style-type:decimal-leading-zero;*list-style-type:decimal;background-color:#fff}.layui-code-view pre{margin:0}.layui-code-notepad{border:1px solid #0C0C0C;border-left-color:#3F3F3F;background-color:#0C0C0C;color:#C2BE9E}.layui-code-notepad .layui-code-h3{border-bottom:none}.layui-code-notepad .layui-code-ol li{background-color:#3F3F3F;border-left:none}
|
Before Width: | Height: | Size: 5.8 KiB After Width: | Height: | Size: 5.8 KiB |