add-api-idcard

This commit is contained in:
lccsw
2022-06-07 16:49:09 +08:00
parent 4fe20fe080
commit fbc8cf5201
+15
View File
@@ -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;
}
}