response.go 330 B

1234567891011121314
  1. package blog
  2. import (
  3. "gfast/library/response"
  4. "github.com/gogf/gf/frame/g"
  5. "github.com/gogf/gf/net/ghttp"
  6. "github.com/gogf/gf/os/gview"
  7. )
  8. func Response(r *ghttp.Request, tpl string, params ...gview.Params) error {
  9. view := g.View()
  10. view.SetPath("template/plugin/blog")
  11. return response.WriteTpl(r, tpl, view, params...)
  12. }