login.html
3.8 KB
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
<!DOCTYPE html>
<html>
<head>
<title>登录</title>
<meta http-equiv="X-UA-Compatible" content="IE=edge"/>
<meta http-equiv="content-type" content="text/html; charset=utf-8"/>
<link rel="stylesheet" href="/run/css/lo_style.css">
<link href="/run/css/bootstrap.css" rel="stylesheet">
<link href="/run/css/font-awesome.css" rel="stylesheet">
<link href="/run/css/style-responsive.css" rel="stylesheet">
</head>
<body>
<div class="lo_box">
<div class="lo_bg">
<div class="lo_xbox">
<div class="box">
<div class="lo_left">
<p>HELLO!</p>
<p>欢迎使用</p>
<p>智慧水库运行管理维护系统</p>
</div>
<div class="lo_right">
<h2>智慧水库运行管理维护系统</h2>
<!-- <div style="padding: 100px 100px 10px;">
<form class="bs-example bs-example-form" role="form">
<div class="input-group input-group-lg">
<span class="input-group-addon">@</span>
<input type="text" class="form-control lo_sty" placeholder="Twitterhandle">
</div><br>
<div class="input-group">
<span class="input-group-addon">@</span>
<input type="text" class="form-control" placeholder="Twitterhandle">
</div><br>
<div class="input-group input-group-sm">
<span class="input-group-addon">@</span>
<input type="text" class="form-control" placeholder="Twitterhandle">
</div>
</form>
</div> -->
<form id='form' name="form" id="login-form" class="form-vertical" method="POST" action="{:url('index/user/login')}">
<input type="hidden" name="url" value="{$url|htmlentities}"/>
{:token()}
<div class="put">
<div class="user0">
<i class="fa fa-user user0"></i>
<input type="text" placeholder="请输入用户名称" name="account" autocomplete="off">
</div>
<div class="user0">
<i class="fa fa-lock"></i>
<input type="password" placeholder="请输入登录密码" name="password" autocomplete="off">
</div>
<!--<div class="put_sys">-->
<!-- <div class="user0">-->
<!-- <i class="fa fa-skyatlas"></i>-->
<!-- <input type="text" placeholder="请输入右侧校验码">-->
<!-- </div>-->
<!-- <button>PgLe</button>-->
<!--</div>-->
</div>
<div class="lo_lo">
<button type="button" onclick="login()">登录</button>
</div>
</form>
</div>
</div>
</div>
<script src="https://cdn.bootcdn.net/ajax/libs/jquery/3.6.0/jquery.js"></script>
<script src="https://cdn.bootcdn.net/ajax/libs/layer/3.5.1/layer.js"></script>
<script>
function login(){
let account = $('input[name="account"]').val();
let password = $('input[name="password"]').val();
if(account==''){
layer.msg('请填写账号');
return;
}
let data = $('#form').serialize();
if(password==''){
layer.msg('请填写密码');
return;
}
$.post("{:url('index/user/login')}",data,function(res){
if(res.code==0){
layer.msg(res.msg);
$('input[name="__token__"]').val(res.data.token);
return;
}
setTimeout(function(){
layer.msg('登录成功');
location.href= $('input[name="url"]').val();
},1000)
});
}
</script>
<div class="lo_btm">
<span>版权所有:云南省腾亿融媒互联网有限公司</span>
</div>
</div>
</div>
</div>
<script src="/run/resources/scripts/axure/ios.js"></script>
</body>
</html>