package api

import (
	"git.rosy.net.cn/baseapi/platformapi/ali_logistics_query"
	enterprise "git.rosy.net.cn/baseapi/platformapi/enterprise_wechat"
	"git.rosy.net.cn/baseapi/platformapi/jxprintapi"
	"git.rosy.net.cn/baseapi/platformapi/kuaishou_mini"
	"git.rosy.net.cn/baseapi/platformapi/lakala"
	"git.rosy.net.cn/baseapi/platformapi/qywxapi"
	"git.rosy.net.cn/baseapi/platformapi/sfps2"
	"git.rosy.net.cn/baseapi/platformapi/tao_vegetable"
	"git.rosy.net.cn/baseapi/platformapi/tencent_map"
	"git.rosy.net.cn/baseapi/platformapi/tiktok"
	tiktokShop "git.rosy.net.cn/baseapi/platformapi/tiktok_shop/tiktok_api"
	"git.rosy.net.cn/baseapi/platformapi/trenditapi"
	"git.rosy.net.cn/baseapi/platformapi/uinapp"
	"git.rosy.net.cn/baseapi/platformapi/uuptapi"
	"git.rosy.net.cn/baseapi/platformapi/xpyunapi"
	"git.rosy.net.cn/jx-callback/business/jxutils/cache/redis"

	"time"

	"git.rosy.net.cn/baseapi/platformapi/fnpsapi"

	"git.rosy.net.cn/baseapi/platformapi/jdshopapi"

	"git.rosy.net.cn/baseapi/platformapi/aliupcapi"

	"git.rosy.net.cn/baseapi/platformapi/jdeclpapi"
	"git.rosy.net.cn/baseapi/platformapi/yinbaoapi"

	"git.rosy.net.cn/baseapi/platformapi/tonglianpayapi"

	"git.rosy.net.cn/baseapi/platformapi"
	"git.rosy.net.cn/baseapi/platformapi/alipayapi"
	"git.rosy.net.cn/baseapi/platformapi/dadaapi"
	"git.rosy.net.cn/baseapi/platformapi/dingdingapi"
	"git.rosy.net.cn/baseapi/platformapi/ebaiapi"
	"git.rosy.net.cn/baseapi/platformapi/elmapi"
	"git.rosy.net.cn/baseapi/platformapi/feieapi"
	"git.rosy.net.cn/baseapi/platformapi/jdapi"
	"git.rosy.net.cn/baseapi/platformapi/mtpsapi"
	"git.rosy.net.cn/baseapi/platformapi/mtwmapi"
	"git.rosy.net.cn/baseapi/platformapi/showapi"
	"git.rosy.net.cn/baseapi/platformapi/weimobapi"
	"git.rosy.net.cn/baseapi/platformapi/weixinapi"
	"git.rosy.net.cn/baseapi/platformapi/wxpayapi"
	"git.rosy.net.cn/baseapi/platformapi/xiaowmapi"
	"git.rosy.net.cn/baseapi/platformapi/yilianyunapi"
	"git.rosy.net.cn/baseapi/platformapi/zhongwuapi"
	"git.rosy.net.cn/jx-callback/business/jxutils/cache"
	"git.rosy.net.cn/jx-callback/globals"
	aliyunsmsclient "github.com/KenmyZhang/aliyun-communicate"

	beego "github.com/astaxie/beego/server/web"
	"github.com/qiniu/api.v7/auth/qbox"
)

