server/handlers/games.go
@@ -200,9 +200,9 @@
      c.JSON(http.StatusOK, gin.H{"code": 1, "msg": "游戏不存在"})
      return
   }
   // 校验会员是否有效
   // 校验会员是否有效(永久卡 expired_at 为 NULL)
   var keys []models.MemberKey
   config.DB.Where("user_id = ? AND expired_at > ?", userID, time.Now()).Find(&keys)
   config.DB.Where("user_id = ? AND (expired_at IS NULL OR expired_at > ?)", userID, time.Now()).Find(&keys)
   if len(keys) == 0 {
      c.JSON(http.StatusOK, gin.H{"code": 2, "msg": "您的会员已到期,无法下载游戏。请激活新的会员密钥!"})
      return
@@ -215,7 +215,8 @@
   }
   config.DB.Model(&game).UpdateColumn("download_count", game.DownloadCount+1)
   c.JSON(http.StatusOK, gin.H{"code": 0, "data": gin.H{
      "title": game.Title,
      "files": game.Files,
      "title":     game.Title,
      "files":     game.Files,
      "launch_exe": game.LaunchExe,
   }})
}