|
@@ -78,7 +78,7 @@ func TrusteeshipProduct(args map[string]string) ([]TikTokGoods, int64) { |
|
|
return goodsList, lmData.Data.Total |
|
|
return goodsList, lmData.Data.Total |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
func ActivityProduct(args map[string]string) ([]TikTokGoods, int64) { |
|
|
|
|
|
|
|
|
func ActivityProduct(args map[string]string) ([]TikTokGoods, int64, string) { |
|
|
//args = map[string]string{ |
|
|
//args = map[string]string{ |
|
|
// "appkey": "7136155008692651560", |
|
|
// "appkey": "7136155008692651560", |
|
|
// "appSecret": "b132549f-f62c-491e-86f1-89af3658896a", |
|
|
// "appSecret": "b132549f-f62c-491e-86f1-89af3658896a", |
|
@@ -101,24 +101,25 @@ func ActivityProduct(args map[string]string) ([]TikTokGoods, int64) { |
|
|
var goodsList = make([]TikTokGoods, 0) |
|
|
var goodsList = make([]TikTokGoods, 0) |
|
|
product := gjson.Get(send, "data.data").String() |
|
|
product := gjson.Get(send, "data.data").String() |
|
|
if err != nil || product == "" { |
|
|
if err != nil || product == "" { |
|
|
return goodsList, 0 |
|
|
|
|
|
|
|
|
return goodsList, 0, "" |
|
|
} |
|
|
} |
|
|
var lmData struct { |
|
|
var lmData struct { |
|
|
Data struct { |
|
|
Data struct { |
|
|
Data []TikTokGoodsLm `json:"data"` |
|
|
|
|
|
Total int64 `json:"total"` |
|
|
|
|
|
|
|
|
Data []TikTokGoodsLm `json:"data"` |
|
|
|
|
|
Total int64 `json:"total"` |
|
|
|
|
|
NextCursor string `json:"next_cursor"` |
|
|
} `json:"data"` |
|
|
} `json:"data"` |
|
|
} |
|
|
} |
|
|
err = json.Unmarshal([]byte(send), &lmData) |
|
|
err = json.Unmarshal([]byte(send), &lmData) |
|
|
if err != nil { |
|
|
if err != nil { |
|
|
return goodsList, 0 |
|
|
|
|
|
|
|
|
return goodsList, 0, "" |
|
|
} |
|
|
} |
|
|
for _, v := range lmData.Data.Data { |
|
|
for _, v := range lmData.Data.Data { |
|
|
tmp := CommGoodsDetail(v) |
|
|
tmp := CommGoodsDetail(v) |
|
|
goodsList = append(goodsList, tmp) |
|
|
goodsList = append(goodsList, tmp) |
|
|
} |
|
|
} |
|
|
fmt.Println(string(zhios_third_party_utils.Serialize(goodsList))) |
|
|
fmt.Println(string(zhios_third_party_utils.Serialize(goodsList))) |
|
|
return goodsList, lmData.Data.Total |
|
|
|
|
|
|
|
|
return goodsList, lmData.Data.Total, lmData.Data.NextCursor |
|
|
} |
|
|
} |
|
|
func ProductUrl(args map[string]string) map[string]string { |
|
|
func ProductUrl(args map[string]string) map[string]string { |
|
|
//args = map[string]string{ |
|
|
//args = map[string]string{ |
|
|