News.php 649 B

12345678910111213141516171819202122232425
  1. <?php
  2. namespace app\api\controller\v1;
  3. use app\api\controller\Base;
  4. use app\hander\HelpHander;
  5. class News extends Base
  6. {
  7. public function lists(){
  8. $cateId=input('cateId');
  9. $page = input('page/d',1);
  10. $size = input('size/d',10);
  11. $ret=model('News')->apiNewList($page,$size,$cateId,$this->userId,$this->orgId);
  12. HelpHander::success($ret);
  13. }
  14. public function search(){
  15. $title=input('title');
  16. $page = input('page/d',1);
  17. $size = input('size/d',10);
  18. $ret=model('News')->apiSearchs($page,$size,$title,$this->userId,$this->orgId);
  19. HelpHander::success($ret);
  20. }
  21. }