mirror of
https://gitee.com/apiadmin/ApiAdmin.git
synced 2025-04-06 03:58:00 +08:00
modified 添加JSON字符串验证
This commit is contained in:
parent
b1aeed9bdc
commit
559d832b65
@ -150,6 +150,9 @@ class Fields extends Base {
|
||||
$jsonStr = $this->request->post('jsonStr');
|
||||
$jsonStr = html_entity_decode($jsonStr);
|
||||
$data = json_decode($jsonStr, true);
|
||||
if ($data === null) {
|
||||
return $this->buildFailed(ReturnCode::EXCEPTION, 'JSON数据格式有误');
|
||||
}
|
||||
ApiList::update(['returnStr' => json_encode($data)], ['hash' => $hash]);
|
||||
$this->handle($data['data'], $dataArr);
|
||||
$old = (new ApiFields())->where([
|
||||
|
Loading…
x
Reference in New Issue
Block a user