| xqd
@@ -437,14 +437,19 @@ class UserController extends Controller
|
|
|
$result = $apiFace->match($images);
|
|
|
// $result = json_decode($result,true);
|
|
|
if($result['error_code']==0){
|
|
|
- $res = $result['result'];
|
|
|
+ if($result['result']['score']<80){
|
|
|
+ $user->is_auth = 1;
|
|
|
+ $user->save();
|
|
|
+ }else{
|
|
|
+ throw new Exception("人脸检测不通过");
|
|
|
+ }
|
|
|
+ }else{
|
|
|
+ throw new Exception($result['error_msg']);
|
|
|
}
|
|
|
-
|
|
|
-
|
|
|
}catch (\Exception $exception){
|
|
|
return $this->response->errorForbidden($exception->getMessage());
|
|
|
}
|
|
|
- return response()->json($res);
|
|
|
+ return response()->json(['message'=>"认证成功"]);
|
|
|
}
|
|
|
|
|
|
/**
|