新增辅助函数

This commit is contained in:
2024-10-31 14:24:43 +08:00
parent 22241f4280
commit d1a55ecd73
5 changed files with 16 additions and 1 deletions

12
helpers/helpers.php Normal file
View File

@@ -0,0 +1,12 @@
<?php
if (!function_exists('ds')) {
function ds($data, $exit = false)
{
exit(json_encode([
'code' => 19980617,
'msg' => '测试返回',
'data' => $data
], JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES | JSON_PRETTY_PRINT
));
}
}