feat:完善项目
This commit is contained in:
@ -12,6 +12,34 @@ type Config struct{}
|
||||
* @apiDefine Config 配置管理
|
||||
*/
|
||||
|
||||
/**
|
||||
* @api {get} /api/v1/config/area 区域管理
|
||||
* @apiVersion 1.0.0
|
||||
* @apiName ConfigArea
|
||||
* @apiGroup Config
|
||||
*
|
||||
* @apiHeader {string} x-token token
|
||||
* @apiHeader {string} Content-Type=application/json 传输方式
|
||||
*
|
||||
* @apiParam {String} [key="''"] 区域标识
|
||||
*
|
||||
* @apiSuccess (200) {Number} code 成功响应状态码!
|
||||
* @apiSuccess (200) {String} msg 成功提示
|
||||
* @apiSuccess (200) {Json} data 数据信息{"110000": "北京市", "120000": "天津市", ...}
|
||||
*
|
||||
* @apiSuccessExample {json} Success response:
|
||||
* HTTPS 200 OK
|
||||
* {
|
||||
* "code": 200
|
||||
* "msg": "ok"
|
||||
* "data": {
|
||||
* "110000": "北京市",
|
||||
* "120000": "天津市",
|
||||
* "130000": "河北省",
|
||||
* "140000": "山西省",
|
||||
* }
|
||||
* }
|
||||
*/
|
||||
func (*Config) Area(c *gin.Context) {
|
||||
form := &struct {
|
||||
Key string `json:"key" form:"key"`
|
||||
@ -21,5 +49,5 @@ func (*Config) Area(c *gin.Context) {
|
||||
return
|
||||
}
|
||||
data := config.NewInstance()(getSession()(c).(*service.Session)).Area(form.Key)
|
||||
APIResponse(nil, data)
|
||||
APIResponse(nil, data)(c)
|
||||
}
|
||||
|
Reference in New Issue
Block a user