()
| 266 | } |
| 267 | |
| 268 | func (this *BaseController) BaseUrl() string { |
| 269 | host := beego.AppConfig.String("sitemap_host") |
| 270 | if len(host) > 0 { |
| 271 | if strings.HasPrefix(host, "http://") || strings.HasPrefix(host, "https://") { |
| 272 | return host |
| 273 | } |
| 274 | return this.Ctx.Input.Scheme() + "://" + host |
| 275 | } |
| 276 | return this.Ctx.Input.Scheme() + "://" + this.Ctx.Request.Host |
| 277 | } |
| 278 | |
| 279 | // 显示错误信息页面. |
| 280 | func (this *BaseController) ShowErrorPage(errCode int, errMsg string) { |
no outgoing calls
no test coverage detected