修改使用登录及添加用户在线验证
This commit is contained in:
1 parent
1b4abd1ee3
commit
2cb2202ed2
9 files changed
+68
-76
No files matched your search
@@ -7,14 +7,13 @@ use think\Model;
|
||||
class Member extends Model
|
||||
{
|
||||
// 密码验证
|
||||
// $data = ['username'=>'aa,'password'=>'bb']
|
||||
public function check( $data = [] )
|
||||
public function check( $username ,$password )
|
||||
{
|
||||
// 验证用户名与密码是否匹配
|
||||
$list = $this
|
||||
->where('username',$data['username'])
|
||||
->where('password',$data['password'])
|
||||
->value('id');dump($list);
|
||||
->where('username',$username)
|
||||
->where('password',$password)
|
||||
->value('id');
|
||||
|
||||
return $list;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user