renderJson(config('status.success'), $message, $data); } /** * 返回操作失败json * @param string $message * @param array $data * @return Json */ protected final function renderError(string $message = 'error', array $data = []): Json { return $this->renderJson(config('status.error'), $message, $data); } /** * 获取post数据 (数组) * @param null $key * @param bool $filter * @return mixed */ protected final function postData($key = null, bool $filter = false) { return $this->request->post(empty($key) ? '' : "{$key}/a", null, $filter ? '' : null); } /** * 获取post数据 (数组) * @param string|null $key * @param bool $filter * @return mixed */ protected final function postForm(?string $key = 'form', bool $filter = true) { return $this->postData(empty($key) ? 'form' : $key, $filter); } }