<?php

namespace addons\fastim\controller;

use think\addons\Controller;
use think\Request;

class Base extends Controller
{

    public function __construct(Request $request = null)
    {
        parent::__construct($request);
        $config = get_addon_config('fastim');
        // 设定主题模板目录
        $this->view->engine->config('view_path', $this->view->engine->config('view_path') . trim($config['theme']) . DS);
    }

    protected function _initialize()
    {
        //跨域检测
        check_cors_request();
        parent::_initialize();
    }

}
