暂时取消身份证号码验证

This commit is contained in:
2024-12-12 14:37:29 +08:00
parent 73a8e1711d
commit 9c4bb5a1c3
2 changed files with 4 additions and 2 deletions

View File

@@ -228,10 +228,11 @@ class UserController extends BaseServiceController
public function actionCheckIdcard(){
$post = \Yii::$app->request->post();
// TODO 暂时取消验证
$this->requestValidate($post, [
[['name', 'idcard'], 'required']
]);
$response = (new Client(['http_errors' => false]))->post("https://eid.shumaidata.com/eid/check", [
/* $response = (new Client(['http_errors' => false]))->post("https://eid.shumaidata.com/eid/check", [
'headers' => ['Authorization' => "APPCODE f98bba3251714c759f5bd29d00e1c46e"],
'query' => [
'idcard' => $post['idcard'],
@@ -241,7 +242,7 @@ class UserController extends BaseServiceController
$result = json_decode($response->getBody(), true);
if (!($result['code'] == 0 && $result['result']['res'] == 1)) {
throw new Exception('姓名和身份证号码不符');
}
}*/
return ['success'];
}