代码和注释规范

This commit is contained in:
thinkphp
2016-01-04 08:47:36 +08:00
parent 4eb78d2229
commit 7ceb302e34
2 changed files with 28 additions and 29 deletions

View File

@@ -176,11 +176,8 @@ class Response
'wait' => $wait,
];
if (IS_AJAX) {
$type = Config::get('default_ajax_return');
} else {
$type = Config::get('default_return_type');
}
$type = IS_AJAX ? Config::get('default_ajax_return') : Config::get('default_return_type');
if ('html' == $type) {
$result = \think\View::instance()->fetch(Config::get('dispatch_jump_tmpl'), $result);
}
@@ -212,11 +209,8 @@ class Response
'wait' => $wait,
];
if (IS_AJAX) {
$type = Config::get('default_ajax_return');
} else {
$type = Config::get('default_return_type');
}
$type = IS_AJAX ? Config::get('default_ajax_return') : Config::get('default_return_type');
if ('html' == $type) {
$result = \think\View::instance()->fetch(Config::get('dispatch_jump_tmpl'), $result);
}