接口统一返回处理

This commit is contained in:
Devil
2021-01-06 21:26:19 +08:00
parent e4032fc250
commit 36e22ff6d6
26 changed files with 146 additions and 101 deletions

View File

@ -10,6 +10,7 @@
// +----------------------------------------------------------------------
namespace app\api\controller;
use app\service\BaseService;
use app\service\AnswerService;
/**
@ -72,11 +73,11 @@ class Answer extends Common
// 返回数据
$result = [
'total' => $total,
'page_total' => $page_total,
'data' => $data['data'],
'total' => $total,
'page_total' => $page_total,
'data' => $data['data'],
];
return DataReturn('success', 0, $result);
return BaseService::DataReturn($result);
}
/**