|
|
@@ -17,7 +17,7 @@ use common\components\util;
|
|
|
class BaseController extends PublicController
|
|
|
{
|
|
|
public $admin, $adminId, $adminAvatar, $account;
|
|
|
- public $merchantId = 0, $merchantName, $merchant, $merchantExtend, $merchantLogo, $signPackage, $shopId = 0;
|
|
|
+ public $ghsId = 0, $merchantName, $merchant, $merchantExtend, $merchantLogo, $signPackage, $shopId = 0;
|
|
|
public $appId;
|
|
|
public $isWx = false;
|
|
|
public $isLogin = false;
|
|
|
@@ -28,8 +28,10 @@ class BaseController extends PublicController
|
|
|
public function beforeAction($action)
|
|
|
{
|
|
|
//token验证
|
|
|
- $adminId = jwt::getLoginId();
|
|
|
- $merchantId = 0;
|
|
|
+ //$adminId = jwt::getLoginId();
|
|
|
+ //模拟用户
|
|
|
+ $adminId = 1;
|
|
|
+ $ghsId = 0;
|
|
|
$merchant = [];
|
|
|
$merchantExtend = [];
|
|
|
$admin = [];
|
|
|
@@ -53,9 +55,9 @@ class BaseController extends PublicController
|
|
|
if (empty($shop)) {
|
|
|
util::fail('没有找到门店');
|
|
|
}
|
|
|
- $merchantId = $shop['merchantId'];
|
|
|
- $merchant = MerchantService::getMerchantById($merchantId);
|
|
|
- $merchantExtend = MerchantExtendService::getByMerchantId($merchantId);
|
|
|
+ $ghsId = $shop['ghsId'];
|
|
|
+ $merchant = MerchantService::getMerchantById($ghsId);
|
|
|
+ $merchantExtend = MerchantExtendService::getByMerchantId($ghsId);
|
|
|
}
|
|
|
$this->shopId = $shopId;
|
|
|
}
|
|
|
@@ -68,7 +70,7 @@ class BaseController extends PublicController
|
|
|
}
|
|
|
$this->admin = $admin;
|
|
|
$this->adminId = $adminId;
|
|
|
- $this->merchantId = $merchantId;
|
|
|
+ $this->ghsId = $ghsId;
|
|
|
$this->merchant = $merchant;
|
|
|
$this->merchantExtend = $merchantExtend;
|
|
|
return parent::beforeAction($action);
|