|
|
@ -33,7 +33,7 @@ class Controller extends BaseController |
|
|
|
protected int $storeId; |
|
|
|
protected int $storeId; |
|
|
|
|
|
|
|
|
|
|
|
// 当前商户ID |
|
|
|
// 当前商户ID |
|
|
|
protected int $merchantId; |
|
|
|
protected int $merchantId = 0; |
|
|
|
|
|
|
|
|
|
|
|
// 当前控制器名称 |
|
|
|
// 当前控制器名称 |
|
|
|
protected string $controller = ''; |
|
|
|
protected string $controller = ''; |
|
|
@ -157,9 +157,10 @@ class Controller extends BaseController |
|
|
|
protected function getMerchantId() |
|
|
|
protected function getMerchantId() |
|
|
|
{ |
|
|
|
{ |
|
|
|
$user = StoreUserService::getLoginInfo(); |
|
|
|
$user = StoreUserService::getLoginInfo(); |
|
|
|
|
|
|
|
if (!empty($user)) { |
|
|
|
$this->merchantId = MerchantModel::getMerchantId($user['user']['user_name']); |
|
|
|
$this->merchantId = MerchantModel::getMerchantId($user['user']['user_name']); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
|
* 强制验证当前访问的控制器方法method |
|
|
|
* 强制验证当前访问的控制器方法method |
|
|
|