|
@@ -43,8 +43,12 @@ class BaseController extends base{
|
|
|
}
|
|
|
$this->uid=$effetc['data']['id']??"";
|
|
|
$this->uname=$effetc['data']['user']['nickname']??"";
|
|
|
- $role = Db::name("user_role")->where(["uid"=>$this->uid,"companyNo"=>$companyNo,"status"=>1,"is_del"=>0])
|
|
|
- ->findOrEmpty();
|
|
|
+ $where=[];
|
|
|
+ if($companyNo!=""){
|
|
|
+ $where=["companyNo"=>$companyNo];
|
|
|
+ }
|
|
|
+ $role = Db::name("user_role")->where(["uid"=>$this->uid,"status"=>1,"is_del"=>0])
|
|
|
+ ->where($where)->findOrEmpty();
|
|
|
if(empty($role)){
|
|
|
return ["code"=>101,"message"=>"账户已禁用"];
|
|
|
}
|