32 lines
607 B
Go
32 lines
607 B
Go
package partner
|
|
|
|
import (
|
|
"git.rosy.net.cn/jx-callback/business/jxutils/jxcontext"
|
|
)
|
|
|
|
var (
|
|
HandlerMap map[int]UnionInterface
|
|
)
|
|
|
|
const (
|
|
LinkTypeWeiXinMini = 1 //微信小程序
|
|
LinkTypeH5 = 2 //H5
|
|
)
|
|
|
|
type ActivityList struct {
|
|
ActID int `json:"actID"`
|
|
}
|
|
|
|
func init() {
|
|
HandlerMap = make(map[int]UnionInterface)
|
|
}
|
|
|
|
type UnionInterface interface {
|
|
ShareUnionLink(ctx *jxcontext.Context, linkType int) (link string, err error)
|
|
GetUnionActList(ctx *jxcontext.Context, actType int) (result interface{}, err error)
|
|
}
|
|
|
|
func GetHandler(vendorID int) UnionInterface {
|
|
return HandlerMap[vendorID]
|
|
}
|