<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2018/9/20
 * Time: 10:34
 */

namespace app\api\controller;

use app\common\model\Banner as BannerModel;

class Banner extends Base
{
    /**
     * 获取banner列表
     * @url /api/Banner/index
     * return json
     */
    public function index()
    {
        $banner = BannerModel::all(['status' => 1]);
        if (!$banner) return ['code' => 1, 'msg' => '没有更多'];
        return ['code' => 0, 'msg' => 'success', 'data' => $banner];
    }
}