1
13693261870
2022-09-16 58d012f11dd34564d81b4eb3a6099eb689876597
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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>单点登录系统-登录</title>
<meta http-equiv="pragma" content="no-cache" />
<meta http-equiv="cache-control" content="no-cache" />
<meta http-equiv="expires" content="0" />
<link rel="stylesheet" type="text/css" href="/cas/css/reset.css" />
<link rel="stylesheet" type="text/css" href="/cas/css/GJXJ_style.css" />
<script type="text/javascript" src="download-jquery/jquery.min.js"></script>
 
<link rel="stylesheet" href="download-jquery/font-awesome.min.css"/>
<!--<link type="text/css" rel="stylesheet" href="download-jquery/bootstrap.min.css"/>-->
 
<link rel="stylesheet" th:href="@{${#themes.code('standard.custom.css.file')}}"/>
 
<link rel="icon" th:href="@{/favicon.ico}" type="image/x-icon"/>
 
<script type="text/javascript" src="download-jquery/zxcvbn.js"></script>
<script type="text/javascript" src="download-jquery/jquery-ui.min.js"></script>
<script type="text/javascript" src="download-jquery/jquery.cookie.min.js"></script>
<script src="download-jquery/api.js" async defer th:if="${recaptchaSiteKey}"></script>
<script src="download-jquery/bootstrap.min.js"></script>
 
<style type="text/css">
.errorMessage_show {
    width: 200px;
    text-align: left;
    line-height: 6px;
    height: 6px;
    clear: both;
    color: #d56969;
    font-size: 12px;
}
</style>
 
<style type="text/css">
.code {
    /* background:url(code_bg.jpg); */
    font-family:Arial;
    font-style:italic;
    color:blue;
    font-size:30px;
    border:0;
    padding:2px 3px;
    letter-spacing:3px;
    font-weight:bolder;             
    float:left;            
    cursor:pointer;
    width:88px;
    height:35px;
    line-height:34px;
    text-align:center;
    vertical-align:middle;
    border-top-right-radius:5px;
    border-bottom-right-radius:5px;
    background-color:white;
}
a {
    text-decoration:underline;
    /*font-size:12px;
    color:#288bc4;*/
}
a:hover {
    text-decoration:underline;
}
</style>
<script language="javascript" type="text/javascript">
    var code;
    function createCode() {
        code = "";
        var codeLength = 4; //验证码的长度
        var checkCode = document.getElementById("checkCode");
        /* var codeChars = new Array(0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 
        'a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z',
        'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z'); */
        var codeChars = new Array(0, 1, 2, 3, 4, 5, 6, 7, 8, 9 );
        for (var i = 0; i < codeLength; i++) 
        {
            var charNum = Math.floor(Math.random() * 10);
            code += codeChars[charNum];
        }
        if (checkCode) 
        {
            checkCode.className = "code";
            checkCode.innerHTML = code;
        }
    }
    function validateCode() {
        var inputCode = document.getElementById("inputCode").value;
        if (inputCode.length <= 0) 
        {
            alert("请输入验证码!");
        }
        else if (inputCode.toUpperCase() != code.toUpperCase()) 
        {
            alert("验证码输入有误!");
            createCode();
        }
        else 
        {
            alert("验证码正确!");
        }        
    }    
 </script>
