Index.php 634 B

1234567891011121314151617181920212223242526272829
  1. <?php
  2. namespace addons\cms\controller;
  3. use think\Config;
  4. /**
  5. * CMS首页控制器
  6. * Class Index
  7. * @package addons\cms\controller
  8. */
  9. class Index extends Base
  10. {
  11. public function index()
  12. {
  13. $config = get_addon_config('cms');
  14. //设置TKD
  15. Config::set('cms.title', $config['title'] ?: __('Home'));
  16. Config::set('cms.keywords', $config['keywords']);
  17. Config::set('cms.description', $config['description']);
  18. if ($this->request->isAjax()) {
  19. $this->success("", "", $this->view->fetch('common/index_list'));
  20. }
  21. return $this->view->fetch('/index');
  22. }
  23. }