Commit d8809d0a authored by hujiebin's avatar hujiebin

GemConfig

parent aa09a770
......@@ -183,6 +183,10 @@ type BeanConfig struct {
DIAMOND_BEAN_RATE int
}
type GemConfig struct {
DIAMOND_GEM_RATE int
}
type H5Config struct {
USER_LEVEL string
GROUP_SUPPORT string
......@@ -337,6 +341,7 @@ var onlineData OnlineConfig
var sessionData SessionConfig
var videoData VideoConfig
var beanData BeanConfig
var gemData GemConfig
var h5Data H5Config
var groupImData GroupImConfig
var gradeData GradeConfig
......@@ -503,6 +508,10 @@ func GetBeanConfig() BeanConfig {
return beanData
}
func GetGemConfig() GemConfig {
return gemData
}
func GetH5Config() H5Config {
return h5Data
}
......@@ -692,6 +701,10 @@ func init() {
mylogrus.MyLog.Fatal(err)
}
if err := conf.Section("GEM").MapTo(&gemData); err != nil {
mylogrus.MyLog.Fatal(err)
}
if err := conf.Section("H5").MapTo(&h5Data); err != nil {
mylogrus.MyLog.Fatal(err)
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment