tb
This commit is contained in:
@@ -108,3 +108,14 @@ func (a *API) ListActivitys() (listActivitysResult []*ListActivitysResult, err e
|
||||
}
|
||||
return listActivitysResult, err
|
||||
}
|
||||
|
||||
func (a *API) UnionPromotion(PID string) (err error) {
|
||||
_, err = a.AccessStorePage("https://api.m.jd.com/api", map[string]interface{}{
|
||||
"functionId": "unionPromotion",
|
||||
"appid": "u",
|
||||
"_": time.Now().UnixNano(),
|
||||
"loginType": 3,
|
||||
"body": "{\"funName\":\"savePromotionSite\",\"param\":{\"siteId\":4100279071,\"spaceName\":" + PID + ",\"type\":3,\"unionType\":1}}",
|
||||
}, false)
|
||||
return err
|
||||
}
|
||||
|
||||
@@ -30,3 +30,11 @@ func TestListActivitys(t *testing.T) {
|
||||
}
|
||||
t.Log(utils.Format4Output(result, false))
|
||||
}
|
||||
|
||||
func TestUnionPromotion(t *testing.T) {
|
||||
err := api.UnionPromotion("18160030913903")
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
//t.Log(utils.Format4Output(result, false))
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user