2ed5dfa6a1
iotlcm-app:小程序端 + 用户端服务。 - app/:uni-app 小程序前端(基于 unibest,MIT) - 微信 AppID → YOUR_WX_APPID,uni-app AppID → __UNI__YOURAPPID - 内网后端地址 → admin.iotlcm.example.com - 应用标题与 unibest 模板 README 重写(保留上游致谢与 MIT 声明) - server/:GoFrame 用户端服务(基于 XiuAdmin,Apache-2.0) - module xiuadmin → git.5iot.com/iotlcm-public/iotlcm-app(360 文件) - 支付回调地址 → app.iotlcm.example.com,商户名与应用名泛化 - 真实手机号 → 合法 11 位编造号(保留号段前 3 位 + 后 4 位) - 依赖号码尾部的断言同步更新 - 补 server/LICENSE(Apache-2.0) - 移除内部资产:CI 触发器 - 补根 README,LF 行尾 + .gitattributes 已知:TestSysDept_RefreshDeptAncestors 在源仓同一提交上同样失败,属既有缺陷。
117 lines
5.1 KiB
Go
117 lines
5.1 KiB
Go
// Package v1
|
|
// @Link https://github.com/xiujiecn/xiu-admin
|
|
// @Copyright Copyright (c) 2025 LiXiujie
|
|
// @Author Lxj <li@xiujie.cn>
|
|
// @License https://github.com/xiujiecn/xiu-admin/blob/master/LICENSE
|
|
package v1
|
|
|
|
import (
|
|
"git.5iot.com/iotlcm-public/iotlcm-app/internal/model"
|
|
|
|
"github.com/gogf/gf/v2/frame/g"
|
|
)
|
|
|
|
// 路由菜单
|
|
type RouteMenu struct {
|
|
Id int64 `json:"id" dc:"路由ID"`
|
|
ParentId int64 `json:"parentId" dc:"父路由ID"`
|
|
Path string `json:"path" dc:"路由路径"`
|
|
Redirect *string `json:"redirect,omitempty" dc:"重定向路径"`
|
|
Name string `json:"name" dc:"路由名称"` // 必须唯一
|
|
Component string `json:"component" dc:"组件路径"`
|
|
Meta *RouteMeta `json:"meta,omitempty" dc:"路由元数据"`
|
|
Children []*RouteMenu `json:"children,omitempty" dc:"子路由"`
|
|
}
|
|
|
|
// 路由元数据
|
|
// 对应 vue/packages/@core/base/typings/src/vue-router.d.ts
|
|
type RouteMeta struct {
|
|
Title string `json:"title" dc:"菜单标题"`
|
|
Icon *string `json:"icon,omitempty" dc:"菜单图标"`
|
|
Order *int `json:"order,omitempty" dc:"菜单排序"`
|
|
OpenInNewWindow *bool `json:"openInNewWindow,omitempty" dc:"是否在新窗口打开"`
|
|
NoBasicLayout *bool `json:"noBasicLayout,omitempty" dc:"是否不使用基础布局"`
|
|
HideInMenu *bool `json:"hideInMenu,omitempty" dc:"是否隐藏菜单"`
|
|
HideInBreadcrumb *bool `json:"hideInBreadcrumb,omitempty" dc:"是否隐藏面包屑"`
|
|
HideChildrenInMenu *bool `json:"hideChildrenInMenu,omitempty" dc:"是否隐藏子菜单"`
|
|
HideInTab *bool `json:"hideInTab,omitempty" dc:"是否隐藏标签页"`
|
|
MenuVisibleWithForbidden *bool `json:"menuVisibleWithForbidden,omitempty" dc:"菜单可见但访问会被重定向到403"`
|
|
IgnoreAccess *bool `json:"ignoreAccess,omitempty" dc:"忽略权限,直接可以访问"`
|
|
KeepAlive *bool `json:"keepAlive,omitempty" dc:"开启KeepAlive缓存"`
|
|
Link *string `json:"link,omitempty" dc:"外链-跳转路径"`
|
|
Query map[string]string `json:"query,omitempty" dc:"路由所携带的参数"`
|
|
IframeSrc *string `json:"iframeSrc,omitempty" dc:"iframe地址"`
|
|
MaxNumOfOpenTab *int `json:"maxNumOfOpenTab,omitempty" dc:"标签页最大打开数量"`
|
|
Badge *string `json:"badge,omitempty" dc:"徽标"`
|
|
BadgeType *string `json:"badgeType,omitempty" dc:"徽标类型"`
|
|
BadgeVariants *string `json:"badgeVariants,omitempty" dc:"徽标颜色"`
|
|
Authority []string `json:"authority,omitempty" dc:"需要特定的角色标识才可以访问"`
|
|
AffixTab *bool `json:"affixTab,omitempty" dc:"是否固定标签页"`
|
|
AffixTabOrder *int `json:"affixTabOrder,omitempty" dc:"固定标签页的顺序"`
|
|
ActiveIcon *string `json:"activeIcon,omitempty" dc:"激活图标"`
|
|
ActivePath *string `json:"activePath,omitempty" dc:"当前激活的菜单"`
|
|
}
|
|
|
|
// 获取用户所有菜单
|
|
type MenuAllReq struct {
|
|
g.Meta `path:"/menu/all" method:"get" tags:"系统-菜单管理" summary:"获取用户所有菜单" x-check-permission:""`
|
|
}
|
|
|
|
// type MenuAllRes struct {
|
|
// Data []RouteMenu `json:"data" dc:"菜单列表"`
|
|
// }
|
|
type MenuAllRes = []*RouteMenu
|
|
|
|
type MenuListReq struct {
|
|
g.Meta `path:"/menu/list" method:"get" tags:"系统-菜单管理" summary:"获取菜单列表" x-check-permission:"cpm:system:menu:list"`
|
|
model.SysMenuListParam
|
|
}
|
|
|
|
type MenuListRes struct {
|
|
Data []*model.SysMenuListModel `json:"items" dc:"菜单列表"`
|
|
Total int `json:"total" dc:"总数"`
|
|
}
|
|
|
|
type MenuViewReq struct {
|
|
g.Meta `path:"/menu/view" method:"get" tags:"系统-菜单管理" summary:"获取菜单详情" x-check-permission:"cpm:system:menu:query"`
|
|
MenuId int64 `json:"menuId" dc:"菜单ID"`
|
|
}
|
|
|
|
type MenuViewRes struct {
|
|
model.SysMenuViewModel
|
|
}
|
|
|
|
type MenuAddReq struct {
|
|
g.Meta `path:"/menu/add" method:"post" tags:"系统-菜单管理" summary:"添加菜单" x-check-permission:"cpm:system:menu:add"`
|
|
model.SysMenuAddModel
|
|
}
|
|
|
|
type MenuAddRes struct {
|
|
model.SysMenuViewModel
|
|
}
|
|
|
|
type MenuUpdateReq struct {
|
|
g.Meta `path:"/menu/update" method:"post" tags:"系统-菜单管理" summary:"更新菜单" x-check-permission:"cpm:system:menu:edit"`
|
|
model.SysMenuUpdateModel
|
|
}
|
|
|
|
type MenuUpdateRes struct {
|
|
model.SysMenuViewModel
|
|
}
|
|
|
|
type MenuDeleteReq struct {
|
|
g.Meta `path:"/menu/delete" method:"post" tags:"系统-菜单管理" summary:"删除菜单" x-check-permission:"cpm:system:menu:remove"`
|
|
MenuId int64 `json:"menuId" dc:"菜单ID"`
|
|
}
|
|
|
|
type MenuDeleteRes struct {
|
|
}
|
|
|
|
type MenuTreeReq struct {
|
|
g.Meta `path:"/menu/tree" method:"get" tags:"系统-菜单管理" summary:"获取菜单树" x-check-permission:""`
|
|
}
|
|
|
|
type MenuTreeRes struct {
|
|
Data []*model.SysMenuTreeModel `json:"items" dc:"菜单树"`
|
|
}
|