初始化2

This commit is contained in:
2026-07-10 17:33:33 +08:00
parent b51ee98afa
commit 94f6ecf901
59 changed files with 3893 additions and 980 deletions

View File

@@ -41,6 +41,24 @@ func (c *AuthController) Login(ctx *gin.Context) {
utils.Success(ctx, resp)
}
// AppLogin 应用登录(用户名+appId)
// POST /api/auth/app-login
func (c *AuthController) AppLogin(ctx *gin.Context) {
var req dto.AppLoginRequest
if err := ctx.ShouldBindJSON(&req); err != nil {
utils.BadRequest(ctx, "参数错误: "+err.Error())
return
}
resp, err := c.authService.AppLogin(&req)
if err != nil {
utils.Unauthorized(ctx, err.Error())
return
}
utils.Success(ctx, resp)
}
// Register 用户注册
// POST /api/auth/register
func (c *AuthController) Register(ctx *gin.Context) {