mirror of
https://gitee.com/wonderful-code/buildadmin
synced 2024-11-21 14:41:29 +00:00
refactor:取消响应类型自动判断至 jsonp,因为跨域请求均会被中间件拦截
This commit is contained in:
parent
29faf6189c
commit
1573df7e91
@ -114,8 +114,7 @@ class Api extends BaseController
|
|||||||
'data' => $data,
|
'data' => $data,
|
||||||
];
|
];
|
||||||
|
|
||||||
// 如果未设置类型则自动判断
|
$type = $type ?: $this->responseType;
|
||||||
$type = $type ?: ($this->request->param(Config::get('route.var_jsonp_handler')) ? 'jsonp' : $this->responseType);
|
|
||||||
|
|
||||||
$code = 200;
|
$code = 200;
|
||||||
if (isset($header['statuscode'])) {
|
if (isset($header['statuscode'])) {
|
||||||
|
Loading…
Reference in New Issue
Block a user