123456789101112131415161718192021222324252627282930313233343536373839404142434445 |
- package vars
- import (
- qutil "app.yhyue.com/moapp/jybase/common"
- )
- var Config *config
- type config struct {
- WebPort string `json:"webPort"` //服务端口
- Ahead AheadConfig `json:"ahead"` //超前项目配置
- Custom CustomConfig `json:"custom"` //定制化报告配置
- TestUid []string `json:"testUid"` //测试用户id
- ContextOldVipLimit int64 `json:"contextOldVipLimit"` //旧版超级订阅超前订阅时间
- ProjectNumLimit int `json:"projectNumLimit"` //自定义报告限制项目个数
- }
- type AheadConfig struct {
- IsEnable bool `json:"isEnable"` //开关
- Prop float64 `json:"prop"` //新增用户百分比
- DailyTimes int `json:"dailyTimes"` //每日展示次数
- SaveClickTimes int `json:"saveClickTimes"` //保留用户的点击量
- UpdateCron string `json:"updateCron"` //更新周活用户
- Mode int `json:"mode"` // 用户范围: 1-月活 2 周活
- }
- type CustomConfig struct {
- IsEnable bool `json:"isEnable"` //开关
- Open bool `json:"open"` //是否运行查询
- UpdateCron string `json:"updateCron"` //更新周活用户
- SearchLimit struct {
- Switch struct {
- Stop string `json:"stop"` //搜索停止
- Start string `json:"start"` //搜索开始
- } `json:"switch"`
- TimeOver int `json:"timeOver"` //超时
- WaitTime int `json:"waitTime"` //休息
- } `json:"searchLimit"`
- Mode int `json:"mode"` // 用户范围: 1-月活 2 周活
- }
- func init() {
- //程序配置文件
- qutil.ReadConfig(&Config)
- }
|