diff --git a/business/jxstore/vendor/mt/mt.go b/business/jxstore/vendor/mt/mt.go index 73ffade96..808d37664 100644 --- a/business/jxstore/vendor/mt/mt.go +++ b/business/jxstore/vendor/mt/mt.go @@ -1 +1,18 @@ package mt + +import ( + "git.rosy.net.cn/jx-callback/business/jxstore/vendor" + "git.rosy.net.cn/jx-callback/business/jxutils/jxcontext" +) + +type UnionHandler struct { +} + +var ( + UnionHandlerObj UnionHandler + UnionHandlerObj = vendor.UnionInterfaceHandler +) + +func (s *UnionHandler) ShareUnionLink(ctx *jxcontext.Context, linkType int) (err error) { + return err +} diff --git a/business/jxstore/vendor/partner.go b/business/jxstore/vendor/partner.go index 0a00424a4..e99338cfc 100644 --- a/business/jxstore/vendor/partner.go +++ b/business/jxstore/vendor/partner.go @@ -1 +1,18 @@ package vendor + +import ( + "git.rosy.net.cn/jx-callback/business/jxutils/jxcontext" +) + +const ( + LinkTypeWeiXinMini = 1 //微信小程序 + LinkTypeH5 = 2 //H5 +) + +var ( + UnionInterfaceHandler UnionInterface +) + +type UnionInterface interface { + ShareUnionLink(ctx *jxcontext.Context, linkType int) (err error) +} diff --git a/conf/app.conf b/conf/app.conf index 668f57b12..f05e93681 100644 --- a/conf/app.conf +++ b/conf/app.conf @@ -296,3 +296,5 @@ ejyAfterKey = "QM5RnGl6kNh3ENLT" txCloudSecretID = "AKIDFNmm1U7vhITlVItry0ng5Q268lGjDZyQUR6" txCloudSecretKey = "25p3aynr97hOMJEfpvr0LoXD0gI62l7wcHA7nsM6" +mtUnionAppKey = "b6481f92b47918cd6e42e7ea4fae6084" +mtUnionAppSecret = "84d390777ddf691ff092e744ba26bfdd" \ No newline at end of file diff --git a/globals/api/api.go b/globals/api/api.go index b7d2cca4b..b212ed70e 100644 --- a/globals/api/api.go +++ b/globals/api/api.go @@ -4,6 +4,8 @@ import ( "io/ioutil" "time" + "git.rosy.net.cn/baseapi/platformapi/mtunionapi" + "git.rosy.net.cn/baseapi/platformapi/txcloudapi" "git.rosy.net.cn/baseapi/platformapi/ejyapi" @@ -103,6 +105,8 @@ var ( Cacher cache.ICacher SMSClient *aliyunsmsclient.SmsClient + + MtUnionAPI *mtunionapi.API ) func init() { @@ -260,4 +264,5 @@ func Init() { PushAPI = unipushapi.New(beego.AppConfig.DefaultString("pushAppID", ""), beego.AppConfig.DefaultString("pushAppKey", ""), beego.AppConfig.DefaultString("pushAppSecret", ""), beego.AppConfig.DefaultString("pushMasterSecret", "")) MtMemberAPI = mtmemberapi.New() SMSClient = aliyunsmsclient.New("http://dysmsapi.aliyuncs.com/") + MtUnionAPI = mtunionapi.New(beego.AppConfig.DefaultString("mtUnionAppKey", ""), beego.AppConfig.DefaultString("mtUnionAppSecret", "")) }