更新密码找回uniapp

This commit is contained in:
hero920103 committed 2026-11-16 17:22:50 +08:00
1 parent 7f9a66da0f
commit 3fdda89833
1304 files changed
+3503 -26132

No files matched your search

-7
View File
@@ -13,7 +13,6 @@ import (
beego "github.com/beego/beego/v2/server/web"
)
// BackendNotifyConfigController 租户用户通知配置控制器
type BackendNotifyConfigController struct {
beego.Controller
}
@@ -40,8 +39,6 @@ type notifyConfigPayload struct {
BarkServerURL string `json:"bark_server_url"`
}
// GetConfig GET /backend/notify-config
// 获取当前登录用户的通知配置
func (c *BackendNotifyConfigController) GetConfig() {
claims, err := c.ncClaims()
if err != nil {
@@ -52,14 +49,11 @@ func (c *BackendNotifyConfigController) GetConfig() {
cfg := models.GetBackendUserNotifyConfig(uint64(claims.TenantId), uint64(claims.UserID))
if cfg == nil {
// 未配置时返回空结构,前端可以直接展示空表单
cfg = &models.BackendUserNotifyConfig{}
}
c.ncOk(cfg)
}
// UpdateConfig PUT /backend/notify-config
// 更新当前登录用户的通知配置(不存在则创建)
func (c *BackendNotifyConfigController) UpdateConfig() {
claims, err := c.ncClaims()
if err != nil {
@@ -113,7 +107,6 @@ func (c *BackendNotifyConfigController) UpdateConfig() {
c.ncOk(nil)
}
// ncStrPtr 字符串转指针,空字符串返回 nil
func ncStrPtr(s string) *string {
s = strings.TrimSpace(s)
if s == "" {