This commit is contained in:
maxwell 2024-10-09 08:05:20 +08:00
parent c8eedf5a8f
commit cbc6405a3e

View File

@ -60,7 +60,7 @@ func GetUserInfo(redisClient *redis.Storage) fiber.Handler {
var result map[string]interface{}
json.Unmarshal(body, &result)
fmt.Println(result)
if _, ok := result["code"]; !ok || result["code"] != 1 {
if _, ok := result["code"]; !ok || int(result["code"].(float64)) != 1 {
return c.Status(http.StatusUnauthorized).JSON(fiber.Map{
"message": "获取学生信息失败,身份证无效",
"error": "身份证无效",