|
@@ -29,24 +29,22 @@ var (
|
|
Middleground *middleground.Middleground
|
|
Middleground *middleground.Middleground
|
|
HotWinnerConfig HotConfig
|
|
HotWinnerConfig HotConfig
|
|
HotBuyerConfig HotConfig
|
|
HotBuyerConfig HotConfig
|
|
- IndustryTrendConfig IndustryTrend
|
|
|
|
|
|
+ IndustryTrendConfig []IndustryTrend
|
|
IpList *ipmatch.WhiteIp
|
|
IpList *ipmatch.WhiteIp
|
|
IpInitLock sync.RWMutex //锁
|
|
IpInitLock sync.RWMutex //锁
|
|
)
|
|
)
|
|
|
|
|
|
type IndustryTrend struct {
|
|
type IndustryTrend struct {
|
|
- IndustryArr []struct {
|
|
|
|
- AreaArr []struct {
|
|
|
|
- Area string `json:"area"`
|
|
|
|
- QuarterArr []struct {
|
|
|
|
- FirstQuarter int `json:"firstQuarter,omitempty"`
|
|
|
|
- SecondQuarter int `json:"secondQuarter,omitempty"`
|
|
|
|
- ThirdQuarter int `json:"thirdQuarter,omitempty"`
|
|
|
|
- FourthQuarter int `json:"fourthQuarter,omitempty"`
|
|
|
|
- } `json:"quarterArr"`
|
|
|
|
- } `json:"areaArr"`
|
|
|
|
- Industry string `json:"industry"`
|
|
|
|
- } `json:"industryArr"`
|
|
|
|
|
|
+ AreaArr []struct {
|
|
|
|
+ Area string `json:"area"`
|
|
|
|
+ QuarterArr []struct {
|
|
|
|
+ FirstQuarter int `json:"firstQuarter,omitempty"`
|
|
|
|
+ SecondQuarter int `json:"secondQuarter,omitempty"`
|
|
|
|
+ ThirdQuarter int `json:"thirdQuarter,omitempty"`
|
|
|
|
+ FourthQuarter int `json:"fourthQuarter,omitempty"`
|
|
|
|
+ } `json:"quarterArr"`
|
|
|
|
+ } `json:"areaArr"`
|
|
|
|
+ Industry string `json:"industry"`
|
|
}
|
|
}
|
|
|
|
|
|
type HotConfig struct {
|
|
type HotConfig struct {
|
|
@@ -65,7 +63,6 @@ func init() {
|
|
util.ReadConfig(&Sysconfig)
|
|
util.ReadConfig(&Sysconfig)
|
|
util.ReadConfig("./export.json", &ExportConfig)
|
|
util.ReadConfig("./export.json", &ExportConfig)
|
|
IpInit()
|
|
IpInit()
|
|
- util.ReadConfig("./dataService.json", &IndustryTrendConfig)
|
|
|
|
//log.Println("sysconfig:", Sysconfig)
|
|
//log.Println("sysconfig:", Sysconfig)
|
|
WeixinConfig, _ = Sysconfig["wxJianyu"].(map[string]interface{})
|
|
WeixinConfig, _ = Sysconfig["wxJianyu"].(map[string]interface{})
|
|
Wxoauth = `https://open.weixin.qq.com/connect/oauth2/authorize?appid=` + util.ObjToString(WeixinConfig["appid"]) + `&redirect_uri=%s&response_type=code&scope=snsapi_base&state=%s#wechat_redirect`
|
|
Wxoauth = `https://open.weixin.qq.com/connect/oauth2/authorize?appid=` + util.ObjToString(WeixinConfig["appid"]) + `&redirect_uri=%s&response_type=code&scope=snsapi_base&state=%s#wechat_redirect`
|
|
@@ -87,6 +84,9 @@ func init() {
|
|
//PC端商机管理配置
|
|
//PC端商机管理配置
|
|
util.ReadConfig("./entnichePc.json", &EntnichePcConf)
|
|
util.ReadConfig("./entnichePc.json", &EntnichePcConf)
|
|
var ctx = gctx.New()
|
|
var ctx = gctx.New()
|
|
|
|
+ // 获取配置数据
|
|
|
|
+ _ = g.Cfg("index").MustGet(ctx, "industryArr").Structs(&IndustryTrendConfig)
|
|
|
|
+
|
|
Middleground = middleground.NewMiddleground(g.Cfg().MustGet(ctx, "etcd.hosts").Strings()).
|
|
Middleground = middleground.NewMiddleground(g.Cfg().MustGet(ctx, "etcd.hosts").Strings()).
|
|
RegUserCenter(g.Cfg().MustGet(ctx, "userCenterKey").String()).
|
|
RegUserCenter(g.Cfg().MustGet(ctx, "userCenterKey").String()).
|
|
RegPowerCheckCenter(g.Cfg().MustGet(ctx, "powerCheckCenterKey").String()).
|
|
RegPowerCheckCenter(g.Cfg().MustGet(ctx, "powerCheckCenterKey").String()).
|