feat: 新增登录接口

This commit is contained in:
2024-12-31 18:05:36 +08:00
parent 741c2d6f85
commit b5e83a998c
8 changed files with 219 additions and 2 deletions

27
app/admin/route/v1.php Normal file
View File

@@ -0,0 +1,27 @@
<?php
// +----------------------------------------------------------------------
// | ThinkPHP [ WE CAN DO IT JUST THINK ]
// +----------------------------------------------------------------------
// | Copyright (c) 2006~2018 http://thinkphp.cn All rights reserved.
// +----------------------------------------------------------------------
// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
// +----------------------------------------------------------------------
// | Author: liu21st <liu21st@gmail.com>
// +----------------------------------------------------------------------
use think\facade\Route;
// v1版本路由定义
Route::group('v1', function () {
// 用户模块
Route::group('user', function () {
// 获取验证码
Route::get('captcha', 'Captcha/index');
// 登录接口
Route::post('login', 'Login/index');
});
})->prefix('v1.');
Route::miss(function() {
return '404 Not Found!';
});