pdd活动
This commit is contained in:
@@ -1,5 +1,7 @@
|
||||
package pddapi
|
||||
|
||||
import "git.rosy.net.cn/baseapi/utils"
|
||||
|
||||
const (
|
||||
cthMediaID = 9180924964
|
||||
)
|
||||
@@ -13,3 +15,110 @@ func (a *API) GoodsOPidGenerate(name string) (err error) {
|
||||
})
|
||||
return err
|
||||
}
|
||||
|
||||
type ActivityOperationListResult struct {
|
||||
ID int `json:"id"`
|
||||
Name string `json:"name"`
|
||||
Starttime string `json:"startTime"`
|
||||
Endtime string `json:"endTime"`
|
||||
Description string `json:"description"`
|
||||
Introduction string `json:"introduction"`
|
||||
Level int `json:"level"`
|
||||
Goodspoolid string `json:"goodsPoolId"`
|
||||
Duoimage string `json:"duoImage"`
|
||||
Bannerimage string `json:"bannerImage"`
|
||||
Filename string `json:"fileName"`
|
||||
Fileurl string `json:"fileUrl"`
|
||||
Activitylink string `json:"activityLink"`
|
||||
Cpscoverage int `json:"cpsCoverage"`
|
||||
Activitystatus int `json:"activityStatus"`
|
||||
Tagid int `json:"tagId"`
|
||||
Goodslist []struct {
|
||||
Mallid int `json:"mallId"`
|
||||
Mallname string `json:"mallName"`
|
||||
Malllogo interface{} `json:"mallLogo"`
|
||||
Qrcodeimageurl interface{} `json:"qrCodeImageUrl"`
|
||||
Merchanttype int `json:"merchantType"`
|
||||
Hascltcpn bool `json:"hasCltCpn"`
|
||||
Goodsid int64 `json:"goodsId"`
|
||||
Goodssign string `json:"goodsSign"`
|
||||
Goodsname string `json:"goodsName"`
|
||||
Goodsdesc string `json:"goodsDesc"`
|
||||
Goodsimageurl string `json:"goodsImageUrl"`
|
||||
Goodsthumbnailurl string `json:"goodsThumbnailUrl"`
|
||||
Mingroupprice int `json:"minGroupPrice"`
|
||||
Categoryid int `json:"categoryId"`
|
||||
Categoryname string `json:"categoryName"`
|
||||
Goodstype int `json:"goodsType"`
|
||||
Subsidyamount interface{} `json:"subsidyAmount"`
|
||||
Haspddcoupon interface{} `json:"hasPddCoupon"`
|
||||
Hascoupon bool `json:"hasCoupon"`
|
||||
Couponminorderamount int `json:"couponMinOrderAmount"`
|
||||
Coupondiscount int `json:"couponDiscount"`
|
||||
Coupontotalquantity int `json:"couponTotalQuantity"`
|
||||
Couponremainquantity int `json:"couponRemainQuantity"`
|
||||
Couponstarttime int `json:"couponStartTime"`
|
||||
Couponendtime int `json:"couponEndTime"`
|
||||
Mallclientable bool `json:"mallClientAble"`
|
||||
Plantype int `json:"planType"`
|
||||
Plantypeisbest interface{} `json:"planTypeIsBest"`
|
||||
Zsduoid int `json:"zsDuoId"`
|
||||
Plantypeall int `json:"planTypeAll"`
|
||||
Promotionrate int `json:"promotionRate"`
|
||||
Activitypromotionrate interface{} `json:"activityPromotionRate"`
|
||||
Sharerate int `json:"shareRate"`
|
||||
Mallrate int `json:"mallRate"`
|
||||
Optid int `json:"optId"`
|
||||
Collected bool `json:"collected"`
|
||||
Marketfee int `json:"marketFee"`
|
||||
Salestip string `json:"salesTip"`
|
||||
Desctxt string `json:"descTxt"`
|
||||
Servtxt string `json:"servTxt"`
|
||||
Lgsttxt string `json:"lgstTxt"`
|
||||
Issceneauth interface{} `json:"isSceneAuth"`
|
||||
Inbigsale []int `json:"inBigSale"`
|
||||
Haohuocouponlist interface{} `json:"haohuoCouponList"`
|
||||
Brandcouponlist []interface{} `json:"brandCouponList"`
|
||||
Isonsale bool `json:"isOnsale"`
|
||||
Isbijia bool `json:"isBiJia"`
|
||||
Isextramissiongoods bool `json:"isExtraMissionGoods"`
|
||||
Unifiedtag struct {
|
||||
Goodsid int64 `json:"goodsId"`
|
||||
Tagdtos []struct {
|
||||
Groupcode int `json:"groupCode"`
|
||||
Tagseries int `json:"tagSeries"`
|
||||
Tagid int `json:"tagId"`
|
||||
Text string `json:"text"`
|
||||
Color string `json:"color"`
|
||||
URL interface{} `json:"url"`
|
||||
Prefiximageurl interface{} `json:"prefixImageUrl"`
|
||||
Link interface{} `json:"link"`
|
||||
Width interface{} `json:"width"`
|
||||
Height interface{} `json:"height"`
|
||||
} `json:"tagDTOs"`
|
||||
Icondtos []interface{} `json:"iconDTOs"`
|
||||
Highlightdtos []interface{} `json:"highLightDTOs"`
|
||||
Rankdtos []interface{} `json:"rankDTOs"`
|
||||
} `json:"unifiedTag"`
|
||||
Matchtype int `json:"matchType"`
|
||||
Goodsgalleryurls interface{} `json:"goodsGalleryUrls"`
|
||||
Hasmaterial bool `json:"hasMaterial"`
|
||||
Withfixedrate bool `json:"withFixedRate"`
|
||||
Nextlevelpromotionrate int `json:"nextLevelPromotionRate"`
|
||||
Nextlevelmarketfee int `json:"nextLevelMarketFee"`
|
||||
Extrainfovo interface{} `json:"extraInfoVO"`
|
||||
} `json:"goodsList"`
|
||||
}
|
||||
|
||||
//获取官方活动
|
||||
func (a *API) ActivityOperationList() (activityOperationListResult []*ActivityOperationListResult, err error) {
|
||||
result, err := a.AccessStorePage("https://jinbao.pinduoduo.com/network/api/activity/operation/list", map[string]interface{}{
|
||||
"inPrepare": false,
|
||||
"pageNumber": 1,
|
||||
"pageSize": 9,
|
||||
}, true)
|
||||
if err == nil {
|
||||
utils.Map2StructByJson(result["result"].(map[string]interface{})["list"], &activityOperationListResult, false)
|
||||
}
|
||||
return activityOperationListResult, err
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user