login_show.html
1.7 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>會員登錄</title>
<link rel="stylesheet" href="__TMPL__/public/assets/css/wbase.css">
<script src="__TMPL__/public/assets/js/base.js"></script>
</head>
<body>
<!--header-->
<header class="header">
<img src="{:cmf_get_image_url($logo.image)}" alt="">
</header>
<!-- 内容 -->
<div class="land_box">
<h1>會員登錄</h1>
<form class="form">
<ul>
<li>
<input type="text" name="name" placeholder="請輸入您的用戶名">
</li>
<li style="border:0">
<input type="password" name="pass" placeholder="請輸入您的密碼">
</li>
</ul>
<button type="button" onclick="tlogin()">登錄</button>
</form>
</div>
</body>
<script src="__TMPL__/public/assets/js/jquery.js"></script>
<script>
function tlogin(){
name = $("input[name='name']").val();
pass = $("input[name='pass']").val();
if(name == ''){
alert('用户名不能为空');
}else{
if(pass == ''){
alert('密码不能为空');
}else{
$.post("{:url('Weixin/login_to')}",{name:name,pass:pass},function(data){
if(data){
window.location.href="{:url('Weixin/jifen',array('jifen'=>"+data+"))}";
}else{
alert('用户名密码错误');
}
});
}
}
}
</script>
</html>