徐总多门店
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
jiuhaoshenghuo/app/controller/admin/AuthController.php

57 lines
1.6 KiB

2 months ago
<?php
// +----------------------------------------------------------------------
// | CRMEB [ CRMEB赋能开发者,助力企业发展 ]
// +----------------------------------------------------------------------
// | Copyright (c) 2016~2020 https://www.crmeb.com All rights reserved.
// +----------------------------------------------------------------------
// | Licensed CRMEB并不是自由软件,未经许可不能去掉CRMEB相关版权
// +----------------------------------------------------------------------
// | Author: CRMEB Team <admin@crmeb.com>
// +----------------------------------------------------------------------
namespace app\controller\admin;
use app\Request;
use crmeb\basic\BaseController;
/**
* 基类 所有控制器继承的类
* Class AuthController
* @package app\controller\admin
* @property Request $request
* @property $services
* @method success($message = '',array $data = [])
* @method fail($message = '',array $data = [])
*/
class AuthController extends BaseController
{
/**
* 当前登陆管理员信息
* @var
*/
protected $adminInfo;
/**
* 当前登陆管理员ID
* @var
*/
protected $adminId;
/**
* 当前管理员权限
* @var array
*/
protected $auth = [];
/**
* 初始化
*/
protected function initialize()
{
$this->adminId = $this->request->hasMacro('adminId') ? $this->request->adminId() : 0;
$this->adminInfo = $this->request->hasMacro('adminInfo') ? $this->request->adminInfo() : [];
$this->auth = $this->adminInfo['rule'] ?? [];
}
}