<?php
// +----------------------------------------------------------------------
// | RXThinkCMF框架 [ RXThinkCMF ]
// +----------------------------------------------------------------------
// | 版权所有 2017~2020 南京RXThinkCMF研发中心
// +----------------------------------------------------------------------
// | 官方网站: http://www.rxthink.cn
// +----------------------------------------------------------------------
// | Author: 牧羊人 <1175401194@qq.com>
// +----------------------------------------------------------------------

namespace app\admin\controller;


use app\admin\service\AdminRomService;
use app\common\controller\Backend;

/**
 * 角色菜单关系-控制器
 * @author 牧羊人
 * @since 2020/7/3
 * Class Adminrom
 * @package app\admin\controller
 */
class Adminrom extends Backend
{
    /**
     * 初始化
     * @author 牧羊人
     * @since 2020/7/3
     */
    public function initialize()
    {
        parent::initialize(); // TODO: Change the autogenerated stub
        $this->model = new \app\admin\model\AdminRom();
        $this->service = new AdminRomService();
    }

    /**
     * 获取菜单列表
     * @return mixed
     * @since 2020/7/3
     * @author 牧羊人
     */
    public function index()
    {
        $result = $this->service->getList();
        return $result;
    }

    /**
     * 设置权限
     * @return mixed
     * @since 2020/7/3
     * @author 牧羊人
     */
    public function setPermission()
    {
        $result = $this->service->setPermission();
        return $result;
    }
}