Selaa lähdekoodia

武汉常福医院添加内外网访问判断

laowo 4 vuotta sitten
vanhempi
commit
03ea4e578a
3 muutettua tiedostoa jossa 448 lisäystä ja 251 poistoa
  1. 122 121
      WebRoot/index.jsp
  2. 0 0
      WebRoot/res/jquery/jquery-3.3.1.min.js
  3. 326 130
      WebRoot/view/frontpage/scripts/company.js

+ 122 - 121
WebRoot/index.jsp

@@ -1,139 +1,140 @@
 <%@ page language="java" contentType="text/html; charset=UTF-8"
-    pageEncoding="UTF-8"%>
+         pageEncoding="UTF-8" %>
 <%
     String path = request.getContextPath();
-    String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
-    String baseUrl = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+"/";
+    String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort() + path + "/";
+    String baseUrl = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort() + "/";
 %>
 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
 <html lang="en">
 <head>
-<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
-<!-- <meta http-equiv="Content-Security-Policy" content="upgrade-insecure-requests"> -->
-<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no">
-<link type="text/css" rel="stylesheet" href="<%=basePath+"res/extjs/resources/css/ext-all-access.css" %>"/>
-<link type="text/css" rel="sytlesheet" href="<%=basePath+"res/particles/css/style.css" %>">
-<link type="text/css" rel="stylesheet" href="index.css">
-<script type="text/javascript" src="<%=basePath+"res/jquery/jquery-3.3.1.min.js" %>"></script>
-<script type="text/javascript" src="<%=basePath+"res/particles/particles.min.js" %>"></script>
-<script type="text/javascript" src ="<%=basePath+"res/extjs/ext-all.js" %>"></script>
-<script type="text/javascript" src ="<%=basePath+"res/extjs/locale/ext-lang-zh_CN.js" %>"></script>
-<title>智慧消防管理平台</title>
+    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+    <!-- <meta http-equiv="Content-Security-Policy" content="upgrade-insecure-requests"> -->
+    <meta name="viewport"
+          content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no">
+    <link type="text/css" rel="stylesheet" href="<%=basePath+"res/extjs/resources/css/ext-all-access.css" %>"/>
+    <link type="text/css" rel="sytlesheet" href="<%=basePath+"res/particles/css/style.css" %>">
+    <link type="text/css" rel="stylesheet" href="index.css">
+    <script type="text/javascript" src="<%=basePath+"res/jquery/jquery-3.3.1.min.js" %>"></script>
+    <script type="text/javascript" src="<%=basePath+"res/particles/particles.min.js" %>"></script>
+    <script type="text/javascript" src="<%=basePath+"res/extjs/ext-all.js" %>"></script>
+    <script type="text/javascript" src="<%=basePath+"res/extjs/locale/ext-lang-zh_CN.js" %>"></script>
+    <title>智慧消防管理平台</title>
 </head>
 <body onload="webInit();" style="overflow:hidden;">
 <form id="my_login">
-<div id="particles-js">
-  <div class="bdy-login" >
-    <div id="frm-login" autocomplete="off">
-      <p>
-        <img src="res/img/login_title.png" alt="">
-      </p>
-      <p>
-        <span>用户名</span>
-        <input type="text" placeholder="请输入用户名" id="username" name="username" autocomplete="off">
-      </p>
-      <p>
-        <span>密 码</span>
-        <input type="password" placeholder="请输入密码" id="password" name="password" autocomplete="off">
-      </p>
-      <p id="btn-submit" onclick="loginSubmit()">
-        登 录
-      </p>
+    <div id="particles-js">
+        <div class="bdy-login">
+            <div id="frm-login" autocomplete="off">
+                <p>
+                    <img src="res/img/login_title.png" alt="">
+                </p>
+                <p>
+                    <span>用户名</span>
+                    <input type="text" placeholder="请输入用户名" id="username" name="username" autocomplete="off">
+                </p>
+                <p>
+                    <span>密 码</span>
+                    <input type="password" placeholder="请输入密码" id="password" name="password" autocomplete="off">
+                </p>
+                <p id="btn-submit" onclick="loginSubmit()">
+                    登 录
+                </p>
+            </div>
+        </div>
     </div>
-  </div>
-</div>
 </form>
 <script src="res/particles/js/app.js"></script>
 <script>
