取消api获职字段限制

This commit is contained in:
liuxiaoquan 2023-02-28 17:12:05 +08:00
parent 03a880d3a0
commit da228bda16
4 changed files with 7 additions and 7 deletions

View File

@ -22,7 +22,7 @@ class Cultural extends BaseController
protected function getData($cid){
$where = ['category_id'=>$cid];
$list = Db::table('fa_article')->field('id')->where($where)
$list = Db::table('fa_article')->where($where)
->page(1)
->limit(10)
->order('id desc')

View File

@ -25,7 +25,7 @@ class Education extends BaseController
protected function getData($cid){
$where = ['category_id'=>$cid];
$list = Db::table('fa_article')->field('id')->withAttr('lesson',
$list = Db::table('fa_article')->withAttr('lesson',
function($value, $data){
return Db::table(self::ARTICLE_EDUCATION_LIVE)->field('lesson_period,tag_ids as series_num')->where('article_id', $data['id'])->find();
}

View File

@ -17,12 +17,12 @@ class HouseDecoration extends BaseController
* @var array
*/
protected $middleware = [
Auth::class => ['except' => ['Case','Store'] ]
Auth::class => ['except' => ['case','store'] ]
];
protected function getData($cid){
$where = ['category_id'=>$cid];
$list = Db::table('fa_article')->field('id')
$list = Db::table('fa_article')
// ->withAttr('enroll',
// function($value, $data){
// return Db::table(self::ARTICLE_PUBLIC_BENEFIT)->field('promoter,enrolled_num')->where('article_id', $data['id'])->find();
@ -37,12 +37,12 @@ class HouseDecoration extends BaseController
return $list;
}
public function Case(){
public function case(){
$data = $this->getData(499);
$this->apiSuccess('ok', ['list' => $data]);
}
public function Store(){
public function store(){
$data = $this->getData(501);
$this->apiSuccess('ok', ['list' => $data]);
}

View File

@ -24,7 +24,7 @@ class PublicBenefit extends BaseController
protected function getData($cid){
$where = ['category_id'=>$cid];
$list = Db::table('fa_article')->field('id')->withAttr('enroll',
$list = Db::table('fa_article')->withAttr('enroll',
function($value, $data){
return Db::table(self::ARTICLE_PUBLIC_BENEFIT)->field('promoter,enrolled_num')->where('article_id', $data['id'])->find();
}