qecode.go 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  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. SelectedName string `json:"selected_name"` // 带货任务名称
  33. TaskMode int `json:"task_mode"` // 任务形式,1、2分别表示悬赏任务、纯佣带货
  34. SampleMode int `json:"sample_mode"` // 领样形式,1、2、3分别表示免费领样、垫付领样、不提供样品
  35. SaleActual int `json:"sale_actual"` // 带货销量条件
  36. PerReward float64 `json:"per_reward"` // 每人可获得悬赏金
  37. ProductPrice float64 `json:"product_price"` // 商品价值
  38. CommissionPrice float64 `json:"commission_price"` // 每单赚-佣金金额
  39. ExclusiveCommission float64 `json:"exclusive_commission"` // 每单赚-佣金比例
  40. MainPhotoUrl string `json:"main_photo_url"` // 商品主图url
  41. ProjectType int `json:"project_type"` // 种草任务类型,1代表公开,2代表定向
  42. ProjectName string `json:"project_name"` // 种草任务名称
  43. }
  44. func NewGetWxQRCodeRequest() *GetWxQRCodeRequest {
  45. return new(GetWxQRCodeRequest)
  46. }
  47. func NewGetWxQRCodeResponse() *CommonResponse {
  48. resp := new(CommonResponse)
  49. resp.Data = new(GetWxQRCodeData)
  50. return resp
  51. }