|
@@ -71,11 +71,14 @@ class User extends BaseController{
|
|
|
if($instr==false) throw new Exception("关联企业保存失败");
|
|
|
}
|
|
|
}
|
|
|
- $companyinfo = ["id"=>$post['id'],"company"=>$CompArr,"token"=>$post['token']];
|
|
|
+ if(!empty($CompArr)){
|
|
|
+ $companyinfo = ["id"=>$post['id'],"company"=>$CompArr,"token"=>$post['token']];
|
|
|
$companyset =setUserCompany($companyinfo);
|
|
|
if(!isset($companyset['code'])||$companyset['code']!=0){
|
|
|
throw new Exception($companyset['message']);
|
|
|
}
|
|
|
+ }
|
|
|
+
|
|
|
}
|
|
|
Db::commit();
|
|
|
return app_show(0,"设置成功");
|