You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
94 lines
3.4 KiB
HTML
94 lines
3.4 KiB
HTML
<extend name="Base/common" />
|
|
<block name="header">
|
|
<header class="jumbotron subhead" id="overview">
|
|
<div class="container">
|
|
<h2>用户登录</h2>
|
|
<p><span><span class="pull-left"><span>还没有账号? <a href="{:U('User/register')}">立即注册</a></span> </span></p>
|
|
</div>
|
|
</header>
|
|
</block>
|
|
|
|
<block name="body">
|
|
<section>
|
|
<div class="span12">
|
|
<form class="login-form" action="__SELF__" method="post">
|
|
<div class="control-group">
|
|
<label class="control-label" for="inputEmail">用户名</label>
|
|
<div class="controls">
|
|
<input type="text" id="inputEmail" class="span3" placeholder="请输入用户名" ajaxurl="/member/checkUserNameUnique.html" errormsg="请填写1-16位用户名" nullmsg="请填写用户名" datatype="*1-16" value="" name="username">
|
|
</div>
|
|
</div>
|
|
<div class="control-group">
|
|
<label class="control-label" for="inputPassword">密码</label>
|
|
<div class="controls">
|
|
<input type="password" id="inputPassword" class="span3" placeholder="请输入密码" errormsg="密码为6-20位" nullmsg="请填写密码" datatype="*6-20" name="password">
|
|
</div>
|
|
</div>
|
|
<div class="control-group">
|
|
<label class="control-label" for="inputPassword">验证码</label>
|
|
<div class="controls">
|
|
<input type="text" id="inputPassword" class="span3" placeholder="请输入验证码" errormsg="请填写5位验证码" nullmsg="请填写验证码" datatype="*5-5" name="verify">
|
|
</div>
|
|
</div>
|
|
<div class="control-group">
|
|
<label class="control-label"></label>
|
|
<div class="controls">
|
|
<img class="verifyimg reloadverify" alt="点击切换" src="{:U('verify')}" style="cursor:pointer;">
|
|
</div>
|
|
<div class="controls Validform_checktip text-warning"></div>
|
|
</div>
|
|
<div class="control-group">
|
|
<div class="controls">
|
|
<label class="checkbox">
|
|
<input type="checkbox"> 自动登录
|
|
</label>
|
|
<button type="submit" class="btn">登 陆</button>
|
|
</div>
|
|
</div>
|
|
</form>
|
|
</div>
|
|
</section>
|
|
</block>
|
|
|
|
<block name="side"> </block>
|
|
<block name="script">
|
|
<script type="text/javascript">
|
|
|
|
$(document)
|
|
.ajaxStart(function(){
|
|
$("button:submit").addClass("log-in").attr("disabled", true);
|
|
})
|
|
.ajaxStop(function(){
|
|
$("button:submit").removeClass("log-in").attr("disabled", false);
|
|
});
|
|
|
|
|
|
$("form").submit(function(){
|
|
var self = $(this);
|
|
$.post(self.attr("action"), self.serialize(), success, "json");
|
|
return false;
|
|
|
|
function success(data){
|
|
if(data.status){
|
|
window.location.href = data.url;
|
|
} else {
|
|
self.find(".Validform_checktip").text(data.info);
|
|
//刷新验证码
|
|
$(".reloadverify").click();
|
|
}
|
|
}
|
|
});
|
|
|
|
$(function(){
|
|
var verifyimg = $(".verifyimg").attr("src");
|
|
$(".reloadverify").click(function(){
|
|
if( verifyimg.indexOf('?')>0){
|
|
$(".verifyimg").attr("src", verifyimg+'&random='+Math.random());
|
|
}else{
|
|
$(".verifyimg").attr("src", verifyimg.replace(/\?.*$/,'')+'?'+Math.random());
|
|
}
|
|
});
|
|
});
|
|
</script>
|
|
</block>
|