Index.php 808 B

123456789101112131415161718192021222324252627282930313233
  1. <?php
  2. namespace app\data\controller\api;
  3. use app\data\model\DataHotSearch;
  4. use app\data\model\DataXw;
  5. use app\data\model\DataXwAd;
  6. use app\data\model\DataXwCategory;
  7. use think\admin\Controller;
  8. use hg\apidoc\annotation\Title;
  9. use hg\apidoc\annotation\Returned;
  10. use hg\apidoc\annotation\Param;
  11. use hg\apidoc\annotation\Method;
  12. use think\db\Query;
  13. /**
  14. * @Title("首页")
  15. */
  16. class Index extends Auth
  17. {
  18. protected $noNeedLogin=['hotsearch'];
  19. /**
  20. * @Title("热门搜索")
  21. * @Returned ("id",desc="id")
  22. * @Returned ("name",desc="热词")
  23. * @Returned ("is_hot",desc="1:热 0:否")
  24. */
  25. public function hotsearch(){
  26. $list=DataHotSearch::mk()->where('is_del',1)->order('is_hot','desc')->select();
  27. //->where('type',1)
  28. $this->success('',$list);
  29. }
  30. }