wugg 1 년 전
부모
커밋
e6e621dcf6
1개의 변경된 파일3개의 추가작업 그리고 2개의 파일을 삭제
  1. 3 2
      app/controller/User.php

+ 3 - 2
app/controller/User.php

@@ -167,11 +167,12 @@ class User extends Base
         	"sex"=>$acc->userinfo->sex,
         	"sex"=>$acc->userinfo->sex,
         	"email"=>$acc->userinfo->email,
         	"email"=>$acc->userinfo->email,
         	"level"=>$acc->level,
         	"level"=>$acc->level,
-        	"itemid"=>$acc->accountitem->itemid,
-        	"position"=>$acc->accountitem->position,
+        	"itemid"=>$acc->accountitem->itemid??0,
+        	"position"=>$acc->accountitem->position??'',
         	"depart_name"=>$acc->depart_name,
         	"depart_name"=>$acc->depart_name,
         	"company_relaton"=>$acc->company_relaton,
         	"company_relaton"=>$acc->company_relaton,
         	];
         	];
+       
         if($post['openId']!=''&& $acc->userinfo->openId!=$post['openId'] ){
         if($post['openId']!=''&& $acc->userinfo->openId!=$post['openId'] ){
 	        $acc->userinfo->openId=$post['openId'];
 	        $acc->userinfo->openId=$post['openId'];
 	        $this->model->userinfo()->save($acc->userinfo->toArray());
 	        $this->model->userinfo()->save($acc->userinfo->toArray());