增加部分api接口功能

This commit is contained in:
2020-02-18 10:21:17 +08:00
parent d4325e3016
commit 40c5e75558
10 changed files with 812 additions and 8 deletions

View File

@@ -34,10 +34,15 @@ Route::group('user', function () {
});
Route::group('api', function () {
Route::rule('/', 'admin.Index/index');
Route::rule('login', 'api.Index/login');
Route::rule('register', 'api.Index/register');
Route::rule('/', 'api.Index/index');
Route::rule('login', 'api.Login/index');
Route::rule('register', 'api.Login/register');
Route::rule('logout', 'api.Login/logout');
Route::rule(':controller/:function', 'api.:controller/:function');
});
})->allowCrossDomain([
'Access-Control-Allow-Origin' => '*',
'Access-Control-Allow-Credentials' => 'true',
'Access-Control-Allow-Headers' => 'authorization, token, Content-Type, If-Match, If-Modified-Since, If-None-Match, If-Unmodified-Since, X-Requested-With',
]);
Route::miss('Index/miss');