diff --git a/server/product/internal/handler/routes.go b/server/product/internal/handler/routes.go index 2977ab20..015571f1 100644 --- a/server/product/internal/handler/routes.go +++ b/server/product/internal/handler/routes.go @@ -48,7 +48,7 @@ func RegisterHandlers(server *rest.Server, serverCtx *svc.ServiceContext) { Handler: SaveDesignHandler(serverCtx), }, { - Method: http.MethodPost, + Method: http.MethodGet, Path: "/product/other-list", Handler: OtherProductListHandler(serverCtx), }, diff --git a/server/product/internal/types/types.go b/server/product/internal/types/types.go index fce4b77e..1ba88b9d 100644 --- a/server/product/internal/types/types.go +++ b/server/product/internal/types/types.go @@ -216,9 +216,9 @@ type ColorFill struct { } type OtherProductListReq struct { - Cid int64 `json:"cid"` - Num int64 `json:"num"` - Size uint32 `json:"size"` + Cid int64 `form:"cid"` + Num int64 `form:"num"` + Size uint32 `form:"size"` } type OtherProductListRsp struct { diff --git a/server_api/product.api b/server_api/product.api index 5f0e34e7..09a12d40 100644 --- a/server_api/product.api +++ b/server_api/product.api @@ -33,7 +33,7 @@ service product { post /product/save-design(SaveDesignReq) returns (response); //其他产品推荐列表 @handler OtherProductListHandler - post /product/other-list (OtherProductListReq) returns (response); + get /product/other-list (OtherProductListReq) returns (response); } //获取产品列表 @@ -228,9 +228,9 @@ type ColorFill { } //其他产品推荐列表 type OtherProductListReq { - Cid int64 `json:"cid"` - Num int64 `json:"num"` - Size uint32 `json:"size"` + Cid int64 `form:"cid"` + Num int64 `form:"num"` + Size uint32 `form:"size"` } type OtherProductListRsp { Title string `json:"title"`