|
|
|
@ -12,7 +12,7 @@ class ArticleController extends Controller
|
|
|
|
public function GetList()
|
|
|
|
public function GetList()
|
|
|
|
{
|
|
|
|
{
|
|
|
|
$type=request('type');
|
|
|
|
$type=request('type');
|
|
|
|
$list = DB::table('articles')->where(['type'=>$type,'is_del'=>0,'status'=>1])->orderBy('order','asc')->get();
|
|
|
|
$list = DB::table('articles')->select('id','type','title')->where(['type'=>$type,'is_del'=>0,'status'=>1])->orderBy('order','asc')->get();
|
|
|
|
return \Yz::Return(true,"查询完成",['list'=>$list]);
|
|
|
|
return \Yz::Return(true,"查询完成",['list'=>$list]);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@ -20,7 +20,7 @@ class ArticleController extends Controller
|
|
|
|
public function GetDetail()
|
|
|
|
public function GetDetail()
|
|
|
|
{
|
|
|
|
{
|
|
|
|
$id=request('id');
|
|
|
|
$id=request('id');
|
|
|
|
$info = DB::table('articles')->where(['id'=>$id,'is_del'=>0,'status'=>1])->first();
|
|
|
|
$info = DB::table('articles')->select('id','type','title','content')->where(['id'=>$id,'is_del'=>0,'status'=>1])->first();
|
|
|
|
if($info){
|
|
|
|
if($info){
|
|
|
|
return \Yz::Return(true,"查询完成",['info'=>$info]);
|
|
|
|
return \Yz::Return(true,"查询完成",['info'=>$info]);
|
|
|
|
}else{
|
|
|
|
}else{
|
|
|
|
|