wangrong
2022-11-22 0a3e3f3302cbbdbcc35c501e44c71c4b42077a1c
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
<!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>