pass.html
1.9 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
{extend name="base" /}
{block name="head"}
<style>
html{height:100%;}
body {
background-image: linear-gradient(to bottom,#71BA51 0,#00B16A 100%);
background-repeat: repeat-x;
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#FF71BA51', endColorstr='#FF00B16A', GradientType=0);
color: #fff;
box-sizing: border-box;
min-height: 100%;
height: 100%;
}
</style>
{/block}
{block name="main"}
<div class="container" style="">
<div class="container">
<div class="page-header text-center" style="border-bottom: none;margin-top: 200px;" >
<h2>{$title} / {$version}</h2>
</div>
<div class="row" style="margin-top: 100px;">
<div class="col-xs-12 col-sm-3"></div>
<div class="col-xs-12 col-sm-4">
<input class="form-control input-lg" type="password" id="pass" placeholder="请输入访问密码...">
</div>
<div class="col-xs-12 col-sm-2">
<button type="button" class="btn btn-info btn-lg btn-block">进入</button>
</div>
<div class="col-xs-12 col-sm-3"></div>
</div>
</div>
</div>
{/block}
{block name="footer"}
<script type="text/javascript">
$(document).ready(function(){
$("button").click(function(){
if($("#pass").val() == ""){
alert("请输入密码");$("#pass").focus();
}else{
$.ajax({
url: "{$root}/doc/login",
data: {pass: $("#pass").val() },
dataType: "json",
success: function(data){
if(data.status == 200){
location.href = "/doc";
}else{
alert(data.message);
}
}
});
}
})
});
</script>
{/block}