Index.php 811 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. <?php
  2. namespace app\api\controller;
  3. use app\common\controller\Api;
  4. /**
  5. * 首页接口
  6. */
  7. class Index extends Api
  8. {
  9. protected $noNeedLogin = ['*'];
  10. protected $noNeedRight = ['*'];
  11. public function index()
  12. {
  13. $this->success();
  14. }
  15. /**
  16. * 首页
  17. *
  18. */
  19. public function home(){
  20. //轮播图
  21. $banner = Db::name('banner')->field('id, title, image, url')->where(['status' => 1])->order('weigh', 'desc')->select();
  22. $banner = list_domain_image($banner, ['image']);
  23. //四个顶部分类
  24. //第一个顶部分类,的两个商品
  25. //其他所有分类
  26. }
  27. //吃喝玩乐
  28. //列表
  29. public function chihewanle_list(){
  30. }
  31. //吃喝玩乐
  32. //详情
  33. public function chihewanle_info(){
  34. }
  35. }