|
@@ -426,6 +426,20 @@ function made($var,$data=[]){
|
|
|
return made($str['pid'],$data);
|
|
|
}
|
|
|
}
|
|
|
+function catChild($var,&$data=[]){
|
|
|
+ $str = Db::name('cat')->where(['id'=>$var])->find();
|
|
|
+ if($str==false){
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ $data[]=$var;
|
|
|
+ $lsit = Db::name("cat")->where(["pid"=>$var,"status"=>1,"is_del"=>0])->column("id");
|
|
|
+ if(!empty($lsit)){
|
|
|
+ foreach ($lsit as $value){
|
|
|
+ catChild($value,$data);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ return $data;
|
|
|
+}
|
|
|
|
|
|
|
|
|
function makeExcluse($var,$data=[]){
|