From 6960c80ba3cf6d44aca0ceb5f6aae214bdcd92bb Mon Sep 17 00:00:00 2001 From: wuhui_zzw <1760308791@qq.com> Date: Wed, 21 Feb 2024 09:23:55 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=EF=BC=9A=E7=94=B3=E8=AF=B7?= =?UTF-8?q?=E6=88=90=E4=B8=BA=E5=A4=96=E5=8B=A4=E5=92=8C=E5=86=85=E5=8B=A4?= =?UTF-8?q?=E6=97=B6=EF=BC=8C=E6=94=AF=E4=BB=98=E5=86=85=E5=AE=B9=E6=9C=AA?= =?UTF-8?q?=E6=88=90=E5=8A=9F=E5=A4=84=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/common/repositories/marketing/AgentApplyRepository.php | 2 ++ app/controller/api/Agent.php | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/app/common/repositories/marketing/AgentApplyRepository.php b/app/common/repositories/marketing/AgentApplyRepository.php index 2197035..ca73563 100644 --- a/app/common/repositories/marketing/AgentApplyRepository.php +++ b/app/common/repositories/marketing/AgentApplyRepository.php @@ -101,6 +101,8 @@ class AgentApplyRepository extends BaseRepository{ case 6: $payMoney = $config['partner_money'] ?? 0;break; case 7: $payMoney = $config['mer_money'] ?? 0;break; case 8: $payMoney = $config['delivery_money'] ?? 0;break; + case 9: $payMoney = $config['field_personnel_money'] ?? 0;break; + case 10: $payMoney = $config['external_personnel_money'] ?? 0;break; } // 判断:是否需要支付 需要支付生成订单并且获取支付信息 $orderId = 0;// 默认 无需支付、无订单信息 diff --git a/app/controller/api/Agent.php b/app/controller/api/Agent.php index 162cb8d..8e2536b 100644 --- a/app/controller/api/Agent.php +++ b/app/controller/api/Agent.php @@ -119,10 +119,10 @@ class Agent extends BaseController{ $data['uid'] = $this->request->uid(); // 信息验证 if((int)$data['pid'] <= 0) throw new ValidateException('非法请求,无邀请信息!'); - if(!in_array((int)$data['agent_type'], [2,3,4,5,6,7,8])) throw new ValidateException('非法请求,代理类型错误!'); + if(!in_array((int)$data['agent_type'], [2,3,4,5,6,7,8,9,10])) throw new ValidateException('非法请求,代理类型错误!'); if(empty($data['contact_name'])) throw new ValidateException('请输入联系人姓名!'); if(empty($data['contact_phone'])) throw new ValidateException('请输入联系人电话!'); - if((int)$data['province_id'] <= 0) throw new ValidateException('请选择地区!'); + if(!in_array((int)$data['agent_type'], [9,10]) && (int)$data['province_id'] <= 0) throw new ValidateException('请选择地区!'); if(in_array((int)$data['agent_type'], [5,6,7])){ if((int)$data['city_id'] <= 0) throw new ValidateException('请选择地区!'); if((int)$data['area_id'] <= 0) throw new ValidateException('请选择地区!');