40 lines
715 B
Go
40 lines
715 B
Go
package mt
|
|
|
|
import (
|
|
"f5"
|
|
"main/mtb"
|
|
"strings"
|
|
)
|
|
|
|
type Config struct {
|
|
mtb.Config
|
|
}
|
|
|
|
type ConfigTable struct {
|
|
f5.IdMetaTable[Config]
|
|
selfConf *Config
|
|
}
|
|
|
|
func (this *ConfigTable) GetGameApiUrl() string {
|
|
return this.selfConf.GetGameapiUrl()
|
|
}
|
|
|
|
func (this *ConfigTable) GetWxUrl() []string {
|
|
return strings.Split(this.selfConf.GetWxUrl(), "|")
|
|
}
|
|
|
|
func (this *ConfigTable) GetWxNotifyToken() string {
|
|
return this.selfConf.GetWxNotifyToken()
|
|
}
|
|
|
|
func (this *ConfigTable) GetWxNotifyEncodingAesKey() string {
|
|
return this.selfConf.GetWxNotifyEncodingAesKey()
|
|
}
|
|
|
|
func (this *ConfigTable) PostInit1() {
|
|
this.selfConf = this.GetById(int64(0))
|
|
if this.selfConf == nil {
|
|
panic("无法读取config.json")
|
|
}
|
|
}
|