package utils import ( beego "github.com/beego/beego/v2/adapter" ) var ( RunMode string //运行模式 MYSQL_URL string //数据库连接 MYSQL_URL_RDDP string //数据库连接 MYSQL_URL_EDB string MYSQL_URL_DATA string ) var ( CompanyId int AdminId int RealName string ) var ( WxAppId string WxAppSecret string TemplateId string RemindTemplateId string ) //oss配置 var ( Bucketname string = "hongze" Endpoint string Imghost string = "https://hongze.oss-accelerate.aliyuncs.com/" Upload_dir string = "static/images/" Upload_Audio_Dir string = "static/audio/" AccessKeyId string = "LTAIFMZYQhS2BTvW" AccessKeySecret string = "12kk1ptCHoGWedhBnKRVW5hRJzq9Fq" ) var ( THS_SendUrl string //同花顺地址url THS_PubKey string //同花顺公钥 ) func init() { RunMode = beego.AppConfig.String("run_mode") config, err := beego.AppConfig.GetSection(RunMode) if err != nil { panic("配置文件读取错误 " + err.Error()) } beego.Info(RunMode + " 模式") MYSQL_URL = config["mysql_url"] MYSQL_URL_RDDP = config["mysql_url_rddp"] MYSQL_URL_EDB = config["mysql_url_edb"] MYSQL_URL_DATA = config["mysql_url_data"] //同花顺公钥 THS_PubKey = `-----BEGIN PUBLIC KEY----- MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAqugglfCboOEfWtHlGBOW 40a4Y3xOs0MPBwjTOzHgcaWzx5XCc20VftGVXkWlpjs8u4dza/Bp1SV7SJ5Y7U95 jgUOP8Js9Qgp6UVqBJDJf3i1KpjHzlk3ma8zxAYUAdieEUE+SKSxSY+BD9A6lpf5 n+igXLmzR5GeVGFeLzoMhB1+pXgGhW30ao9wPwuRF7DBl+FKa/ACi7iXLiwXVgqT FFi29TKeerEENu3EpMXvPml7tNUiVmVW6d83hlascfbAlkShwuHLSGpLqK7brtg6 jRS9hreKFKb0BUQ4TB26e7IDCstbMRvUp4+OGezexzic5NYPQ8uLo5OTaS7f7PrW ZwIDAQAB -----END PUBLIC KEY-----` if RunMode == "release" { CompanyId = 16 RealName = "超级管理员" WxAppId = "wx4a844c734d8c8e56" WxAppSecret = "26c586e7ccb3c575433f0f37797b3eeb" TemplateId = "P0klzaZjEI2UYth-z-WnmtOQgyxcF8klPoA_MlsA8Eo" RemindTemplateId = "PaHpQjVffrvmeW8wiOUcqlEhnD1LXyU9FnPVF-Jg9wM" //同花顺正式地址 THS_SendUrl = `https://board.10jqka.com.cn/gateway/ps/syncNews` } else { CompanyId = 16 RealName = "超级管理员" AdminId = 11 WxAppId = "wx9b5d7291e581233a" WxAppSecret = "f4d52e34021eee262dce9682b31f8861" TemplateId = "P0klzaZjEI2UYth-z-WnmtOQgyxcF8klPoA_MlsA8Eo" RemindTemplateId = "9JYV6sHMJlu2EHRBIj_8ift6wkrrTb9_UO-M_-YXKBw" //同花顺测试地址 THS_SendUrl = `https://mtest.10jqka.com.cn/gateway/ps/syncNews` } } //http://entryapi.brilliantstart.cn //http://entryapi.brilliantstart.cn/swagger/