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

+1 -5
View File
@@ -14,8 +14,6 @@ type BackendMenuFrontController struct {
beego.Controller
}
// checkAuth 前台菜单只归租户自己维护:必须是 backend 端令牌,且令牌带上企业。
// 此前只解令牌不判端,app/platform 的令牌也能增删别家的前台菜单。
func (c *BackendMenuFrontController) checkAuth() (uint64, bool) {
claims, err := identity.Claims(c.Ctx.Request.Header.Get("Authorization"), identity.EndBackend)
if err != nil {
@@ -24,7 +22,6 @@ func (c *BackendMenuFrontController) checkAuth() (uint64, bool) {
_ = c.ServeJSON()
return 0, false
}
// tenant_id=0 为全局默认菜单保留值,不允许任何接口以租户身份操作
if claims.TenantId <= 0 {
c.Data["json"] = map[string]interface{}{"code": 401, "msg": "租户ID缺失"}
_ = c.ServeJSON()
@@ -39,7 +36,6 @@ func (c *BackendMenuFrontController) List() {
return
}
// 全局默认菜单(tenant_id=0,不可删改)+ 租户自定义菜单
var menus []models.BackendMenuFront
_, err := models.Orm.QueryTable("yz_backend_menu_front").
Filter("tenant_id__in", []uint64{0, tid}).
@@ -69,7 +65,7 @@ func (c *BackendMenuFrontController) Create() {
}
menu.TenantID = tid
menu.CreateTime = nil // 由orm自动处理
menu.CreateTime = nil
_, err := models.Orm.Insert(&menu)
if err != nil {
c.Data["json"] = map[string]interface{}{"code": 500, "msg": "创建失败"}