| xqd
@@ -416,20 +416,20 @@ class UserController extends Controller
|
|
|
try {
|
|
|
$user = auth('api')->user();
|
|
|
$userinfo = UserInfoModel::query()->where('user_id',$user->id)->first();
|
|
|
-// if(empty($request->auth_pic)){
|
|
|
-// throw new Exception("参数错误");
|
|
|
-// }
|
|
|
+ if(empty($request->auth_pic)){
|
|
|
+ throw new Exception("参数错误");
|
|
|
+ }
|
|
|
|
|
|
$images = array(
|
|
|
array(
|
|
|
-// 'image' => base64_encode(file_get_contents($userinfo->avatar)),
|
|
|
- 'image' => base64_encode(file_get_contents("https://zhengda.oss-accelerate.aliyuncs.com/tinymce/images/dcdc14c5987ebbb233a6232264bb80e260f4f496e12ba.jpg")),
|
|
|
+ 'image' => base64_encode(file_get_contents($userinfo->avatar)),
|
|
|
+// 'image' => base64_encode(file_get_contents("https://zhengda.oss-accelerate.aliyuncs.com/tinymce/images/dcdc14c5987ebbb233a6232264bb80e260f4f496e12ba.jpg")),
|
|
|
'image_type' => 'BASE64',
|
|
|
'liveness_control'=>'NORMAL',
|
|
|
),
|
|
|
array(
|
|
|
-// 'image' => base64_encode(file_get_contents($request->auth_pic)),
|
|
|
- 'image' => base64_encode(file_get_contents("https://zhengda.oss-accelerate.aliyuncs.com/tinymce/images/cea206a2046b895f253445f35794226860f4f4df1d786.jpg")),
|
|
|
+ 'image' => base64_encode(file_get_contents($request->auth_pic)),
|
|
|
+// 'image' => base64_encode(file_get_contents("https://zhengda.oss-accelerate.aliyuncs.com/tinymce/images/cea206a2046b895f253445f35794226860f4f4df1d786.jpg")),
|
|
|
'image_type' => 'BASE64',
|
|
|
//'liveness_control'=>'NORMAL',
|
|
|
),
|
| xqd
@@ -437,7 +437,7 @@ class UserController extends Controller
|
|
|
$result = $apiFace->match($images);
|
|
|
// $result = json_decode($result,true);
|
|
|
if($result['error_code']==0){
|
|
|
- if($result['result']['score']<80){
|
|
|
+ if($result['result']['score']>80){
|
|
|
$user->is_auth = 1;
|
|
|
$user->save();
|
|
|
}else{
|