kefu/lib/entconfig.go

27 lines
393 B
Go
Raw Permalink Normal View History

2024-12-10 02:50:12 +00:00
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
}