mirror of
https://gitee.com/fastadminnet/framework.git
synced 2026-07-06 07:02:47 +08:00
页面跳转的error和success模板分开 \think\controller类添加result方法 用于单独返回不同格式的api数据
This commit is contained in:
@@ -181,7 +181,7 @@ class Response
|
||||
$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);
|
||||
$result = \think\View::instance()->fetch(Config::get('dispatch_success_tmpl'), $result);
|
||||
}
|
||||
self::type($type);
|
||||
return $result;
|
||||
@@ -214,7 +214,7 @@ class Response
|
||||
$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);
|
||||
$result = \think\View::instance()->fetch(Config::get('dispatch_error_tmpl'), $result);
|
||||
}
|
||||
self::type($type);
|
||||
return $result;
|
||||
|
||||
Reference in New Issue
Block a user