Browse Source

邀请

tmp
huangjiajun 1 day ago
parent
commit
0fe81f8bd1
3 changed files with 8 additions and 5 deletions
  1. +1
    -1
      app/hdl/hdl_config.go
  2. +1
    -1
      app/hdl/hdl_user.go
  3. +6
    -3
      app/svc/svc_common.go

+ 1
- 1
app/hdl/hdl_config.go View File

@@ -56,7 +56,7 @@ func Config(c *gin.Context) {
WebLogo: svc.GetOssUrl(svc.GetSysCfgStr("web_logo")), WebLogo: svc.GetOssUrl(svc.GetSysCfgStr("web_logo")),
} }


res.DownViewUrl, res.RegisterViewUrl = svc.DownUrl(c)
res.DownViewUrl, _, res.RegisterViewUrl = svc.DownUrl(c)
if res.DownViewUrl == "" { if res.DownViewUrl == "" {
link := svc.GetSysCfgStr("kuaizhan_url") link := svc.GetSysCfgStr("kuaizhan_url")
link += "?type=download" link += "?type=download"


+ 1
- 1
app/hdl/hdl_user.go View File

@@ -331,7 +331,7 @@ func InviteUrl(c *gin.Context) {
if user.CustomInviteCode != "" { if user.CustomInviteCode != "" {
res.InviteCode = user.CustomInviteCode res.InviteCode = user.CustomInviteCode
} }
_, registerViewUrl := svc.DownUrl(c)
_, registerViewUrl, _ := svc.DownUrl(c)
if registerViewUrl != "" { if registerViewUrl != "" {
link = registerViewUrl link = registerViewUrl
} }


+ 6
- 3
app/svc/svc_common.go View File

@@ -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") 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") downDomainStr := GetSysCfgStr("down_web_domain")
registerDomainStr := GetSysCfgStr("down_register_domain") registerDomainStr := GetSysCfgStr("down_register_domain")
var downDomainArr = make([]string, 0) var downDomainArr = make([]string, 0)
@@ -168,12 +168,15 @@ func DownUrl(c *gin.Context) (string, string) {
} }
downUrl := "" downUrl := ""
registerUrl := "" registerUrl := ""
registerUrl1 := ""
if downDomain != "" { if downDomain != "" {
downUrl = fmt.Sprintf("%s%s%s", "https://", downDomain, "/#/pages/down-page/down-page?type=download") downUrl = fmt.Sprintf("%s%s%s", "https://", downDomain, "/#/pages/down-page/down-page?type=download")
} }
if registerDomain != "" { if registerDomain != "" {
registerUrl = fmt.Sprintf("%s%s%s", "https://", registerDomain, "/#/pages/down-page/down-page?type=") 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
} }

Loading…
Cancel
Save