This commit is contained in:
parent
6acc371b4e
commit
31878a4e77
@ -97,13 +97,14 @@ func (c *ItemController) GetTypes() mvc.Result {
|
|||||||
// @Accept json
|
// @Accept json
|
||||||
// @Produce json
|
// @Produce json
|
||||||
// @Param keyword query string true "搜索关键字"
|
// @Param keyword query string true "搜索关键字"
|
||||||
|
// @Param pagingParam query validate.PagingParam true "分页信息"
|
||||||
// @Success 200 {object} []model.ItemModel "{["id":1],["id":2]}"
|
// @Success 200 {object} []model.ItemModel "{["id":1],["id":2]}"
|
||||||
// @Failure 400 {object} map[string]interface{} "{"msg": "错误信息","code":0}"
|
// @Failure 400 {object} map[string]interface{} "{"msg": "错误信息","code":0}"
|
||||||
// @Router /api/item/search [get]
|
// @Router /api/item/search [get]
|
||||||
func (c *ItemController) Search() mvc.Result {
|
func (c *ItemController) Search() mvc.Result {
|
||||||
keyword := c.Ctx.URLParam("keyword")
|
keyword := c.Ctx.URLParam("keyword")
|
||||||
pagineParam := new(validate.PagingParam)
|
pagingParam := new(validate.PagingParam)
|
||||||
e := validate.ReadQuery(c.Ctx, pagineParam)
|
e := validate.ReadQuery(c.Ctx, pagingParam)
|
||||||
if e.Error() {
|
if e.Error() {
|
||||||
return e.Response()
|
return e.Response()
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user