master
chenzhi 5 years ago
parent 8633efd7d6
commit c8fb1bb207

1
.gitignore vendored

@ -6,3 +6,4 @@ Application/Common/Conf/pay_config.php
Application/Sdk/OrderNo/ Application/Sdk/OrderNo/
.idea/ .idea/
Uploads/ Uploads/
.vscode

@ -1899,6 +1899,22 @@ function arr_count1($string){
} }
return $cou; return $cou;
} }
/**
* 获取新推广权限后底下推广员子账号
* @param int $id 推广员id
* @param array,string 查询字段
* @return array
*/
function getPrmoteChlidAccount($id=0,$field="*")
{
$promote = M("promote","tab_");
$map['status'] = 1;
$map["chain"] = array("LIKE","%/{$id}/%");
$data = $promote->field($field)->where($map)->select();
if(empty($data)){return array();}
return $data;
# code...
}
/** /**
*获取推广员子账号 *获取推广员子账号

@ -323,7 +323,7 @@ class TestResourceController extends BaseController
} }
//获取当前和当前子渠道的渠道id //获取当前和当前子渠道的渠道id
public function get_all_promote(){ public function get_all_promote(){
$pro_id=get_prmoote_chlid_account(session('promote_auth.pid')); $pro_id=getPrmoteChlidAccount(get_pid(),"id");
foreach ($pro_id as $key => $value) { foreach ($pro_id as $key => $value) {
$pro_id1[]=$value['id']; $pro_id1[]=$value['id'];
} }

Loading…
Cancel
Save