|
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263 |
- <?php
-
- namespace app\controller\store;
-
-
- 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
- {
- /**
- * 门店整体类型1:平台2:门店
- * @var int
- */
- protected $type = 2;
- /**
- * 当前登录门店信息
- * @var
- */
- protected $storeInfo;
-
- /**
- * 当前登门店ID
- * @var
- */
- protected $storeId;
-
- /**
- * 当前登录门店店员ID
- * @var
- */
- protected $storeStaffId;
- /**
- * 当前登录门店店员信息
- * @var
- */
- protected $storeStaffInfo;
-
- /**
- * 当前管理员权限
- * @var array
- */
- protected $auth = [];
-
-
- /**
- * 初始化
- */
- protected function initialize()
- {
- $this->storeId = $this->request->storeId();
- $this->storeStaffId = $this->request->storeStaffId();
- $this->storeStaffInfo = $this->request->storeStaffInfo();
- $this->auth = $this->storeStaffInfo['rule'] ?? [];
- }
-
- }
|