aa
This commit is contained in:
@@ -1,12 +1,26 @@
|
||||
package taobao
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"git.rosy.net.cn/baseapi/utils"
|
||||
"git.rosy.net.cn/jx-callback/business/jxstore/partner"
|
||||
"git.rosy.net.cn/jx-callback/business/jxutils/jxcontext"
|
||||
"git.rosy.net.cn/jx-callback/globals/api"
|
||||
)
|
||||
|
||||
func (s *UnionHandler) ShareUnionLink(ctx *jxcontext.Context, linkType, unionActID int, userID string) (link string, err error) {
|
||||
func (s *UnionHandler) ShareUnionLink(ctx *jxcontext.Context, linkType, unionActID int, sID, userID string) (link string, err error) {
|
||||
if result, err2 := api.TbUnionAPI.ActivityInfoGet(userID, utils.Int2Str(unionActID), utils.Str2Int64(sID)); err2 == nil {
|
||||
switch linkType {
|
||||
case partner.LinkTypeWeiXinMini:
|
||||
return result.TbkActivityInfoGetResponse.Data.WxQrcodeURL, err
|
||||
case partner.LinTypeH5:
|
||||
return result.TbkActivityInfoGetResponse.Data.ClickURL, err
|
||||
case partner.LinTypeWx:
|
||||
return result.TbkActivityInfoGetResponse.Data.WxMiniprogramPath, err
|
||||
default:
|
||||
return link, fmt.Errorf("暂不支持此链接类型!")
|
||||
}
|
||||
}
|
||||
return link, err
|
||||
}
|
||||
|
||||
@@ -14,7 +28,7 @@ func (s *UnionHandler) GetUnionActList(ctx *jxcontext.Context, actType int) (act
|
||||
if result, err2 := getAPI().GatewayUnionpub(); err2 == nil {
|
||||
for _, v := range result {
|
||||
act := &partner.ActivityList{
|
||||
ActID: utils.Str2Int(v.Eventid),
|
||||
ActID: utils.Str2Int(v.Pageid),
|
||||
ActName: v.Pagename,
|
||||
ActDes: v.Eventenname,
|
||||
Ratio: "6%",
|
||||
|
||||
Reference in New Issue
Block a user