Kaynağa Gözat

穿山甲本地生活

master
huangjiajun 2 ay önce
ebeveyn
işleme
16d7517280
1 değiştirilmiş dosya ile 30 ekleme ve 0 silme
  1. +30
    -0
      tik_tok/csjp_life.go

+ 30
- 0
tik_tok/csjp_life.go Dosyayı Görüntüle

@@ -139,3 +139,33 @@ func CsjpLifeGetOrder(args map[string]string) (*[]csjp.CsjpOrder, int64, bool) {
hasMore := gjson.Get(send, "data.has_more").Bool()
return &list, cursor, hasMore
}

//4.5 活动转链接口
func CsjpLifeGetActLink(args map[string]string) (map[string]string, error) {
params := map[string]interface{}{
"distribution_activity_id": args["distribution_activity_idf"],
"command_external_info": args["command_external_info"],
}
if args["need_qr_code"] == "1" {
params["need_qr_code"] = true
}
if args["need_share_link"] == "1" {
params["need_share_link"] = true
}
if args["need_zlink"] == "1" {
params["need_zlink"] = true
}
if args["need_share_command"] == "1" {
params["need_share_command"] = true
}
send, err := CsjpSend(args["app_id"], args["app_secret"], "life/activity_command_share", params)
fmt.Println(send)
res := map[string]string{
"dy_share_command": gjson.Get(send, "data.command_share_info.dy_share_command").String(),
"qr_code_url": gjson.Get(send, "data.command_share_info.qr_code_url").String(),
"share_link": gjson.Get(send, "data.command_share_info.share_link").String(),
"dy_deeplink": gjson.Get(send, "data.command_share_info.dy_deeplink").String(),
"dy_zlink": gjson.Get(send, "data.command_share_info.dy_zlink").String(),
}
return res, err
}

Yükleniyor…
İptal
Kaydet