-
Notifications
You must be signed in to change notification settings - Fork 0
/
app.go
30 lines (28 loc) · 791 Bytes
/
app.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
package BaseWeixinApp
import (
BaseConfig "github.com/fotomxq/weeekj_core/v5/base/config"
OrgCore "github.com/fotomxq/weeekj_core/v5/org/core"
)
// 获取商户的APPID等配置
func getAppConfig(orgID int64) (appID string, appKey string) {
if orgID > 0 {
androidKeys, _ := OrgCore.GetSystem(&OrgCore.ArgsGetSystem{
OrgID: orgID,
SystemMark: "android",
})
iosKeys, _ := OrgCore.GetSystem(&OrgCore.ArgsGetSystem{
OrgID: orgID,
SystemMark: "ios",
})
appID = androidKeys.Mark
appKey = androidKeys.Params.GetValNoBool("key")
if appID == "" {
appID = iosKeys.Mark
appKey = iosKeys.Params.GetValNoBool("key")
}
} else {
appID, _ = BaseConfig.GetDataString("WeixinAppAppID")
appKey, _ = BaseConfig.GetDataString("WeixinAppAppKey")
}
return
}