接口修改4
This commit is contained in:
parent
62a174c0d9
commit
b3cdc4f743
@ -336,7 +336,7 @@ class Api extends BaseController
|
||||
$content = $log->get_log_list($param);
|
||||
return table_assign(0, '', $content);
|
||||
}
|
||||
|
||||
|
||||
public function getbytype(){
|
||||
$type = get_params("type");
|
||||
$where['type'] = $type;
|
||||
|
@ -322,7 +322,12 @@ class Common extends BaseController
|
||||
if ($id==0 && $type==''){
|
||||
return $this->apiError('参数不能为空,请填写参数');
|
||||
}
|
||||
$where[]=['pid','=',$pid];
|
||||
if($pid){
|
||||
$where[]=['pid','=',$pid];
|
||||
}else{
|
||||
$where[]=['pid','<>',0];
|
||||
}
|
||||
|
||||
$where[]=['status','=','normal'];
|
||||
$select=Db::table('fa_category')->where($where)->select();
|
||||
return $this->apiSuccess('ok',$select);
|
||||
@ -359,7 +364,11 @@ class Common extends BaseController
|
||||
if ($id==0 && $type==''){
|
||||
return $this->apiError('参数不能为空,请填写参数');
|
||||
}
|
||||
$where[]=['pid','=',$pid];
|
||||
if($pid){
|
||||
$where[]=['pid','=',$pid];
|
||||
}else{
|
||||
$where[]=['pid','<>',0];
|
||||
}
|
||||
$where[]=['status','=','normal'];
|
||||
$select=Db::table('fa_category')->where($where)->field('id as category_id,name as topic_name,image as pic,pid')->select()->toArray();
|
||||
foreach ($select as $k=>$v){
|
||||
|
Loading…
x
Reference in New Issue
Block a user