Browse Source

医生是否完成用户资料

lizhen_gitee 11 months ago
parent
commit
f3730ded0b
1 changed files with 15 additions and 0 deletions
  1. 15 0
      application/common/library/Authdoctor.php

+ 15 - 0
application/common/library/Authdoctor.php

@@ -435,6 +435,14 @@ class Authdoctor
     public function getUserinfo_simple(){
         $userinfo = Tokendoctor::get($this->_token);
 
+        //是否完成用户资料
+        $data = $this->_user->toArray();
+        if(empty($data['idcard'])){
+            $userinfo['finish_profile'] = 0;
+        }else{
+            $userinfo['finish_profile'] = 1;
+        }
+
         return $userinfo;
     }
 
@@ -458,6 +466,13 @@ class Authdoctor
 
         $userinfo['wallet'] = Db::name('doctor_wallet')->where('doctor_id',$this->id)->find();
 
+        //是否完成用户资料
+        if(empty($data['idcard'])){
+            $userinfo['finish_profile'] = 0;
+        }else{
+            $userinfo['finish_profile'] = 1;
+        }
+
         return $userinfo;
     }