1
This commit is contained in:
@@ -455,10 +455,11 @@ type CategoryAttrValueListResult struct {
|
|||||||
//https://open-shangou.meituan.com/home/docDetail/387
|
//https://open-shangou.meituan.com/home/docDetail/387
|
||||||
func (a *API) CategoryAttrValueList(attr_id int64, keyword string) (categoryAttrValueListResult []*CategoryAttrValueListResult, err error) {
|
func (a *API) CategoryAttrValueList(attr_id int64, keyword string) (categoryAttrValueListResult []*CategoryAttrValueListResult, err error) {
|
||||||
result, err := a.AccessAPI("gw/category/attr/value/list", true, map[string]interface{}{
|
result, err := a.AccessAPI("gw/category/attr/value/list", true, map[string]interface{}{
|
||||||
"attr_id": attr_id,
|
"attr_id": attr_id,
|
||||||
"keyword": keyword,
|
"keyword": keyword,
|
||||||
"page_num": 1,
|
"page_num": 1,
|
||||||
"page_size": 20,
|
"page_size": 20,
|
||||||
|
"category_type": 1,
|
||||||
})
|
})
|
||||||
if err == nil {
|
if err == nil {
|
||||||
utils.Map2StructByJson(result, &categoryAttrValueListResult, false)
|
utils.Map2StructByJson(result, &categoryAttrValueListResult, false)
|
||||||
|
|||||||
@@ -387,7 +387,7 @@ func TestCategoryAttrList(t *testing.T) {
|
|||||||
|
|
||||||
//特殊属性查询
|
//特殊属性查询
|
||||||
func TestCategoryAttrValueList(t *testing.T) {
|
func TestCategoryAttrValueList(t *testing.T) {
|
||||||
result, err := api.CategoryAttrValueList(1200000094, "青团")
|
result, err := api.CategoryAttrValueList(1200000088, "散装糖果")
|
||||||
if err != nil {
|
if err != nil {
|
||||||
t.Fatal(err)
|
t.Fatal(err)
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user