修复聚推客取链报错问题
This commit is contained in:
parent
ce8c7bfd50
commit
ea00ab3a31
@ -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)
|
||||
|
||||
@ -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)
|
||||
|
||||
@ -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"` //支付宝小程序信息(部分活动没有,请注意判断)
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user