1
This commit is contained in:
parent
13f4c0cca4
commit
8dde79e9d0
@ -3,10 +3,12 @@ package mt
|
|||||||
import (
|
import (
|
||||||
"f5"
|
"f5"
|
||||||
"main/mtb"
|
"main/mtb"
|
||||||
|
"net/url"
|
||||||
)
|
)
|
||||||
|
|
||||||
type Config struct {
|
type Config struct {
|
||||||
mtb.Config
|
mtb.Config
|
||||||
|
redirectHost string
|
||||||
}
|
}
|
||||||
|
|
||||||
type ConfigTable struct {
|
type ConfigTable struct {
|
||||||
@ -14,6 +16,14 @@ type ConfigTable struct {
|
|||||||
selfConf *Config
|
selfConf *Config
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (this *Config) Init0() {
|
||||||
|
u, err := url.Parse(this.GetRedirectUrl())
|
||||||
|
if err != nil {
|
||||||
|
panic(err)
|
||||||
|
}
|
||||||
|
this.redirectHost = u.Host
|
||||||
|
}
|
||||||
|
|
||||||
func (this *ConfigTable) GetGameSApiUrl() string {
|
func (this *ConfigTable) GetGameSApiUrl() string {
|
||||||
return this.selfConf.GetGamesapiUrl()
|
return this.selfConf.GetGamesapiUrl()
|
||||||
}
|
}
|
||||||
@ -23,7 +33,7 @@ func (this *ConfigTable) GetRedirectUrl() string {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (this *ConfigTable) GetRedirectHost() string {
|
func (this *ConfigTable) GetRedirectHost() string {
|
||||||
return this.selfConf.GetRedirectUrl()
|
return this.selfConf.redirectHost
|
||||||
}
|
}
|
||||||
|
|
||||||
func (this *ConfigTable) GetSecretKey() string {
|
func (this *ConfigTable) GetSecretKey() string {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user