feat:完善项目信息
This commit is contained in:
@ -2,15 +2,13 @@ package controller
|
||||
|
||||
import (
|
||||
"SciencesServer/app/api/admin/model"
|
||||
"SciencesServer/app/basic/config"
|
||||
model2 "SciencesServer/app/common/model"
|
||||
"SciencesServer/app/session"
|
||||
config2 "SciencesServer/config"
|
||||
)
|
||||
|
||||
type Config struct{ *session.Admin }
|
||||
type Config struct{ *session.Enterprise }
|
||||
|
||||
type ConfigHandle func(session *session.Admin) *Config
|
||||
type ConfigHandle func(session *session.Enterprise) *Config
|
||||
|
||||
type (
|
||||
ConfigInfo struct {
|
||||
@ -33,16 +31,8 @@ func (c *Config) Instance(kind int) ([]*ConfigInfo, error) {
|
||||
return out, nil
|
||||
}
|
||||
|
||||
// Area 区域信息
|
||||
func (c *Config) Area(key string) map[string]string {
|
||||
if key == "" {
|
||||
key = config2.DefaultChinaAreaCode
|
||||
}
|
||||
return config.MemoryForAreaInfo[key]
|
||||
}
|
||||
|
||||
func NewConfig() ConfigHandle {
|
||||
return func(session *session.Admin) *Config {
|
||||
return &Config{Admin: session}
|
||||
return func(session *session.Enterprise) *Config {
|
||||
return &Config{Enterprise: session}
|
||||
}
|
||||
}
|
||||
|
@ -8,10 +8,9 @@ import (
|
||||
|
||||
type Docking struct {
|
||||
*session.Enterprise
|
||||
local string
|
||||
}
|
||||
|
||||
type DockingHandle func(session *session.Enterprise, local string) *Docking
|
||||
type DockingHandle func(session *session.Enterprise) *Docking
|
||||
|
||||
// Form 联系客服对接
|
||||
func (c *Docking) Form() error {
|
||||
@ -24,10 +23,9 @@ func (c *Docking) Form() error {
|
||||
}
|
||||
|
||||
func NewDocking() DockingHandle {
|
||||
return func(session *session.Enterprise, local string) *Docking {
|
||||
return func(session *session.Enterprise) *Docking {
|
||||
return &Docking{
|
||||
Enterprise: session,
|
||||
local: local,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user