package app import ( "github.com/gogf/gf/v2/net/ghttp" ) type Ghttp struct { C *ghttp.Request } func (g *Ghttp) Response(httpCode, errCode int, data interface{}) { g.C.Response.WriteJson(map[string]interface{}{ "code": httpCode, "msg": GetMsg(errCode), "data": data, }) return }