Documentation ¶
Index ¶
- Variables
- func APICallBack(c *gin.Context)
- func APIJsAPITicket(c *gin.Context)
- func APIMessageSend(c *gin.Context)
- func APITokenGet(c *gin.Context)
- func CheckCorpidSecret(corpid string, secret string) bool
- func CheckJWT(c *gin.Context)
- func CheckUserID(c *gin.Context)
- func CheckWechatUser(c *gin.Context)
- func FIndWechatUserByCompanyID(id string) (string, error)
- func GETOrder(c *gin.Context)
- func GETProfile(c *gin.Context)
- func GETRegister(c *gin.Context)
- func GetDomainOwnershipVerifyInfo(c *gin.Context)
- func GetHome(c *gin.Context)
- func GetHomeHTML(c *gin.Context)
- func GetHomeHTML2(c *gin.Context)
- func GetSettings(c *gin.Context)
- func GetToTag(str string) string
- func NewJWT(corpid string) (string, error)
- func PostSettings(c *gin.Context)
- func Register()
- func RegisterServerClient()
- func SetRelativePath()
- type Claims
- type FormAPIMessageSend
- type FormAPITokenGet
- type FormJsAPITicket
- type FormPostSettings
- type JSONAccessToken
- type MessageHeader
Constants ¶
This section is empty.
Variables ¶
View Source
var BaseURL = "http://wx.sinopharmgroup.net"
BaseURL 基础网址 TODO 改到系统配置项里 var BaseURL = "http://grwechat.cloudtui.com"
Functions ¶
func APIJsAPITicket ¶
APIJsAPITicket 签名算法
noncestr(随机字符串), jsapi_ticket, timestamp(时间戳), url(当前网页的URL, 不包含#及其后面部分)
@since 0.0.1
func CheckCorpidSecret ¶
CheckCorpidSecret 检查 corpid 和 secret 是否正确对应
func CheckWechatUser ¶ added in v0.0.6
func FIndWechatUserByCompanyID ¶
FIndWechatUserByCompanyID 通过公司ID获取推送人列表 维护麻烦 用tag
func GETRegister ¶ added in v0.0.5
GETRegister 微信注册页面 填写用户信息 @since 0.0.4
func GetDomainOwnershipVerifyInfo ¶
GetDomainOwnershipVerifyInfo 域名所有权验证 @since 0.0.1
func RegisterServerClient ¶
func RegisterServerClient()
RegisterServerClient 初始化微信接口使用到的所有 Server 和 Client @since 0.0.1
Types ¶
type Claims ¶
type Claims struct { CorpID string `json:"corpid"` jwt.StandardClaims }
Claims 这里现在是微信认证用的 后面看看再提出来 @since 0.0.1
type FormAPIMessageSend ¶
type FormAPIMessageSend struct { MessageHeader KV struct { OrderIDS []string `json:"orderids"` CompanyID string `json:"companyid"` CompanyName string `json:"companyname"` } `json:"kv"` Key string `json:"key"` Text struct { Content string `json:"content"` } `json:"text"` }
FormAPIMessageSend 提交表单 @since 0.0.1
type FormAPITokenGet ¶
type FormAPITokenGet struct { Corpid string `form:"corpid" binding:"required"` Secret string `form:"secret" binding:"required"` }
FormAPITokenGet Post 表单 @since 0.0.1
type FormJsAPITicket ¶
type FormJsAPITicket struct { Noncestr string `form:"noncestr" binding:"required"` Timestamp string `form:"timestamp" binding:"required"` URL string `form:"url" binding:"required"` }
FormJsAPITicket 签名算法表单 @since 0.0.1
type FormPostSettings ¶
type FormPostSettings struct { DomainURL string `form:"domain_url"` VerifyValue string `form:"verify_value"` }
FormPostSettings 微信设置表单 @since 0.0.1
type JSONAccessToken ¶
JSONAccessToken token 结构 @since 0.0.1 BUG TODO 这里的 accessToken 应该放在JSONErr 的 data 字段中
type MessageHeader ¶
type MessageHeader struct { MsgType string `json:"msgtype"` // 必须; 消息类型 AgentID int64 `json:"agentid"` // 必须; 企业应用的id, 整型 }
MessageHeader 通用的消息头 @since 0.0.1
Source Files ¶
Click to show internal directories.
Click to hide internal directories.