45 lines
1.7 KiB
Go
45 lines
1.7 KiB
Go
package v1
|
||
|
||
import "github.com/gogf/gf/v2/frame/g"
|
||
|
||
type WeChatLoginReq struct {
|
||
g.Meta `path:"/wechat/login" method:"post" tags:"WeChat" summary:"获取微信二维码登录"`
|
||
SceneId string `json:"sceneId" v:"required" dc:"场景ID,规则:[门店id]_[6位随机字符串]"`
|
||
}
|
||
type WeChatLoginRes struct {
|
||
}
|
||
|
||
type WeChatEventReq struct {
|
||
g.Meta `path:"/wechat" method:"post" tags:"WeChat" summary:"微信订阅事件"`
|
||
ToUserName string `xml:"ToUserName" dc:"开发者微信号" json:"ToUserName"`
|
||
FromUserName string `xml:"FromUserName" dc:"发送方账号(OpenID)" json:"FromUserName"`
|
||
CreateTime int64 `xml:"CreateTime" dc:"消息创建时间" json:"CreateTime"`
|
||
MsgType string `xml:"MsgType" dc:"消息类型" json:"MsgType,omitempty"`
|
||
Event string `xml:"Event" dc:"事件类型 subscribe | SCAN" json:"Event"`
|
||
EventKey string `xml:"EventKey" dc:"事件KEY值" json:"EventKey"`
|
||
Ticket string `xml:"Ticket" dc:"二维码ticket" json:"Ticket"`
|
||
}
|
||
|
||
type WeChatEventRes struct {
|
||
}
|
||
|
||
type WeChatVertifyReq struct {
|
||
g.Meta `path:"/wechat" method:"Get" tags:"WeChat" summary:"微信服务器验证接口"`
|
||
Signature string `json:"signature" v:"required" dc:"微信签名"`
|
||
EchoStr string `json:"echostr" v:"required" dc:"随机字符串"`
|
||
Timestamp string `json:"timestamp" v:"required" dc:"时间戳"`
|
||
Nonce string `json:"nonce" v:"required" dc:"随机数"`
|
||
}
|
||
|
||
type WeChatVertifyRes struct {
|
||
}
|
||
|
||
type WeChatPollingReq struct {
|
||
g.Meta `path:"/wechat/polling" method:"post" tags:"WeChat" summary:"微信长轮询"`
|
||
SceneId string `json:"sceneId" v:"required" dc:"场景ID"`
|
||
}
|
||
type WeChatPollingRes struct {
|
||
Status string `json:"status" dc:"状态"`
|
||
Token string `json:"token" dc:"token"`
|
||
}
|