From ea00ab3a3161ee9407fa0d4ee8ab99d6892c5b27 Mon Sep 17 00:00:00 2001 From: yanfan <1406317364@qq.com> Date: Tue, 24 Jun 2025 11:35:45 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E8=81=9A=E6=8E=A8=E5=AE=A2?= =?UTF-8?q?=E5=8F=96=E9=93=BE=E6=8A=A5=E9=94=99=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- platform/jutuike/api.go | 9 +++++++++ platform/jutuike/api_test.go | 2 +- platform/jutuike/types.go | 1 + 3 files changed, 11 insertions(+), 1 deletion(-) diff --git a/platform/jutuike/api.go b/platform/jutuike/api.go index 1588183..7b07485 100644 --- a/platform/jutuike/api.go +++ b/platform/jutuike/api.go @@ -65,6 +65,15 @@ func (a *jutuikeApiImpl) GenerateLink(ctx context.Context, req GenerateLinkReque result.PosterQrcodeUrl = cast.ToString(posterQrcodeUrl) } } + if taoBaoPoster, ok := data["taobao_poster_qrcode_url"]; ok { + if result.PosterQrcodeUrl == "" { + result.PosterQrcodeUrl = cast.ToString(taoBaoPoster) + } + } + if tkl, ok := data["tkl"]; ok { + result.Tkl = cast.ToString(tkl) + } + if h5Url, ok := data["h5"]; ok { if h5Url != nil { result.H5 = cast.ToString(h5Url) diff --git a/platform/jutuike/api_test.go b/platform/jutuike/api_test.go index 11438cb..00f00ca 100644 --- a/platform/jutuike/api_test.go +++ b/platform/jutuike/api_test.go @@ -28,7 +28,7 @@ func (a *apiClientSuite) SetupSuite() { func (a *apiClientSuite) Test_GenerateLink() { req := GenerateLinkRequest{ - ActId: 74, + ActId: 60, Sid: "10001zdt100034", } result, err := a.api.GenerateLink(context.Background(), req) diff --git a/platform/jutuike/types.go b/platform/jutuike/types.go index d0b32be..447bb66 100644 --- a/platform/jutuike/types.go +++ b/platform/jutuike/types.go @@ -20,6 +20,7 @@ type GenerateLinkData struct { LongH5 string `json:"long_h5"` // 推广长链接(部分活动没有,请注意判断) H5Evoke string `json:"h5_evoke"` DeepLink string `json:"deeplink"` + Tkl string `json:"tkl"` WeAppInfo *WeAppInfo `json:"we_app_info"` // 微信小程序信息(部分活动没有,请注意判断) AlipayAppInfo *AlipayAppInfo `json:"alipay_app_info"` //支付宝小程序信息(部分活动没有,请注意判断) }