diff --git a/library/think/Request.php b/library/think/Request.php index d77e4e77..79c349f8 100644 --- a/library/think/Request.php +++ b/library/think/Request.php @@ -686,7 +686,12 @@ class Request public function post($name = '', $default = null, $filter = '') { if (empty($this->post)) { - $this->post = $_POST; + $content = $this->input; + if (empty($_POST) && strpos($content, '":')) { + $this->post = json_decode($content, true); + } else { + $this->post = $_POST; + } } if (is_array($name)) { $this->param = [];