ssoLogin.jsp
2.4 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<!doctype html>
<html lang="zh">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>郑州机场航空物流信息平台</title>
<link href="<%=basePath %>resource/css/login.css" rel="stylesheet">
<script src="<%=basePath %>resource/easyui/jquery.min.js"></script>
<script type="text/javascript" src="<%=basePath %>resource/layer-v3.0.3/layer/layer.js"></script>
</head>
<body>
<div id="login">
<div style="height: 83px;margin-top: 32px;">
<div style="font-size:28px;color:white;margin-left:400px;">河南省机场集团有限公司</div>
<div style="font-size:16px;color:white;margin-left:510px;"> 郑州机场航空物流信息平台</div>
</div>
</div>
<div id="copyright"></div>
</body>
<script type="text/javascript">
// 获取地址栏参数
function getUrlKey(name) {
return decodeURIComponent((new RegExp('[?|&]' + name + '=' + '([^&;]+?)(&|#|;|$)').exec(location.href) || [, ""])[1].replace(/\+/g, '%20')) || null
}
// 获取票据
function ticket() {
var ticket = this.getUrlKey("ticket");
if (ticket!=undefined){
var loginParams = {
ticket : ticket
}
$.post('<%=basePath %>system/user/ssoLogin',loginParams,function(res){
//NProgress.done();
var status = res.status;
console.log("------->"+status);
console.log("------->"+res);
if (status !== 200) {
var msg = "该账户不存在本系统";
$.growl({ title: "消息提示", message: msg });
} else {
window.location.href='<%=basePath %>/index';
}
}).catch(error => {
$.growl({ title: "消息提示", message: error });
//this.logining = false;
});
}else {
console.log("票据为空 请求路由")
window.location.href = 'http://10.5.14.103:27080/sso/login?service=http://10.50.3.73:8003/sso/ssoLogin.html'
}
}
$(document).ready(function(){
ticket();
});
</script>
</html>