feat(protect): 验证窗按后台设置裁剪功能,补齐验证码倒计时与设备上限提示
Docker Build / Build and Push Docker Image (push) Successful in 32s
Docker Build / Deploy to Server (push) Successful in 3s

后台开关(GET /api/v1/app/:appKey/info 新增 9 个字段,全部取自 applications 表现有配置):
allow_register / enable_login_verify / enable_register_verify / verify_method /
enable_password_reset / password_reset_method / enable_free_period / trial_days / bind_type

壳侧(shell v15,四 tab × 七皮肤通用):
- 启动拉一次 /info,按开关裁剪界面,拉不到就全开(fail-open,不会把用户锁在外面)
- 应用名以服务器为准,不再写死「演示程序」
- allow_register=false → 注册 tab 与面板整体隐藏
- enable_register_verify=false → 收起「邮箱验证码」行和发送按钮,注册只填账号+邮箱+密码,并提示原因
- enable_password_reset=false → 忘记密码 tab 整体隐藏(不给点了就报错的入口);
  方法为 sms 时提示改为「验证码将发送到绑定手机」
- billing_type=free → 免费模式无余额,卡密充值 tab 隐藏
- 发送验证码成功后 60s 倒计时,按钮禁用并显示剩余秒数
- 登录失败命中「设备绑定数量已达上限」时补一句「本应用上限 N 台,可在官网我的设备解绑」
- 说明性提示改中性灰,不再用报错红

壳资源 792,576 B,e2e 8 套全过。
This commit is contained in:
Hermes Agent
2026-11-23 03:54:18 +08:00
parent 8a3ecc6594
commit ea3ef37a31
2 changed files with 10 additions and 0 deletions
Binary file not shown.
+10
View File
@@ -242,6 +242,16 @@ func handleAppGetInfo(c *gin.Context) {
"trial_balance": app.TrialBalance,
"heartbeat_interval": app.HeartbeatInterval,
"heartbeat_timeout": app.HeartbeatTimeout,
// —— 客户端界面开关:壳按这些字段决定显示哪些 tab / 哪些步骤 ——
"allow_register": app.AllowRegister,
"enable_login_verify": app.EnableLoginVerify,
"enable_register_verify": app.EnableRegisterVerify,
"verify_method": app.VerifyMethod,
"enable_password_reset": app.EnablePasswordReset,
"password_reset_method": app.PasswordResetMethod,
"enable_free_period": app.EnableFreePeriod,
"trial_days": app.TrialDays,
"bind_type": app.BindType,
})
}