This commit is contained in:
suyl
2021-07-20 17:21:38 +08:00
parent 0fd6aa4207
commit d750bfe18d
10 changed files with 374 additions and 16 deletions

22
services/api/api.go Normal file
View File

@@ -0,0 +1,22 @@
package api
import (
"git.rosy.net.cn/baseapi/platformapi/tibiotapi"
aliyunsmsclient "github.com/KenmyZhang/aliyun-communicate"
)
var (
SMSClient *aliyunsmsclient.SmsClient
TibiotAPI *tibiotapi.API
)
func init() {
Init() // 这里必须要调用
}
// 这样写的原因是在测试时,可以重新读取配置文件
func Init() {
TibiotAPI = tibiotapi.New("ruoxikeji", "Ruoxi@369")
SMSClient = aliyunsmsclient.New("http://dysmsapi.aliyuncs.com/")
}