27 lines
393 B
Go
27 lines
393 B
Go
|
package lib
|
||
|
|
||
|
import (
|
||
|
"kefu/models"
|
||
|
)
|
||
|
|
||
|
type EntConfig struct {
|
||
|
LandHost string
|
||
|
}
|
||
|
|
||
|
//配置项
|
||
|
func NewEntConfig(entId string) (*EntConfig, error) {
|
||
|
configs := models.FindEntConfigs(entId)
|
||
|
landHost := ""
|
||
|
for _, config := range configs {
|
||
|
|
||
|
if config.ConfKey == "LandHost" {
|
||
|
landHost = config.ConfValue
|
||
|
}
|
||
|
}
|
||
|
|
||
|
entConfig := &EntConfig{
|
||
|
LandHost: landHost,
|
||
|
}
|
||
|
return entConfig, nil
|
||
|
}
|