This commit is contained in:
richboo111
2023-09-04 17:34:32 +08:00
parent 480cfd4571
commit 06c0903a61
2 changed files with 6 additions and 5 deletions

View File

@@ -455,10 +455,11 @@ type CategoryAttrValueListResult struct {
//https://open-shangou.meituan.com/home/docDetail/387
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{}{
"attr_id": attr_id,
"keyword": keyword,
"page_num": 1,
"page_size": 20,
"attr_id": attr_id,
"keyword": keyword,
"page_num": 1,
"page_size": 20,
"category_type": 1,
})
if err == nil {
utils.Map2StructByJson(result, &categoryAttrValueListResult, false)

View File

@@ -387,7 +387,7 @@ func TestCategoryAttrList(t *testing.T) {
//特殊属性查询
func TestCategoryAttrValueList(t *testing.T) {
result, err := api.CategoryAttrValueList(1200000094, "青团")
result, err := api.CategoryAttrValueList(1200000088, "散装糖果")
if err != nil {
t.Fatal(err)
}