作者 邓超

1

... ... @@ -34,7 +34,7 @@ class Folder extends Base {
// 转tree
$folders = list_to_tree($folders);
app()->_json($folders);
return $folders;
}
... ...
... ... @@ -6,7 +6,7 @@ use Lib\Mail\MailFun;
use Lib\Verify;
use Model\emailSql;
use Model\listsSql;
use function Swoole\Coroutine\Http\request;
/**
* @author:dc
... ...
... ... @@ -130,7 +130,17 @@ class App {
}catch (\Throwable $exception){
if(!($exception instanceof Err)){
if($exception instanceof Err){
if ($exception->getCode() !== 200){
$app->data = [
'error_message' => $exception->getMessage(),
'status' => $exception->getCode() ? $exception->getCode() : 500,
];
}
}else{
$app->error = [
'message' => $exception->getMessage(),
'file' => $exception->getFile(),
... ... @@ -143,11 +153,6 @@ class App {
'error_message' => $app->debug ? $exception->getMessage().PHP_EOL.$exception->getTraceAsString() : __('server_error'),
'status' => $exception->getCode() ? $exception->getCode() : 500,
];
}else{
$app->data = [
'error_message' => $exception->getMessage(),
'status' => $exception->getCode() ? $exception->getCode() : 500,
];
}
}
... ...