mirror of
https://github.com/crmeb/CRMEB.git
synced 2026-10-30 14:31:04 +00:00
修改返回数据
This commit is contained in:
parent
c36a00df44
commit
31ad2c6e5e
@ -387,6 +387,25 @@ class SystemCrud extends AuthController
|
||||
['auth_type', '=', 2]
|
||||
], 'methods,api_url');
|
||||
|
||||
$newRoute = [];
|
||||
foreach ($routeList as $item) {
|
||||
if ($item['methods'] == 'GET') {
|
||||
if (strstr('create', $item['api_url'])) {
|
||||
$key = 'create';
|
||||
} else if (strstr('edit', $item['api_url'])) {
|
||||
$key = 'edit';
|
||||
} else {
|
||||
$key = 'index';
|
||||
}
|
||||
} else if ($item['methods'] == 'DELETE') {
|
||||
$key = 'delete';
|
||||
}
|
||||
|
||||
if (isset($key)) {
|
||||
$newRoute[$key] = $item['api_url'];
|
||||
}
|
||||
}
|
||||
|
||||
$column = $this->services->getColumnNamesList($info->table_name);
|
||||
$key = 'id';
|
||||
foreach ($column as $value) {
|
||||
@ -406,7 +425,7 @@ class SystemCrud extends AuthController
|
||||
];
|
||||
}
|
||||
}
|
||||
|
||||
$routeList = $newRoute;
|
||||
return app('json')->success(compact('key', 'routeList', 'columns'));
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user