refactor: 修改登录接口

This commit is contained in:
2025-01-02 18:10:58 +08:00
parent 06868e3a1e
commit 22d1604974
4 changed files with 92 additions and 31 deletions

View File

@@ -3,7 +3,7 @@
// 接口错误返回
if (!function_exists('error')) {
function error($msg = '', $data = [])
function error($msg = '', $data = []): \think\Response
{
return \apiret\Api::error($msg, $data);
}
@@ -12,7 +12,7 @@ if (!function_exists('error')) {
// 接口成功返回
if (!function_exists('success')) {
function success($msg = '', $data = [])
function success($msg = '', $data = []): \think\Response
{
return \apiret\Api::success($msg, $data);
}
@@ -20,7 +20,7 @@ if (!function_exists('success')) {
// 接口调结果返回
if (!function_exists('result')) {
function result($errno, $msg = '', $data = [])
function result($errno, $msg = '', $data = []): \think\Response
{
return \apiret\Api::result($errno)->message($msg)->response($data);
}