作者 xiaohu thinkpad

登录处理

@@ -83,14 +83,10 @@ class LoginController extends HomeBaseController @@ -83,14 +83,10 @@ class LoginController extends HomeBaseController
83 83
84 if($res){ 84 if($res){
85 85
86 - if ($res['user_type'] == '2' and $res['student_type'] != '1'){ 86 + if (($res['user_type'] == '2' and $res['student_type'] != '1') or ($res['user_type'] == '2' and $res['user_status'] != '1') or $res['delete_time'] != '0'){
87 return json(['code'=>'0','msg'=>'抱歉,此用户没有权限登录']); 87 return json(['code'=>'0','msg'=>'抱歉,此用户没有权限登录']);
88 - //用户被拉黑  
89 - }elseif($res['user_status'] != '1'){  
90 - return json(['code'=>'0','msg'=>'抱歉,用户禁止登陆']);  
91 - }elseif($res['delete_time'] != '0'){  
92 - return json(['code'=>'0','msg'=>'抱歉,用户禁止登陆']);  
93 } 88 }
  89 +
94 //后台添加用户,微信登陆后合并数据 90 //后台添加用户,微信登陆后合并数据
95 if($res['add_type'] == '2'){ 91 if($res['add_type'] == '2'){
96 $op_tel_info = Db::name('user')->where(['openid'=>session('openid'),'mobile'=>$mobile])->find(); 92 $op_tel_info = Db::name('user')->where(['openid'=>session('openid'),'mobile'=>$mobile])->find();
@@ -19,7 +19,7 @@ class UserBaseController extends HomeBaseController @@ -19,7 +19,7 @@ class UserBaseController extends HomeBaseController
19 { 19 {
20 if(session('user.id')){ 20 if(session('user.id')){
21 $login_info = Db::name('user')->where(['id'=>session('user.id')])->find(); 21 $login_info = Db::name('user')->where(['id'=>session('user.id')])->find();
22 - var_dump($login_info); 22 +
23 if(!$login_info){ 23 if(!$login_info){
24 session('user.id',null); 24 session('user.id',null);
25 25