-$(function() {
-	particlesJS.load('div-particles', 'https://iot.usky.cn/jdxf/Public/vendor/particles/assets/particles.json', function() {
-		console.log('callback - particles.js config loaded')
-	});
-	$("#btn-submit").hover(function() {
-		$(this).css({
-			color: '#5cc7ff',
-			border: '1px solid #5cc7ff',
-		})
-	});
-	$("#btn-submit").mouseleave(function() {
-		$(this).css({
-			color: '#1EB2FF',
-			border: '1px solid #009FFF',
-		})
-	});
-	$("input").focus(function() {
-		$(this).parent().css({
-			border: '1px solid #009fff',
-		})
-	});
-	$("input").blur(function() {
-		$(this).parent().css({
-			border: '1px solid #06538a',
-		})
-	})
-});
-$(function() {
-	var w = $(document).width();
-	var l = (w - 380) / 2;
-	$("#btn-submit").click(function() {
-		$("#frm-login").submit()
-	});
-	$(".bdy-login").css({
-		"left": l
-	}).animate({
-		top: '300px',
-		opacity: 1,
-		filter: "alpha(opacity=" + 100 + ")"
-	}, 1000);
-	$(document).keydown(function(e) {
-		if (e.which == 13) {
-			$("#frm-login").submit()
-		}
-	})
-});
-var webInit = function(){
-	sessionStorage.setItem('V_LOGINNAME','');
-	sessionStorage.setItem('V_PASSWORD','');
+    $(function () {
+        particlesJS.load('div-particles', 'https://iot.usky.cn/jdxf/Public/vendor/particles/assets/particles.json', function () {
+            console.log('callback - particles.js config loaded')
+        });
+        $("#btn-submit").hover(function () {
+            $(this).css({
+                color: '#5cc7ff',
+                border: '1px solid #5cc7ff',
+            })
+        });
+        $("#btn-submit").mouseleave(function () {
+            $(this).css({
+                color: '#1EB2FF',
+                border: '1px solid #009FFF',
+            })
+        });
+        $("input").focus(function () {
+            $(this).parent().css({
+                border: '1px solid #009fff',
+            })
+        });
+        $("input").blur(function () {
+            $(this).parent().css({
+                border: '1px solid #06538a',
+            })
+        })
+    });
+    $(function () {
+        var w = $(document).width();
+        var l = (w - 380) / 2;
+        $("#btn-submit").click(function () {
+            $("#frm-login").submit()
+        });
+        $(".bdy-login").css({
+            "left": l
+        }).animate({
+            top: '300px',
+            opacity: 1,
+            filter: "alpha(opacity=" + 100 + ")"
+        }, 1000);
+        $(document).keydown(function (e) {
+            if (e.which == 13) {
+                $("#frm-login").submit()
+            }
+        })
+    });
+    var webInit = function () {
+        sessionStorage.setItem('V_LOGINNAME', '');
+        sessionStorage.setItem('V_PASSWORD', '');
 
-}
-var loginSubmit = function(){
-	var basePath = $("#basePath").val();
-	var queryJson = new Object();
-	queryJson.V_LOGINNAME = $("#username").val();
-	queryJson.V_PASSWORD = $("#password").val();
-	queryJson.V_COMMAND = "LOGIN";
-	var qdata = "queryJson="+JSON.stringify(queryJson);
-	var qurl = basePath+'/cgi-bin/WebAction.cgi';
-	 if((basePath.indexOf('localhost')>=0)||(basePath.indexOf('127.0.0.1')>=0))
-		qurl = 'http://47.103.74.123:8080/YtIoT/cgi-bin/WebAction.cgi';
-	$.ajax({
-		type:'POST',
-		url: qurl,
-		data: qdata,
-		success:function(result){
-			var json = eval('(' + result + ')');
-			if(json.login=='true'){
-				sessionStorage.setItem('V_LOGINNAME',$("#username").val());
-				sessionStorage.setItem('V_PASSWORD',$("#password").val());
-                                if($("#username").val()=="wjzn"){
-					location.href = basePath+"view/frontpage/index.html"
-				}else{
-				        location.href = basePath+json.href
-                                }
-			}else{
-				if(json.login=='false'){
-					Ext.Msg.show({
-						title:'错误信息',
-						msg:json.Msg
-					});
-				}
-			}
-		}
-	});
-};
-$("#my_login").submit(function(e){
-	loginSubmit();
-});
+    }
+    var loginSubmit = function () {
+        var basePath = $("#basePath").val();
+        var queryJson = new Object();
+        queryJson.V_LOGINNAME = $("#username").val();
+        queryJson.V_PASSWORD = $("#password").val();
+        queryJson.V_COMMAND = "LOGIN";
+        var qdata = "queryJson=" + JSON.stringify(queryJson);
+        var qurl = basePath + '/cgi-bin/WebAction.cgi';
+        if ((basePath.indexOf('localhost') >= 0) || (basePath.indexOf('127.0.0.1') >= 0))
+            qurl = 'http://47.103.74.123:8080/YtIoT/cgi-bin/WebAction.cgi';
+        $.ajax({
+            type: 'POST',
+            url: qurl,
+            data: qdata,
+            success: function (result) {
+                var json = eval('(' + result + ')');
+                if (json.login == 'true') {
+                    sessionStorage.setItem('V_LOGINNAME', $("#username").val());
+                    sessionStorage.setItem('V_PASSWORD', $("#password").val());
+                    if ($("#username").val() == "wjzn") {
+                        location.href = basePath + "view/frontpage/index.html"
+                    } else {
+                        location.href = basePath + json.href
+                    }
+                } else {
+                    if (json.login == 'false') {
+                        Ext.Msg.show({
+                            title: '错误信息',
+                            msg: json.Msg
+                        });
+                    }
+                }
+            }
+        });
+    };
+    $("#my_login").submit(function (e) {
+        loginSubmit();
+    });
 </script>
 <input type="hidden" id="basePath" name="basePath" value="<%=basePath %>"/>
 </body>

Tiedoston diff-näkymää rajattu, sillä se on liian suuri
+ 0 - 0
WebRoot/res/jquery/jquery-3.3.1.min.js


Tiedoston diff-näkymää rajattu, sillä se on liian suuri
+ 326 - 130
WebRoot/view/frontpage/scripts/company.js


Kaikkia tiedostoja ei voida näyttää, sillä liian monta tiedostoa muuttui tässä diffissä