You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
51 lines
1.5 KiB
PHP
51 lines
1.5 KiB
PHP
<?php
|
|
class HeaderWidget extends ZcWidget {
|
|
|
|
/**
|
|
* @var MallService
|
|
*/
|
|
private $mallService;
|
|
/**
|
|
* @var AffiliateAccountService
|
|
*/
|
|
private $affiliateAccountService;
|
|
|
|
/**
|
|
* @var FeedbackService
|
|
*/
|
|
private $feedbackService;
|
|
|
|
public function __construct() {
|
|
$this->mallService = Zc::singleton('MallService');
|
|
$this->affiliateAccountService = Zc::singleton('AffiliateAccountService');
|
|
$this->feedbackService = Zc::singleton(FeedbackService::class);
|
|
}
|
|
|
|
public function render($data = '') {
|
|
$data = array();
|
|
|
|
$data['route'] = $_GET['route'];
|
|
$data['nickname'] = $_SESSION[SessionConst::mallName];
|
|
$data['mallSubAccountId'] = $_SESSION[SessionConst::mallSubAccountId];
|
|
$data['imConfig'] = $this->feedbackService->getImConfig();
|
|
|
|
$data['isMallRoleFactory'] = $this->mallService->checkIsMallRoleFactory($_SESSION[SessionConst::mallId]);
|
|
|
|
switch (Zc::C('appName')) {
|
|
case AppConst::appMsPddOd:
|
|
$tplFile = AppConst::isNewVersionPurchase() ? 'msod/common/header' : 'msod/common/header_old';
|
|
break;
|
|
case AppConst::appPddRuby:
|
|
if (AppConst::isRubyDesktop()) {
|
|
$tplFile = 'msod/common/header';
|
|
} else {
|
|
$tplFile = 'common/header';
|
|
}
|
|
break;
|
|
default:
|
|
$tplFile = 'common/header';
|
|
break;
|
|
}
|
|
return $this->renderFile($tplFile, $data);
|
|
}
|
|
} |