mirror of
https://gitee.com/fastadminnet/framework.git
synced 2026-07-05 22:52:49 +08:00
改进Response类 支持扩展不同的输出类型 改进Model类 不同的模型采用不同的查询对象实例 修正Request类一处错误 助手函数view改进 直接返回Response类对象实例
This commit is contained in:
@@ -106,7 +106,7 @@ class App
|
||||
default:
|
||||
throw new Exception('dispatch type not support', 10008);
|
||||
}
|
||||
} catch (HttpResponseException $exception){
|
||||
} catch (HttpResponseException $exception) {
|
||||
$data = $exception->getResponse();
|
||||
}
|
||||
// 输出数据到客户端
|
||||
@@ -116,8 +116,9 @@ class App
|
||||
} else {
|
||||
// 监听app_end
|
||||
APP_HOOK && Hook::listen('app_end', $data);
|
||||
$type = IS_AJAX ? Config::get('default_ajax_return') : Config::get('default_return_type');
|
||||
// 自动响应输出
|
||||
return Response::instance()->send($data, '', Config::get('response_return'));
|
||||
return Response::create($type)->send($data);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user