wesmiler 3 tháng trước cách đây
mục cha
commit
6e2a0b234c
1 tập tin đã thay đổi với 17 bổ sung5 xóa
  1. 17 5
      app/Services/Api/AccountService.php

+ 17 - 5
app/Services/Api/AccountService.php

@@ -313,17 +313,25 @@ class AccountService extends BaseService
         }
 
         // 电费验证
-        if($mealType==2){
+        if($mealType==2 && $electricType==3){
             if(empty($area)){
                 $this->error = '请选择省份/直辖市';
                 RedisService::clear($cacheKey . '_lock');
                 return false;
             }
 
-            if(empty($idCardNo)){
-                $this->error = "请填写".(['验证参数','身份证后6位','银行卡后6位','营业执照后6位'][$ytype]);
-                RedisService::clear($cacheKey . '_lock');
-                return false;
+            if(in_array($area,['广东','广西','海南','贵州','云南'])){
+                if($ytype<=0){
+                    $this->error = '请选择三要素验证类型';
+                    RedisService::clear($cacheKey . '_lock');
+                    return false;
+                }
+
+                if(empty($idCardNo)){
+                    $this->error = "请填写".(['验证参数','身份证后6位','银行卡后6位','营业执照后6位'][$ytype]);
+                    RedisService::clear($cacheKey . '_lock');
+                    return false;
+                }
             }
 
             if(empty($city)){
@@ -362,6 +370,10 @@ class AccountService extends BaseService
             'type' => $mealType,
             'account' => $account,
             'discount' => $discount,
+            'area' => $area,
+            'city' => $city,
+            'ytype' => $ytype,
+            'id_card_no' => $idCardNo,
             'create_time' => time(),
             'remark' => $remark,
             'status' => 1,