47 lines
951 B
PHP
47 lines
951 B
PHP
<?php
|
|
namespace app\controller\supplier;
|
|
|
|
|
|
use crmeb\basic\BaseController;
|
|
|
|
/**
|
|
* 基类 所有控制器继承的类
|
|
* Class AuthController
|
|
* @package app\controller\admin
|
|
* @method success($msg = 'ok', array $data = [])
|
|
* @method fail($msg = 'error', array $data = [])
|
|
*/
|
|
class AuthController extends BaseController
|
|
{
|
|
|
|
/**
|
|
* 当前登录供应商ID
|
|
* @var
|
|
*/
|
|
protected $supplierId;
|
|
|
|
/**
|
|
* 当前登录供应商信息
|
|
* @var
|
|
*/
|
|
protected $supplierInfo;
|
|
|
|
/**
|
|
* 当前管理员权限
|
|
* @var array
|
|
*/
|
|
protected $auth = [];
|
|
|
|
|
|
/**
|
|
* 初始化
|
|
*/
|
|
protected function initialize()
|
|
{
|
|
$this->supplierId = $this->request->hasMacro('supplierId') ? $this->request->supplierId() : 0;
|
|
$this->supplierInfo = $this->request->hasMacro('supplierInfo') ? $this->request->supplierInfo() : [];
|
|
$this->auth = $this->supplierInfo['rule'] ?? [];
|
|
}
|
|
|
|
}
|