From 0fe81f8bd1d4042ae41a7fc2b7534bd322c57474 Mon Sep 17 00:00:00 2001 From: huangjiajun <582604932@qq.com> Date: Sun, 22 Dec 2024 16:51:20 +0800 Subject: [PATCH] =?UTF-8?q?=E9=82=80=E8=AF=B7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/hdl/hdl_config.go | 2 +- app/hdl/hdl_user.go | 2 +- app/svc/svc_common.go | 9 ++++++--- 3 files changed, 8 insertions(+), 5 deletions(-) diff --git a/app/hdl/hdl_config.go b/app/hdl/hdl_config.go index 43a7bdf..7025be5 100644 --- a/app/hdl/hdl_config.go +++ b/app/hdl/hdl_config.go @@ -56,7 +56,7 @@ func Config(c *gin.Context) { WebLogo: svc.GetOssUrl(svc.GetSysCfgStr("web_logo")), } - res.DownViewUrl, res.RegisterViewUrl = svc.DownUrl(c) + res.DownViewUrl, _, res.RegisterViewUrl = svc.DownUrl(c) if res.DownViewUrl == "" { link := svc.GetSysCfgStr("kuaizhan_url") link += "?type=download" diff --git a/app/hdl/hdl_user.go b/app/hdl/hdl_user.go index 9ef0950..7e079ea 100644 --- a/app/hdl/hdl_user.go +++ b/app/hdl/hdl_user.go @@ -331,7 +331,7 @@ func InviteUrl(c *gin.Context) { if user.CustomInviteCode != "" { res.InviteCode = user.CustomInviteCode } - _, registerViewUrl := svc.DownUrl(c) + _, registerViewUrl, _ := svc.DownUrl(c) if registerViewUrl != "" { link = registerViewUrl } diff --git a/app/svc/svc_common.go b/app/svc/svc_common.go index 70c31f0..4e62c7c 100644 --- a/app/svc/svc_common.go +++ b/app/svc/svc_common.go @@ -139,7 +139,7 @@ func GetWeekInfo(dateStr string) (string, string, string, string) { return utils.IntToStr(year), utils.IntToStr(week), weekStart.Format("2006-01-02"), weekEnd.Format("2006-01-02") } -func DownUrl(c *gin.Context) (string, string) { +func DownUrl(c *gin.Context) (string, string, string) { downDomainStr := GetSysCfgStr("down_web_domain") registerDomainStr := GetSysCfgStr("down_register_domain") var downDomainArr = make([]string, 0) @@ -168,12 +168,15 @@ func DownUrl(c *gin.Context) (string, string) { } downUrl := "" registerUrl := "" + registerUrl1 := "" if downDomain != "" { downUrl = fmt.Sprintf("%s%s%s", "https://", downDomain, "/#/pages/down-page/down-page?type=download") } if registerDomain != "" { registerUrl = fmt.Sprintf("%s%s%s", "https://", registerDomain, "/#/pages/down-page/down-page?type=") } - - return downUrl, registerUrl + if registerDomain != "" { + registerUrl1 = fmt.Sprintf("%s%s%s", "https://", registerDomain, "/#/pages/down-page/down-page?type=") + } + return downUrl, registerUrl, registerUrl1 }