|
@@ -1,6 +1,7 @@ |
|
|
package tik_tok |
|
|
package tik_tok |
|
|
|
|
|
|
|
|
import ( |
|
|
import ( |
|
|
|
|
|
zhios_third_party_utils "code.fnuoos.com/go_rely_warehouse/zyos_go_third_party_api.git/utils" |
|
|
"encoding/json" |
|
|
"encoding/json" |
|
|
"fmt" |
|
|
"fmt" |
|
|
"github.com/tidwall/gjson" |
|
|
"github.com/tidwall/gjson" |
|
@@ -38,12 +39,13 @@ func ActivityProduct(args map[string]string) []TikTokGoods { |
|
|
//args = map[string]string{ |
|
|
//args = map[string]string{ |
|
|
// "appkey": "7136155008692651560", |
|
|
// "appkey": "7136155008692651560", |
|
|
// "appSecret": "b132549f-f62c-491e-86f1-89af3658896a", |
|
|
// "appSecret": "b132549f-f62c-491e-86f1-89af3658896a", |
|
|
// "activity_id": "468745", |
|
|
|
|
|
|
|
|
// "activity_id": "437153", |
|
|
// "search_type": "0", |
|
|
// "search_type": "0", |
|
|
// "sort_type": "1", |
|
|
// "sort_type": "1", |
|
|
// "page": "1", |
|
|
// "page": "1", |
|
|
// "count": "20", |
|
|
// "count": "20", |
|
|
// "acctoken": "21af5cb7-6a14-455f-90f7-6807b5e6655f", |
|
|
|
|
|
|
|
|
// "status": "1", |
|
|
|
|
|
// "acctoken": "ff1a797c-a088-47bf-8c31-9784fa630c5e", |
|
|
//} |
|
|
//} |
|
|
params := map[string]interface{}{"status": args["status"], "activity_id": args["activity_id"], "search_type": args["search_type"], "sort_type": args["sort_type"], "page": args["page"], "count": args["count"]} |
|
|
params := map[string]interface{}{"status": args["status"], "activity_id": args["activity_id"], "search_type": args["search_type"], "sort_type": args["sort_type"], "page": args["page"], "count": args["count"]} |
|
|
send, err := Send(args["appkey"], args["appSecret"], "alliance.colonelActivityProduct", params, args["acctoken"]) |
|
|
send, err := Send(args["appkey"], args["appSecret"], "alliance.colonelActivityProduct", params, args["acctoken"]) |
|
@@ -64,9 +66,14 @@ func ActivityProduct(args map[string]string) []TikTokGoods { |
|
|
return goodsList |
|
|
return goodsList |
|
|
} |
|
|
} |
|
|
for _, v := range lmData.Data.Data { |
|
|
for _, v := range lmData.Data.Data { |
|
|
|
|
|
if v.ActivityCosRatio > 0 { |
|
|
|
|
|
v.CosRatio = v.ActivityCosRatio / 100 |
|
|
|
|
|
} |
|
|
tmp := CommGoodsDetail(v) |
|
|
tmp := CommGoodsDetail(v) |
|
|
|
|
|
|
|
|
goodsList = append(goodsList, tmp) |
|
|
goodsList = append(goodsList, tmp) |
|
|
} |
|
|
} |
|
|
|
|
|
fmt.Println(string(zhios_third_party_utils.Serialize(goodsList))) |
|
|
return goodsList |
|
|
return goodsList |
|
|
} |
|
|
} |
|
|
func ProductUrl(args map[string]string) map[string]string { |
|
|
func ProductUrl(args map[string]string) map[string]string { |
|
|