huangjiajun hace 1 día
padre
commit
0fe81f8bd1
Se han modificado 3 ficheros con 8 adiciones y 5 borrados
  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 Ver fichero

@@ -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"


+ 1
- 1
app/hdl/hdl_user.go Ver fichero

@@ -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
}


+ 6
- 3
app/svc/svc_common.go Ver fichero

@@ -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
}

Cargando…
Cancelar
Guardar