Files
baseapi/platformapi/enterprise_wechat/wechat_model.go
2022-05-23 11:57:44 +08:00

33 lines
654 B
Go

package enterprise_wechat
import (
"git.rosy.net.cn/baseapi/platformapi"
"net/http"
"sync"
)
const (
WeChatBaseApi = "https://qyapi.weixin.qq.com" // 企业微信基础访问链接
// api接口
GetToken = "cgi-bin/gettoken" // 获取token
)
// 注册请求api
type API struct {
corpId string // 企业号
corpSecret string // 秘钥
accessToken string // token
expiresIn int64 // token过期时间
locker sync.RWMutex
client *http.Client
config *platformapi.APIConfig
}
// 公共错误码
type PublicCode struct {
ErrCode int `json:"errcode"` // 错误码
ErrMsg string `json:"errmsg"` // 错误消息
}