25 lines
440 B
Go
25 lines
440 B
Go
![]() |
package config
|
||
|
|
||
|
import (
|
||
|
"ArmedPolice/app/service"
|
||
|
"ArmedPolice/config"
|
||
|
)
|
||
|
|
||
|
type Area struct{ *service.Session }
|
||
|
|
||
|
type AreaHandle func(session *service.Session) *Area
|
||
|
|
||
|
// List 区域信息
|
||
|
func (c *Area) List(key string) map[string]string {
|
||
|
if key == "" {
|
||
|
key = config.DefaultChinaAreaCode
|
||
|
}
|
||
|
return config.SettingAreaInfo[key]
|
||
|
}
|
||
|
|
||
|
func NewArea() AreaHandle {
|
||
|
return func(session *service.Session) *Area {
|
||
|
return &Area{session}
|
||
|
}
|
||
|
}
|