| 1234567891011121314151617181920212223242526272829303132 |
- <?php
- namespace mall\controllers;
- use biz\merchant\services\MerchantService;
- use common\components\baseController;
- use common\components\httpUtil;
- /**
- * 前台公共类
- */
- class PublicController extends baseController
- {
-
- public $webTitle = '花卉宝';
- public $webDescription = '花卉宝';
- public $webKeyword = '花卉宝';
- public $version;//公共静态文件版本号
- 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;
- $this->merchant = MerchantService::getMerchantById($account);
- }
- return parent::beforeAction($action);
- }
- }
|