$(document).ready(function(){
//获取登录按的事件并激活click事件
$('#btn_ent_login').click(function(){
chacklogin();
});
});
function chacklogin()
{
var loginid=$('#txtloginid').val();
var pwd=$('#txtpass').val();
if(loginid.length ==0){alert('登录账号不能为空!');$('#txtloginid').focus();return;}
if(pwd.length ==0){alert('请输入登录密码!');$('#txtpass').focus();return;}
var strHtml = "<br/><center><span style='width:100%;padding-left:20px'><br/>正在登陆ing...<img src=images/loading.gif />请稍候</span></center>";
var pop=new Popup({ contentType:2,isReloadOnClose:false,width:328,height:123});
pop.setContent("contentHtml",strHtml);
pop.setContent("title","提示!");
$.ajax({
type: 'POST',
url: 'vldlogin.aspx',
data: { type: "ent", loginid: "[email protected]" ,pwd:"[email protected]"}, //'type=ent&loginid='+loginid+'&pwd='+pwd,
dataType:'json',
beforeSend:function(){pop.build(); pop.show();},
error: function() { alert("连接出现错误") ; pop.close();},
success:function(data)
{
//1表示成功
if(data.sta==1)
{
window.location.href="ent/index.aspx";
}
else
{
alert(data.info);
}
}
});
}if (Request.Params["type"] == "ent")//企业用户
{
if (Request.Params["loginid"] != null && Request.Params["pwd"] != null)
{
string loginid = Request.Params["loginid"].ToString().Trim();
string pwd = Request.Params["pwd"].ToString().Trim();
if (Common.xz_Expression.isEmail(loginid))
{
heyjob.Model.b_EntUser modelE = new heyjob.Model.b_EntUser();
modelE = bllE.GetModel(loginid, Common.xz_MD5.MD5(pwd));
if (modelE != null)
{
Session["ent"] = modelE;
Response.Write(CreareJson("登录成功!", 1));
}
else
{
Response.Write(CreareJson("用户名或密码错误!", 2));
}
}
}
else
{
Response.Write(CreareJson("账号格式不对!", 3));
}
}
else
{
Response.Write(CreareJson("登录失败!", 0));
}
Response.End();
是请求出错,貌似都没去到这个请求页,求解决!!
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货