12345678910111213141516171819202122232425262728293031323334353637 |
- <?php
- namespace addons\cms\controller;
- use think\Request;
- class Base extends \think\addons\Controller
- {
-
- public function __construct(Request $request = null)
- {
- parent::__construct($request);
- $config = get_addon_config('cms');
-
- $this->view->engine->config('view_path', $this->view->engine->config('view_path') . $config['theme'] . DS);
-
-
-
- $this->view->assign('__CHANNEL__', null);
-
- \think\Config::set('cms.indexurl', addon_url('cms/index/index', [], false));
- }
- public function _initialize()
- {
- parent::_initialize();
-
- $action = $this->request->post("action");
- if ($action && $this->request->isPost()) {
- return $this->$action();
- }
- }
- }
|