<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
<html xmlns="http://www.w3.org/1999/xhtml">
|
<head>
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
<title>${Constants.company_name}用户中心</title>
|
<style type="text/css">
|
/*等待加载*/
|
.loading_wrap{
|
padding-top:20px;
|
background:#FFF;
|
border:5px solid #dadada;
|
height:130px;
|
width:300px;
|
text-align:center;
|
margin:0 auto;
|
}
|
</style>
|
<script type="text/javascript">
|
if(top!=self){
|
if(top.location != self.location)
|
top.location=self.location;
|
}
|
</script>
|
[#include "/business/pages/include/static.html" /]
|
<script type="text/javascript" src="${common_static}/static/script/jquery.initValue.js"></script>
|
<script type="text/javascript">
|
function switchBtn() {
|
$("#logining").hide();
|
$("#submitForm").show();
|
}
|
$(function() {
|
//初始化用户名输入框
|
$("#username").initValue({
|
"initValue" : "用户名/邮箱",
|
"initClass" : "font_666"
|
});
|
//初始化密码输入框
|
/*
|
$("#passwordText").initValue({
|
"initValue" : "密码",
|
"initClass" : "font_666"
|
});
|
*/
|
//初始化验证码输入框
|
$("#checkCode").initValue({
|
"initValue" : "验证码",
|
"initClass" : "font_666"
|
});
|
|
$("#passwordText").focus(function() {
|
$(this).hide();
|
$("#password").show().focus();
|
});
|
|
$("#password").blur(function() {
|
if($(this).val()=="") {
|
$(this).hide();
|
$("#passwordText").show();
|
}
|
})
|
|
var b = false;
|
$("#submitForm").click(function() {
|
var errMsgEl = $("#errMsgU");
|
errMsgEl.hide();
|
$("#submitForm").hide();
|
$("#logining").show();
|
if(!b) {
|
b = true;
|
var usernameEl = $("#username");
|
var passwordEl = $("#password");
|
var checkCodeEle = $("#checkCode");
|
errMsgEl.empty();
|
var username = usernameEl.val().replace(/(^\s*)|(\s*$)/g, "");
|
var password = passwordEl.val();
|
var checkCode = checkCodeEle.val();
|
if (username=='用户名/邮箱'||username.length == 0 || !username.match(/^[a-zA-Z0-9_\u4e00-\u9fa5\uF900-\uFA2D]{2,20}$/)) {
|
usernameEl.focus();
|
errMsgEl.text("名称由2-20位的汉字,字母,数字,下划线组成");
|
errMsgEl.show();
|
switchBtn();
|
b = false;
|
return;
|
}
|
if(!password.match(/^[a-zA-Z0-9_]{6,18}$/)) {
|
$("#passwordText").trigger("focus");
|
errMsgEl.text("密码由6-18位的字母,数字,下划线组成");
|
errMsgEl.show();
|
switchBtn();
|
b = false;
|
return;
|
}
|
if (checkCode=='验证码'||checkCode.length != 4) {
|
errMsgEl.text("请输入4位验证码!");
|
errMsgEl.show();
|
checkCodeEle.focus();
|
switchBtn();
|
b = false;
|
return;
|
}
|
$.post('${base}/user/login.html',{'username':username,'password':password,"checkCode":checkCode},function(data,textStatus) {
|
$("#load").remove();
|
if(data.result==5) {
|
window.location.href="${base}/uc/home.html";
|
} else if(data.result == 8) {
|
window.location.href="${base}/uc/changeInitPwd.html";
|
} else {
|
if(data.result=="3") {
|
$("#checkImg").trigger("click");
|
$("#checkCode").val("");
|
}
|
errMsgEl.text(data.msg);
|
errMsgEl.show();
|
switchBtn();
|
}
|
b = false;
|
},"json");
|
} else {
|
alert("正在登陆,请稍后...");
|
}
|
});
|
})
|
$(document).keyup(function(event) {
|
if(event.keyCode==13) {
|
$("#submitForm").trigger("click");
|
}
|
});
|
</script>
|
</head>
|
<body>
|
[#include "/uc/include/loginHead.html" /]
|
<div class="cont">
|
<div class="cont_left"></div>
|
<div class="cont_right">
|
<h2>欢迎登录</h2>
|
<div class="dluser">
|
<input class="dluser_txt" name="" type="text" id="username" />
|
</div>
|
<div class="dluser">
|
<input class="dluser_txt font_666" name="" type="text" id="passwordText" value="密码"/>
|
<input class="dluser_txt" name="" type="password" id="password" style="display:none;"/>
|
</div>
|
<div class="dluser">
|
<input class="dluser_yzm" name="" type="text" id="checkCode" /><img width="100" id="checkImg" height="30" style="padding-bottom: 2px;" id="validatecode" align="absmiddle" title="更换新的验证码" src="Kaptcha.validatecode" onclick="this.src=Math.floor(Math.random()*0x10000) + '.validatecode'"/>
|
</div>
|
<div id="errMsgU" style=" margin-bottom:17px; border:1px solid #ccc; padding:10px 8px;width:280px; color:#f00;display:none;"></div>
|
<!-- <div class="dluser"> <span><a href="#">忘记密码?</a></span>
|
<input class="dluser_ck" type="checkbox" />
|
<label>自动登录</label>
|
</div> -->
|
<div class="dluser">
|
<input class="dluser_btn" name="" type="button" id="submitForm"/>
|
<input class="dluser_btn greyloginbtn" name="" type="button" id="logining" style="display:none;"/>
|
|
<font><a href="${base}/user/findPwd.html">忘记密码?</a></font> </div>
|
|
</div>
|
<div class="clear"></div>
|
</div>
|
<div class="clear"></div>
|
[#include "/uc/include/loginFoot.html" /]
|
</body>
|
</html>
|