feat:完善项目信息

This commit is contained in:
henry
2022-01-11 10:41:46 +08:00
parent 6712feec35
commit 7cab0fb354
24 changed files with 188 additions and 169 deletions

View File

@ -4,17 +4,17 @@ import (
"SciencesServer/app/api/website/model"
config2 "SciencesServer/app/basic/config"
model2 "SciencesServer/app/common/model"
"SciencesServer/app/service"
"SciencesServer/app/session"
"SciencesServer/config"
"SciencesServer/utils"
"strings"
)
type Index struct {
*service.Session
*session.Enterprise
}
type IndexHandle func(session *service.Session) *Index
type IndexHandle func(session *session.Enterprise) *Index
type (
// InstanceInfo 首页信息
@ -218,7 +218,58 @@ func (c *Index) DistributionExpert(province, city string) (map[string]*InstanceD
},
},
}
_out["630000"] = &InstanceDistributionDetailInfo{
Code: "630000",
Name: "青海省",
Count: 1200,
Industry: nil,
Children: map[string]*InstanceDistributionDetailInfo{
"630200": &InstanceDistributionDetailInfo{
Code: "630200",
Name: "海东市",
Count: 1200,
Industry: nil,
Children: nil,
},
},
}
_out["230000"] = &InstanceDistributionDetailInfo{
Code: "230000",
Name: "黑龙江",
Count: 6000,
Industry: nil,
Children: map[string]*InstanceDistributionDetailInfo{
"230100": &InstanceDistributionDetailInfo{
Code: "230100",
Name: "哈尔滨市",
Count: 3000,
Industry: nil,
Children: nil,
},
"230200": &InstanceDistributionDetailInfo{
Code: "230200",
Name: "齐齐哈尔市",
Count: 3000,
Industry: nil,
Children: nil,
},
},
}
_out["330000"] = &InstanceDistributionDetailInfo{
Code: "330000",
Name: "浙江省",
Count: 5000,
Industry: nil,
Children: map[string]*InstanceDistributionDetailInfo{
"330100": &InstanceDistributionDetailInfo{
Code: "330100",
Name: "杭州市",
Count: 5000,
Industry: nil,
Children: nil,
},
},
}
return _out, nil
}
@ -293,9 +344,9 @@ func (c *Index) Instance() (*InstanceInfo, error) {
}
func NewIndex() IndexHandle {
return func(session *service.Session) *Index {
return func(session *session.Enterprise) *Index {
return &Index{
Session: session,
session,
}
}
}