Banner.php 480 B

1234567891011121314151617181920212223
  1. <?php
  2. namespace app\api\controller;
  3. use app\common\controller\Api;
  4. use think\Db;
  5. /**
  6. * 示例接口
  7. */
  8. class Banner extends Api
  9. {
  10. protected $noNeedLogin = ['*'];
  11. protected $noNeedRight = ['*'];
  12. //轮播图
  13. public function banner()
  14. {
  15. $list = Db::name('banner')->field('id, title, image, url')->where(['status' => 1])->order('weigh', 'desc')->select();
  16. $list = list_domain_image($list, ['image']);
  17. $this->success(1, $list);
  18. }
  19. }