aa
This commit is contained in:
23
business/jxstore/partner/jds/jds.go
Normal file
23
business/jxstore/partner/jds/jds.go
Normal file
@@ -0,0 +1,23 @@
|
||||
package jds
|
||||
|
||||
import (
|
||||
"git.rosy.net.cn/jx-callback/business/jxstore/partner"
|
||||
"git.rosy.net.cn/jx-callback/business/jxutils/jxcontext"
|
||||
"git.rosy.net.cn/jx-callback/business/model"
|
||||
)
|
||||
|
||||
type UnionHandler struct {
|
||||
}
|
||||
|
||||
var (
|
||||
unionHandler *UnionHandler
|
||||
)
|
||||
|
||||
func init() {
|
||||
partner.HandlerMap[model.VendorIDJDShop] = unionHandler
|
||||
}
|
||||
|
||||
func (s *UnionHandler) ShareUnionLink(ctx *jxcontext.Context, linkType int) (link string, err error) {
|
||||
|
||||
return "jds", err
|
||||
}
|
||||
23
business/jxstore/partner/mt/mt.go
Normal file
23
business/jxstore/partner/mt/mt.go
Normal file
@@ -0,0 +1,23 @@
|
||||
package mt
|
||||
|
||||
import (
|
||||
"git.rosy.net.cn/jx-callback/business/jxstore/partner"
|
||||
"git.rosy.net.cn/jx-callback/business/jxutils/jxcontext"
|
||||
"git.rosy.net.cn/jx-callback/business/model"
|
||||
)
|
||||
|
||||
type UnionHandler struct {
|
||||
}
|
||||
|
||||
var (
|
||||
unionHandler *UnionHandler
|
||||
)
|
||||
|
||||
func init() {
|
||||
partner.HandlerMap[model.VendorIDMTWM] = unionHandler
|
||||
}
|
||||
|
||||
func (s *UnionHandler) ShareUnionLink(ctx *jxcontext.Context, linkType int) (link string, err error) {
|
||||
|
||||
return "mt", err
|
||||
}
|
||||
26
business/jxstore/partner/partner.go
Normal file
26
business/jxstore/partner/partner.go
Normal file
@@ -0,0 +1,26 @@
|
||||
package partner
|
||||
|
||||
import (
|
||||
"git.rosy.net.cn/jx-callback/business/jxutils/jxcontext"
|
||||
)
|
||||
|
||||
var (
|
||||
HandlerMap map[int]UnionInterface
|
||||
)
|
||||
|
||||
const (
|
||||
LinkTypeWeiXinMini = 1 //微信小程序
|
||||
LinkTypeH5 = 2 //H5
|
||||
)
|
||||
|
||||
func init() {
|
||||
HandlerMap = make(map[int]UnionInterface)
|
||||
}
|
||||
|
||||
type UnionInterface interface {
|
||||
ShareUnionLink(ctx *jxcontext.Context, linkType int) (link string, err error)
|
||||
}
|
||||
|
||||
func GetHandler(vendorID int) UnionInterface {
|
||||
return HandlerMap[vendorID]
|
||||
}
|
||||
1
business/jxstore/partner/pdd/pdd.go
Normal file
1
business/jxstore/partner/pdd/pdd.go
Normal file
@@ -0,0 +1 @@
|
||||
package pdd
|
||||
1
business/jxstore/partner/taobao/taobao.go
Normal file
1
business/jxstore/partner/taobao/taobao.go
Normal file
@@ -0,0 +1 @@
|
||||
package taobao
|
||||
Reference in New Issue
Block a user