Procházet zdrojové kódy

Merge branch 'shichen0929' of shop/php into dev

shishichen před 10 měsíci
rodič
revize
68612335dc
1 změnil soubory, kde provedl 8 přidání a 1 odebrání
  1. 8 1
      app/common/repositories/user/UserRepository.php

+ 8 - 1
app/common/repositories/user/UserRepository.php

@@ -2911,7 +2911,14 @@ class UserRepository extends BaseRepository
2911 2911
             //            $birth = strtotime(substr($certification["user_card"], 6, 8));
2912 2912
             $old_age = $this->getSex($certification["user_card"])?60:55;
2913 2913
             //            $age = $this->howOld($birth);
2914
-            $age=$this->calculateAge($birth_data);
2914
+
2915
+
2916
+            // 兼容港澳台证件号
2917
+            if ($certification['card_type'] == 1){
2918
+                $age=$this->calculateAge($birth_data);
2919
+            }else{
2920
+                $age=$this->calculateAge($certification['birthday']);
2921
+            }
2915 2922
 
2916 2923
             if ($age < $old_age) {
2917 2924
                 //                $yes = $old_age - $age;