2021-07-07

登录页面

<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title>shiro+freemaker+springboot+redis +mysql 权限控制后台演示</title>
		<link href="${request.contextPath}/media/css/common.css" rel="stylesheet" />
		<link href="${request.contextPath}/media/css/login.css" rel="stylesheet" />
		
		<script> 
		   (function() {
		     if (! 
		     /*@cc_on!@*/
		     0) return;
		     var e = "abbr, article, aside, audio, canvas, datalist, details, dialog, eventsource, figure, footer, header, hgroup, mark, menu, meter, nav, output, progress, section, time, video".split(', ');
		     var i= e.length;
		     while (i--){
		         document.createElement(e[i])
		     } 
		})() 
		</script>
		
		<script src="${request.contextPath}/media/js/jquery-1.10.1.min.js" type="text/javascript"></script>
	</head>
	<body>
		<header>
			<div class="container">
				<span class="logo-title">shiro+freemaker+springboot+redis +mysql 权限控制后台演示</span>
			</div>			
		</header>
		<section class="login-wrap">
			<div class="login-inner">
				<div class="login-left">
					<!--<img src="images/earth.png" />-->
				</div>
				<div class="login-right">
					<div class="login-title">用户登录</div>
					<div class="warning" id="loginError" ></div>
					<div class="passport-login">
						<form id="loginForm" method="post">
							<p class="p1">
								<label for="userName" class="user-icon"></label>
								<input type="text" name="username" id="username"  placeholder="用户名"/>
							</p>
							<p class="p2">
								<label for="userPwd" class="psd-icon"></label>
								<input type="password" name="password" id="password"  placeholder="密码"/>
							</p>
							<p class="p3">
								<input type="button" onClick="login();" class="submit-btn" value="登录"/>
							</p>
							 
						</form>
					</div>
				</div>
			</div>
		</section>
		<footer class="foot container">
				<p> shiro+freemaker+springboot+redis +mysql 权限控制后台演示</p>
		</footer>
		
	</body>
</html>
<script>
		function login() {
	            	$.ajax({   
           		     url:'/login',   
           		     type:'post',   
           		     data:'username='+ $("#username").val()+'&password='+ $("#password").val(),
           		     async : true,// 默认为true 异步   
           	         error:function(){   
           		        alert('error');   
           		     },   
           		     success:function(data){   
           		    	// alert(data);
           		    	var data = $.parseJSON(data); 
           		    	
           		    	 if(data.msg=="success"){
           		    		 window.location.href =data.url
           		    	 }else{
           		    		// alert(data.reason);

           		    		 $("#loginError").html(data.returnStr);
           		    		 
           		    	 }
           		    	 
           		     }
           		 });
	            	
	            }
</script>

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值