守兔演出链接生成
This commit is contained in:
parent
532e0b68f2
commit
b557a96fea
@ -33,10 +33,9 @@ func newShouTuShowApiImpl(log logx.Logger, client *Client) ShouTuShowApi {
|
|||||||
|
|
||||||
// 守兔演出不支持H5取链,生成的H5url为小程序中间页URL
|
// 守兔演出不支持H5取链,生成的H5url为小程序中间页URL
|
||||||
func (a *ShouTuShowApiImpl) GenerateLink(ctx context.Context, req GenerateLinkRequest) (*GenerateLinkResponse, error) {
|
func (a *ShouTuShowApiImpl) GenerateLink(ctx context.Context, req GenerateLinkRequest) (*GenerateLinkResponse, error) {
|
||||||
if req.ActivityUrl == "" || req.Sid == "" {
|
if req.ActivityUrl == "" || req.LinkCode == "" || req.ActId == "" {
|
||||||
return nil, errors.New("请求参数activityUrl或sid不能为空")
|
return nil, errors.New("请求参数activityUrl或linkCode或actId不能为空")
|
||||||
}
|
}
|
||||||
|
|
||||||
activityUrl := fmt.Sprintf("%s?linkCode=%s&actId=%s", req.ActivityUrl, req.LinkCode, req.ActId)
|
activityUrl := fmt.Sprintf("%s?linkCode=%s&actId=%s", req.ActivityUrl, req.LinkCode, req.ActId)
|
||||||
return &GenerateLinkResponse{
|
return &GenerateLinkResponse{
|
||||||
H5: activityUrl,
|
H5: activityUrl,
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user