fix: 移除 limit_agent 白名单限制,所有代理下会员均可充值/提现
- config.php: area_id=3 的 limit_agent 改为空数组 - Order.php/epayPay.php/ccpayPay.php: 空数组时跳过白名单检查
This commit is contained in:
@@ -286,7 +286,7 @@ return [
|
||||
'pay' => 'alinPay',
|
||||
'default_agent' => 111,
|
||||
'default_wt_agent' => 111,
|
||||
'limit_agent' => [111],
|
||||
'limit_agent' => [],
|
||||
],
|
||||
],
|
||||
|
||||
|
||||
@@ -114,8 +114,9 @@ class Order Extends Controller{
|
||||
$zdlIdArr = explode(',',$user['agent_parent_id_path']);
|
||||
$area_list = config('area_list');
|
||||
//判断是否金流支线,如果不是的话,不允许充值
|
||||
$isAllow = false;
|
||||
foreach($area_list[$user['area_id']]['limit_agent'] as $allowAgentId){
|
||||
$limitAgents = $area_list[$user['area_id']]['limit_agent'];
|
||||
$isAllow = empty($limitAgents);
|
||||
foreach($limitAgents as $allowAgentId){
|
||||
if(in_array($allowAgentId,$zdlIdArr)){
|
||||
$isAllow = true;
|
||||
}
|
||||
@@ -184,9 +185,10 @@ class Order Extends Controller{
|
||||
$user = Db::name('user')->where(array('id' => $user_id))->find();
|
||||
$zdlIdArr = explode(',',$user['agent_parent_id_path']);
|
||||
$area_list = config('area_list');
|
||||
//判断是否金流支线,如果不是的话,不允许充值
|
||||
$isAllow = false;
|
||||
foreach($area_list[$user['area_id']]['limit_agent'] as $allowAgentId){
|
||||
//判断是否金流支线,如果不是的话,不允许提现
|
||||
$limitAgents = $area_list[$user['area_id']]['limit_agent'];
|
||||
$isAllow = empty($limitAgents);
|
||||
foreach($limitAgents as $allowAgentId){
|
||||
if(in_array($allowAgentId,$zdlIdArr)){
|
||||
$isAllow = true;
|
||||
}
|
||||
|
||||
@@ -43,8 +43,9 @@ trait ccpayPay
|
||||
return json(['Success' => 1, 'Data' => $data]);
|
||||
}
|
||||
|
||||
$isAllow = false;
|
||||
foreach ($area_list[$user['area_id']]['limit_agent'] as $allowAgentId) {
|
||||
$limitAgents = $area_list[$user['area_id']]['limit_agent'];
|
||||
$isAllow = empty($limitAgents);
|
||||
foreach ($limitAgents as $allowAgentId) {
|
||||
if (in_array($allowAgentId, $zdlIdArr)) {
|
||||
$isAllow = true;
|
||||
}
|
||||
|
||||
@@ -88,8 +88,9 @@ trait epayPay
|
||||
return json(['Success' => 1, 'Data' => $data]);
|
||||
}
|
||||
|
||||
$isAllow = false;
|
||||
foreach ($area_list[$user['area_id']]['limit_agent'] as $allowAgentId) {
|
||||
$limitAgents = $area_list[$user['area_id']]['limit_agent'];
|
||||
$isAllow = empty($limitAgents);
|
||||
foreach ($limitAgents as $allowAgentId) {
|
||||
if (in_array($allowAgentId, $zdlIdArr)) {
|
||||
$isAllow = true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user