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

-15
View File
@@ -11,7 +11,6 @@ import (
beego "github.com/beego/beego/v2/server/web"
)
// PlatformRoleController 平台角色管理(yz_system_admin_role)
type PlatformRoleController struct {
beego.Controller
}
@@ -44,8 +43,6 @@ func normalizeRights(v interface{}) *string {
}
}
// GetAllRoles 获取角色列表
// GET /platform/allRoles
func (c *PlatformRoleController) GetAllRoles() {
var rows []models.AdminRole
_, err := models.Orm.QueryTable(new(models.AdminRole)).
@@ -60,8 +57,6 @@ func (c *PlatformRoleController) GetAllRoles() {
_ = c.ServeJSON()
}
// GetRoleByID 获取角色详情
// GET /platform/roles/:id
func (c *PlatformRoleController) GetRoleByID() {
idStr := c.Ctx.Input.Param(":id")
id, _ := strconv.ParseUint(idStr, 10, 64)
@@ -80,8 +75,6 @@ func (c *PlatformRoleController) GetRoleByID() {
_ = c.ServeJSON()
}
// CreateRole 创建角色
// POST /platform/roles
func (c *PlatformRoleController) CreateRole() {
var p rolePayload
raw, _ := io.ReadAll(c.Ctx.Request.Body)
@@ -111,8 +104,6 @@ func (c *PlatformRoleController) CreateRole() {
return
}
rights := normalizeRights(p.Rights)
// 平台建的租户角色(cid=2)就是「下发到租户后台」,对租户只读;
// 平台角色(cid=1)不下发,锁定位无意义。
isLocked := uint8(0)
if cid == 2 {
isLocked = 1
@@ -134,8 +125,6 @@ func (c *PlatformRoleController) CreateRole() {
_ = c.ServeJSON()
}
// UpdateRole 更新角色
// PUT /platform/roles/:id
func (c *PlatformRoleController) UpdateRole() {
idStr := c.Ctx.Input.Param(":id")
id, _ := strconv.ParseUint(idStr, 10, 64)
@@ -167,8 +156,6 @@ func (c *PlatformRoleController) UpdateRole() {
return
}
update["cid"] = *p.Cid
// 锁定位必须跟着 cid 走:改成 cid=2 即下发给租户,必须只读;
// 改回 cid=1 收回平台,就不能再留着锁定标记。
if *p.Cid == 2 {
update["is_locked"] = uint8(1)
} else {
@@ -194,8 +181,6 @@ func (c *PlatformRoleController) UpdateRole() {
_ = c.ServeJSON()
}
// DeleteRole 删除角色
// DELETE /platform/roles/:id
func (c *PlatformRoleController) DeleteRole() {
idStr := c.Ctx.Input.Param(":id")
id, _ := strconv.ParseUint(idStr, 10, 64)