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