优化推广员选择

master
chenzhi 5 years ago
parent 3b9c49efa7
commit dfff8b6240

File diff suppressed because it is too large Load Diff

@ -197,7 +197,7 @@
<tbody> <tbody>
<if condition = "empty($list_data)"> <if condition = "empty($list_data)">
<tr> <tr>
<td colspan="14" class="text-center">aOh! 暂时还没有内容!</td> <td colspan="16" class="text-center">aOh! 暂时还没有内容!</td>
</tr> </tr>
</if> </if>
<notemtpy name = "list_data"> <notemtpy name = "list_data">

@ -1995,18 +1995,34 @@ function get_parent_promote_($prmote_id=0,$isShwo=true)
//获取当前子渠道 //获取当前子渠道
function get_zi_promote_id($id){ function get_zi_promote_id($id){
$map['parent_id']=$id; // $map['parent_id']=$id;
$map['grand_id'] = $id; // $map['grand_id'] = $id;
$map['_logic'] = 'or'; // $map['_logic'] = 'or';
$pro=M("promote","tab_")->field('id')->where($map)->select(); // $pro=M("promote","tab_")->field('id')->where($map)->select();
if(null==$pro){ // if(null==$pro){
return 0; // return 0;
}else{ // }else{
for ($i=0; $i <count($pro); $i++) { // for ($i=0; $i <count($pro); $i++) {
$sd[]=implode(",", $pro[$i]); // $sd[]=implode(",", $pro[$i]);
} // }
return implode(",", $sd); // return implode(",", $sd);
// }
$promote = M("promote","tab_");
//获取自己的等级
$self = $promote->field("chain,level")->where("id = '{$id}'")->find();
if ($self['level'] == 1) {
$self['chain'] = "/{$id}/";
} }
$map['status'] = 1;
$map["chain"] = array("LIKE","%{$self['chain']}%");
$map["level"] = array("GT",$self['level']);
$data = $promote->field("id")->where($map)->select();
if(empty($data)){return array();}
$data = implode(",",array_column($data,"id"));
return $data;
} }
/** /**

Loading…
Cancel
Save