Your Name 2 سال پیش
والد
کامیت
0e22ff6acb
2فایلهای تغییر یافته به همراه18 افزوده شده و 2 حذف شده
  1. 17 0
      service/agent/src/My.php
  2. 1 2
      service/option/src/My.php

+ 17 - 0
service/agent/src/My.php

@@ -420,6 +420,23 @@ class My extends Core
             }
 
             $update['idcard_path'] = Dever::input('idcard_path');
+            if($update['idcard_path']){
+                $idcard_path = (array)json_decode($update['idcard_path']);
+                if($idcard_path['face']){
+                    $rest = (array)$idcard_path['face'];
+                    if($this->user['name'] != $rest['name'] || $this->user['idcard'] != $rest['idNumber']){
+                        Dever::alert('姓名或身份证号不匹配');
+                    }
+                }
+                if($idcard_path['back']){
+                    $rest = (array)$idcard_path['back'];
+                    $date = explode('-',$rest['validPeriod']);
+                    $cdate = strtotime(str_replace('.','-',$date[1]));
+                    if(time()>=$cdate){
+                        Dever::alert('身份证背面已过期');
+                    }
+                }
+            }
 
             if ($info['type'] == 2) {
                 $update['company_name'] = Dever::input('company_name');

+ 1 - 2
service/option/src/My.php

@@ -224,8 +224,7 @@ class My extends Core
 
         $where['idcard_path'] = Dever::input('idcard_path');
         if($where['idcard_path']){
-            $data['idcard_path'] = $where['idcard_path'];
-            $idcard_path = (array)json_decode($data['idcard_path']);
+            $idcard_path = (array)json_decode($where['idcard_path']);
             if($idcard_path['face']){
                 $rest = (array)$idcard_path['face'];
                 if($this->user['name'] != $rest['name'] || $this->user['idcard'] != $rest['idNumber']){