add-api-idcard
This commit is contained in:
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user