浏览代码

更新

master
huangjiajun 1年前
父节点
当前提交
b85c83327c
共有 1 个文件被更改,包括 7 次插入6 次删除
  1. +7
    -6
      tik_tok/svc_tik_tok_team.go

+ 7
- 6
tik_tok/svc_tik_tok_team.go 查看文件

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


正在加载...
取消
保存