package utils import ( "fmt" "github.com/astaxie/beego" "github.com/astaxie/beego/logs" ) var ( RunMode string //运行模式 MYSQL_URL string //数据库连接 MYSQL_URL_RDDP string //数据库连接 ) //微信配置信息 var ( WxId string //微信原始ID WxAppId string WxAppSecret string TemplateIdByProduct string //产品运行报告通知-模板ID TemplateRedirectUrl string //模板消息跳转地址 WxPlatform int //用户来源,需要入库,用来保存该用户来自哪个平台,默认是:1 TemplateIdByCompanyApply string //客户申请单审批通知-模板ID //微信小程序appid WxId2 string //微信原始ID WxAppId2 string WxAppSecret2 string WxPlatform2 int //用户来源,需要入库,用来保存该用户来自哪个平台,默认是:1 ) var ( STATIC_DIR string ) 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" ) func init() { RunMode = beego.AppConfig.String("run_mode") fmt.Println(RunMode, "模式") config, err := beego.AppConfig.GetSection(RunMode) if err != nil { panic("配置文件读取错误 " + err.Error()) } logs.Info(RunMode + " 模式") MYSQL_URL = config["mysql_url"] MYSQL_URL_RDDP = config["mysql_url_rddp"] //小程序appid配置 WxAppId2 = `wx67b68e39913e511e` WxId2 = `wx67b68e39913e511e` WxAppSecret2 = `660b0375f701a19220bb8a662b41c77c` WxPlatform2 = 5 if RunMode == "release" { WxAppId = "wx4a844c734d8c8e56" WxAppSecret = "26c586e7ccb3c575433f0f37797b3eeb" WxId = "gh_b67e0049fb8c" TemplateIdByProduct = "Cp2wF8gvBtxyWV4DeYuI172oqwyYXVRSm3AyJO42d84" TemplateRedirectUrl = "https://ficc.hzinsights.com/reportdtl?id=" WxPlatform = 1 TemplateIdByCompanyApply = "ZKcOfNIWBpwHJxpptufHIK1mp2nIwkT3cxub-35cFqI" //oss STATIC_DIR = "/home/static/imgs/" Endpoint = "oss-cn-shanghai-internal.aliyuncs.com" } else { WxAppId = "wx9b5d7291e581233a" WxAppSecret = "f4d52e34021eee262dce9682b31f8861" WxId = "gh_5dc508325c6f" TemplateIdByProduct = "-YjuPOB7Fqd-S3ilabYa6wvjDY9aXmeEfPN6DCiy-EY" TemplateRedirectUrl = "http://rddpweb.brilliantstart.cn/reportdtl?id=" WxPlatform = 1 TemplateIdByCompanyApply = "eTalI1LbiT_B0mTaBeDTlfSMITenK8dQIgEB5yqjjvA" //oss配置 STATIC_DIR = "static/imgs/" Endpoint = "oss-cn-shanghai.aliyuncs.com" } } //http://webapi.brilliantstart.cn/api/ //http://webapi.brilliantstart.cn/swagger/ //http://139.196.122.219:8603/swagger/