This commit is contained in:
邹宗楠
2023-05-22 14:42:26 +08:00
parent d936e5fc54
commit 784d60912c
3 changed files with 20 additions and 24 deletions

View File

@@ -123,15 +123,13 @@ func (a *Auther) GetUserType() (userType int8) {
return model.UserTypeStoreBoss
}
func GetAPI(authType string) *weixinapi.API {
if authType == AuthTypeWeixin {
return api.WeixinPageAPI
func GetAPI(appID string) *weixinapi.API {
miniApi := api.WeixinMiniAPI
if len(appID) > 0 && appID == api.WeixinMiniAppID2 {
miniApi = api.WeixinMiniAPI2
}
if authType == AuthTypeWxApp {
return api.WeixinApp
if len(appID) > 0 && appID == api.WeixinMiniAppIDsc {
miniApi = api.WeixinMiniAPIsc
}
if authType == AuthTypeWxAppCaishi {
return api.WeixinApp2
}
return api.WeixinAPI
return miniApi
}