Browse Source

拼多多商品

master
huangjiajun 5 months ago
parent
commit
0e33cdb806
1 changed files with 6 additions and 0 deletions
  1. +6
    -0
      pdd_union/goods.go

+ 6
- 0
pdd_union/goods.go View File

@@ -13,6 +13,9 @@ func GetRecommendGoods(keyArr map[string]string, param map[string]interface{}) [
json.Unmarshal([]byte(send), &res)
data := make([]map[string]interface{}, 0)
for _, v := range res.GoodsBasicDetailResponse.List {
if v.GoodsName == "" {
continue
}
tmp := make(map[string]interface{})
tmp["gid"] = zhios_third_party_utils.Int64ToStr(v.GoodsId)
tmp["goods_title"] = v.GoodsName
@@ -56,6 +59,9 @@ func GetSearchGoods(keyArr map[string]string, param map[string]interface{}) []ma
json.Unmarshal([]byte(send), &res)
data := make([]map[string]interface{}, 0)
for _, v := range res.GoodsSearchResponse.GoodsList {
if v.GoodsName == "" {
continue
}
tmp := make(map[string]interface{})
tmp["gid"] = zhios_third_party_utils.Int64ToStr(v.GoodsId)
tmp["goods_title"] = v.GoodsName


Loading…
Cancel
Save