feat: i18n

This commit is contained in:
meilin.huang
2024-11-20 22:43:53 +08:00
parent 74ae031853
commit 99a746085b
308 changed files with 8177 additions and 3880 deletions

View File

@@ -24,7 +24,7 @@ func (r *Resource) GetAllResourceTree(rc *req.Ctx) {
func (r *Resource) GetById(rc *req.Ctx) {
res, err := r.ResourceApp.GetById(uint64(rc.PathParamInt("id")))
biz.ErrIsNil(err, "该资源不存在")
biz.ErrIsNil(err, "The resource does not exist")
rc.ResData = res
}
@@ -63,3 +63,10 @@ func (r *Resource) Sort(rc *req.Ctx) {
r.ResourceApp.Sort(rc.MetaCtx, sortE)
}
}
// GetResourceRoles
func (r *Resource) GetResourceRoles(rc *req.Ctx) {
rrs, err := r.ResourceApp.GetResourceRoles(uint64(rc.PathParamInt("id")))
biz.ErrIsNil(err)
rc.ResData = rrs
}