Commit 79ae949f authored by liuchao's avatar liuchao

no message

parent 4a699e64
...@@ -67,13 +67,13 @@ public class UserController extends BaseController<Object>{ ...@@ -67,13 +67,13 @@ public class UserController extends BaseController<Object>{
if (StringUtils.isEmpty(userVo.getId())) { if (StringUtils.isEmpty(userVo.getId())) {
Boolean userIsExistMobile = userService.validateUserExistByMobile(userVo.getMobile()); Boolean userIsExistMobile = userService.validateUserExistByPaperId(userVo.getPaperId());
if (userIsExistMobile) { if (userIsExistMobile) {
view.getModel().put("message", "userIsExist_mobile"); view.getModel().put("message", "userIsExist_paperId");
return view; return view;
} }
Boolean userIsExistUserName = userService.validateUserExistByTeamName(userVo.getTeamName()); Boolean userIsExistUserName = userService.validateUserExistByUserName(userVo.getUserName());
if (userIsExistUserName) { if (userIsExistUserName) {
view.getModel().put("message", "userIsExist_teamName"); view.getModel().put("message", "userIsExist_teamName");
return view; return view;
...@@ -106,8 +106,8 @@ public class UserController extends BaseController<Object>{ ...@@ -106,8 +106,8 @@ public class UserController extends BaseController<Object>{
} }
} }
user = userService.findById(userVo.getId()); user = userService.findById(userVo.getId());
if (StringUtils.isNotBlank(userVo.getTeamName())) { if (StringUtils.isNotBlank(userVo.getUserName())) {
Boolean userIsExistUserName = userService.validateUserExistByTeamName(userVo.getTeamName()); Boolean userIsExistUserName = userService.validateUserExistByUserName(userVo.getUserName());
if (userIsExistUserName) { if (userIsExistUserName) {
view.getModel().put("message", "userIsExist_teamName"); view.getModel().put("message", "userIsExist_teamName");
return view; return view;
...@@ -129,13 +129,13 @@ public class UserController extends BaseController<Object>{ ...@@ -129,13 +129,13 @@ public class UserController extends BaseController<Object>{
@Auth(verifyLogin = false, verifyURL = false) @Auth(verifyLogin = false, verifyURL = false)
@RequestMapping("/api/signin") @RequestMapping("/api/signin")
public ModelAndView signin(HttpServletRequest request, public ModelAndView signin(HttpServletRequest request,
final HttpServletResponse response, String mobile, String pwd) final HttpServletResponse response, String userName, String pwd)
throws Exception { throws Exception {
ModelAndView view = new ModelAndView(); ModelAndView view = new ModelAndView();
ResourceBundle rb = ResourceBundle.getBundle("system"); ResourceBundle rb = ResourceBundle.getBundle("system");
String superAdmin = rb.getString("account"); String superAdmin = rb.getString("account");
if (mobile.equals(superAdmin)) { if (userName.equals(superAdmin)) {
String p = rb.getString("password"); String p = rb.getString("password");
if (p.equals(pwd)) { if (p.equals(pwd)) {
...@@ -144,20 +144,25 @@ public class UserController extends BaseController<Object>{ ...@@ -144,20 +144,25 @@ public class UserController extends BaseController<Object>{
user.setUserName(superAdmin); user.setUserName(superAdmin);
user.setPwd(MD5.digest(pwd)); user.setPwd(MD5.digest(pwd));
SessionUtils.setUser(request, user); SessionUtils.setUser(request, user);
view.getModelMap().addAttribute("status", 2); view.getModelMap().addAttribute("status", 1);
} else { } else {
view.getModelMap().addAttribute("status", 0); view.getModelMap().addAttribute("status", 0);
} }
} else { } else {
User user = userService.userLogin(mobile, pwd); User user = userService.userLogin(userName, pwd);
if (user != null) { if (user != null) {
// 设置User到Session // 设置User到Session
if ("1".equals(user.getRole())){
SessionUtils.setUser(request, user); SessionUtils.setUser(request, user);
view.getModelMap().addAttribute("status", 1); view.getModelMap().addAttribute("status", 1);
} else { } else {
view.getModelMap().addAttribute("status", 0); view.getModelMap().addAttribute("status", 0);
} }
} else {
view.getModelMap().addAttribute("status", 0);
}
} }
...@@ -175,7 +180,7 @@ public class UserController extends BaseController<Object>{ ...@@ -175,7 +180,7 @@ public class UserController extends BaseController<Object>{
if (superAdmin.equals(userSession.getMobile()) && MD5.digest(p).equals(userSession.getPwd())) { if (superAdmin.equals(userSession.getMobile()) && MD5.digest(p).equals(userSession.getPwd())) {
IPageList<User> userPage = userService.findByUsers(userVo.getSearchStr(), userVo.getGroups(), userVo.getOrder(), userVo.getSort(), IPageList<User> userPage = userService.findByUsers(userVo.getSearchStr(), userVo.getRole(), userVo.getOrder(), userVo.getSort(),
new Hints(getStartRow(request), getPageCount(request))); new Hints(getStartRow(request), getPageCount(request)));
view.getModelMap().addAttribute("userPage", userPage); view.getModelMap().addAttribute("userPage", userPage);
......
...@@ -17,13 +17,19 @@ public class WebSiteController extends BaseController<Object>{ ...@@ -17,13 +17,19 @@ public class WebSiteController extends BaseController<Object>{
@Autowired @Autowired
private ApplicationContext applicationContext; private ApplicationContext applicationContext;
@RequestMapping("/index") @RequestMapping("/default")
public ModelAndView index() throws Exception { public ModelAndView index() throws Exception {
ModelAndView t_view = new ModelAndView(); ModelAndView t_view = new ModelAndView();
t_view.setViewName("index"); t_view.setViewName("index");
return t_view; return t_view;
} }
@RequestMapping("/")
public ModelAndView login() throws Exception {
ModelAndView t_view = new ModelAndView();
t_view.setViewName("index");
return t_view;
}
@RequestMapping("/result") @RequestMapping("/result")
......
...@@ -7,16 +7,14 @@ import com.qiankun.pages.IPageList; ...@@ -7,16 +7,14 @@ import com.qiankun.pages.IPageList;
public interface UserDao extends IDao<User, String> { public interface UserDao extends IDao<User, String> {
IPageList<User> findUserPage(String searchStr, String groupId, String order, String sort, Hints hints); IPageList<User> findUserPage(String searchStr, String role, String order, String sort, Hints hints);
User findLastUserByGroup(String groupId); User login(String userName, String password);
User login(String mobile, String password); Boolean validateUserExistByPaperId(String mobile);
Boolean validateUserExistByMobile(String mobile);
Boolean validatePwd(String id, String password); Boolean validatePwd(String id, String password);
Boolean validateUserExistByTeamName(String userName); Boolean validateUserExistByUserName(String userName);
} }
...@@ -15,21 +15,21 @@ public class UserDaoImpl extends AbsDao<User, String> implements UserDao { ...@@ -15,21 +15,21 @@ public class UserDaoImpl extends AbsDao<User, String> implements UserDao {
private static final String FIND = "from User where "; private static final String FIND = "from User where ";
private static final String FIND_USER_PAGE = " from User where (userId like ? or mobile like ?) "; private static final String FIND_USER_PAGE = " from User where (mobile like ? or paperId like ? or name like ? or userName like ?) ";
private static final String FIND_LASTUSER_BY_GROUP = " from User where groups = ? order by createTime desc"; // private static final String FIND_LASTUSER_BY_GROUP = " from User where groups = ? order by createTime desc";
private static final String LOGIN = " from User where mobile = ? and pwd = ? and isRemove=false"; private static final String LOGIN = " from User where mobile = ? and pwd = ? and isRemove=false";
private static final String VALIDATE_MOBILE = " from User where mobile = ?"; private static final String VALIDATE_PAPERID = " from User where paperId = ?";
private static final String VALIDATE_TEAMNAME = " from User where teamName = ?"; private static final String VALIDATE_USERNAME = " from User where userName = ?";
private static final String VALIDATE_PWD = " from User where id = ? and pwd = ? and isRemove=false"; private static final String VALIDATE_PWD = " from User where id = ? and pwd = ? and isRemove=false";
@Override @Override
public Boolean validateUserExistByMobile(String mobile) { public Boolean validateUserExistByPaperId(String paperId) {
Long count = findCount(" select count(*) " + VALIDATE_MOBILE, mobile); Long count = findCount(" select count(*) " + VALIDATE_PAPERID, paperId);
if (count > 0) if (count > 0)
return true; return true;
else else
...@@ -37,30 +37,30 @@ public class UserDaoImpl extends AbsDao<User, String> implements UserDao { ...@@ -37,30 +37,30 @@ public class UserDaoImpl extends AbsDao<User, String> implements UserDao {
} }
@Override @Override
public Boolean validateUserExistByTeamName(String userName) { public Boolean validateUserExistByUserName(String userName) {
Long count = findCount(" select count(*) " + VALIDATE_TEAMNAME, userName); Long count = findCount(" select count(*) " + VALIDATE_USERNAME, userName);
if (count > 0) if (count > 0)
return true; return true;
else else
return false; return false;
} }
@Override // @Override
public User findLastUserByGroup(String groupId) { // public User findLastUserByGroup(String groupId) {
//
List<User> records = find(FIND_LASTUSER_BY_GROUP , new Hints(0,1), groupId); // List<User> records = find(FIND_LASTUSER_BY_GROUP , new Hints(0,1), groupId);
if (records.size()>0) { // if (records.size()>0) {
return records.get(0); // return records.get(0);
} else { // } else {
return null; // return null;
} // }
//
//
} // }
@Override @Override
public IPageList<User> findUserPage(String searchStr, String groupId, String order, String sort, Hints hints) { public IPageList<User> findUserPage(String searchStr, String role, String order, String sort, Hints hints) {
if (order == null){ if (order == null){
...@@ -71,7 +71,7 @@ public class UserDaoImpl extends AbsDao<User, String> implements UserDao { ...@@ -71,7 +71,7 @@ public class UserDaoImpl extends AbsDao<User, String> implements UserDao {
} }
String groupHql = null; String groupHql = null;
if (groupId != null){ if (role != null){
groupHql = " and groups = ? "; groupHql = " and groups = ? ";
} }
...@@ -80,9 +80,9 @@ public class UserDaoImpl extends AbsDao<User, String> implements UserDao { ...@@ -80,9 +80,9 @@ public class UserDaoImpl extends AbsDao<User, String> implements UserDao {
} }
String param = "%" + searchStr + "%"; String param = "%" + searchStr + "%";
IPageList<User> users = new PageListImpl<User>(); IPageList<User> users = new PageListImpl<User>();
if (groupId != null){ if (role != null){
users.setRecords(find(FIND_USER_PAGE + groupHql + sortHQL(order, sort), hints, param, param, groupId)); users.setRecords(find(FIND_USER_PAGE + groupHql + sortHQL(order, sort), hints, param, param, role));
users.setRecordTotal(findCount(" select count(*) " + FIND_USER_PAGE + groupHql, param, param, groupId)); users.setRecordTotal(findCount(" select count(*) " + FIND_USER_PAGE + groupHql, param, param, role));
} else { } else {
users.setRecords(find(FIND_USER_PAGE + sortHQL(order, sort), hints, param, param)); users.setRecords(find(FIND_USER_PAGE + sortHQL(order, sort), hints, param, param));
users.setRecordTotal(findCount(" select count(*) " + FIND_USER_PAGE, param, param)); users.setRecordTotal(findCount(" select count(*) " + FIND_USER_PAGE, param, param));
......
...@@ -50,7 +50,7 @@ public class LoginInterceptor extends HandlerInterceptorAdapter { ...@@ -50,7 +50,7 @@ public class LoginInterceptor extends HandlerInterceptorAdapter {
if (auth == null || auth.verifyLogin()) { if (auth == null || auth.verifyLogin()) {
if (user == null) { if (user == null) {
response.setStatus(response.SC_GATEWAY_TIMEOUT); response.setStatus(response.SC_GATEWAY_TIMEOUT);
response.sendRedirect(baseUri + "/"); response.sendRedirect(baseUri + "/login");
return false; return false;
} }
} }
......
...@@ -32,8 +32,8 @@ public class UserService { ...@@ -32,8 +32,8 @@ public class UserService {
userDao.remove(id); userDao.remove(id);
} }
public User userLogin(final String mobile, final String password) { public User userLogin(final String userName, final String password) {
return userDao.login(mobile, MD5.digest(password)); return userDao.login(userName, MD5.digest(password));
} }
...@@ -42,16 +42,12 @@ public class UserService { ...@@ -42,16 +42,12 @@ public class UserService {
return users; return users;
} }
public User findLastUserByGroup(String groupId) { public Boolean validateUserExistByPaperId(String paperId) {
return userDao.findLastUserByGroup(groupId); return userDao.validateUserExistByPaperId(paperId);
} }
public Boolean validateUserExistByMobile(String mobile) { public Boolean validateUserExistByUserName(String userName) {
return userDao.validateUserExistByMobile(mobile); return userDao.validateUserExistByUserName(userName);
}
public Boolean validateUserExistByTeamName(String userName) {
return userDao.validateUserExistByTeamName(userName);
} }
......
This diff is collapsed.
...@@ -13,60 +13,9 @@ ...@@ -13,60 +13,9 @@
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>2019年“一汽丰田杯”中国工业工程与精益管理创新大赛</title> <title></title>
<style> <style>
.footer {
position: fixed;width:100%;text-align: center;bottom:0;color:#f0f0f0;
background-color: #0a1020;
height:35px;
padding-top:7px;
}
/* loading */
#maskloading{
height:100%;
width:100%;
position:fixed;
top:0px;
left:0px;
background-color: #000000;
opacity: 0.6;
filter: alpha(opacity = 60);
}
.ios-overlay-show {
animation-duration: 750ms;
animation-name: ios-overlay-show;
}
.ui-ios-overlay {
background: none repeat scroll 0 0 rgba(0, 0, 0, 0.8);
border-radius: 20px;
height: 200px;
left: 50%;
margin-left: -100px;
margin-top: -100px;
position: fixed;
top: 40%;
width: 200px;
z-index: 99999;
}
.ui-ios-overlay img {
display: block;
margin: 20% auto 0;
}
.ui-ios-overlay .title {
bottom: 30px;
color: #FFFFFF;
display: block;
font-size: 26px;
font-weight: bold;
left: 0;
position: absolute;
text-align: center;
width: 100%;
}
/* end loading */
</style> </style>
...@@ -77,11 +26,11 @@ ...@@ -77,11 +26,11 @@
<![endif] --> <![endif] -->
<!-- page specific plugin styles --> <!-- page specific plugin styles -->
<!-- fonts --> <!-- fonts -->
<!-- <link rel="stylesheet" href="http://fonts.googleapis.com/css?family=Open+Sans:400,300"/> -->
<link rel="stylesheet" href="<webpath:path/>/resources/css/googleCss.css">
<!-- ace styles --> <!-- ace styles -->
<link rel="stylesheet" href="<webpath:path/>/resources/assets/css/ace.min.css" /> <link rel="stylesheet" href="<webpath:path/>/resources/assets/css/ace.min.css" />
<link rel="stylesheet" href="<webpath:path/>/resources/assets/css/ace-rtl.min.css"/> <link rel="stylesheet" href="<webpath:path/>/resources/assets/css/ace-rtl.min.css"/>
<link rel="stylesheet" href="<webpath:path/>/resources/assets/css/ace-skins.min.css" />
<link rel="stylesheet" href="<webpath:path/>/resources/css/page.css"> <link rel="stylesheet" href="<webpath:path/>/resources/css/page.css">
<!--[if lte IE 8] > <!--[if lte IE 8] >
<link rel="stylesheet" href="<webpath:path/>/resources/assets/css/ace-ie.min.css"/> <link rel="stylesheet" href="<webpath:path/>/resources/assets/css/ace-ie.min.css"/>
...@@ -92,10 +41,35 @@ ...@@ -92,10 +41,35 @@
var webPath="<webpath:path/>"; var webPath="<webpath:path/>";
</script> </script>
<!-- inline styles related to this page --> <!-- inline styles related to this page -->
<script type="text/javascript" src="<webpath:path/>/resources/js/tools/jquery.min.js"></script> <script src="<webpath:path/>/resources/assets/js/jquery-2.0.3.min.js"></script>
<script type="text/javascript" src="<webpath:path/>/resources/assets/js/bootstrap.min.js"></script>
<script src="<webpath:path/>/resources/assets/js/ace-extra.min.js"></script>
<!-- HTML5 shim and Respond.js IE8 support of HTML5 elements and media queries -->
<!--[if lt IE 9]>
<script src="<webpath:path/>/resources/assets/js/html5shiv.js"></script>
<script src="<webpath:path/>/resources/assets/js/respond.min.js"></script>
<![endif]-->
<script src="<webpath:path/>/resources/assets/js/jquery.ui.touch-punch.min.js"></script>
<script src="<webpath:path/>/resources/assets/js/jquery.slimscroll.min.js"></script>
<script src="<webpath:path/>/resources/assets/js/jquery.easy-pie-chart.min.js"></script>
<script src="<webpath:path/>/resources/assets/js/jquery.sparkline.min.js"></script>
<script src="<webpath:path/>/resources/assets/js/flot/jquery.flot.min.js"></script>
<script src="<webpath:path/>/resources/assets/js/flot/jquery.flot.pie.min.js"></script>
<script src="<webpath:path/>/resources/assets/js/flot/jquery.flot.resize.min.js"></script>
<!-- ace scripts -->
<script src="<webpath:path/>/resources/assets/js/ace-elements.min.js"></script>
<script src="<webpath:path/>/resources/assets/js/ace.min.js"></script>
<script type="text/javascript" src="<webpath:path/>/resources/js/tools/jquery.validate.js"></script> <script type="text/javascript" src="<webpath:path/>/resources/js/tools/jquery.validate.js"></script>
<script type="text/javascript" src="<webpath:path/>/resources/assets/js/bootbox.min.js"></script> <script type="text/javascript" src="<webpath:path/>/resources/assets/js/bootbox.min.js"></script>
<script type="text/javascript" src="<webpath:path/>/resources/assets/js/bootstrap.min.js"></script>
<%-- <script type="text/javascript" src="<webpath:path/>/resources/js/tools/jquerysession.js"></script> --%> <%-- <script type="text/javascript" src="<webpath:path/>/resources/js/tools/jquerysession.js"></script> --%>
<script type="text/javascript" src="<webpath:path/>/resources/js/argus.js"></script> <script type="text/javascript" src="<webpath:path/>/resources/js/argus.js"></script>
<!--[if lt IE 9] > <!--[if lt IE 9] >
...@@ -114,15 +88,240 @@ ...@@ -114,15 +88,240 @@
<!-- BEGIN BODY --> <!-- BEGIN BODY -->
<body> <body>
<div class="navbar navbar-default" id="navbar">
<div class="navbar-container" id="navbar-container">
<div class="navbar-header pull-left">
<a href="#" class="navbar-brand">
<small>
<i class="icon-leaf"></i>
中国造血干细胞捐献者资料库天津管理中心
</small>
</a><!-- /.brand -->
</div><!-- /.navbar-header -->
<div class="navbar-header pull-right" role="navigation">
<ul class="nav ace-nav">
<li class="light-blue">
<a data-toggle="dropdown" href="#" class="dropdown-toggle">
<span class="user-info">
<small>您好,</small>
${sessionScope.session_user.userName}
</span>
<i class="icon-caret-down"></i>
</a>
<ul class="user-menu pull-right dropdown-menu dropdown-yellow dropdown-caret dropdown-close">
<!-- <li>
<a href="#">
<i class="icon-user"></i>
修改密码
</a>
</li>
<li class="divider"></li> -->
<li>
<a href="#">
<i class="icon-off"></i>
退出
</a>
</li>
</ul>
</li>
</ul><!-- /.ace-nav -->
</div><!-- /.navbar-header -->
</div><!-- /.container -->
</div>
<div class="main-container" id="main-container">
<script type="text/javascript">
try{ace.settings.check('main-container' , 'fixed')}catch(e){}
</script>
<div class="main-container-inner">
<a class="menu-toggler" id="menu-toggler" href="#">
<span class="menu-text"></span>
</a>
<div class="sidebar" id="sidebar">
<script type="text/javascript">
try{ace.settings.check('sidebar' , 'fixed')}catch(e){}
</script>
<ul class="nav nav-list">
<li class="active">
<a href="index.html">
<i class="icon-user"></i>
<span class="menu-text"> 用户管理 </span>
</a>
</li>
<li>
<a href="#" class="dropdown-toggle">
<i class="icon-heart"></i>
<span class="menu-text"> 彩虹计划 </span>
<b class="arrow icon-angle-down"></b>
</a>
<ul class="submenu">
<li>
<a href="elements.html">
<i class="icon-double-angle-right"></i>
彩虹计划用户管理
</a>
</li>
<li>
<a href="buttons.html">
<i class="icon-double-angle-right"></i>
愿望管理
</a>
</li>
</ul>
</li>
<li>
<a href="#" class="dropdown-toggle">
<i class="icon-book"></i>
<span class="menu-text"> 电子证书 </span>
<b class="arrow icon-angle-down"></b>
</a>
<ul class="submenu">
<li>
<a href="tables.html">
<i class="icon-double-angle-right"></i>
模版管理
</a>
</li>
<li>
<a href="jqgrid.html">
<i class="icon-double-angle-right"></i>
证书管理
</a>
</li>
</ul>
</li>
<li>
<a href="#" class="dropdown-toggle">
<i class="icon-group"></i>
<span class="menu-text"> 活动管理 </span>
<b class="arrow icon-angle-down"></b>
</a>
<ul class="submenu">
<li>
<a href="form-elements.html">
<i class="icon-double-angle-right"></i>
活动管理
</a>
</li>
<li>
<a href="form-wizard.html">
<i class="icon-double-angle-right"></i>
活动类别
</a>
</li>
</ul>
</li>
<li>
<a href="widgets.html">
<i class="icon-list-alt"></i>
<span class="menu-text"> 积分管理 </span>
</a>
</li>
<li>
<a href="calendar.html">
<i class="icon-briefcase "></i>
<span class="menu-text">
礼物管理
</span>
</a>
</li>
<li>
<a href="#" class="dropdown-toggle">
<i class="icon-envelope "></i>
<span class="menu-text"> 消息管理 </span>
<b class="arrow icon-angle-down"></b>
</a>
<ul class="submenu">
<li>
<a href="profile.html">
<i class="icon-double-angle-right"></i>
消息设置
</a>
</li>
<li>
<a href="inbox.html">
<i class="icon-double-angle-right"></i>
消息管理
</a>
</li>
</ul>
</li>
</ul><!-- /.nav-list -->
<div class="sidebar-collapse" id="sidebar-collapse">
<i class="icon-double-angle-left" data-icon1="icon-double-angle-left" data-icon2="icon-double-angle-right"></i>
</div>
</div>
<decorator:body />
</div><!-- /.main-container-inner -->
<a href="#" id="btn-scroll-up" class="btn-scroll-up btn btn-sm btn-inverse">
<i class="icon-double-angle-up icon-only bigger-110"></i>
</a>
</div>
<decorator:body />
<div class="footer">
<img src="<webpath:path/>/resources/images/ga.png"/>&nbsp;<a target="_blank" href="http://www.beian.gov.cn/portal/registerSystemInfo?recordcode=12011102000403" style="color:#fff;">津公网安备 12011102000403号</a>
&nbsp;&nbsp;<a target="_blank" href="http://www.miitbeian.gov.cn/" style="color:#fff;">津ICP备16006658号-2</a>&nbsp;&nbsp;系统技术支持:镜像科技(天津)有限公司&nbsp;&nbsp;邮箱:chinaielean@163.com
</div>
</body> </body>
<!-- END BODY --> <!-- END BODY -->
......
<%@ page language="java" contentType="text/html; charset=UTF-8"
pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<%@ taglib prefix="webpath" uri="/WEB-INF/tlds/path.tld"%>
<%@ taglib prefix="webpage" uri="/WEB-INF/tlds/pageview.tld"%>
<head>
</head>
<div class="main-content">
<div class="breadcrumbs" id="breadcrumbs">
<ul class="breadcrumb">
<li>
<i class="icon-home home-icon"></i>
<a href="#">首页</a>
</li>
</ul><!-- .breadcrumb -->
</div>
</div>
...@@ -11,52 +11,17 @@ ...@@ -11,52 +11,17 @@
<head> <head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>后台系统</title> <title>后台系统</title>
<link href="<webpath:path/>/resources/frame/style/authority/login_css.css" rel="stylesheet" type="text/css" /> <link rel="stylesheet" type="text/css" href="<webpath:path/>/resources/assets/css/bootstrap.min.css"/>
<script type="text/javascript" src="<webpath:path/>/resources/frame/scripts/jquery/jquery-1.7.1.js"></script> <link href="<webpath:path/>/resources/css/login_css.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="<webpath:path/>/resources/js/tools/jquery.min.js"></script>
<script type="text/javascript" src="<webpath:path/>/resources/js/tools/jquery.validate.js"></script>
<script type="text/javascript" src="<webpath:path/>/resources/assets/js/bootbox.min.js"></script>
<script type="text/javascript" src="<webpath:path/>/resources/assets/js/bootstrap.min.js"></script>
<script type="text/javascript" src="<webpath:path/>/resources/js/argus.js"></script>
<script type="text/javascript"> <script type="text/javascript">
var webPath="<webpath:path/>";
$(document).ready(function(){ $(document).ready(function(){
$("#login_sub").click(function(){ $("#submitForm").validate({
$("#submitForm").attr("action", "index.html").submit();
});
});
/*回车事件*/
function EnterPress(e){ //传入 event
var e = e || window.event;
if(e.keyCode == 13){
$("#submitForm").attr("action", "index.html").submit();
}
}
</script>
</head>
<body>
<div id="login_center">
<div id="login_area">
<div id="login_box">
<div id="login_form">
<form id="submitForm" action="" method="post">
<div id="login_tip">
<span id="login_err" class="sty_txt2"></span>
</div>
<div>
用户名:<input type="text" name="userName" class="username" id="name">
</div>
<div>
&nbsp;&nbsp;&nbsp;&nbsp;码:<input type="password" name="pwd" class="pwd" id="pwd">
</div>
<div id="btn_area">
<input type="button" class="login_btn" id="login_sub" value="登 录">
<input type="reset" class="login_btn" id="login_ret" value="重 置">
</div>
</form>
</div>
</div>
</div>
</div>
<script type="text/javascript">
$().ready(function() {
$("#login_form").validate({
rules:{ rules:{
userName:{ userName:{
required: true required: true
...@@ -86,7 +51,7 @@ ...@@ -86,7 +51,7 @@
}, },
success: function(data){ success: function(data){
var status = data.status; var status = data.status;
if(status == 1) if(status == 1){
window.location.href = webPath + "/default"; window.location.href = webPath + "/default";
}else if(status == 0){ }else if(status == 0){
bootbox.dialog({ bootbox.dialog({
...@@ -98,16 +63,42 @@ ...@@ -98,16 +63,42 @@
} }
} }
}); });
} else if (status == 2){
window.location.href = webPath + "/api/user/list";
} }
} }
}); });
} }
}); });
}); });
</script>
</head>
<body>
<div id="login_center">
<div id="login_area">
<div id="login_box">
<div id="login_form">
<form id="submitForm" action="" method="post">
<div id="login_tip">
<span id="login_err" class="sty_txt2"></span>
</div>
<div>
用户名:<input type="text" name="userName" class="username" id="userName">
</div>
<div>
&nbsp;&nbsp;&nbsp;&nbsp;码:<input type="password" name="pwd" class="pwd" id="pwd">
</div>
<div id="btn_area">
<input type="submit" class="login_btn" id="login_sub" value="登 录">
<input type="reset" class="login_btn" id="login_ret" value="重 置">
</div>
</form>
</div>
</div>
</div>
</div>
<script type="text/javascript">
</script> </script>
</body> </body>
</html> </html>
\ No newline at end of file
<%@ page language="java" contentType="text/html; charset=UTF-8"
pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<%@ taglib prefix="webpath" uri="/WEB-INF/tlds/path.tld"%>
<%@ taglib prefix="webpage" uri="/WEB-INF/tlds/pageview.tld"%>
<head>
</head>
<div class="main-content">
<div class="breadcrumbs" id="breadcrumbs">
<ul class="breadcrumb">
<li>
<i class="icon-home home-icon"></i>
<a href="#">首页</a>
</li>
<li class="active">用户管理</li>
</ul><!-- .breadcrumb -->
</div>
</div>
...@@ -5,7 +5,7 @@ html { ...@@ -5,7 +5,7 @@ html {
body { body {
padding-bottom: 0; padding-bottom: 0;
background-color: #e4e6e9; background-color: #fff;
min-height: 100%; min-height: 100%;
font-family: 'Open Sans'; font-family: 'Open Sans';
font-size: 13px; font-size: 13px;
...@@ -1756,7 +1756,7 @@ blockquote, blockquote.pull-right { ...@@ -1756,7 +1756,7 @@ blockquote, blockquote.pull-right {
background-color: transparent; background-color: transparent;
display: inline-block; display: inline-block;
line-height: 24px; line-height: 24px;
margin: 0 22px 0 12px; margin: 5px 22px 0 12px;
padding: 0; padding: 0;
font-size: 13px; font-size: 13px;
color: #333; color: #333;
......
...@@ -22,7 +22,7 @@ html,body { ...@@ -22,7 +22,7 @@ html,body {
margin: 0 auto; margin: 0 auto;
width: 812px; width: 812px;
height: 408px; height: 408px;
background: url('../../images/login/login.png') 0px 0px no-repeat; background: url('../images/login.png') 0px 0px no-repeat;
position: relative; position: relative;
} }
...@@ -74,7 +74,7 @@ html,body { ...@@ -74,7 +74,7 @@ html,body {
border-style: none; border-style: none;
cursor: pointer; cursor: pointer;
font-family: "Microsoft YaHei", "微软雅黑", "sans-serif"; font-family: "Microsoft YaHei", "微软雅黑", "sans-serif";
background: url('../../images/login/btn.jpg') 0px -1px no-repeat; background: url('../images/btn.jpg') 0px -1px no-repeat;
} }
.login_btn:hover { .login_btn:hover {
...@@ -85,6 +85,10 @@ html,body { ...@@ -85,6 +85,10 @@ html,body {
border-style: none; border-style: none;
cursor: pointer; cursor: pointer;
font-family: "Microsoft YaHei", "微软雅黑", "sans-serif"; font-family: "Microsoft YaHei", "微软雅黑", "sans-serif";
background: url('../../images/login/btn_hover.jpg') 0px 0px no-repeat; background: url('../images/btn_hover.jpg') 0px 0px no-repeat;
color: #fff; color: #fff;
} }
.error{
color:#ff0000;
}
\ No newline at end of file
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment