src/Controller.php
protected function ajaxError(string $msg, int $code = 1, $data = ''): void
    {
        $this->ajax(json(Debug::end([
            'status' => 'error',
            'success' => false,
            'error' => true,
            'msg' => $msg,
            'errorCode' => $code,
            'data' => $data
        ])));
    }
protected function ajaxError(string $msg, int $code = 1, $data = ''): void
    {
        $this->ajax(json(Debug::end([
            'status' => 'error',
            'success' => false,
            'error' => true,
            'msg' => $msg,
            'errorCode' => $code,
            'data' => $data
        ])));
    }
返回Json失败信息
@param string $msg 错误信息
@param $code int 错误代码
@param $data mixed 其他要返回的数据