perf:附件不再使用绝对路径

This commit is contained in:
lifei6671 2018-11-14 19:03:27 +08:00
parent 4d0b132200
commit a95ea86648

View File

@ -213,7 +213,7 @@ func URLFor(endpoint string, values ...interface{}) string {
pathUrl := beego.URLFor(endpoint, values ...)
if baseUrl == "" {
baseUrl = BaseUrl
baseUrl = "/"
}
if strings.HasPrefix(pathUrl, "http://") {
return pathUrl