package app

import (
	"github.com/gin-gonic/gin"
	"bwallet/pkg/e"
)

type Gin struct {
	C *gin.Context
}


//为特定类型定义函数，即为类型对象定义方法
func (g *Gin) Response(httpCode, errCode int, data interface{}) {
	g.C.JSON(httpCode, gin.H{
		"code": httpCode,
		"msg":  e.GetMsg(errCode),
		"data": data,
	})

	return
}
