对返回的各种数据格式做归一化成对象的处理

This commit is contained in:
2024-06-08 14:05:50 +08:00
parent 5b41563619
commit 83b5e41105
2 changed files with 23 additions and 2 deletions

View File

@ -22,7 +22,7 @@ type Response struct {
Data string `json:"data"` // 响应body
Code string `json:"code"` // 业务状态码
Message string `json:"message"` // 业务状态码描述
Body string `json:"body"` // 响应数据
Body string `json:"body"` // 响应数据, 如果 data 本身是 list, 会自动转成 {"list": 真实数据}
ExtendData map[string]string `json:"extend_data"` // 除去 code / message / data 之外的其他数据
HttpCode int `json:"http_code"` // http状态码
HttpCodeStatus string `json:"http_code_status"` // http状态码描述