qecode.go 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. package http_model
  2. type GetWxQRCodeRequest struct {
  3. Scene string `json:"scene"` // 需要携带的参数,目前为任务id
  4. Page string `json:"page"` // 页面path
  5. }
  6. type WxAccessTokenResponse struct {
  7. AccessToken string `json:"access_token"` // 获取到的凭证
  8. ExpiresIn int `json:"expires_in"` // 凭证有效时间,单位:秒。目前是7200秒之内的值。
  9. Errcode int `json:"errcode"` // 错误码
  10. Errmsg string `json:"errmsg"` // 错误信息
  11. }
  12. type WxQrCodeRequest struct {
  13. Scene string `json:"scene"`
  14. Page string `json:"page"`
  15. Width int `json:"width,omitempty"`
  16. CheckPath bool `json:"check_path,omitempty"`
  17. EnvVersion string `json:"env_version,omitempty"`
  18. }
  19. type WxQrCodeResponse struct {
  20. Errcode int `json:"errcode"`
  21. Errmsg string `json:"errmsg"`
  22. ContentType string `json:"contentType"`
  23. Buffer []byte `json:"buffer"`
  24. }
  25. type GetWxQRCodeData struct {
  26. QrCodeBytes []byte `json:"qr_code_bytes"`
  27. }
  28. func NewGetWxQRCodeRequest() *GetWxQRCodeRequest {
  29. return new(GetWxQRCodeRequest)
  30. }
  31. func NewGetWxQRCodeResponse() *CommonResponse {
  32. resp := new(CommonResponse)
  33. resp.Data = new(GetWxQRCodeData)
  34. return resp
  35. }