阶段性更新

This commit is contained in:
2020-10-13 08:49:57 +08:00
parent 7cfd45bf99
commit d8cd8ae9a6
21 changed files with 420 additions and 423 deletions

View File

@@ -1,45 +0,0 @@
<?php
/**
* Author: sai
* Date: 2020/1/15
* Time: 14:31
*/
namespace App\Exceptions;
class ApiUnionpayException extends \Exception
{
const ERROR_CODE = 1001;
const ERROR_MSG = 'ApiUnionpayException';
private $data = [];
/**
* BusinessException constructor.
* @param string $message
* @param string $code
* @param array $data
*/
public function __construct($data = [])
{
$this->data = $data;
}
/**
* @return array
*/
public function getData()
{
return $this->data;
}
/**
* 异常输出
*/
public function render($request)
{
return response()->json($this->getData(), 200);
}
}

View File

@@ -13,7 +13,6 @@ class Handler extends ExceptionHandler
* @var array
*/
protected $dontReport = [
ApiException::class,
];
/**
@@ -32,7 +31,6 @@ class Handler extends ExceptionHandler
*/
public function report(Exception $exception)
{
info($exception->getMessage());
parent::report($exception);
}