<!DOCTYPE html>
|
<html class="no-js css-menubar" lang="zh-cn">
|
|
<head>
|
<title>上海市道路交通环境监测平台</title>
|
<meta charset="utf-8" />
|
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
|
<!-- 移动设备 viewport -->
|
<meta name="viewport"
|
content="width=device-width,initial-scale=1.0,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no,minimal-ui" />
|
<meta name="author" content="上海市道路交通环境监测平台 http://mars3d.cn" />
|
<!-- 360浏览器默认使用Webkit内核 -->
|
<meta name="renderer" content="webkit" />
|
<!-- Chrome浏览器添加桌面快捷方式(安卓) -->
|
<link rel="icon" type="image/png" href="img/favicon/favicon.png" />
|
<meta name="mobile-web-app-capable" content="yes" />
|
<!-- Safari浏览器添加到主屏幕(IOS) -->
|
<link rel="icon" sizes="192x192" href="img/favicon/apple-touch-icon.png" />
|
<meta name="apple-mobile-web-app-capable" content="yes" />
|
<meta name="apple-mobile-web-app-status-bar-style" content="black" />
|
<meta name="apple-mobile-web-app-title" content="火星科技 MarsGIS" />
|
<script type="text/javascript" src="../lib/jquery/jquery-1.11.3.min.js"></script>
|
<script type="text/javascript" src="../js/changable_params.js"></script>
|
<!--第三方lib-->
|
<link href="../css/style.css" rel="stylesheet" />
|
<style>
|
* {
|
margin: 0;
|
padding: 0;
|
box-sizing: border-box;
|
}
|
|
.login {
|
height: 100%;
|
width: 100%;
|
background: url("../mobile/img/login_bg.png") no-repeat;
|
background-size: cover;
|
position: fixed;
|
}
|
|
.login-head {
|
margin: 0 auto;
|
text-align: center;
|
color: #fff;
|
font-size: 24px;
|
font-weight: 500;
|
line-height: 1.5;
|
}
|
|
.login-head>.login-logo {
|
display: block;
|
margin: 64px auto 20px;
|
width: 48px;
|
height: 48px;
|
padding: 4px;
|
background: #fff;
|
border-radius: 4px;
|
box-shadow: 0 2px 6px rgba(0, 0, 0, .15);
|
}
|
|
.login-head>p {
|
font-size: 16px;
|
font-weight: 300;
|
color: rgba(255, 255, 255, 0.7);
|
}
|
|
.login-form {
|
margin: 30px;
|
}
|
|
.login-item {
|
margin-bottom: 20px;
|
}
|
|
.login-item label {
|
color: #fff;
|
font-size: 18px;
|
line-height: 1;
|
font-weight: 400;
|
}
|
|
.login-item input {
|
display: block;
|
width: 100%;
|
font-size: 16px;
|
line-height: 48px;
|
padding: 0;
|
color: #fff;
|
background-color: transparent;
|
border: none;
|
border-bottom: 0.5px solid #fff;
|
outline: none;
|
border-radius: 0;
|
}
|
|
.login-item>input::-webkit-input-placeholder,
|
.login-item>input::placeholder {
|
color: rgba(255, 255, 255, 0.3);
|
}
|
|
.login-btn {
|
width: 100%;
|
text-align: center;
|
line-height: 48px;
|
color: #fff;
|
background: #FEA41D;
|
font-size: 16px;
|
letter-spacing: 1px;
|
border-radius: 4px;
|
box-shadow: 0 2px 4px rgba(0, 0, 0, .15);
|
border: none;
|
outline: none;
|
}
|
</style>
|
</head>
|
|
<body>
|
<div class="login">
|
<div class="login-head">
|
<img src="../img/logo.png" class="login-logo" />
|
上海市道路交通环境监测平台
|
<p>让上海的道路环境更加美好</p>
|
</div>
|
<div class="login-form" id="road">
|
<form id="myform">
|
<div class="login-item"><label>账号</label><input type="text" placeholder="请输入您的账号" id="username"></div>
|
<div class="login-item"><label>密码</label><input type="password" placeholder="请输入您的密码" id="password"></div>
|
<input class="login-btn" type="button" value="立即登录" onclick="DoAjax()">
|
</form>
|
<script>
|
function DoAjax() {
|
debugger;
|
$.ajax({
|
type: "get",
|
url: default_system_params.nodejs_url_predix+"dataapi/Bdata?bid=mobile_login",
|
data: {"username":$("#username").val(),"password":$("#password").val()},
|
async: true,
|
error: function (request) {
|
alert("Connection error");
|
window.location = "../mobile";
|
},
|
success: function (data) {
|
data = data.data;
|
if(!data && !data.result) {
|
alert("连接错误!");
|
return ;
|
}
|
if(data.result.length==0 ) {
|
alert("账号和密码错误!");
|
return ;
|
}
|
let record = data.result[0];
|
if(record.status == 0 && record.is_deleted ==0) {
|
localStorage.setItem("name",record.name);
|
window.location = "../mobile/road.html";
|
} else {
|
alert("账号异常!");
|
return ;
|
}
|
|
}
|
});
|
}
|
</script>
|
</div>
|
</div>
|
</body>
|
|
</html>
|