From 7fd16d0785541dde05b7b3d07754572d6461cbec Mon Sep 17 00:00:00 2001 From: huangjiajun <582604932@qq.com> Date: Mon, 30 Sep 2024 14:45:41 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/hdl/hdl_index.go | 17 +++++++++++++++++ go.mod | 2 +- 2 files changed, 18 insertions(+), 1 deletion(-) 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