wechat.go 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. package models
  2. type WxLoginReq struct {
  3. Code string `description:"微信code"`
  4. }
  5. type WxToken struct {
  6. AccessToken string
  7. ExpiresIn int64
  8. Id int64
  9. }
  10. type WxTicket struct {
  11. Errcode int `json:"errcode"`
  12. Errmsg string `json:"errmsg"`
  13. Ticket string `json:"ticket"`
  14. }
  15. type WechatSign struct {
  16. AppId string
  17. NonceStr string
  18. Timestamp int64
  19. Url string
  20. Signature string
  21. RawString string
  22. }
  23. type WxAccessToken struct {
  24. AccessToken string `json:"access_token"`
  25. ExpiresIn int `json:"expires_in"`
  26. RefreshToken string `json:"refresh_token"`
  27. Openid string `json:"openid"`
  28. Unionid string `json:"unionid"`
  29. Scope string `json:"scope"`
  30. Errcode int `json:"errcode"`
  31. Errmsg string `json:"errmsg"`
  32. }
  33. type WxUsers struct {
  34. Total int
  35. Count int
  36. Data struct {
  37. Openid []string
  38. }
  39. NextOpenid string
  40. }
  41. type WxCheckContentJson struct {
  42. AccessToken string `json:"access_token"`
  43. ExpiresIn int `json:"expires_in"`
  44. RefreshToken string `json:"refresh_token"`
  45. Openid string `json:"openid"`
  46. Unionid string `json:"unionid"`
  47. Scope string `json:"scope"`
  48. Errcode int `json:"errcode"`
  49. Errmsg string `json:"errmsg"`
  50. }