更新密码找回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

-11
View File
@@ -14,12 +14,6 @@ import (
beego "github.com/beego/beego/v2/server/web"
)
// PlatformSiteSettingsController 租户站点设置(站点基本信息)
// 对应前端 normalSettings.vue 的:
// - GET /backend/normalInfos
// - POST /backend/saveNormalInfos
// - GET /platform/normalInfos
// - POST /platform/saveNormalInfos
type PlatformSiteSettingsController struct {
beego.Controller
}
@@ -71,7 +65,6 @@ type normalInfosOutput struct {
Ico string `json:"ico"`
}
// GetNormalInfos GET /backend/normalInfos 或 /platform/normalInfos
func (c *PlatformSiteSettingsController) GetNormalInfos() {
claims, err := c.claimsByPath()
if err != nil {
@@ -80,7 +73,6 @@ func (c *PlatformSiteSettingsController) GetNormalInfos() {
return
}
// 优先使用 token 中的租户 id;若为 0,则允许前端通过查询参数传入(兼容历史/平台端)。
tid := uint64(claims.TenantId)
if tid == 0 {
tidStr := strings.TrimSpace(c.GetString("tid"))
@@ -103,7 +95,6 @@ func (c *PlatformSiteSettingsController) GetNormalInfos() {
Ico: "",
}
// tid 缺失时不报错,直接返回空对象给前端渲染(避免 UI 直接崩)。
if tid == 0 {
c.Data["json"] = map[string]interface{}{"code": 200, "msg": "success", "data": out}
_ = c.ServeJSON()
@@ -138,7 +129,6 @@ func (c *PlatformSiteSettingsController) GetNormalInfos() {
}
type normalInfosPayload struct {
// 前端会传 tid(但我们仍优先使用 token 的 tenant_id)
Tid interface{} `json:"tid"`
Sitename string `json:"sitename"`
@@ -152,7 +142,6 @@ type normalInfosPayload struct {
Icp string `json:"icp"`
}
// SaveNormalInfos POST /backend/saveNormalInfos 或 /platform/saveNormalInfos
func (c *PlatformSiteSettingsController) SaveNormalInfos() {
claims, err := c.claimsByPath()
if err != nil {