getConfig()['error_page_jump']) { Config::set('dispatch_success_tmpl', $addonPath . 'view' . DS . 'tpl' . DS . 'dispatch_jump.tpl'); Config::set('dispatch_error_tmpl', $addonPath . 'view' . DS . 'tpl' . DS . 'dispatch_jump.tpl'); } } /** * HTML替换 */ public function viewFilter(&$content) { $request = Request::instance(); $module = strtolower($request->module()); $controller = strtolower($request->controller()); $action = strtolower($request->action()); if ($module == 'admin') { // 如果没有定义主题就用 sdtheme-white if ($controller == 'index' && $action == 'index') { if (!config('fastadmin.adminskin') && !cookie('adminskin')) { $content = preg_replace( '/(
]*class=")([^"]*)(")/', '$1$2 sdtheme-white $3', $content ); } // 右侧菜单栏增加主题 $newItem = 'sdtheme