55 lines
2.0 KiB
Go
55 lines
2.0 KiB
Go
package v1
|
||
|
||
import "github.com/gogf/gf/v2/frame/g"
|
||
|
||
type WeChatLoginReq struct {
|
||
g.Meta `path:"/wechat/login" method:"post" tags:"PC/WeChat" summary:"(PC)获取微信二维码登录"`
|
||
SceneId string `json:"sceneId" v:"required" dc:"场景ID"`
|
||
}
|
||
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:"PC/WeChat" summary:"(PC)微信长轮询"`
|
||
SceneId string `json:"sceneId" v:"required" dc:"场景ID"`
|
||
}
|
||
type WeChatPollingRes struct {
|
||
Status string `json:"status" dc:"状态"`
|
||
Token string `json:"token" dc:"token"`
|
||
}
|
||
|
||
type GetWechatSceneIdReq struct {
|
||
g.Meta `path:"/wechat/sceneId" method:"get" tags:"PC/WeChat" summary:"(PC)获取微信场景ID"`
|
||
StoreId int `json:"storeId" v:"required#门店 id 账号不能为空" dc:"门店ID"`
|
||
UUID string `json:"uuid" dc:"8圈唯一 id"`
|
||
}
|
||
|
||
type GetWechatSceneIdRes struct {
|
||
SceneId string `json:"sceneId" v:"required" dc:"场景ID"`
|
||
}
|