1234567891011121314151617181920212223242526272829 |
- package libs
- type Response struct {
- }
- func NewResponse()*Response {
- return new(Response)
- }
- //ajax返回
- func (self *Response) AjaxMsg( msgno int,msg interface{},data interface{})map[string]interface{} {
- out := make(map[string]interface{})
- out["code"] = msgno
- out["message"] = msg
- out["data"] = data
- return out
- }
- //ajax返回 列表
- func (self *Response) AjaxList( msgno int,msg interface{}, count int64, data interface{})map[string]interface{} {
- out := make(map[string]interface{})
- out["code"] = msgno
- out["msg"] = msg
- out["count"] = count
- out["data"] = data
- return out
- }
|