1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768 |
- package utils
- import (
- "github.com/astaxie/beego"
- )
- var (
- RunMode string //运行模式
- MYSQL_URL string //数据库连接
- MYSQL_URL_RDDP string //数据库连接
- MYSQL_URL_EDB string
- )
- //微信配置信息
- var (
- WxId string //微信原始ID
- WxAppId string
- WxAppSecret string
- WxMsgTemplateIdApply string //申请待处理
- WxMsgTemplateIdApplyCancel string //预约取消提醒
- WxMsgTemplateIdPermissionApply string //预约取消提醒
- )
- //微信公众号配置信息
- var (
- WxPublicId string //微信原始ID
- WxPublicAppId string
- WxPublicAppSecret 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"]
- if RunMode == "release" {
- WxAppId = "wxcc32b61f96720d2f"
- WxAppSecret = "06894933fafb24dafead7eaae09c08e0"
- WxId = "gh_a9d3744e1072"
- WxPublicAppId = "wx4a844c734d8c8e56"
- WxPublicAppSecret = "26c586e7ccb3c575433f0f37797b3eeb"
- WxPublicId = "gh_b67e0049fb8c"
- } else {
- WxAppId = "wxcc32b61f96720d2f"
- WxAppSecret = "06894933fafb24dafead7eaae09c08e0"
- WxId = "gh_a9d3744e1072"
- WxMsgTemplateIdApply = "qfNuops-sKrfIkbA7U97A7gSrX03mUpoEpJksRUdloo"
- WxMsgTemplateIdApplyCancel = "UU_d7ks0XZBnWg2xFzxL9Heilm4kisX39K7dr4SDdO8"
- WxMsgTemplateIdPermissionApply = "qfNuops-sKrfIkbA7U97A7gSrX03mUpoEpJksRUdloo"
- WxPublicAppId = "wx9b5d7291e581233a"
- WxPublicAppSecret = "f4d52e34021eee262dce9682b31f8861"
- WxPublicId = "gh_5dc508325c6f"
- }
- }
- //http://webapi.brilliantstart.cn/api/
- //http://webapi.brilliantstart.cn/swagger/
- //http://139.196.122.219:8603/swagger/
|