gix issue in Config variable for ghttp.Response.View

This commit is contained in:
John
2019-09-16 15:49:31 +08:00
parent 2cfcbc82e1
commit 33fbedffb8

View File

@ -65,7 +65,7 @@ func (r *Response) buildInVars(params ...map[string]interface{}) map[string]inte
}
// 当配置文件不存在时就不赋值该模板变量,不然会报错
if c := gins.Config(); c.FilePath() != "" {
vars["Config"] = c.GetMap("")
vars["Config"] = c.GetMap(".")
}
vars["Cookie"] = r.request.Cookie.Map()
vars["Session"] = r.request.Session.Map()