Commit e5703fb8 by liusiyan

登录页面

parent 55ab8f69
This source diff could not be displayed because it is too large. You can view the blob instead.
<?xml version="1.0" encoding="UTF-8"?>
<connections/>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<connection>
<connection>
<name>Default</name>
<source>file:/C:/Users/Administrator</source>
</connection>
</connection>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<sites/>
\ No newline at end of file
#safe table
#Tue Dec 24 09:55:17 CST 2019
connections=connections.1
#safe table
#Tue Dec 24 09:55:17 CST 2019
defaultConnection=defaultConnection.1
sites=sites.1
This source diff could not be displayed because it is too large. You can view the blob instead.
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<typeInfoHistroy/>
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<qualifiedTypeNameHistroy/>
2019-12-24 09:54:49,038 [Worker-0: Loading available Gradle versions] INFO c.g.t.t.d.PublishedGradleVersions - Gradle version information cache is out-of-date. Trying to update.
<configuration scan="true">
<appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
<encoder class="ch.qos.logback.classic.encoder.PatternLayoutEncoder">
<pattern>%date [%thread] %-5level %logger{35} - %msg%n</pattern>
</encoder>
<filter class="ch.qos.logback.classic.filter.ThresholdFilter">
<level>OFF</level> <!-- change to DEBUG to mimic '-consolelog' behaviour -->
</filter>
</appender>
<appender name="FILE" class="ch.qos.logback.core.rolling.RollingFileAppender">
<File>${org.eclipse.m2e.log.dir}/0.log</File>
<rollingPolicy class="ch.qos.logback.core.rolling.FixedWindowRollingPolicy">
<FileNamePattern>${org.eclipse.m2e.log.dir}/%i.log</FileNamePattern>
<MinIndex>1</MinIndex>
<MaxIndex>10</MaxIndex>
</rollingPolicy>
<triggeringPolicy class="ch.qos.logback.core.rolling.SizeBasedTriggeringPolicy">
<MaxFileSize>100MB</MaxFileSize>
</triggeringPolicy>
<encoder class="ch.qos.logback.classic.encoder.PatternLayoutEncoder">
<pattern>%date [%thread] %-5level %logger{35} - %msg%n</pattern>
</encoder>
</appender>
<appender name="EclipseLog" class="org.eclipse.m2e.logback.appender.EclipseLogAppender">
<filter class="ch.qos.logback.classic.filter.ThresholdFilter">
<level>WARN</level>
</filter>
</appender>
<appender name="MavenConsoleLog" class="org.eclipse.m2e.logback.appender.MavenConsoleAppender">
</appender>
<root level="INFO">
<appender-ref ref="FILE" />
<appender-ref ref="STDOUT" />
<appender-ref ref="EclipseLog" />
<appender-ref ref="MavenConsoleLog" />
</root>
<logger name="com.ning.http.client" level="INFO" />
</configuration>
<?xml version="1.0" encoding="UTF-8"?>
<setup:Workspace
xmi:version="2.0"
xmlns:xmi="http://www.omg.org/XMI"
xmlns:setup="http://www.eclipse.org/oomph/setup/1.0"
name="workspace"/>
<?xml version="1.0" encoding="UTF-8"?>
<section name="Workbench">
</section>
<?xml version="1.0" encoding="UTF-8"?>
<section name="Workbench">
<section name="org.eclipse.ui.internal.QuickAccess">
<item value="-1" key="dialogHeight"/>
<item value="-1" key="dialogWidth"/>
<list key="textEntries">
</list>
<list key="orderedElements">
</list>
<list key="orderedProviders">
</list>
<list key="textArray">
</list>
</section>
</section>
<?xml version="1.0" encoding="UTF-8"?>
<workingSetManager>
<workingSet editPageId="org.eclipse.jdt.internal.ui.DynamicSourcesWorkingSet" factoryID="org.eclipse.ui.internal.WorkingSetFactory" id="1577152435852_0" label="Java Main Sources" name="Java Main Sources"/>
<workingSet editPageId="org.eclipse.jdt.internal.ui.DynamicSourcesWorkingSet" factoryID="org.eclipse.ui.internal.WorkingSetFactory" id="1577152435873_1" label="Java Test Sources" name="Java Test Sources"/>
<workingSet aggregate="true" factoryID="org.eclipse.ui.internal.WorkingSetFactory" id="1577152492846_2" label="窗口工作集" name="Aggregate for window 1577152492846"/>
</workingSetManager>
\ No newline at end of file
#Tue Dec 24 09:53:52 CST 2019
org.eclipse.core.runtime=2
org.eclipse.platform=4.9.0.v20180906-0745
......@@ -15,9 +15,9 @@ public class DBConnection {
// // 测试环境本地调试数据库用户名
// String test_user = "root";
// // 测试环境本地调试数据库密码
// String test_password = "mjitech";
// String test_password = "mjitech";
//发布环境数据库访问地址,代码开发完成,发布的时候需要放开以下注释再提交。
// //发布环境数据库访问地址,代码开发完成,发布的时候需要放开以下注释再提交。
String test_url = "jdbc:mysql://139.129.108.180:3306/maxbox_test?useunicode=true&characterEncoding=utf8";
// 发布环境用户名
String test_user = "root";
......
<html>
<%@ page language="java" contentType="text/html; charset=UTF-8"
pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>登录</title>
<script type="text/javascript" src="https://code.jquery.com/jquery-3.4.1.js"></script>
<style type="text/css">
* {
margin: 0px;
background: rgba(56,157,170,.82);
}
body{
width: 100%;
height: 1px;
}
#content {
margin: 320px auto;
width: 700px;
height: 360px;
border: 1px transparent solid;
}
#box {
width: 700px;
height: 360px;
background-color: #fff;
text-align: center;
border-radius: 15px;
border: 2px #fff solid;
box-shadow: 10px 10px 5px #000000;
}
.title {
line-height: 58px;
margin-top: 20px;
font-size: 36px;
color: #000;
height: 58px;
background: white;
}
#box:hover {
border: 2px #fff solid;
}
.input {
margin-top: 20px;
background: white;
}
input {
margin-top: 5px;
outline-style: none;
border: 1px solid #ccc;
border-radius: 3px;
padding: 13px 14px;
width: 70%;
font-size: 14px;
font-weight: 700;
font-family: "Microsoft soft";
background:#e6faf7;
border: 1px solid #dcdfe6;
}
input:hover {
border-color: #c0c4cc;
}
#password{
margin-top: 30px;
}
button {
width: 150px;
margin-top: 30px;
border: none;
color: white;
padding: 15px 32px;
text-align: center;
text-decoration: none;
display: inline-block;
font-size: 18px;
border-radius: 15px;
background-color: #33dac1;
outline:none;
}
#ti{
background: white;
color: red;
margin-top: 7px;
}
</style>
</head>
<body>
<h2>Hello World!</h2>
<div id="content">
<div id="box">
<div class="title">Login</div>
<div class="input">
<input type="text" id="username" value="" placeholder="用户名" />
<br>
<input type="password" id="password" placeholder="密码" />
<br>
<button type="button" onclick="return check(this.form);">登录</button>
</div>
<p id="ti"></p>
</div>
</div>
</body>
<script type="text/javascript">
//验证表单是否为空,若为空则将焦点聚焦在input表单上,否则表单通过,登录成功
function check(form){
var accountName = $("#username"),$password = $("#password");
var accountName = accountName.val(),password = $password.val();
if(!accountName || accountName == ""){
showMsg("请输入用户名");
return false;
}
if(!password || password == ""){
showMsg("请输入密码");
return false;
}
if( password !== ""&&accountName!== ""){
window.location="http://localhost:8080/audit/views/inventory_list.jsp";
return false;
}
//无需用户验证直接登录
//需要账户密码匹配才可登录。
//这里为用ajax获取用户信息并进行验证,如果账户密码不匹配则登录失败,如不需要验证用户信息,这段可不写
// $.ajax({
// url : systemURL,// 获取自己系统后台用户信息接口
// data :{"password":password,"accountName":accountName},
// type : "GET",
// dataType: "json",
// success : function(data) {
// if (data){
// if (data.code == "1111") { //判断返回值,这里根据的业务内容可做调整
// setTimeout(function () {//做延时以便显示登录状态值
// showMsg("正在登录中...");
// console.log(data);
// window.location.href = url;//指向登录的页面地址
// },100)
// } else {
// showMsg(data.message);//显示登录失败的原因
// return false;
// }
// }
// },
// error : function(data){
// showMsg(data.message);
// }
// });
}
//错误信息提醒
function showMsg(msg){
$("#ti").text(msg);
}
//监听回车键提交
$(function(){
document.onkeydown=keyDownSearch;
function keyDownSearch(e) {
// 兼容FF和IE和Opera
var theEvent = e || window.event;
var code = theEvent.keyCode || theEvent.which || theEvent.charCode;
if (code == 13) {
$('#submit').click();//具体处理函数
return false;
}
return true;
}
});
</script>
</html>
......@@ -390,7 +390,7 @@
</tbody>
</table>
<input type="submit" value="submit">
<input type="submit" value="submit">
</form>
......
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