123456789101112131415161718192021222324252627282930 |
- <?php
- namespace app\api\controller;
- use app\common\controller\Api;
- use think\Db;
- /**
- * 首页接口
- */
- class Index extends Api
- {
- protected $noNeedLogin = ['banner'];
- protected $noNeedRight = ['*'];
- /**
- * 首页
- *
- */
- public function index()
- {
- $this->success('请求成功');
- }
- public function banner(){
- $list = Db::name('banner')->order('weigh desc')->select();
- $list = list_domain_image($list,['image']);
- $this->success(1,$list);
- }
- }
|