diff --git a/middleware/student.go b/middleware/student.go index 0e7f8f6..63cd90b 100644 --- a/middleware/student.go +++ b/middleware/student.go @@ -16,7 +16,7 @@ import ( func GetUserInfo(redisClient *redis.Storage) fiber.Handler { return func(c *fiber.Ctx) error { // 获取POST 请求参数 - nationalId := c.Params("nationalId") + nationalId := c.FormValue("nationalId") if nationalId == "" { return c.Status(http.StatusUnauthorized).JSON(fiber.Map{ "message": "获取信息失败,身份证不能为空",