var (
	JdAPI     *jdapi.API
	JdPageAPI *jdapi.API

	Jd2API    *jdapi.API
	Jd3API    *jdapi.API
	JdcsAPI   *jdapi.API
	JdydAPI   *jdapi.API
	FakeJdAPI *jdapi.API
	JdEclpAPI *jdeclpapi.API
	JdShopAPI *jdshopapi.API
	// JdShop2API *jdshopapi.API

	ElmAPI   *elmapi.API
	EbaiAPI  *ebaiapi.API
	Ebai2API *ebaiapi.API

	MtwmAPI              *mtwmapi.API
	Mtwm2API             *mtwmapi.API
	MtpsAPI              *mtpsapi.API
	DadaAPI              *dadaapi.API
	QywxAPI              *qywxapi.API   //企业微信
	WeixinAPI            *weixinapi.API // 微信公众号
	WeixinMiniAPI        *weixinapi.API // 小程序  (果园商家)
	WeixinMiniAPI2       *weixinapi.API // 小程序2 菜市商城
	WeixinMiniAPIsc      *weixinapi.API //小程序商城 (菜市商家)
	WeixinMiniAPIPrint   *weixinapi.API //小程序打印机
	WeixinApp            *weixinapi.API // app微信登录(商家端App微信授权)
	WeixinApp2           *weixinapi.API // app微信登录(菜市端App微信授权)
	WeixinMiniAppID2     string
	WeixinMiniAppID3     string
	WeixinMiniAppIDsc    string
	WeixinMiniPrintAppId string
	WxpayAPI             *wxpayapi.API       // 微信支付API
	TLpayAPI             *tonglianpayapi.API //通联收银宝api
	FnAPI                *fnpsapi.API        //蜂鸟配送api
	UuAPI                *uuptapi.API        //uu跑腿api
	SfPsAPI              *sfps2.API          //顺丰派送api
	YinBaoAPI            *yinbaoapi.API      //银豹平台api

	WeixinPageAPI *weixinapi.API // 用户微信扫码登录

	AliPayAPI *alipayapi.API

	// BaiDuNaviAPI      *baidunavi.API 百度
	TencentMapAPI *tencent_map.API // 腾讯
	//AutonaviAPI   *autonavi.API    //  高德

	QiniuAPI          *qbox.Mac
	ShowAPI           *showapi.API
	WeimobAPI         *weimobapi.API
	DingDingAPI       *dingdingapi.API
	DingDingQRCodeAPI *dingdingapi.API
	AliUpcAPI         *aliupcapi.API //阿里商品条码查询api

	FeieAPI       *feieapi.API
	XiaoWMAPI     *xiaowmapi.API
	YilianyunAPI  *yilianyunapi.API
	YilianyunAPI2 *yilianyunapi.API
	XpyunAPI      *xpyunapi.API
	TrendITAPI    *trenditapi.API
	ZhongwuAPI    *zhongwuapi.API
	JxPrintAPI    *jxprintapi.API

	Cacher    cache.ICacher
	SMSClient *aliyunsmsclient.SmsClient

	TiktokApi             *tiktok.API              // 抖音api
	TiktokJXDJApi         *tiktok.API              // 抖音京西到家api
	TiktokApiID           string                   // 抖音商城ID
	TiktokJXDJApiID       string                   // 抖音京西到家ID
	TiktokStore           *tiktokShop.API          // 抖店
	EnterpriseChatHeadApi *enterprise.API          // 企业微信api
	EnterpriseChatMin     *enterprise.API          // 企业微信小程序api
	LogisticsApi          *ali_logistics_query.API // 阿里云提供获取物流订单的配送信息
	KuaiShouApi           *kuaishou_mini.API       // 快手平台
	UniAppApi             *uinapp.API              // uinapp 消息通知
	TaoVegetableApi       *tao_vegetable.API       // 淘菜菜
	LaKaLaApi             *lakala.API              // 拉卡拉支付
)

func init() {
	Init() // 这里必须要调用
}

