login.html
3.1 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>{$title|default=""}</title>
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="maximum-scale=1.0, minimum-scale=1.0, user-scalable=0, initial-scale=1.0, width=device-width"/>
<link rel="stylesheet" type="text/css" href="__CDN__/assets/adverh5/css/login.css">
<link rel="stylesheet" type="text/css" href="__CDN__/assets/adverh5/css/public.css">
<script src="__CDN__/assets/adverh5/js/base.js"></script>
</head>
<style>
.container{
width: 100%;
height: 100%;
background: url('__CDN__/assets/adverh5/img/bg2.png') no-repeat center;
background-size: 100% 100%;
background-attachment: fixed;
overflow: hidden;
}
.login_btn{
width: 5.9rem;
height: 1.12rem;
background: url('__CDN__/assets/adverh5/img/9.png') no-repeat;
background-size: 100% 100%;
overflow: hidden;
font-size:0.32rem;
font-family:PingFang SC;
font-weight:bold;
color:rgba(249,249,249,1);
opacity:1;
text-align: center;
line-height: 1.12rem;
margin:0.88rem auto 0;
}
</style>
<body>
<div class="toast">与服务器断开连接</div>
<div class="container">
<div class="title">
页面标题页面标题
</div>
<div class="password">
<div class="lock">
<img src="__CDN__/assets/adverh5/img/10.png"/>
</div>
<div class="input">
<input id="password" type="password" placeholder="请输入密码"/>
</div>
</div>
<div class="login_btn">
登录
</div>
</div>
<script src="__CDN__/assets/adverh5/js/jquery.min.js"></script>
<script src="__CDN__/assets/adverh5/js/public.js"></script>
<script>
$('.input input').on("blur", function () {
window.scroll(0, 0);
});
//滑动隐藏键盘
$('.container').on('touchstart',function(){
$('textarea').blur()
$('.more').hide();
});
</script>
<script>
$(function(){
$('.login_btn').click(function(){
var password = $('#password').val();
if(password == ''){
toast('请输入密码');
return ;
}
$('.login_btn').text('登录中...');
$.ajax({
url:"{:url('home/index/login_verify')}",
type:"POST",
data:{"password":password},
success:function(res){
if(res.code == 1){
toast('登陆成功');
setTimeout(function(){
window.location.href = "{:url('home/index/index','',false,true)}/goods_id/"+res.data.id;
},2500);
}else{
toast(res.msg);
$('.login_btn').text('登录');
}
},
error:function(res){
toast('与服务器断开连接')
$('.login_btn').text('登录');
}
});
});
})
</script>
</body>
</html>