123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051 |
- package consts
- import (
- "context"
- "fmt"
- "github.com/gogf/gf/v2/frame/g"
- "github.com/gogf/gf/v2/util/gconv"
- "strings"
- )
- const (
- AreaType = iota + 1 //省份
- CityType //城市
- CitySpecialType //直辖市
- HotBidding = iota - 2
- ClassBidding
- CityBidding
- )
- var (
- SettingPageSize = g.Cfg().MustGet(context.Background(), "listPageSetting.pageSize").Int()
- SettingBidCacheTime = g.Cfg().MustGet(context.Background(), "listPageSetting.cacheTime").Int64()
- BiddingListMaxTotal = g.Cfg().MustGet(context.Background(), "listPageSetting.maxBidSize", 5000).Int()
- TableName = g.Cfg().MustGet(context.Background(), "tableName", "jybid_classifyList").String()
- WebDomainFormat = g.Cfg("global").MustGet(context.Background(), "webDomainFormat").String()
- JyWebDomain = g.Cfg("global").MustGet(context.Background(), "jyWebDomain").String()
- PinyinKeywords map[string]map[string]string
- TopTypeMap = map[string]string{
- "预告": "招标预告",
- "招标": "招标公告",
- "结果": "招标结果",
- "其它": "招标信用",
- }
- )
- func init() {
- PinyinKeywords = map[string]map[string]string{}
- for _, m := range g.Config("global").MustGet(context.Background(), "pinyinKeywords").Maps() {
- keyword := strings.TrimSpace(gconv.String(m["name"]))
- code := strings.TrimSpace(gconv.String(m["code"]))
- if keyword != "" && code != "" {
- PinyinKeywords[keyword] = map[string]string{
- "name": keyword,
- "href": fmt.Sprintf("%s/list/keywords/%s.html", JyWebDomain, code),
- }
- }
- }
- }
|