diff --git a/api/controllers/wxapp/licheb/Idcard.php b/api/controllers/wxapp/licheb/Idcard.php index 5810c3de..7af403fa 100644 --- a/api/controllers/wxapp/licheb/Idcard.php +++ b/api/controllers/wxapp/licheb/Idcard.php @@ -187,4 +187,19 @@ class Idcard extends Wxapp{ } } + + protected function get_info(){ + $img = $this->input_param('img'); + if(!$img){ + throw new Exception('参数错误', ERR_PARAMS_ERROR); + } + $full_cardidA = build_qiniu_image_url($img); + $result = $this->tcorc->IdentityCard($full_cardidA); + if(!$result['code']){ + throw new Exception('图片识别失败:'.$result['msg'], API_CODE_FAIL); + } + + $userinfo = $result['data']; + return $userinfo; + } }