diff --git a/app/hdl/hdl_index.go b/app/hdl/hdl_index.go index ca7ea95..e76bc77 100644 --- a/app/hdl/hdl_index.go +++ b/app/hdl/hdl_index.go @@ -6,6 +6,7 @@ import ( "applet/app/md" "applet/app/svc" "applet/app/utils" + "code.fnuoos.com/zhimeng/model.git/src/implement" "github.com/gin-gonic/gin" ) @@ -26,6 +27,22 @@ func Base(c *gin.Context) { "account_id": utils.IntToStr(user.AdmId), "name": name, "account": user.Username, + "logo": "", + "label": "", + "seo_logo": "", + "seo_title": "", + } + NewAdminRoleDb := implement.NewAdminRoleDb(svc.MasterDb(c)) + role, _ := NewAdminRoleDb.GetAdminRoleByAdminId(user.AdmId) + if role != nil { + NewRoleDb := implement.NewRoleDb(svc.MasterDb(c), user.AdmId) + getRole, _ := NewRoleDb.GetRole() + if getRole != nil { + res["logo"] = getRole.Logo + res["label"] = getRole.Label + res["seo_logo"] = getRole.SeoLogo + res["seo_title"] = getRole.SeoTitle + } } e.OutSuc(c, res, nil) return diff --git a/go.mod b/go.mod index 74fc11d..898411e 100644 --- a/go.mod +++ b/go.mod @@ -5,7 +5,6 @@ go 1.18 //replace code.fnuoos.com/zhimeng/model.git => E:/company/ad/models require ( - code.fnuoos.com/zhimeng/model.git v0.0.3-0.20240930063210-6bb519cca13b github.com/afex/hystrix-go v0.0.0-20180502004556-fa1af6a1f4f5 github.com/boombuler/barcode v1.0.1 github.com/dchest/uniuri v0.0.0-20200228104902-7aecb25e1fe5 @@ -41,6 +40,7 @@ require ( ) require ( + code.fnuoos.com/zhimeng/model.git v0.0.3-0.20240930064359-f120af0d8ade // indirect filippo.io/edwards25519 v1.1.0 // indirect github.com/KyleBanks/depth v1.2.1 // indirect github.com/PuerkitoBio/purell v1.1.1 // indirect