// 这样写的原因是在测试时，可以重新读取配置文件
func Init() {
	if !beego.AppConfig.DefaultBool("disableJd", false) {
		//初始化京东api
		JdAPI = jdapi.New("", "", "")

		conf := platformapi.NewDefAPIConfig()
		conf.MaxSleepSecondWhenExceedLimit = 60 * 30 // 最大重试间隙30分钟
		JdPageAPI = jdapi.NewPageOnly("", conf)

		if globals.Jd2OrgCode != "" {
			// Jd2API = jdapi.New(beego.AppConfig.DefaultString("jd2Token"), beego.AppConfig.DefaultString("jd2AppKey"), beego.AppConfig.DefaultString("jd2Secret"))
			Jd2API = jdapi.New("", "", "")
		}

		if globals.Jd3OrgCode != "" {
			// Jd3API = jdapi.New(beego.AppConfig.DefaultString("jd3Token"), beego.AppConfig.DefaultString("jd3AppKey"), beego.AppConfig.DefaultString("jd3Secret"))
			Jd3API = jdapi.New("", "", "")
		}

		if globals.JdcsOrgCode != "" {
			// JdcsAPI = jdapi.New(beego.AppConfig.DefaultString("jdcsToken"), beego.AppConfig.DefaultString("jdcsAppKey"), beego.AppConfig.DefaultString("jdcsSecret"))
			JdAPI = jdapi.New("", "", "")
		}

		if globals.JdydOrgCode != "" {
			// JdydAPI = jdapi.New(beego.AppConfig.DefaultString("jdydToken"), beego.AppConfig.DefaultString("jdydAppKey"), beego.AppConfig.DefaultString("jdydSecret"))
			JdAPI = jdapi.New("", "", "")
		}

		fakeJdToken := beego.AppConfig.DefaultString("fakeJdToken", "")
		if fakeJdToken != "" {
			FakeJdAPI = jdapi.NewFakeJD(fakeJdToken, beego.AppConfig.DefaultString("fakeJdBaseURL", ""))
		}
	} else {
		JdAPI = nil
	}

	if !beego.AppConfig.DefaultBool("disableJdEclp", false) {
		JdEclpAPI = jdeclpapi.New(beego.AppConfig.DefaultString("jdEclpAccessToken", ""), beego.AppConfig.DefaultString("jdEclpAppKey", ""), beego.AppConfig.DefaultString("jdEclpAppSecret", ""))
	} else {
		JdEclpAPI = nil
	}
	if !beego.AppConfig.DefaultBool("disableJdShop", false) {
		// JdShopAPI = jdshopapi.New(beego.AppConfig.DefaultString("jdShopAccessToken", ""), beego.AppConfig.DefaultString("jdShopAppKey", ""), beego.AppConfig.DefaultString("jdShopAppSecret", ""))
		JdShopAPI = jdshopapi.New(beego.AppConfig.DefaultString("jdShopAccessToken2", ""), beego.AppConfig.DefaultString("jdShopAppKey2", ""), beego.AppConfig.DefaultString("jdShopAppSecret2", ""))
	} else {
		JdShopAPI = nil
	}
	if !beego.AppConfig.DefaultBool("disableElm", false) {
		ElmAPI = elmapi.New(beego.AppConfig.DefaultString("elmToken", ""), beego.AppConfig.DefaultString("elmAppKey", ""), beego.AppConfig.DefaultString("elmSecret", ""), beego.AppConfig.DefaultBool("elmIsProd", false))
	} else {
		ElmAPI = nil
	}
	if !beego.AppConfig.DefaultBool("disableMtwm", false) {
		MtwmAPI = mtwmapi.New(beego.AppConfig.DefaultString("mtwmAppID", ""), beego.AppConfig.DefaultString("mtwmSecret", ""), beego.AppConfig.DefaultString("mtwmCallbackURL", ""), "")
		// if mtwmCookieStr := beego.AppConfig.DefaultString("mtwmCookieStr", ""); mtwmCookieStr != "" {
		// 	MtwmAPI.SetCookieWithStr(mtwmCookieStr)
		// }
		Mtwm2API = mtwmapi.New(beego.AppConfig.DefaultString("mtwmAppID2", ""), beego.AppConfig.DefaultString("mtwmSecret2", ""), beego.AppConfig.DefaultString("mtwmCallbackURL2", ""), "")
	} else {
		MtwmAPI = nil
	}
	if !beego.AppConfig.DefaultBool("disableWeimob", false) {
		//微盟上传大图片耗时较长
		weimobAPIConfig := platformapi.DefAPIConfig
		weimobAPIConfig.ClientTimeout = 120 * time.Second
		WeimobAPI = weimobapi.New(nil, beego.AppConfig.DefaultString("weimobAppID", ""), beego.AppConfig.DefaultString("weimobAppSecret", ""), &weimobAPIConfig)
	} else {
		WeimobAPI = nil
	}
	if !beego.AppConfig.DefaultBool("disableEbai", false) {
		EbaiAPI = ebaiapi.New(beego.AppConfig.DefaultString("ebaiSource", ""), beego.AppConfig.DefaultString("ebaiSecret", ""))
		// ebaiStorePageCookieWMUSS := beego.AppConfig.DefaultString("ebaiStorePageCookieWMUSS", "")
		// ebaiStorePageCookieWMSTOKEN := beego.AppConfig.DefaultString("ebaiStorePageCookieWMSTOKEN", "")
		// ebaiStorePageCookieExdTOKEN := beego.AppConfig.DefaultString("ebaiStorePageCookieExdTOKEN", "")
		// if ebaiStorePageCookieWMUSS != "" && ebaiStorePageCookieWMSTOKEN != "" && ebaiStorePageCookieExdTOKEN != "" {
		// 	EbaiAPI.SetCookie("WMUSS", ebaiStorePageCookieWMUSS)
		// 	EbaiAPI.SetCookie("WMSTOKEN", ebaiStorePageCookieWMSTOKEN)
		// EbaiAPI.SetCookie("PASSPORT_DELIMONT_TOKEN", ebaiStorePageCookieExdTOKEN)
		// }
		Ebai2API = ebaiapi.New(beego.AppConfig.DefaultString("ebaiSource", ""), beego.AppConfig.DefaultString("ebaiSecret", ""))
		// ebaiStorePageCookieWMUSS2 := beego.AppConfig.DefaultString("ebaiStorePageCookieWMUSS2", "")
		// ebaiStorePageCookieWMSTOKEN2 := beego.AppConfig.DefaultString("ebaiStorePageCookieWMSTOKEN2", "")
		// if ebaiStorePageCookieWMUSS2 != "" && ebaiStorePageCookieWMSTOKEN2 != "" && ebaiStorePageCookieExdTOKEN != "" {
		// 	Ebai2API.SetCookie("WMUSS", ebaiStorePageCookieWMUSS2)
		// 	Ebai2API.SetCookie("WMSTOKEN", ebaiStorePageCookieWMSTOKEN2)
		// Ebai2API.SetCookie("PASSPORT_DELIMONT_TOKEN", ebaiStorePageCookieExdTOKEN)
		// }
	} else {
		EbaiAPI = nil
		Ebai2API = nil
	}

	if !beego.AppConfig.DefaultBool("disableYb", false) {
		YinBaoAPI = yinbaoapi.New(beego.AppConfig.DefaultString("yinbaoAppKey", ""), beego.AppConfig.DefaultString("yinbaoAppID", ""))
	} else {
		YinBaoAPI = nil
	}

	if !beego.AppConfig.DefaultBool("disableMtps", false) {
		MtpsAPI = mtpsapi.New(beego.AppConfig.DefaultString("mtpsAppKey", ""), beego.AppConfig.DefaultString("mtpsSecret", ""))
		// if mtpsStoreToken := beego.AppConfig.DefaultString("mtpsStoreToken", ""); mtpsStoreToken != "" {
		// 	MtpsAPI.SetCookie("token", mtpsStoreToken)
		// }
	} else {
		MtpsAPI = nil
	}
	if !beego.AppConfig.DefaultBool("disableDada", false) {
		DadaAPI = dadaapi.New(beego.AppConfig.DefaultString("dadaAppKey", ""), beego.AppConfig.DefaultString("dadaAppSecret", ""), beego.AppConfig.DefaultString("dadaSourceID", ""), beego.AppConfig.DefaultString("dadaCallbackURL", ""), beego.AppConfig.DefaultBool("dadaIsProd", false))
	} else {
		DadaAPI = nil
	}

	if !beego.AppConfig.DefaultBool("disableWeixin", false) {
		WeixinAPI = weixinapi.New(beego.AppConfig.DefaultString("weixinAppID", ""), beego.AppConfig.DefaultString("weixinSecret", ""))
		// 这个主要是用于调试阶段使用，生产环境中用的是自动刷新那套
		if weixinToken := beego.AppConfig.DefaultString("weixinToken", ""); weixinToken != "" {
			WeixinAPI.CBSetToken(weixinToken)
		}
		if weixinMsgToken := beego.AppConfig.DefaultString("weixinMsgToken", ""); weixinMsgToken != "" {
			WeixinAPI.SetMsgTokenAndKey(weixinMsgToken, beego.AppConfig.DefaultString("weixinMsgKey", ""))
		}
	} else {
		WeimobAPI = nil
	}
	WeixinMiniAPI = weixinapi.New(beego.AppConfig.DefaultString("weixinMiniAppID", ""), beego.AppConfig.DefaultString("weixinMiniSecret", ""))
	if WeixinMiniAppID2 = beego.AppConfig.DefaultString("weixinMiniAppID2", ""); WeixinMiniAppID2 != "" {
		WeixinMiniAPI2 = weixinapi.New(WeixinMiniAppID2, beego.AppConfig.DefaultString("weixinMiniSecret2", ""))
	}
	WeixinPageAPI = weixinapi.New(beego.AppConfig.DefaultString("weixinPageAppID", ""), beego.AppConfig.DefaultString("weixinPageSecret", ""))
	if WeixinMiniAppID3 = beego.AppConfig.DefaultString("weixinMiniAppID3", ""); WeixinMiniAppID3 != "" {
		WeixinApp = weixinapi.New(WeixinMiniAppID3, beego.AppConfig.DefaultString("weixinMiniSecret3", ""))
	}

	WeixinApp2 = weixinapi.New("wxf3657c94aa01a3f0", "ce2b9c4cf991d72a09f67bab4d359015") // 暂时写死的

	if WeixinMiniAppIDsc = beego.AppConfig.DefaultString("weixinMiniAppIDsc", ""); WeixinMiniAppIDsc != "" {
		WeixinMiniAPIsc = weixinapi.New(WeixinMiniAppIDsc, beego.AppConfig.DefaultString("weixinMiniSecretsc", ""))
	}
	if WeixinMiniPrintAppId = beego.AppConfig.DefaultString("weixinAppIdPrint", ""); WeixinMiniPrintAppId != "" {
		WeixinMiniAPIPrint = weixinapi.New(WeixinMiniPrintAppId, beego.AppConfig.DefaultString("weixinAppSecretPrint", ""))
	}

	if globals.WxpayNotifyURL != "" {
		// WxpayAPI = wxpayapi.New(beego.AppConfig.DefaultString("wxpayAppID"), beego.AppConfig.DefaultString("wxpayAppKey"), beego.AppConfig.DefaultString("wxpayAppMchID"))
		WxpayAPI = wxpayapi.NewWithCertificate(beego.AppConfig.DefaultString("wxpayAppID", ""), beego.AppConfig.DefaultString("wxpayAppKey", ""), beego.AppConfig.DefaultString("wxpayAppMchID", ""),
			"conf/apiclient_cert.pem", "conf/apiclient_key.pem")
	}

	if globals.TLPayNotifyURL != "" {
		TLpayAPI = tonglianpayapi.New(beego.AppConfig.DefaultString("tonglianPayAppID", ""), beego.AppConfig.DefaultString("tonglianPayKey", ""), beego.AppConfig.DefaultString("tonglianPayCusID", ""))
	}

	//AutonaviAPI = autonavi.New(beego.AppConfig.DefaultString("autonaviKey", ""))
	//BaiDuNaviAPI = baidunavi.New(beego.AppConfig.DefaultString("baidunaviAK", ""), beego.AppConfig.DefaultString("baidunaviSK", ""))
	TencentMapAPI = tencent_map.New(beego.AppConfig.DefaultString("TencentKey", ""), beego.AppConfig.DefaultString("TencentSK", ""))

	QiniuAPI = qbox.NewMac(beego.AppConfig.DefaultString("qiniuAK", ""), beego.AppConfig.DefaultString("qiniuSK", ""))
	ShowAPI = showapi.New(beego.AppConfig.DefaultInt("showAppID", 0), beego.AppConfig.DefaultString("showAppSecret", ""))

	Cacher = redis.New(beego.AppConfig.DefaultString("redisHost", "localhost"), beego.AppConfig.DefaultInt("redisPort", 0), beego.AppConfig.DefaultString("redisPassword", ""))

	AliUpcAPI = aliupcapi.New(beego.AppConfig.DefaultString("aliUpcAppCode", ""))

	DingDingAPI = dingdingapi.NewWithAgentID(beego.AppConfig.DefaultInt64("dingdingAgentID", 0), beego.AppConfig.DefaultString("dingdingCorpID", ""), beego.AppConfig.DefaultString("dingdingAppKey", ""), beego.AppConfig.DefaultString("dingdingSecret", ""),
		beego.AppConfig.DefaultString("dingdingCallbackToken", ""), beego.AppConfig.DefaultString("dingdingCallbackAESKey", ""))
	DingDingQRCodeAPI = dingdingapi.New(beego.AppConfig.DefaultString("dingdingCorpID", ""), beego.AppConfig.DefaultString("dingdingQRCodeAppKey", ""), beego.AppConfig.DefaultString("dingdingQRCodeSecret", ""))

	if alipayAppID := beego.AppConfig.DefaultString("alipayAppID", ""); alipayAppID != "" {
		AliPayAPI = alipayapi.New(alipayAppID, []byte(beego.AppConfig.DefaultString("alipayPrivateKey", "")))
	}

	FnAPI = fnpsapi.New(beego.AppConfig.DefaultString("fnAppID", ""), beego.AppConfig.DefaultString("fnAppSecret", ""), beego.AppConfig.DefaultString("fnMerchantId", ""), beego.AppConfig.DefaultString("fnCode", ""))
	//测试
	//SfPsAPI = sfps2.New(beego.AppConfig.DefaultInt("sfpsTestAppID", 0), beego.AppConfig.DefaultString("sfpsTestAppKey", ""))
	SfPsAPI = sfps2.New(beego.AppConfig.DefaultInt("sfpsAppID", 0), beego.AppConfig.DefaultString("sfpsAppKey", ""))
	UuAPI = uuptapi.New(beego.AppConfig.DefaultString("uuAppID", ""), beego.AppConfig.DefaultString("uuAppKey", ""), beego.AppConfig.DefaultString("uuOpenID", ""))
	FeieAPI = feieapi.New(beego.AppConfig.DefaultString("feieUser", ""), beego.AppConfig.DefaultString("feieKey", ""))
	XiaoWMAPI = xiaowmapi.New(beego.AppConfig.DefaultInt("xiaoWMAppID", 0), beego.AppConfig.DefaultString("xiaoWMAppKey", ""))
	YilianyunAPI = yilianyunapi.New(beego.AppConfig.DefaultString("yilianyunClientID", ""), beego.AppConfig.DefaultString("yilianyunClientSecret", ""))
	YilianyunAPI2 = yilianyunapi.New(beego.AppConfig.DefaultString("yilianyunClientID2", ""), beego.AppConfig.DefaultString("yilianyunClientSecret2", ""))
	XpyunAPI = xpyunapi.New(beego.AppConfig.DefaultString("xpyunUserName", ""), beego.AppConfig.DefaultString("xpyunUserKey", ""))
	TrendITAPI = trenditapi.New(beego.AppConfig.DefaultString("trendIDAppID", ""), beego.AppConfig.DefaultString("trendIDAppSecret", ""))
	ZhongwuAPI = zhongwuapi.New(beego.AppConfig.DefaultInt("zhongwuAppID", 0), beego.AppConfig.DefaultString("zhongwuAppSecret", ""))
	JxPrintAPI = jxprintapi.New(beego.AppConfig.DefaultString("jxPrintAppID", ""), beego.AppConfig.DefaultString("jxPrintAppKey", ""))

	SMSClient = aliyunsmsclient.New("http://dysmsapi.aliyuncs.com/")

	QywxAPI = qywxapi.New(beego.AppConfig.DefaultString("qywxID", ""), beego.AppConfig.DefaultString("qywxSecret", ""), "")
	TiktokApi = tiktok.New(beego.AppConfig.DefaultString("tiktokAppSecret", ""), beego.AppConfig.DefaultString("tiktokAppKey", ""))
	//TiktokJXDJApi = tiktok.New(beego.AppConfig.DefaultString("tiktokJXDJSecret", ""), beego.AppConfig.DefaultString("tiktokJXDJKey", ""))
	if TiktokJXDJApiID = beego.AppConfig.DefaultString("TiktokJXDJApiID", ""); TiktokJXDJApiID != "" {
		TiktokJXDJApi = tiktok.New(beego.AppConfig.DefaultString("tiktokJXDJSecret", ""), beego.AppConfig.DefaultString("TiktokJXDJApiID", ""))
	}

	LogisticsApi = ali_logistics_query.New(beego.AppConfig.DefaultString("aliLogisticsAppKey", ""), beego.AppConfig.DefaultString("aliLogisticsAppSecret", ""), beego.AppConfig.DefaultString("aliLogisticsAppCode", ""))
	// 抖店 = "c397aa9f-3927-47c4-8cfe-4d84e02602e0"
	TiktokStore = tiktokShop.New(beego.AppConfig.DefaultString("tiktokShopAppId", ""), beego.AppConfig.DefaultString("tiktokShopAppSecret", ""), "")
	EnterpriseChatHeadApi = enterprise.New("ww9a156bfa070e1857", "0jBdCjSmoFiOoHIXyeCK9VbGQ82fVNJZ8uMl6JNN7X4") // 通讯录
	EnterpriseChatMin = enterprise.NewMin("ww9a156bfa070e1857", "JQsEmSTltHhNgdPIT320YJFphiYmRs-YZa-rCBwplss")  // 小程序
	KuaiShouApi = kuaishou_mini.New(beego.AppConfig.DefaultString("kuaiShouAppSecret", ""), beego.AppConfig.DefaultString("kuaiShouAppId", ""))
	UniAppApi = uinapp.NewUinappApi(beego.AppConfig.DefaultString("uniAppAppId", ""), beego.AppConfig.DefaultString("uniAppAppKey", ""), beego.AppConfig.DefaultString("uniAppAppSecret", ""), beego.AppConfig.DefaultString("uniAppMasterSecret", ""))
	TaoVegetableApi = tao_vegetable.NewTaoVegetable(beego.AppConfig.DefaultString("taoVegetableAppKey", ""), beego.AppConfig.DefaultString("taoVegetableSecret", ""), beego.AppConfig.DefaultString("taoVegetableServerUrl", ""))
	LaKaLaApi = lakala.New(lakala.AppID, lakala.SerialNo, lakala.SM4Key, lakala.ClientID, lakala.ClientSecret, "", "", lakala.OrgCode)
}
