Commit 993c8a5f authored by zfc's avatar zfc

登陆

parent ee3e0f30
......@@ -39,9 +39,11 @@ class Login extends Basic
{
$name = $_POST["username"];
$password = $_POST["passwd"];
if (!isset($name) || !isset($passwd)) {
if (!isset($name) || !isset($password)) {
return view("/login/login", [ "msg" => "用户名或密码不能为空" ]);
}
// if($name=='admin'){
// $params["name"] = $name;
// $params["pswd"] = md5(md5($passwd));
......@@ -73,7 +75,9 @@ class Login extends Basic
$password = md5($password);
$where="( phone='{$name}') and password='$password' ";
$list=$this->loginAgent->verifyUser($filed,$join,$where);
if(!$list){
if(!$list){
return view("/login/login", [ "msg" => "用户名或密码错误" ]);
}
//prt($list->toArray());//转化arr
......
......@@ -115,7 +115,7 @@ public function saveList(){
->join($join)
->where($params)
->find();
// echo $this->getLastSql();
echo $this->getLastSql();
return $r;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment