mirror of
https://gitee.com/apiadmin/ApiAdmin.git
synced 2025-04-06 03:58:00 +08:00
modified 优化代码格式
This commit is contained in:
parent
869b65d605
commit
2a720cb56a
@ -1,4 +1,5 @@
|
||||
<?php
|
||||
|
||||
use think\Route;
|
||||
|
||||
$afterBehavior = [
|
||||
@ -12,7 +13,7 @@ $afterBehavior = [
|
||||
Route::rule([
|
||||
'admin/Login/index' => [
|
||||
'admin/Login/index',
|
||||
['method'=>'post']
|
||||
['method' => 'post']
|
||||
],
|
||||
'admin/Index/upload' => [
|
||||
'admin/Index/upload',
|
||||
@ -30,245 +31,245 @@ Route::rule([
|
||||
|
||||
|
||||
//大部分控制器的路由都以分组的形式写到这里
|
||||
Route::group('admin',function(){
|
||||
Route::group('Menu',[
|
||||
'index'=> [
|
||||
Route::group('admin', function() {
|
||||
Route::group('Menu', [
|
||||
'index' => [
|
||||
'admin/Menu/index',
|
||||
['method' => 'get']
|
||||
],
|
||||
'changeStatus' =>[
|
||||
'changeStatus' => [
|
||||
'admin/Menu/changeStatus',
|
||||
['method' => 'get']
|
||||
],
|
||||
'add' =>[
|
||||
'add' => [
|
||||
'admin/Menu/add',
|
||||
['method' => 'post']
|
||||
],
|
||||
'edit' =>[
|
||||
'edit' => [
|
||||
'admin/Menu/edit',
|
||||
['method' => 'post']
|
||||
],
|
||||
'del' =>[
|
||||
'del' => [
|
||||
'admin/Menu/del',
|
||||
['method' => 'get']
|
||||
]
|
||||
]);
|
||||
Route::group('User',[
|
||||
'index'=> [
|
||||
Route::group('User', [
|
||||
'index' => [
|
||||
'admin/User/index',
|
||||
['method' => 'get']
|
||||
],
|
||||
'getUsers' =>[
|
||||
'getUsers' => [
|
||||
'admin/User/getUsers',
|
||||
['method' => 'get']
|
||||
],
|
||||
'changeStatus' =>[
|
||||
'changeStatus' => [
|
||||
'admin/User/changeStatus',
|
||||
['method' => 'get']
|
||||
],
|
||||
'add' =>[
|
||||
'add' => [
|
||||
'admin/User/add',
|
||||
['method' => 'post']
|
||||
],
|
||||
'own' =>[
|
||||
'own' => [
|
||||
'admin/User/own',
|
||||
['method' => 'post']
|
||||
],
|
||||
'edit' =>[
|
||||
'edit' => [
|
||||
'admin/User/edit',
|
||||
['method' => 'post']
|
||||
],
|
||||
'del' =>[
|
||||
'del' => [
|
||||
'admin/User/del',
|
||||
['method' => 'get']
|
||||
],
|
||||
]);
|
||||
Route::group('Auth',[
|
||||
'index'=> [
|
||||
Route::group('Auth', [
|
||||
'index' => [
|
||||
'admin/Auth/index',
|
||||
['method' => 'get']
|
||||
],
|
||||
'changeStatus' =>[
|
||||
'changeStatus' => [
|
||||
'admin/Auth/changeStatus',
|
||||
['method' => 'get']
|
||||
],
|
||||
'add' =>[
|
||||
'add' => [
|
||||
'admin/Auth/add',
|
||||
['method' => 'post']
|
||||
],
|
||||
'delMember' =>[
|
||||
'delMember' => [
|
||||
'admin/Auth/delMember',
|
||||
['method' => 'get']
|
||||
],
|
||||
'edit' =>[
|
||||
'edit' => [
|
||||
'admin/Auth/edit',
|
||||
['method' => 'post']
|
||||
],
|
||||
'del' =>[
|
||||
'del' => [
|
||||
'admin/Auth/del',
|
||||
['method' => 'get']
|
||||
],
|
||||
'getGroups' =>[
|
||||
'getGroups' => [
|
||||
'admin/Auth/getGroups',
|
||||
['method' => 'get']
|
||||
],
|
||||
'getRuleList' =>[
|
||||
'getRuleList' => [
|
||||
'admin/Auth/getRuleList',
|
||||
['method' => 'get']
|
||||
]
|
||||
]);
|
||||
Route::group('App',[
|
||||
'index'=> [
|
||||
Route::group('App', [
|
||||
'index' => [
|
||||
'admin/App/index',
|
||||
['method' => 'get']
|
||||
],
|
||||
'refreshAppSecret'=> [
|
||||
'refreshAppSecret' => [
|
||||
'admin/App/refreshAppSecret',
|
||||
['method' => 'get']
|
||||
],
|
||||
'changeStatus' =>[
|
||||
'changeStatus' => [
|
||||
'admin/App/changeStatus',
|
||||
['method' => 'get']
|
||||
],
|
||||
'add' =>[
|
||||
'add' => [
|
||||
'admin/App/add',
|
||||
['method' => 'post']
|
||||
],
|
||||
'getAppInfo' =>[
|
||||
'getAppInfo' => [
|
||||
'admin/App/getAppInfo',
|
||||
['method' => 'get']
|
||||
],
|
||||
'edit' =>[
|
||||
'edit' => [
|
||||
'admin/App/edit',
|
||||
['method' => 'post']
|
||||
],
|
||||
'del' =>[
|
||||
'del' => [
|
||||
'admin/App/del',
|
||||
['method' => 'get']
|
||||
]
|
||||
]);
|
||||
Route::group('InterfaceList',[
|
||||
'index'=> [
|
||||
Route::group('InterfaceList', [
|
||||
'index' => [
|
||||
'admin/InterfaceList/index',
|
||||
['method' => 'get']
|
||||
],
|
||||
'changeStatus' =>[
|
||||
'changeStatus' => [
|
||||
'admin/InterfaceList/changeStatus',
|
||||
['method' => 'get']
|
||||
],
|
||||
'add' =>[
|
||||
'add' => [
|
||||
'admin/InterfaceList/add',
|
||||
['method' => 'post']
|
||||
],
|
||||
'refresh' =>[
|
||||
'refresh' => [
|
||||
'admin/InterfaceList/refresh',
|
||||
['method' => 'get']
|
||||
],
|
||||
'edit' =>[
|
||||
'edit' => [
|
||||
'admin/InterfaceList/edit',
|
||||
['method' => 'post']
|
||||
],
|
||||
'del' =>[
|
||||
'del' => [
|
||||
'admin/InterfaceList/del',
|
||||
['method' => 'get']
|
||||
],
|
||||
'getHash' =>[
|
||||
'getHash' => [
|
||||
'admin/InterfaceList/getHash',
|
||||
['method' => 'get']
|
||||
]
|
||||
]);
|
||||
Route::group('Fields',[
|
||||
'index'=> [
|
||||
Route::group('Fields', [
|
||||
'index' => [
|
||||
'admin/Fields/index',
|
||||
['method' => 'get']
|
||||
],
|
||||
'request' =>[
|
||||
'request' => [
|
||||
'admin/Fields/request',
|
||||
['method' => 'get']
|
||||
],
|
||||
'add' =>[
|
||||
'add' => [
|
||||
'admin/Fields/add',
|
||||
['method' => 'post']
|
||||
],
|
||||
'response' =>[
|
||||
'response' => [
|
||||
'admin/Fields/response',
|
||||
['method' => 'get']
|
||||
],
|
||||
'edit' =>[
|
||||
'edit' => [
|
||||
'admin/Fields/edit',
|
||||
['method' => 'post']
|
||||
],
|
||||
'del' =>[
|
||||
'del' => [
|
||||
'admin/Fields/del',
|
||||
['method' => 'get']
|
||||
],
|
||||
'upload' =>[
|
||||
'upload' => [
|
||||
'admin/Fields/upload',
|
||||
['method' => 'post']
|
||||
]
|
||||
]);
|
||||
Route::group('InterfaceGroup',[
|
||||
'index'=> [
|
||||
Route::group('InterfaceGroup', [
|
||||
'index' => [
|
||||
'admin/InterfaceGroup/index',
|
||||
['method' => 'get']
|
||||
],
|
||||
'getAll' =>[
|
||||
'getAll' => [
|
||||
'admin/InterfaceGroup/getAll',
|
||||
['method' => 'get']
|
||||
],
|
||||
'add' =>[
|
||||
'add' => [
|
||||
'admin/InterfaceGroup/add',
|
||||
['method' => 'post']
|
||||
],
|
||||
'changeStatus' =>[
|
||||
'changeStatus' => [
|
||||
'admin/InterfaceGroup/changeStatus',
|
||||
['method' => 'get']
|
||||
],
|
||||
'edit' =>[
|
||||
'edit' => [
|
||||
'admin/InterfaceGroup/edit',
|
||||
['method' => 'post']
|
||||
],
|
||||
'del' =>[
|
||||
'del' => [
|
||||
'admin/InterfaceGroup/del',
|
||||
['method' => 'get']
|
||||
]
|
||||
]);
|
||||
Route::group('AppGroup',[
|
||||
'index'=> [
|
||||
Route::group('AppGroup', [
|
||||
'index' => [
|
||||
'admin/AppGroup/index',
|
||||
['method' => 'get']
|
||||
],
|
||||
'getAll' =>[
|
||||
'getAll' => [
|
||||
'admin/AppGroup/getAll',
|
||||
['method' => 'get']
|
||||
],
|
||||
'add' =>[
|
||||
'add' => [
|
||||
'admin/AppGroup/add',
|
||||
['method' => 'post']
|
||||
],
|
||||
'changeStatus' =>[
|
||||
'changeStatus' => [
|
||||
'admin/AppGroup/changeStatus',
|
||||
['method' => 'get']
|
||||
],
|
||||
'edit' =>[
|
||||
'edit' => [
|
||||
'admin/AppGroup/edit',
|
||||
['method' => 'post']
|
||||
],
|
||||
'del' =>[
|
||||
'del' => [
|
||||
'admin/AppGroup/del',
|
||||
['method' => 'get']
|
||||
]
|
||||
]);
|
||||
Route::group('Log',[
|
||||
'index'=> [
|
||||
Route::group('Log', [
|
||||
'index' => [
|
||||
'admin/Log/index',
|
||||
['method' => 'get']
|
||||
],
|
||||
'del' =>[
|
||||
'del' => [
|
||||
'admin/Log/del',
|
||||
['method' => 'get']
|
||||
]
|
||||
]);
|
||||
Route::miss('admin/Miss/index');
|
||||
},['after_behavior' => $afterBehavior]
|
||||
}, ['after_behavior' => $afterBehavior]
|
||||
);
|
||||
|
Loading…
x
Reference in New Issue
Block a user