aa
This commit is contained in:
@@ -76,13 +76,35 @@ func (a *API) AccessStorePage(fullURL string, bizParams map[string]interface{},
|
|||||||
return retVal, err
|
return retVal, err
|
||||||
}
|
}
|
||||||
|
|
||||||
func (a *API) ListActivitys() (result map[string]interface{}, err error) {
|
type ListActivitysResult struct {
|
||||||
result, err = a.AccessStorePage("https://api.m.jd.com/api", map[string]interface{}{
|
Activityenddate string `json:"activityEndDate"`
|
||||||
|
Activityid int `json:"activityId"`
|
||||||
|
Activityname string `json:"activityName"`
|
||||||
|
Activitystartdate string `json:"activityStartDate"`
|
||||||
|
Activitystatus int `json:"activityStatus"`
|
||||||
|
Activitystatusstr string `json:"activityStatusStr"`
|
||||||
|
Activitytypeid int `json:"activityTypeId"`
|
||||||
|
Activitytypename string `json:"activityTypeName"`
|
||||||
|
Bonusstatement int `json:"bonusStatement"`
|
||||||
|
Businesstype int `json:"businessType"`
|
||||||
|
Imageurl string `json:"imageUrl"`
|
||||||
|
Paystatus int `json:"payStatus"`
|
||||||
|
Pcdescurl string `json:"pcDescUrl"`
|
||||||
|
Plantype int `json:"planType"`
|
||||||
|
Remark string `json:"remark"`
|
||||||
|
Reporttype int `json:"reportType"`
|
||||||
|
}
|
||||||
|
|
||||||
|
func (a *API) ListActivitys() (listActivitysResult []*ListActivitysResult, err error) {
|
||||||
|
result, err := a.AccessStorePage("https://api.m.jd.com/api", map[string]interface{}{
|
||||||
"functionId": "listActivitys",
|
"functionId": "listActivitys",
|
||||||
"appid": "unionpc",
|
"appid": "unionpc",
|
||||||
"_": time.Now().UnixNano(),
|
"_": time.Now().UnixNano(),
|
||||||
"loginType": 3,
|
"loginType": 3,
|
||||||
"body": "{\"funName\":\"listActivitys\",\"param\":{\"activityStatus\":\"3\"},\"page\":{\"pageNo\":1,\"pageSize\":20}}",
|
"body": "{\"funName\":\"listActivitys\",\"param\":{\"activityStatus\":\"3\"},\"page\":{\"pageNo\":1,\"pageSize\":20}}",
|
||||||
}, false)
|
}, false)
|
||||||
return result, err
|
if err == nil {
|
||||||
|
utils.Map2StructByJson(result["result"], &listActivitysResult, false)
|
||||||
|
}
|
||||||
|
return listActivitysResult, err
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user