Skip to content

Commit

Permalink
邮件域名
Browse files Browse the repository at this point in the history
  • Loading branch information
TruthHun88 committed Oct 21, 2018
1 parent 026a650 commit d73aa5d
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions controllers/BaseController.go
Expand Up @@ -157,6 +157,13 @@ func (this *BaseController) ExecuteViewPathTemplate(tplName string, data interfa
}

func (this *BaseController) BaseUrl() string {
host := beego.AppConfig.String("sitemap_host")
if len(host) > 0 {
if strings.HasPrefix(host, "http://") || strings.HasPrefix(host, "https://") {
return host
}
return this.Ctx.Input.Scheme() + "://" + host
}
return this.Ctx.Input.Scheme() + "://" + this.Ctx.Request.Host
}

Expand Down

0 comments on commit d73aa5d

Please sign in to comment.