This commit is contained in:
suyl
2021-06-24 15:37:47 +08:00
parent fda538ce92
commit 8993e48ae9

View File

@@ -2,7 +2,10 @@ package api
import (
"git.rosy.net.cn/jx-callback/business/jxutils/cache"
"git.rosy.net.cn/jx-callback/business/jxutils/cache/redis"
aliyunsmsclient "github.com/KenmyZhang/aliyun-communicate"
beego "github.com/astaxie/beego/adapter"
"github.com/astaxie/beego/server/web"
)
var (
@@ -17,4 +20,5 @@ func init() {
// 这样写的原因是在测试时,可以重新读取配置文件
func Init() {
SMSClient = aliyunsmsclient.New("http://dysmsapi.aliyuncs.com/")
Cacher = redis.New(web.AppConfig.DefaultString("redisHost", "localhost"), beego.AppConfig.DefaultInt("redisPort", 0), beego.AppConfig.DefaultString("redisPassword", ""))
}