aa
This commit is contained in:
@@ -36,9 +36,9 @@ func init() {
|
||||
|
||||
// 京西果园
|
||||
// api = New("35957", "10013fbb7c2ddad7")
|
||||
api.SetCookie("PASSPORT_DELIMONT_TOKEN", "PBE_2.0_5cd1c6141c127d4188f026ac01fc93656266683e8dfb3127c2fdf894259e9034125ff3bdd2a997a385802ee3ef1802ba93a04acea34fde2d2b6e802c5dcd4ec6e3f4ad909a1d806e3ceeb349ed726b03d60ed1fe7010d4140aa338d9c5f05e3fec172c78d3d7f0ca579d61b7015af1bf99aa46b04d2b8a64aa50646dc09afe94b6b60e0ba9a933635db5e8b2a035e9b6d693b289acf1b256d5b9a3f8478c87b0b009115bfd1394f20bb5a0dc2c07b8d013a25f286ec6bf7f2d86010d65507e31358834b7a6b58fbd88cb3f1a12cf71c997b91c1527f6f3c10693f7c2bd6073da8633a98cd2dc1114dfa5be5ee0e60b02cf7e4a94d0fb563a8c01717e7c050f02249117219c07a2eb211577c208ba77f4d536fa25139bc249be93b38d6fc495ef67a32aa206835d177db402bc534de1d29caf4f6b4fbcd912c13f167d00d1732222744c336a5189728f72fb5e153c4b1164171cfb0c811f34f4c2fedd43f721b8706b43f8d631251c")
|
||||
api.SetCookie("WMUSS", "4AAPQCAAB5PF0aUGcBVzoRTCEkOFhFIhx-Yk9vN2EfPHYoLlROKBEsQmAUQjhNUgRt0ADAP5x-RFklwAAdjxGO11iOj8xKXYSSDIJb2BcPghsaklNfQwGS10JOVRFfhAiYElhEXFXIzoJKyloCGdwdFE6Qk9FRxojUFN3FVEHNjJPZJu4Bt9nxQ13cwoMbjA")
|
||||
api.SetCookie("WMSTOKEN", "AcAANQZAABbC04rUBZFc2UYanlocDAaP0dcfzZCeS1SHQ1qJ15ExgAA13A2dGLjdbcitBZJu4Bn6B_g6cZAAA0tyyFm8cdBaNAQAAwug8HTG0xRjwt1UZzbcAAN7ofRO")
|
||||
// api.SetCookie("PASSPORT_DELIMONT_TOKEN", "PBE_2.0_5cd1c6141c127d4188f026ac01fc93656266683e8dfb3127c2fdf894259e9034125ff3bdd2a997a385802ee3ef1802ba93a04acea34fde2d2b6e802c5dcd4ec6e3f4ad909a1d806e3ceeb349ed726b03d60ed1fe7010d4140aa338d9c5f05e3fec172c78d3d7f0ca579d61b7015af1bf99aa46b04d2b8a64aa50646dc09afe94b6b60e0ba9a933635db5e8b2a035e9b6d693b289acf1b256d5b9a3f8478c87b0b009115bfd1394f20bb5a0dc2c07b8d013a25f286ec6bf7f2d86010d65507e31358834b7a6b58fbd88cb3f1a12cf71c997b91c1527f6f3c10693f7c2bd6073da8633a98cd2dc1114dfa5be5ee0e60b02cf7e4a94d0fb563a8c01717e7c050f02249117219c07a2eb211577c208ba77f4d536fa25139bc249be93b38d6fc495ef67a32aa206835d177db402bc534de1d29caf4f6b4fbcd912c13f167d00d1732222744c336a5189728f72fb5e153c4b1164171cfb0c811f34f4c2fedd43f721b8706b43f8d631251c")
|
||||
api.SetCookie("WMUSS", "OGEXYTMTAwMDAyNzYxNzAwOTEyTmEyYjVodzNQ")
|
||||
api.SetCookie("WMSTOKEN", "OGEXYTMTAwMDAyNzYxNzAwOTEyTmEyYjVodzNQ")
|
||||
// api.SetCookieWithStr(`
|
||||
// PASSPORT_DELIMONT_TOKEN=PBE_2.0_5cd1c6141c127d4188f026ac01fc93656266683e8dfb3127c2fdf894259e9034125ff3bdd2a997a385802ee3ef1802ba93a04acea34fde2d2b6e802c5dcd4ec6e3f4ad909a1d806e3ceeb349ed726b03d60ed1fe7010d4140aa338d9c5f05e3fec172c78d3d7f0ca579d61b7015af1bf99aa46b04d2b8a64aa50646dc09afe94b6b60e0ba9a933635db5e8b2a035e9b6d693b289acf1b256d5b9a3f8478c87b0b009115bfd1394f20bb5a0dc2c07b8d013a25f286ec6bf7f2d86010d65507e31358834b7a6b58fbd88cb3f1a12cf71c997b91c1527f6f3c10693f7c2bd6073da8633a98cd2dc1114dfa5be5ee0e60b02cf7e4a94d0fb563a8c01717e7c050f02249117219c07a2eb211577c208ba77f4d536fa25139bc249be93b38d6fc495ef67a32aa206835d177db402bc534de1d29caf4f6b4fbcd912c13f167d00d1732222744c336a5189728f72fb5e153c4b1164171cfb0c811f34f4c2fedd43f721b8706b43f8d631251c
|
||||
// `)
|
||||
|
||||
@@ -640,15 +640,15 @@ func (a *API) AccessStorePage2(subURL, storeURL2 string, params map[string]inter
|
||||
if storeURL2 != "" {
|
||||
return platformapi.ErrLevelSuccess, nil
|
||||
}
|
||||
if jsonResult1["errno"] == nil {
|
||||
if storeURL2 == "" {
|
||||
if jsonResult1[platformapi.KeyData] == nil {
|
||||
baseapi.SugarLogger.Warnf("ebai AccessStorePage2, jsonResult1:%s", utils.Format4Output(jsonResult1, true))
|
||||
} else {
|
||||
return platformapi.ErrLevelRecoverableErr, fmt.Errorf("%s return not json", subURL)
|
||||
}
|
||||
}
|
||||
}
|
||||
// if jsonResult1["errno"] == nil {
|
||||
// if storeURL2 == "" {
|
||||
// if jsonResult1[platformapi.KeyData] == nil {
|
||||
// baseapi.SugarLogger.Warnf("ebai AccessStorePage2, jsonResult1:%s", utils.Format4Output(jsonResult1, true))
|
||||
// } else {
|
||||
// return platformapi.ErrLevelRecoverableErr, fmt.Errorf("%s return not json", subURL)
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
code := int(utils.MustInterface2Int64(jsonResult1["errno"]))
|
||||
if code == ResponseCodeSuccess || code == ResponseCodeSuccess2 {
|
||||
if subURL == swithShopURL {
|
||||
@@ -1148,3 +1148,330 @@ func (a *API) GetEbaiShopShareInfo() (err error) {
|
||||
}
|
||||
return err
|
||||
}
|
||||
|
||||
type GetMainActivityListResult struct {
|
||||
TemplateName interface{} `json:"templateName"`
|
||||
BeginTimeRun interface{} `json:"beginTimeRun"`
|
||||
EndTimeRun interface{} `json:"endTimeRun"`
|
||||
Weeks interface{} `json:"weeks"`
|
||||
AllowCancel interface{} `json:"allowCancel"`
|
||||
InvestmentType int `json:"investmentType"`
|
||||
ActivityPactName interface{} `json:"activityPactName"`
|
||||
ActivityPactText interface{} `json:"activityPactText"`
|
||||
ActivityPlayRule interface{} `json:"activityPlayRule"`
|
||||
OperationalReviewStartTime interface{} `json:"operationalReviewStartTime"`
|
||||
OperationalReviewEndTime interface{} `json:"operationalReviewEndTime"`
|
||||
SignUpStatus string `json:"signUpStatus"`
|
||||
IsLimit bool `json:"is_limit"`
|
||||
ActivityType string `json:"activity_type"`
|
||||
Weekday interface{} `json:"weekday"`
|
||||
Flag string `json:"flag"`
|
||||
StopStatus int `json:"stop_status"`
|
||||
StopReason string `json:"stop_reason"`
|
||||
CreatedAt int64 `json:"created_at"`
|
||||
SkuCount int `json:"skuCount"`
|
||||
Platform interface{} `json:"platform"`
|
||||
PcActivityImgURL interface{} `json:"pcActivityImgUrl"`
|
||||
AppActivityImgURL interface{} `json:"appActivityImgUrl"`
|
||||
SignUpMinCycleTime interface{} `json:"signUpMinCycleTime"`
|
||||
SignUpMaxCycleTime interface{} `json:"signUpMaxCycleTime"`
|
||||
ReviewRuleID interface{} `json:"reviewRuleId"`
|
||||
ReviewRuleName interface{} `json:"reviewRuleName"`
|
||||
InviteActivityType int `json:"inviteActivityType"`
|
||||
InvestmentTemplate int `json:"investmentTemplate"`
|
||||
InvestmentWay int `json:"investmentWay"`
|
||||
IsOld interface{} `json:"isOld"`
|
||||
CreatedUserID string `json:"createdUserId"`
|
||||
CreatedUserName string `json:"createdUserName"`
|
||||
UpdatedAt string `json:"updatedAt"`
|
||||
IsDelete int `json:"isDelete"`
|
||||
InviteNum int `json:"inviteNum"`
|
||||
AcceptNum int `json:"acceptNum"`
|
||||
WaitApproveNum int `json:"waitApproveNum"`
|
||||
ApproveNum int `json:"approveNum"`
|
||||
GoodsNum int `json:"goodsNum"`
|
||||
IsNewActivity int `json:"isNewActivity"`
|
||||
SubActivityIds []int64 `json:"subActivityIds"`
|
||||
CreatedUserNickName string `json:"createdUserNickName"`
|
||||
TimeMode int `json:"timeMode"`
|
||||
ActivityID int64 `json:"activity_id"`
|
||||
StartTime int64 `json:"start_time"`
|
||||
EndTime int64 `json:"end_time"`
|
||||
Status int `json:"status"`
|
||||
RecruitName string `json:"recruit_name"`
|
||||
RecruitDesc string `json:"recruit_desc"`
|
||||
RecruitStartTime interface{} `json:"recruit_start_time"`
|
||||
RecruitEndTime interface{} `json:"recruit_end_time"`
|
||||
AllowSign bool `json:"allowSign"`
|
||||
Reason string `json:"reason"`
|
||||
}
|
||||
|
||||
//饿百平台流量活动
|
||||
//https://ebai-zs.ele.me/api/activities/main-activity-list?pageSize=20&page=1&supplier_id=2233065879
|
||||
func (a *API) GetMainActivityList(supplierID int) (getMainActivityListResult []*GetMainActivityListResult, err error) {
|
||||
result, err := a.AccessStorePage("api/activities/main-activity-list", "https://ebai-zs.ele.me", map[string]interface{}{
|
||||
"supplier_id": supplierID,
|
||||
"pageSize": 30,
|
||||
"page": 1,
|
||||
}, false)
|
||||
if err == nil {
|
||||
utils.Map2StructByJson(result["data"].(map[string]interface{})["rows"], &getMainActivityListResult, false)
|
||||
}
|
||||
return getMainActivityListResult, err
|
||||
}
|
||||
|
||||
type GetMainActivityDetailResult struct {
|
||||
ID int64 `json:"id"`
|
||||
MainActivityID int64 `json:"mainActivityId"`
|
||||
ActivityID int64 `json:"activityId"`
|
||||
Name string `json:"name"`
|
||||
TemplateID int `json:"templateId"`
|
||||
TemplateName string `json:"templateName"`
|
||||
Description string `json:"description"`
|
||||
BeginTime string `json:"beginTime"`
|
||||
EndTime string `json:"endTime"`
|
||||
BeginTimeRun string `json:"beginTimeRun"`
|
||||
EndTimeRun string `json:"endTimeRun"`
|
||||
Weeks string `json:"weeks"`
|
||||
SigninStartTime string `json:"signinStartTime"`
|
||||
SigninEndTime string `json:"signinEndTime"`
|
||||
AuditStartTime string `json:"auditStartTime"`
|
||||
OperationalReviewStartTime string `json:"operationalReviewStartTime"`
|
||||
AuditEndTime string `json:"auditEndTime"`
|
||||
OperationalReviewEndTime string `json:"operationalReviewEndTime"`
|
||||
WeekRun interface{} `json:"weekRun"`
|
||||
ApplyPlatform int `json:"applyPlatform"`
|
||||
AllowCancel int `json:"allowCancel"`
|
||||
ActivityType int `json:"activityType"`
|
||||
InvestmentType int `json:"investmentType"`
|
||||
Status int `json:"status"`
|
||||
ActivityPactName interface{} `json:"activityPactName"`
|
||||
ActivityPactText interface{} `json:"activityPactText"`
|
||||
ActivityPlayRule interface{} `json:"activityPlayRule"`
|
||||
CreatedAt string `json:"createdAt"`
|
||||
SuspendReason interface{} `json:"suspendReason"`
|
||||
IsOld int `json:"isOld"`
|
||||
InviteActivityType interface{} `json:"inviteActivityType"`
|
||||
InvestmentTemplate int `json:"investmentTemplate"`
|
||||
IsNewActivity int `json:"isNewActivity"`
|
||||
PcActivityImgURL interface{} `json:"pcActivityImgUrl"`
|
||||
AppActivityImgURL interface{} `json:"appActivityImgUrl"`
|
||||
SignUpMinCycleTime interface{} `json:"signUpMinCycleTime"`
|
||||
SignUpMaxCycleTime interface{} `json:"signUpMaxCycleTime"`
|
||||
PlayID int `json:"playId"`
|
||||
PlayName interface{} `json:"playName"`
|
||||
ActivitySignupRecords interface{} `json:"activitySignupRecords"`
|
||||
SignUpShopType int `json:"signUpShopType"`
|
||||
ResponsePlayDataInfoDTO interface{} `json:"responsePlayDataInfoDTO"`
|
||||
}
|
||||
|
||||
//饿百平台流量活动详情
|
||||
//https://ebai-zs.ele.me/api/activities/get-main-activity-detail?id=8134513001
|
||||
func (a *API) GetMainActivityDetail(actID int) (getMainActivityDetailResult []*GetMainActivityDetailResult, err error) {
|
||||
result, err := a.AccessStorePage("api/activities/get-main-activity-detail", "https://ebai-zs.ele.me", map[string]interface{}{
|
||||
"id": actID,
|
||||
}, false)
|
||||
if err == nil {
|
||||
utils.Map2StructByJson(result["data"].(map[string]interface{})["subActivities"], &getMainActivityDetailResult, false)
|
||||
}
|
||||
return getMainActivityDetailResult, err
|
||||
}
|
||||
|
||||
type GetSubActivityDetailResult struct {
|
||||
Activity struct {
|
||||
ID int64 `json:"id"`
|
||||
MainActivityID int64 `json:"mainActivityId"`
|
||||
ActivityID int64 `json:"activityId"`
|
||||
Name string `json:"name"`
|
||||
TemplateID int `json:"templateId"`
|
||||
TemplateName string `json:"templateName"`
|
||||
Description string `json:"description"`
|
||||
BeginTime string `json:"beginTime"`
|
||||
EndTime string `json:"endTime"`
|
||||
BeginTimeRun string `json:"beginTimeRun"`
|
||||
EndTimeRun string `json:"endTimeRun"`
|
||||
Weeks string `json:"weeks"`
|
||||
SigninStartTime string `json:"signinStartTime"`
|
||||
SigninEndTime string `json:"signinEndTime"`
|
||||
AuditStartTime string `json:"auditStartTime"`
|
||||
OperationalReviewStartTime interface{} `json:"operationalReviewStartTime"`
|
||||
AuditEndTime string `json:"auditEndTime"`
|
||||
OperationalReviewEndTime interface{} `json:"operationalReviewEndTime"`
|
||||
WeekRun interface{} `json:"weekRun"`
|
||||
ApplyPlatform int `json:"applyPlatform"`
|
||||
AllowCancel int `json:"allowCancel"`
|
||||
ActivityType int `json:"activityType"`
|
||||
InvestmentType int `json:"investmentType"`
|
||||
Status int `json:"status"`
|
||||
ActivityPactName interface{} `json:"activityPactName"`
|
||||
ActivityPactText interface{} `json:"activityPactText"`
|
||||
ActivityPlayRule interface{} `json:"activityPlayRule"`
|
||||
CreatedAt string `json:"createdAt"`
|
||||
SuspendReason interface{} `json:"suspendReason"`
|
||||
IsOld int `json:"isOld"`
|
||||
InviteActivityType int `json:"inviteActivityType"`
|
||||
InvestmentTemplate int `json:"investmentTemplate"`
|
||||
IsNewActivity int `json:"isNewActivity"`
|
||||
PcActivityImgURL interface{} `json:"pcActivityImgUrl"`
|
||||
AppActivityImgURL interface{} `json:"appActivityImgUrl"`
|
||||
SignUpMinCycleTime interface{} `json:"signUpMinCycleTime"`
|
||||
SignUpMaxCycleTime interface{} `json:"signUpMaxCycleTime"`
|
||||
PlayID int `json:"playId"`
|
||||
PlayName interface{} `json:"playName"`
|
||||
ActivitySignupRecords []struct {
|
||||
ID int `json:"id"`
|
||||
ActivityID int64 `json:"activityId"`
|
||||
BeginTime string `json:"beginTime"`
|
||||
EndTime string `json:"endTime"`
|
||||
SignupStoreCount int `json:"signupStoreCount"`
|
||||
SignupCommodityCount int `json:"signupCommodityCount"`
|
||||
Status int `json:"status"`
|
||||
GatewayActivityID int `json:"gatewayActivityId"`
|
||||
ActivityInfoID int `json:"activityInfoId"`
|
||||
} `json:"activitySignupRecords"`
|
||||
SignUpShopType int `json:"signUpShopType"`
|
||||
ResponsePlayDataInfoDTO interface{} `json:"responsePlayDataInfoDTO"`
|
||||
MarketPlay struct {
|
||||
Model struct {
|
||||
UUID string `json:"uuid"`
|
||||
WorkspaceUUID string `json:"workspaceUuid"`
|
||||
Type string `json:"type"`
|
||||
Name string `json:"name"`
|
||||
Title string `json:"title"`
|
||||
Description string `json:"description"`
|
||||
Code struct {
|
||||
Content string `json:"content"`
|
||||
} `json:"code"`
|
||||
Metas []struct {
|
||||
Name string `json:"name"`
|
||||
Title string `json:"title"`
|
||||
Description string `json:"description"`
|
||||
FieldType int `json:"fieldType"`
|
||||
DataType string `json:"dataType"`
|
||||
EditorType string `json:"editorType"`
|
||||
DefaultValue interface{} `json:"defaultValue"`
|
||||
Props interface{} `json:"props"`
|
||||
Array bool `json:"array"`
|
||||
FieldIndex int `json:"fieldIndex"`
|
||||
Tip interface{} `json:"tip"`
|
||||
Group struct {
|
||||
Name string `json:"name"`
|
||||
Title string `json:"title"`
|
||||
} `json:"group"`
|
||||
Validator struct {
|
||||
ValidatorType string `json:"validatorType"`
|
||||
Expression string `json:"expression"`
|
||||
ValidatorParameters string `json:"validatorParameters"`
|
||||
} `json:"validator"`
|
||||
Items interface{} `json:"items"`
|
||||
SubFields interface{} `json:"subFields"`
|
||||
} `json:"metas"`
|
||||
Fields []struct {
|
||||
Name string `json:"name"`
|
||||
Title string `json:"title"`
|
||||
Description interface{} `json:"description"`
|
||||
FieldType int `json:"fieldType"`
|
||||
DataType string `json:"dataType"`
|
||||
EditorType string `json:"editorType"`
|
||||
DefaultValue string `json:"defaultValue"`
|
||||
Props string `json:"props"`
|
||||
Array bool `json:"array"`
|
||||
FieldIndex interface{} `json:"fieldIndex"`
|
||||
Tip interface{} `json:"tip"`
|
||||
Group struct {
|
||||
Name string `json:"name"`
|
||||
Title string `json:"title"`
|
||||
} `json:"group"`
|
||||
Validator interface{} `json:"validator"`
|
||||
Items interface{} `json:"items"`
|
||||
SubFields interface{} `json:"subFields"`
|
||||
} `json:"fields"`
|
||||
Pipelines []struct {
|
||||
ResourceType string `json:"resourceType"`
|
||||
Name string `json:"name"`
|
||||
Description string `json:"description"`
|
||||
FieldMappings []struct {
|
||||
FieldName string `json:"fieldName"`
|
||||
Expression string `json:"expression"`
|
||||
} `json:"fieldMappings"`
|
||||
} `json:"pipelines"`
|
||||
} `json:"model"`
|
||||
Instance struct {
|
||||
ID int `json:"id"`
|
||||
ComponentType string `json:"componentType"`
|
||||
WorkspaceUUID string `json:"workspaceUuid"`
|
||||
Metas struct {
|
||||
ActivityID string `json:"activityId"`
|
||||
ModelUUID string `json:"_model_uuid_"`
|
||||
} `json:"metas"`
|
||||
Fields struct {
|
||||
Creator string `json:"creator"`
|
||||
DateRange string `json:"dateRange"`
|
||||
UserScope string `json:"userScope"`
|
||||
SaleRule string `json:"saleRule"`
|
||||
Weekday string `json:"weekday"`
|
||||
OutBizContext string `json:"outBizContext"`
|
||||
Name string `json:"name"`
|
||||
ItemDiscountType string `json:"itemDiscountType"`
|
||||
UserLimit string `json:"userLimit"`
|
||||
EffectiveChannel string `json:"effectiveChannel"`
|
||||
Budget string `json:"budget"`
|
||||
TimeRange string `json:"timeRange"`
|
||||
} `json:"fields"`
|
||||
Features struct {
|
||||
} `json:"features"`
|
||||
CreateTime string `json:"createTime"`
|
||||
} `json:"instance"`
|
||||
} `json:"marketPlay"`
|
||||
} `json:"activity"`
|
||||
Rule struct {
|
||||
ID int `json:"id"`
|
||||
ActivityID interface{} `json:"activityId"`
|
||||
SkuID interface{} `json:"skuId"`
|
||||
UpcCode interface{} `json:"upcCode"`
|
||||
UpcSet interface{} `json:"upcSet"`
|
||||
CommodityName interface{} `json:"commodityName"`
|
||||
SkuCatJSON string `json:"skuCatJson"`
|
||||
SkuTitleKeyword interface{} `json:"skuTitleKeyword"`
|
||||
MaxDiscount interface{} `json:"maxDiscount"`
|
||||
MinDiscount interface{} `json:"minDiscount"`
|
||||
MaxOriginalPrice string `json:"maxOriginalPrice"`
|
||||
MinOriginalPrice string `json:"minOriginalPrice"`
|
||||
MaxPresentPrice interface{} `json:"maxPresentPrice"`
|
||||
MinPresentPrice interface{} `json:"minPresentPrice"`
|
||||
CommodityAmount interface{} `json:"commodityAmount"`
|
||||
MaxCommodityAmount int `json:"maxCommodityAmount"`
|
||||
SevenDaysMinValidOrderCnt int `json:"sevenDaysMinValidOrderCnt"`
|
||||
SevenDaysMaxValidOrderCnt int `json:"sevenDaysMaxValidOrderCnt"`
|
||||
ThirtyDaysMinValidOrderCnt int `json:"thirtyDaysMinValidOrderCnt"`
|
||||
ThirtyDaysMaxValidOrderCnt int `json:"thirtyDaysMaxValidOrderCnt"`
|
||||
SevenDaysMinTotalAmt string `json:"sevenDaysMinTotalAmt"`
|
||||
SevenDaysMaxTotalAmt string `json:"sevenDaysMaxTotalAmt"`
|
||||
ThirtyDaysMinTotalAmt string `json:"thirtyDaysMinTotalAmt"`
|
||||
ThirtyDaysMaxTotalAmt string `json:"thirtyDaysMaxTotalAmt"`
|
||||
SevenDaysMinPrice int `json:"sevenDaysMinPrice"`
|
||||
FifteenDaysMinPrice int `json:"fifteenDaysMinPrice"`
|
||||
Type interface{} `json:"type"`
|
||||
MinCommodityStocks int `json:"minCommodityStocks"`
|
||||
MaxCommodityStocks int `json:"maxCommodityStocks"`
|
||||
SkuCategorySource int `json:"skuCategorySource"`
|
||||
} `json:"rule"`
|
||||
Status struct {
|
||||
Value string `json:"value"`
|
||||
Reason string `json:"reason"`
|
||||
} `json:"status"`
|
||||
CityAgentAllow bool `json:"cityAgentAllow"`
|
||||
UploadedBefore bool `json:"uploadedBefore"`
|
||||
}
|
||||
|
||||
//饿百平台流量活动详情
|
||||
//https://ebai-zs.ele.me/api/activities/get-sub-activity-detail?id=6134599001&isMobile=0
|
||||
func (a *API) GetSubActivityDetail(actID int) (getSubActivityDetailResult *GetSubActivityDetailResult, err error) {
|
||||
result, err := a.AccessStorePage("api/activities/get-sub-activity-detail", "https://ebai-zs.ele.me", map[string]interface{}{
|
||||
"id": actID,
|
||||
}, false)
|
||||
if err == nil {
|
||||
utils.Map2StructByJson(result["data"].(map[string]interface{}), &getSubActivityDetailResult, false)
|
||||
}
|
||||
return getSubActivityDetailResult, err
|
||||
}
|
||||
|
||||
@@ -201,3 +201,27 @@ func TestGetEbaiShopShareInfo(t *testing.T) {
|
||||
}
|
||||
// t.Log(utils.Format4Output(result, false))
|
||||
}
|
||||
|
||||
func TestGetMainActivityList(t *testing.T) {
|
||||
result, err := api.GetMainActivityList(2233065879)
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
t.Log(utils.Format4Output(result, false))
|
||||
}
|
||||
|
||||
func TestGetMainActivityDetail(t *testing.T) {
|
||||
result, err := api.GetMainActivityDetail(8134513001)
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
t.Log(utils.Format4Output(result, false))
|
||||
}
|
||||
|
||||
func TestGetSubActivityDetail(t *testing.T) {
|
||||
result, err := api.GetSubActivityDetail(6134599001)
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
t.Log(utils.Format4Output(result, false))
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user