...
|
...
|
@@ -121,6 +121,10 @@ class User extends Frontend |
|
|
if($result['password'] != $password){
|
|
|
$this->error('密码错误');
|
|
|
}
|
|
|
$user = Db::name('user')->where(['id'=>$result['id']])->find();
|
|
|
if($user['status'] != 'normal'){
|
|
|
$this->error('抱歉,您已被加入黑名单');
|
|
|
}
|
|
|
$arr3['logintime'] = time();
|
|
|
$arr3['loginip'] = $this->request->ip(0, true);
|
|
|
$result3 = $userModel->updateData(['id'=>$result['id']],$arr3);
|
...
|
...
|
@@ -164,6 +168,10 @@ class User extends Frontend |
|
|
if($data['code'] != $code){
|
|
|
$this->error('验证码错误');
|
|
|
}
|
|
|
$user = Db::name('user')->where(['id'=>$result1['id']])->find();
|
|
|
if($user['status'] != 'normal'){
|
|
|
$this->error('抱歉,您已被加入黑名单');
|
|
|
}
|
|
|
$arr3['logintime'] = time();
|
|
|
$arr3['loginip'] = $this->request->ip(0, true);
|
|
|
$result3 = $userModel->updateData(['id'=>$result1['id']],$arr3);
|
...
|
...
|
@@ -337,12 +345,12 @@ class User extends Frontend |
|
|
}
|
|
|
// $token = generate_user_token($result1);
|
|
|
// session('token',$token);
|
|
|
$this->auth->direct($result1);
|
|
|
$this->auth->direct($data['id']);
|
|
|
$token = $this->auth->getToken();
|
|
|
session('token',$token);
|
|
|
Cookie::set('token',$token);
|
|
|
Db::commit();
|
|
|
$this->success('SUCCESS','user/login_view');
|
|
|
$this->success('SUCCESS','index/index');
|
|
|
}
|
|
|
|
|
|
/**
|
...
|
...
|
|