fix: 订阅模式登录验证、永久会员类型区分、动态代码HTTP返回值修复、侧边栏滚动位置保持

- 修复订阅模式登录时错误检查余额的问题
- 区分无限余额和永久订阅两种永久会员类型
- 修复动态代码HTTP请求返回值在JS中无法正确访问的问题
- 添加侧边栏滚动位置保持功能
- 移除developer角色相关代码,统一使用admin
- 添加缺失的i18n翻译key
This commit is contained in:
2026-05-01 16:39:31 +08:00
parent c0edb32614
commit ea8ffb6c74
69 changed files with 554 additions and 369 deletions
-20
View File
@@ -114,26 +114,6 @@ func AdminAuth() gin.HandlerFunc {
}
}
// DeveloperAuth 开发者权限中间件(管理员即开发者)
func DeveloperAuth() gin.HandlerFunc {
return func(c *gin.Context) {
role, exists := c.Get("role")
if !exists {
response.Error(c, http.StatusForbidden, "Access denied")
c.Abort()
return
}
if role != "admin" {
response.Error(c, http.StatusForbidden, "Admin access required")
c.Abort()
return
}
c.Next()
}
}
// AgentAuth 代理商授权中间件
func AgentAuth() gin.HandlerFunc {
return func(c *gin.Context) {