|
|
@@ -1,19 +1,32 @@
|
|
|
<?php
|
|
|
+
|
|
|
namespace client\controllers;
|
|
|
+
|
|
|
+use biz\merchant\services\MerchantService;
|
|
|
use common\components\baseController;
|
|
|
+use common\components\httpUtil;
|
|
|
|
|
|
/**
|
|
|
* 前台公共类
|
|
|
*/
|
|
|
-class PublicController extends baseController{
|
|
|
-
|
|
|
- public $webTitle = '花卉宝';
|
|
|
- public $webDescription = '花卉宝';
|
|
|
- public $webKeyword = '花卉宝';
|
|
|
+class PublicController extends baseController
|
|
|
+{
|
|
|
+
|
|
|
+ public $webTitle = '花卉宝';
|
|
|
+ public $webDescription = '花卉宝';
|
|
|
+ public $webKeyword = '花卉宝';
|
|
|
public $version;//公共静态文件版本号
|
|
|
-
|
|
|
- public function beforeAction($action){
|
|
|
- $this->version = '1.0.0';
|
|
|
+ public $merchant, $merchantId;
|
|
|
+
|
|
|
+ public function beforeAction($action)
|
|
|
+ {
|
|
|
+ $this->version = '1.0.0';
|
|
|
+ $header = httpUtil::getHeader();
|
|
|
+ $account = isset($header['account']) ? $header['account'] : 0;
|
|
|
+ if (!empty($account)) {
|
|
|
+ $this->merchantId = $account;
|
|
|
+ $merchant = MerchantService::getMerchantById($account);
|
|
|
+ }
|
|
|
return parent::beforeAction($action);
|
|
|
}
|
|
|
}
|