qecode.go 1.5 KB

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