话不多说,请看代码:
where("login_id='{$username}' OR phone='{$username}'")->find();
if (!empty($res) && $res['password']==md5($password)) {
$status=1; //用户名正确,密码正确。
}elseif(!empty($res) && $res['password']!==md5($password)){
$status=2; //用户名正确,密码不正确。
}elseif(empty($res)){
$status=3; //用户名不存在。
}
$this->ajaxReturn($status);
exit();
}
$mobile = parent::isMobile();
if($mobile=="true"){
$this->display(Wap_Login);
}else{
$this->display(Login);
}
}
@H_502_4@
原文链接:https://www.f2er.com/thinkphp/18086.html