|
|
@@ -126,12 +126,15 @@
|
|
126
|
126
|
|
|
127
|
127
|
.mui-logo-box {
|
|
128
|
128
|
text-align: center;
|
|
129
|
|
- padding-top: 80px;
|
|
130
|
|
- margin-bottom: 70px;
|
|
|
129
|
+
|
|
|
130
|
+ margin-bottom: 130px;
|
|
|
131
|
+ width: 100%;
|
|
131
|
132
|
}
|
|
132
|
133
|
|
|
133
|
134
|
.mui-logo-box img {
|
|
134
|
|
- margin-bottom: 50px;
|
|
|
135
|
+ padding-top: 150px;
|
|
|
136
|
+ width: 80%;
|
|
|
137
|
+
|
|
135
|
138
|
}
|
|
136
|
139
|
|
|
137
|
140
|
.mui-input-row {
|
|
|
@@ -210,28 +213,29 @@
|
|
210
|
213
|
|
|
211
|
214
|
<body>
|
|
212
|
215
|
|
|
213
|
|
- <div class="mui-content">
|
|
214
|
|
- <form id='login-form' class="mui-input-group">
|
|
|
216
|
+ <div class="mui-content" >
|
|
|
217
|
+ <form id="login-form" class="mui-input-group">
|
|
215
|
218
|
<!--logo-->
|
|
216
|
219
|
<div class="mui-logo-box">
|
|
217
|
220
|
<div>
|
|
218
|
221
|
<img src="img/123.png" alt="" />
|
|
219
|
222
|
</div>
|
|
|
223
|
+
|
|
220
|
224
|
</div>
|
|
221
|
225
|
<div class="mui-input-row">
|
|
222
|
226
|
<label><span class="mui-icon iconfont icon-yonghu"></span></label>
|
|
223
|
|
- <input id='account' type="text" class="mui-input-clear mui-input" placeholder="请输入账号">
|
|
|
227
|
+ <input id="account" type="text" class="mui-input-clear mui-input" placeholder="请输入账号">
|
|
224
|
228
|
</div>
|
|
225
|
229
|
<div class="mui-input-row mui-password">
|
|
226
|
230
|
<label><span class="mui-icon iconfont icon-suo"></span></label>
|
|
227
|
|
- <input id='password' type="password" class=" mui-input-password mui-input" placeholder="请输入密码">
|
|
|
231
|
+ <input id="password" type="password" class=" mui-input-password mui-input" placeholder="请输入密码">
|
|
228
|
232
|
</div>
|
|
229
|
233
|
</form>
|
|
230
|
234
|
<div class="mui-content-padded">
|
|
231
|
|
- <button id='login' class="mui-btn mui-btn-block mui-btn-primary" style="font-size: 16px;">登录</button>
|
|
|
235
|
+ <button id="login" class="mui-btn mui-btn-block mui-btn-primary" style="font-size: 16px;">登录</button>
|
|
232
|
236
|
</div>
|
|
233
|
237
|
<div class="mui-content-padded oauth-area" style="width: 100%; margin-top: 30px;">
|
|
234
|
|
- <a href="User-login.html" class="reg_href" style="font-size: 14px;">我是市民</a>
|
|
|
238
|
+ <a href="User-login.html" class="reg_href" style="font-size: 14px;">我是市民</a>
|
|
235
|
239
|
</div>
|
|
236
|
240
|
</div>
|
|
237
|
241
|
<script src="js/mui.min.js"></script>
|
|
|
@@ -244,13 +248,13 @@
|
|
244
|
248
|
mui.plusReady(function() {
|
|
245
|
249
|
var usercode = localStorage.getItem("user"); //获取本地存储
|
|
246
|
250
|
var psw = localStorage.getItem("psw"); //获取本地存储s
|
|
247
|
|
- if(usercode != null) //如果缓存中有数据,则加载出来
|
|
|
251
|
+ if (usercode != null) //如果缓存中有数据,则加载出来
|
|
248
|
252
|
{
|
|
249
|
253
|
document.getElementById("account").value = usercode;
|
|
250
|
254
|
document.getElementById("password").value = localStorage.getItem("psw");
|
|
251
|
255
|
}
|
|
252
|
256
|
document.getElementById("login").addEventListener('tap', function() {
|
|
253
|
|
-// localStorage.clear();
|
|
|
257
|
+ // localStorage.clear();
|
|
254
|
258
|
var username = document.getElementById('account').value;
|
|
255
|
259
|
var password = document.getElementById('password').value;
|
|
256
|
260
|
var data = {
|
|
|
@@ -258,12 +262,12 @@
|
|
258
|
262
|
"password": $.md5(password),
|
|
259
|
263
|
" extensionphone": 1
|
|
260
|
264
|
};
|
|
261
|
|
- if(!username) {
|
|
|
265
|
+ if (!username) {
|
|
262
|
266
|
plus.nativeUI.toast('输入账号');
|
|
263
|
|
- } else if(!password) {
|
|
|
267
|
+ } else if (!password) {
|
|
264
|
268
|
plus.nativeUI.toast('密码不能为空');
|
|
265
|
269
|
} else {
|
|
266
|
|
- if(plus.networkinfo.getCurrentType() == plus.networkinfo.CONNECTION_NONE) {
|
|
|
270
|
+ if (plus.networkinfo.getCurrentType() == plus.networkinfo.CONNECTION_NONE) {
|
|
267
|
271
|
mui.toast("网络连接中断!");
|
|
268
|
272
|
}
|
|
269
|
273
|
// 调用ajax
|
|
|
@@ -273,7 +277,7 @@
|
|
273
|
277
|
type: 'post', //HTTP请求类型
|
|
274
|
278
|
timeout: 10000, //超时时间设置为10秒
|
|
275
|
279
|
success: function(data) {
|
|
276
|
|
- if(data.state == "success") {
|
|
|
280
|
+ if (data.state == "success") {
|
|
277
|
281
|
localStorage.setItem("token", data.data.token);
|
|
278
|
282
|
localStorage.setItem("user", username);
|
|
279
|
283
|
localStorage.setItem("psw", password);
|
|
|
@@ -301,4 +305,4 @@
|
|
301
|
305
|
</script>
|
|
302
|
306
|
</body>
|
|
303
|
307
|
|
|
304
|
|
-</html>
|
|
|
308
|
+</html>
|