|
@@ -48,12 +48,14 @@ class Base extends \app\BaseController
|
|
|
if($companyNo!=""){
|
|
|
$where=["companyNo"=>$companyNo];
|
|
|
}
|
|
|
- $user_role = Db::name("user_role")
|
|
|
- ->where(["uid"=>$this->uid,"is_del"=>0])
|
|
|
- ->where($where)
|
|
|
- ->findOrEmpty();
|
|
|
- if(empty($user_role)) return error_show(101,"没有该公司的默认角色");
|
|
|
|
|
|
+ if ($effetc['data']['level'] != 1) {
|
|
|
+ $user_role = Db::name("user_role")
|
|
|
+ ->where(["uid" => $this->uid, "is_del" => 0])
|
|
|
+ ->where($where)
|
|
|
+ ->findOrEmpty();
|
|
|
+ if (empty($user_role)) return error_show(101, "没有该公司的默认角色");
|
|
|
+ }
|
|
|
|
|
|
$this->roleid=$user_role['roleid'];
|
|
|
// $role =Db::name("role")
|