修改返回数据

This commit is contained in:
liaofei 2023-04-20 18:29:32 +08:00
parent 966fbac132
commit a17cd960c6

View File

@ -391,18 +391,14 @@ class SystemCrud extends AuthController
foreach ($routeList as $item) {
if ($item['methods'] == 'GET') {
if (strstr($item['api_url'], 'create')) {
$key = 'create';
$newRoute['create'] = $item['api_url'];
} else if (strstr($item['api_url'], 'edit')) {
$key = 'edit';
$newRoute['edit'] = $item['api_url'];
} else {
$key = 'index';
$newRoute['index'] = $item['api_url'];
}
} else if ($item['methods'] == 'DELETE') {
$key = 'delete';
}
if (isset($key)) {
$newRoute[$key] = $item['api_url'];
$newRoute['delete'] = $item['api_url'];
}
}