1
0
mirror of https://github.com/silenceper/wechat.git synced 2026-02-09 15:12:26 +08:00

微信开放平台-代处理小程序

This commit is contained in:
silenceper
2020-05-23 12:02:55 +08:00
parent 85b0a114dc
commit c372d7a83c
6 changed files with 161 additions and 0 deletions

View File

@@ -3,6 +3,7 @@ package openplatform
import (
"github.com/silenceper/wechat/v2/openplatform/config"
"github.com/silenceper/wechat/v2/openplatform/context"
"github.com/silenceper/wechat/v2/openplatform/miniprogram"
"github.com/silenceper/wechat/v2/openplatform/officialaccount"
)
@@ -26,3 +27,8 @@ func NewOpenPlatform(cfg *config.Config) *OpenPlatform {
func (openPlatform *OpenPlatform) GetOfficialAccount(appID string) *officialaccount.OfficialAccount {
return officialaccount.NewOfficialAccount(openPlatform.Context, appID)
}
//GetMiniProgram 小程序代理
func (openPlatform *OpenPlatform) GetMiniProgram(opCtx *context.Context, appID string) *miniprogram.MiniProgram {
return miniprogram.NewMiniProgram(opCtx, appID)
}