|
|
|
@ -17,6 +17,7 @@ use cores\BaseController; |
|
|
|
|
use app\store\service\Auth as AuthService; |
|
|
|
|
use app\common\service\store\User as StoreUserService; |
|
|
|
|
use cores\exception\BaseException; |
|
|
|
|
use app\common\model\Merchant as MerchantModel; |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* 商户后台控制器基类 |
|
|
|
@ -81,6 +82,8 @@ class Controller extends BaseController |
|
|
|
|
$this->checkPrivilege(); |
|
|
|
|
// 强制验证当前访问的控制器方法method |
|
|
|
|
$this->checkMethodRules(); |
|
|
|
|
|
|
|
|
|
$this->getMerchantId(); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
@ -148,6 +151,17 @@ class Controller extends BaseController |
|
|
|
|
$this->storeId = $this->request->storeId(); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* 获取当前登录的商城ID |
|
|
|
|
*/ |
|
|
|
|
protected function getMerchantId() |
|
|
|
|
{ |
|
|
|
|
$user = StoreUserService::getLoginInfo(); |
|
|
|
|
print_r($user);die; |
|
|
|
|
|
|
|
|
|
$this->merchantId = MerchantModel::getMerchantId(); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* 强制验证当前访问的控制器方法method |
|
|
|
|
* @return void |
|
|
|
|