1234567891011121314151617181920212223242526 |
- <?php
- namespace app\api\controller;
- use app\common\controller\Api;
- use think\Db;
- /**
- * 示例接口
- */
- class Banner extends Api
- {
- protected $noNeedLogin = ['*'];
- protected $noNeedRight = ['*'];
- //轮播图
- public function banner()
- {
- $where = [
- 'status' => 1,
- ];
- $list = Db::name('banner')->field('id,title,type,image,video_file,url')->where($where)->order('weigh', 'desc')->select();
- $list = list_domain_image($list, ['image','video_file']);
- $this->success(1, $list);
- }
- }
|