浏览代码

医生是否完成用户资料

lizhen_gitee 11 月之前
父节点
当前提交
f3730ded0b
共有 1 个文件被更改,包括 15 次插入0 次删除
  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;
     }