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('请选择地区!');