feat:完善网站活动报名信息
This commit is contained in:
@ -123,10 +123,6 @@ func initModel() {
|
||||
&synchronized{iModel: model.NewUserCompany()}, &synchronized{iModel: model.NewUserExpert()},
|
||||
&synchronized{iModel: model.NewUserLaboratory()}, &synchronized{iModel: model.NewUserResearch()},
|
||||
&synchronized{iModel: model.NewUserAgent()},
|
||||
// 入驻管理
|
||||
&synchronized{iModel: model.NewManageCompany()}, &synchronized{iModel: model.NewManageExpert()},
|
||||
&synchronized{iModel: model.NewManageLaboratory()}, &synchronized{iModel: model.NewManageResearch()},
|
||||
&synchronized{iModel: model.NewManageAgent()},
|
||||
// 数据管理
|
||||
&synchronized{iModel: model.NewManageCompany()}, &synchronized{iModel: model.NewManageExpert()},
|
||||
&synchronized{iModel: model.NewManageLaboratory()}, &synchronized{iModel: model.NewManageResearch()},
|
||||
@ -178,6 +174,21 @@ func initCacheMode() {
|
||||
}
|
||||
}},
|
||||
)
|
||||
function(
|
||||
&caches{iModel: model.NewSysPlatform(), iValues: func() interface{} {
|
||||
out := make([]*model.SysPlatform, 0)
|
||||
_ = model.ScanFields(model.NewSysPlatform(), &out, []string{"id", "key", "link"})
|
||||
return out
|
||||
}, toCache: func(values interface{}) {
|
||||
out := values.([]*model.SysPlatform)
|
||||
for _, v := range out {
|
||||
if v.Link == "" {
|
||||
continue
|
||||
}
|
||||
config2.MemoryForPlatformInfo[v.Link] = v.Key
|
||||
}
|
||||
}},
|
||||
)
|
||||
}
|
||||
|
||||
func Init() {
|
||||
|
@ -1,6 +1,7 @@
|
||||
package model
|
||||
|
||||
import (
|
||||
config2 "SciencesServer/app/basic/config"
|
||||
"SciencesServer/config"
|
||||
"SciencesServer/utils"
|
||||
"strings"
|
||||
@ -130,13 +131,13 @@ type Area struct {
|
||||
|
||||
func (m *Area) FormatBasic() string {
|
||||
address := make([]string, 0)
|
||||
address = append(address, config.SettingAreaInfo[config.DefaultChinaAreaCode][m.Province])
|
||||
address = append(address, config2.MemoryForAreaInfo[config.DefaultChinaAreaCode][m.Province])
|
||||
|
||||
if m.City != "" {
|
||||
address = append(address, config.SettingAreaInfo[m.Province][m.City])
|
||||
address = append(address, config2.MemoryForAreaInfo[m.Province][m.City])
|
||||
}
|
||||
if m.District != "" {
|
||||
address = append(address, config.SettingAreaInfo[m.City][m.District])
|
||||
address = append(address, config2.MemoryForAreaInfo[m.City][m.District])
|
||||
}
|
||||
return strings.Join(address, "-")
|
||||
}
|
||||
|
Reference in New Issue
Block a user