<?php

namespace app\api\controller;

use app\common\controller\Api;
use think\Db;
/**
 * 示例接口
 */
class Banner extends Api
{
    protected $noNeedLogin = ['*'];
    protected $noNeedRight = ['*'];

    public function __construct(){
        $this->error('投票活动结束了');
    }

    //轮播图
    public function banner()
    {
        $list = Db::name('banner')->field('id, title, image, url')->where(['status' => 1])->order('weigh', 'desc')->select();
        $list = list_domain_image($list, ['image']);

        $this->success(1, $list);
    }
}