</head>
<body style="background-color:#0eade0" onload="myfocus();">
    <form method="post" id="fm1" class="fm-v clearfix" th:object="${credential}">
        <div class="loginheader" style='display: none;'>
            <span class="loginname">单点登录</span> 
            <img class="devline" src="/cas/images/login/loginline.png" /> 
            <span class="lognameE">Log in</span>
        </div>
 <div style="background-color:#1a65c9;height:30%"></div>
        <div id='div_middle' class="loginmain">
            <div id='div_loginTitle' class="logintitle"></div>
 <div id="topBgColor" style="background-color:#1a65c9;height:19%"></div>
            <div id='div_loginBox' class="logintable">
                <!-- 用户名 -->
            
                    <div th:if="${#fields.hasErrors('*')}" style="margin-left:35px;" >
                        <span th:each="err : ${#fields.errors('*')}" th:utext="${err}" style="color: red;"/>
                    </div>
                    <div th:if="${openIdLocalId}">
                        <strong> <span th:utext="${openIdLocalId}" />
                        </strong> <input type="hidden" id="username" name="username"
                            th:value="${openIdLocalId}" />
                    </div>
                    <div th:unless="${openIdLocalId}" class="loginid" style='width:279px;margin-right:20px;margin-top:20px;background-color:#4987F4;' >
                        <label for="username"></label>
                        <input class="required" id="username" placeholder="用户名" size="25" tabindex="1"
                            type="text" th:field="*{username}"
                            th:accesskey="#{screen.welcome.label.netid.accesskey}"
                            autocomplete="off" />
                    </div>
            
        
                <!-- 密码 -->
                <section >
                    <div class="loginpwd" style='width:279px;margin-right:20px;margin-top:20px;background-color:#4987F4;' >
                        <label for="password"></label>
                        <input class="required" placeholder="密码" type="password" id="password" size="25"
                            tabindex="2"
                            th:accesskey="#{screen.welcome.label.password.accesskey}"
                            th:field="*{password}" autocomplete="off" /> 
                        <span id="capslock-on" style="display: none;">
                            <p>
                            <i class="fa fa-exclamation-circle"></i> 
                            <span th:utext="#{screen.capslock.on}" />
                            </p>
                        </span>
                    </div>
                </section>
                <section class="row check">
                    <p th:if="${rememberMeAuthenticationEnabled}">
                        <input type="checkbox" name="rememberMe" id="rememberMe"
                            value="true" tabindex="3" /> <label for="rememberMe"
                            th:text="#{screen.rememberme.checkbox.title}" />
                    </p>
                </section>
        
                <section class="row" th:if="${recaptchaSiteKey}">
                    <div class="g-recaptcha" th:attr="data-sitekey=${recaptchaSiteKey}" />
                </section>
        
                <!-- 验证码 -->
                <!-- <div class="loginvalifield" style="margin-top:20px;">
                    <div class="loginvalicode">
                        <label for="vcode"></label>
                        
                        <input id="vcode" name="vcode" class="required" tabindex="3" accesskey="v" type="text" value="" size="35" autocomplete="off">
                    </div>
                    <span><img src="servlet/gevcode" class="validatelbl" onclick="this.src='servlet/gevcode?d='+new Date().getTime()"></span>
                </div> -->
                <section >
                <div id="vCodeID" class="loginvalifield" style='margin-top:20px;float:left;background-color:#5F89D8;'>
                    <div class="loginvalicode">
                        <label for="vcode" ></label>
                        <input id="inputCode" name="vcode" placeholder="验证码" class="required" type="text" tabindex="4" />
                    </div>
                    <span class="code" id="checkCode" onclick="createCode()" ></span>
                </div>
                </section>
                <!-- 登录按钮 -->
                <section >
                    <input type="hidden" name="execution" th:value="${flowExecutionKey}" />
                    <input type="hidden" name="_eventId" value="submit" /> 
                    <input type="hidden" name="geolocation" /> 
                    <!-- <input class="loginbtn" name="submit" accesskey="l"  tabindex="6" type="submit" /> -->
                    <input class="loginbtn" style="margin-top:20px;" name="submit" accesskey="l" value="" tabindex="5" type="submit">
                    <!--<div style="text-align:center; font-size:14px; font-weight:bold;margin-top:20px;">
                        <span style="color:blue;font-family:宋体;">国家节点</span>
                    </div> -->
                    <!--<div style="color:white;font-size:14px;margin-top:5px;">
                        <table width="100%" align="center" style='border-collapse:separate;border-spacing:8px;'>
                            <tr> 
                                <td style="width:40px;">
                                    <a href="#" style="color:blue;">辽宁</a>
                                </td>
                                <td style="width:40px;">
                                    <a href="#" style="color:blue;">河北</a>
                                </td>
                                <td style="width:40px;">
                                    <a href="#" style="color:blue;">天津</a>
                                </td>
                                <td style="width:40px;">
                                    <a href="#" style="color:blue;">山东</a>
                                </td>
                                <td style="width:40px;">
                                    <a href="#" style="color:blue;">江苏</a>
                                </td>
                                <td>
                                    <a href="#" style="color:blue;">上海</a>
                                </td>
                            </tr>
                            <tr> 
                                <td >
                                    <a href="#" style="color:blue;">浙江</a>
                                </td>
                                <td>
                                    <a href="#" style="color:blue;">福建</a>
                                </td>
                                <td>
                                    <a href="#" style="color:blue;">广东</a>
                                </td>
                                <td>
                                    <a href="#" style="color:blue;">广西</a>
                                </td>
                                <td>
                                    <a href="#" style="color:blue;">海南</a>
                                </td>
                            </tr>
                        </table>
                    </div>-->
                </section>
            </div>
        </div>
        <div id='div_foot'>
            <span>技术支持:国家海洋信息中心</span><span style='margin-left:20px;'>广东蓝图信息技术有限公司</span>
        </div>
    </form>
    <form th:if="${passwordManagementEnabled}" method="post" id="misagh">
        <input type="hidden" name="execution" th:value="${flowExecutionKey}" />
        <input type="hidden" name="_eventId" value="resetPassword" /> 
        <span class="fa fa-unlock"></span> 
        <a th:utext="#{screen.pm.button.resetPassword}" href="javascript:void(0)" onclick="myLoginSubmit()" />
        <p />
    </form>
    
    <script type="text/javascript">
        function myfocus() {
            document.getElementById('username').focus();
        }
        window.onload = function () {
            var div_obj = document.getElementById("div_middle");
            //宽度自适应
            var fullWidth = document.body.offsetWidth;
            var div_loginBox = document.getElementById("div_loginBox");
            var boxWidth = div_loginBox.offsetWidth;
            var myWidth=div_obj.offsetWidth;
            if (fullWidth > 1920) {
                fullWidth = 1920;
            }
            div_obj.style.width = fullWidth + "px";
            div_loginBox.style.left = ((fullWidth - boxWidth) / 2 + 375) + "px";
            //高度自适应
            var fullHeight = document.body.offsetHeight;
            var myHeight = div_obj.offsetHeight;
            if(fullHeight>myHeight){
                //div_obj.style.marginTop = ((fullHeight - myHeight) / 2) + "px";
            }
            var div_loginTitle = document.getElementById("div_loginTitle");
            var titleWidth = div_loginTitle.offsetWidth;
            div_loginTitle.style.left = (fullWidth - titleWidth) / 2 + "px";
            
            //根据参数自动替换标题、背景图片
            var search = window.location.search;
            if(search != "" && search.indexOf("=") > -1) {
                search = decodeURIComponent(search);
                var value = search.split('=')[1];
                if(value.length > 0) {
                    var startNum = value.indexOf("//");
                    value = value.substring(startNum + 2, value.length);
                    var endNum = value.indexOf("/");
                    if(endNum > -1) {
                        value = value.substring(0, endNum);
                    }
                    var k = value.indexOf(":");
                    if(k > -1) {
                        value = value.substring(0, k);
                    }
                    var host = value;
                    
                    if(host == "10.3.1.37") {
                        $("#div_loginTitle").css("background", "url(images/GJXJlogin/" + host + "_tit.png) no-repeat");
                        $("#div_middle").css("background", "url(images/GJXJlogin/" + host + "_bg.jpg) no-repeat");
                        $("#div_middle").css("background-repeat", "no-repeat");
                        $("#div_middle").css("background-position", "50% 110%");
                        $("#checkCode").css("width", "94px");
                        $("#checkCode").css("height", "40px");
                        $("#topBgColor").css("background-color", "#3FD0FD");
                        $("body").css("background-color", "#31b4ff");
                        $("#div_foot").css("background-color", "#31b4ff");
                    }
                }
            }
            
            createCode();
        }
    </script>
    <script type="text/javascript" th:inline="javascript">
        var i = [[#{screen.welcome.button.loginwip}]]
        //表单提交
        $("#fm1").submit(function() {
            //验证用户名与密码
            var theUsername = document.getElementById("username").value;
            if (theUsername.length <= 0) 
            {
                alert("请输入用户名!");
                return false;
            }
            var thePassword = document.getElementById("password").value;
            if (thePassword.length <= 0) 
            {
                alert("请输入密码!");
                return false;
            }
          //验证验证码
            var inputCode = document.getElementById("inputCode").value;
            if (inputCode.length <= 0) 
            {
                alert("请输入验证码!");
                return false;
            } 
            else if (inputCode.toUpperCase() != code.toUpperCase()) 
            {
                alert("验证码输入有误!");
                createCode();
                return false;
            }
            
            $(":submit").attr("disabled", true);
            $(":submit").attr("value", i);
            return true;
        });
        
        function myLoginSubmit(){
            var theSubmit = document.getElementById("misagh");
            theSubmit.submit();
        }
    </script>
</body>
</html>