You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
- <?php
- /**
- *
- * ============================================================================
- * * 版权所有 蜘蛛出行 * *
- * 网站地址: http://www.zhizhuchuxing.com
- * ----------------------------------------------------------------------------
- * 这不是一个自由软件!您只能在不用于商业目的的前提下对程序代码进行修改和
- * 使用;不允许对程序代码以任何形式任何目的的再发布。
- * ============================================================================
- * Author By: 倪宗锋
- * PhpStorm HomeController.php
- * Create By 2016/11/5 16:05 $
- */
-
-
- namespace Home\Controller;
-
-
- use Home\Service\HomeService;
- use Util\Controller\MvcController;
- use Util\Util\BrowserCache;
- use Util\Util\Util;
-
-
- class HomeController extends MvcController
- {
-
- private $service;
-
- public function __construct()
- {
- parent::__construct();
- $this->service = new HomeService();
- }
-
- /**
- * Function Description:网站首页
- * Function Name: indexAction
- *
- * @return string|void
- *
- * @author 倪宗锋
- */
- public function indexAction()
- {
- $isCache = BrowserCache::checkCache();//校验浏览器缓存是否过时
- if ($isCache['flag'] == false) {
- return '';
- }
- $getInfo = $this->service->getHomeInfo();
- if ($getInfo['flag'] == false) {
- return $this->viewError($getInfo['msg']);
- } else {
- $info = $getInfo['data'];
- }
- $_SESSION['test'] = true;
- $this->setViewParam('info', $info);
- return $this->viewModel('index');
- }
-
- /**
- * Function Description:调试方法
- * Function Name: zzAction
- *
- * @return string
- *
- * @author 倪宗锋
- */
- public function zzAction()
- {
- return Util::returnJsSu('zz调试');
- }
- }
|